From: Chris Wilson <chris.p.wilson(a)intel.com>
mainline inclusion
from mainline-v6.2-rc1
commit 78a033433a5ae4fee85511ee075bc9a48312c79e
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IALIK8
CVE: CVE-2022-48893
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
If we abort driver initialisation in the middle of gt/engine discovery,
some engines will be fully setup and some not. Those incompletely setup
engines only have 'engine->release == NULL' and so will leak any of the
common objects allocated.
v2:
- Drop the destroy_pinned_context() helper for now. It's not really
worth it with just a single callsite at the moment. (Janusz)
Signed-off-by: Chris Wilson <chris.p.wilson(a)intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper(a)intel.com>
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-2-matt…
Signed-off-by: Yu Liao <liaoyu15(a)huawei.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c940ac3aae2f..5bec331c0813 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -905,8 +905,13 @@ int intel_engines_init(struct intel_gt *gt)
return err;
err = setup(engine);
- if (err)
+ if (err) {
+ intel_engine_cleanup_common(engine);
return err;
+ }
+
+ /* The backend should now be responsible for cleanup */
+ GEM_BUG_ON(engine->release == NULL);
err = engine_init_common(engine);
if (err)
--
2.33.0
From: Chris Wilson <chris.p.wilson(a)intel.com>
mainline inclusion
from mainline-v6.2-rc1
commit 78a033433a5ae4fee85511ee075bc9a48312c79e
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IALIK8
CVE: CVE-2022-48893
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
If we abort driver initialisation in the middle of gt/engine discovery,
some engines will be fully setup and some not. Those incompletely setup
engines only have 'engine->release == NULL' and so will leak any of the
common objects allocated.
v2:
- Drop the destroy_pinned_context() helper for now. It's not really
worth it with just a single callsite at the moment. (Janusz)
Signed-off-by: Chris Wilson <chris.p.wilson(a)intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper(a)intel.com>
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-2-matt…
Signed-off-by: Yu Liao <liaoyu15(a)huawei.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c940ac3aae2f..5bec331c0813 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -905,8 +905,13 @@ int intel_engines_init(struct intel_gt *gt)
return err;
err = setup(engine);
- if (err)
+ if (err) {
+ intel_engine_cleanup_common(engine);
return err;
+ }
+
+ /* The backend should now be responsible for cleanup */
+ GEM_BUG_ON(engine->release == NULL);
err = engine_init_common(engine);
if (err)
--
2.33.0
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 313516d1ae36cc86a40f2b86642bc1bfec17f74e
commit: 11b558f5b0628f4701672b6778c068362ef329a7 [4507/30000] arm64: smccc: Support SMCCC v1.3 SVE register saving hint
config: arm64-randconfig-001-20241009 (https://download.01.org/0day-ci/archive/20241009/202410090839.I1WLy52U-lkp@…)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 70e0a7e7e6a8541bcc46908c592eed561850e416)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241009/202410090839.I1WLy52U-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410090839.I1WLy52U-lkp@intel.com/
All errors (new ones prefixed by >>):
| ^
include/linux/arm-smccc.h:365:33: note: expanded from macro '__arm_smccc_1_1'
365 | register unsigned long r1 asm("r1"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r2' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:366:33: note: expanded from macro '__arm_smccc_1_1'
366 | register unsigned long r2 asm("r2"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r3' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:367:33: note: expanded from macro '__arm_smccc_1_1'
367 | register unsigned long r3 asm("r3"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r0' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:368:3: note: expanded from macro '__arm_smccc_1_1'
368 | __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/arm-smccc.h:349:37: note: expanded from macro '___declare_args'
349 | #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
| ^
<scratch space>:25:1: note: expanded from here
25 | __declare_arg_0
| ^
include/linux/arm-smccc.h:303:34: note: expanded from macro '__declare_arg_0'
303 | register unsigned long arg0 asm("r0") = (u32)a0
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
>> arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'x16' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:372:9: note: expanded from macro '__arm_smccc_1_1'
372 | __constraints(__count_args(__VA_ARGS__))); \
| ^
include/linux/arm-smccc.h:355:30: note: expanded from macro '__constraints'
355 | #define __constraints(count) ___constraints(count)
| ^
include/linux/arm-smccc.h:354:4: note: expanded from macro '___constraints'
354 | : smccc_sve_clobbers "memory"
| ^
include/linux/arm-smccc.h:278:28: note: expanded from macro 'smccc_sve_clobbers'
278 | #define smccc_sve_clobbers "x16", "x30", "cc",
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r0' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:364:33: note: expanded from macro '__arm_smccc_1_1'
364 | register unsigned long r0 asm("r0"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r1' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:365:33: note: expanded from macro '__arm_smccc_1_1'
365 | register unsigned long r1 asm("r1"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r2' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:366:33: note: expanded from macro '__arm_smccc_1_1'
366 | register unsigned long r2 asm("r2"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r3' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:367:33: note: expanded from macro '__arm_smccc_1_1'
367 | register unsigned long r3 asm("r3"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r0' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:368:3: note: expanded from macro '__arm_smccc_1_1'
368 | __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/arm-smccc.h:349:37: note: expanded from macro '___declare_args'
349 | #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
| ^
<scratch space>:33:1: note: expanded from here
33 | __declare_arg_0
| ^
include/linux/arm-smccc.h:303:34: note: expanded from macro '__declare_arg_0'
303 | register unsigned long arg0 asm("r0") = (u32)a0
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
>> arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'x16' in asm
include/linux/arm-smccc.h:444:4: note: expanded from macro 'arm_smccc_1_1_invoke'
444 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:391:32: note: expanded from macro 'arm_smccc_1_1_smc'
391 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:372:9: note: expanded from macro '__arm_smccc_1_1'
372 | __constraints(__count_args(__VA_ARGS__))); \
| ^
include/linux/arm-smccc.h:355:30: note: expanded from macro '__constraints'
355 | #define __constraints(count) ___constraints(count)
| ^
include/linux/arm-smccc.h:354:4: note: expanded from macro '___constraints'
354 | : smccc_sve_clobbers "memory"
| ^
include/linux/arm-smccc.h:278:28: note: expanded from macro 'smccc_sve_clobbers'
278 | #define smccc_sve_clobbers "x16", "x30", "cc",
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'r0' in asm
include/linux/arm-smccc.h:447:4: note: expanded from macro 'arm_smccc_1_1_invoke'
447 | __fail_smccc_1_1(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:416:3: note: expanded from macro '__fail_smccc_1_1'
416 | __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
| ^
include/linux/arm-smccc.h:350:37: note: expanded from macro '__declare_args'
350 | #define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:349:37: note: expanded from macro '___declare_args'
349 | #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
| ^
<scratch space>:41:1: note: expanded from here
41 | __declare_arg_0
| ^
include/linux/arm-smccc.h:303:34: note: expanded from macro '__declare_arg_0'
303 | register unsigned long arg0 asm("r0") = (u32)a0
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
>> arch/arm64/include/asm/archrandom.h:20:2: error: unknown register name 'x16' in asm
include/linux/arm-smccc.h:447:4: note: expanded from macro 'arm_smccc_1_1_invoke'
447 | __fail_smccc_1_1(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:417:13: note: expanded from macro '__fail_smccc_1_1'
417 | asm ("" : __constraints(__count_args(__VA_ARGS__))); \
| ^
include/linux/arm-smccc.h:355:30: note: expanded from macro '__constraints'
355 | #define __constraints(count) ___constraints(count)
| ^
include/linux/arm-smccc.h:354:4: note: expanded from macro '___constraints'
354 | : smccc_sve_clobbers "memory"
| ^
include/linux/arm-smccc.h:278:28: note: expanded from macro 'smccc_sve_clobbers'
278 | #define smccc_sve_clobbers "x16", "x30", "cc",
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:66:3: error: unknown register name 'r0' in asm
66 | arm_smccc_1_1_invoke(ARM_SMCCC_TRNG_RND64, 64, &res);
| ^
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:364:33: note: expanded from macro '__arm_smccc_1_1'
364 | register unsigned long r0 asm("r0"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:66:3: error: unknown register name 'r1' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:365:33: note: expanded from macro '__arm_smccc_1_1'
365 | register unsigned long r1 asm("r1"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
In file included from arch/arm64/include/asm/processor.h:45:
In file included from arch/arm64/include/asm/pointer_auth.h:6:
In file included from include/linux/random.h:121:
arch/arm64/include/asm/archrandom.h:66:3: error: unknown register name 'r2' in asm
include/linux/arm-smccc.h:441:4: note: expanded from macro 'arm_smccc_1_1_invoke'
441 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:407:32: note: expanded from macro 'arm_smccc_1_1_hvc'
407 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:366:33: note: expanded from macro '__arm_smccc_1_1'
366 | register unsigned long r2 asm("r2"); \
| ^
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:21:
In file included from include/linux/sysfs.h:17:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/mutex.h:19:
vim +/x16 +20 arch/arm64/include/asm/archrandom.h
78d8f4f7a298a5 Andre Przywara 2022-01-17 15
181f11fd395b9e Andre Przywara 2022-01-17 16 static inline bool __init smccc_probe_trng(void)
181f11fd395b9e Andre Przywara 2022-01-17 17 {
78d8f4f7a298a5 Andre Przywara 2022-01-17 18 struct arm_smccc_res res;
78d8f4f7a298a5 Andre Przywara 2022-01-17 19
78d8f4f7a298a5 Andre Przywara 2022-01-17 @20 arm_smccc_1_1_invoke(ARM_SMCCC_TRNG_VERSION, &res);
78d8f4f7a298a5 Andre Przywara 2022-01-17 21 if ((s32)res.a0 < 0)
181f11fd395b9e Andre Przywara 2022-01-17 22 return false;
78d8f4f7a298a5 Andre Przywara 2022-01-17 23
78d8f4f7a298a5 Andre Przywara 2022-01-17 24 return res.a0 >= ARM_SMCCC_TRNG_MIN_VERSION;
181f11fd395b9e Andre Przywara 2022-01-17 25 }
181f11fd395b9e Andre Przywara 2022-01-17 26
:::::: The code at line 20 was first introduced by commit
:::::: 78d8f4f7a298a5d259b2163121ea20b9e60e93f7 arm64: Add support for SMCCC TRNG entropy source
:::::: TO: Andre Przywara <andre.przywara(a)arm.com>
:::::: CC: Zheng Zengkai <zhengzengkai(a)huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki