Hi Mark,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 1b6ac823ff98dd4dbd1b6bff478a1b9b44855f67
commit: 68da302c8ae30331c8917f1dc7b0f1682f696d71 [22035/30000] arm64/sve: Put system wide vector length information into structs
config: arm64-randconfig-002-20240915 (https://download.01.org/0day-ci/archive/20240915/202409150529.mcKQAqhK-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240915/202409150529.mcKQAqhK-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/202409150529.mcKQAqhK-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/arm64/kvm/reset.c: In function 'kvm_arm_init_sve':
>> arch/arm64/kvm/reset.c:102:34: error: implicit declaration of function 'sve_max_virtualisable_vl' [-Werror=implicit-function-declaration]
102 | kvm_sve_max_vl = sve_max_virtualisable_vl();
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/sve_max_virtualisable_vl +102 arch/arm64/kvm/reset.c
98
99 int kvm_arm_init_sve(void)
100 {
101 if (system_supports_sve()) {
> 102 kvm_sve_max_vl = sve_max_virtualisable_vl();
103
104 /*
105 * The get_sve_reg()/set_sve_reg() ioctl interface will need
106 * to be extended with multiple register slice support in
107 * order to support vector lengths greater than
108 * SVE_VL_ARCH_MAX:
109 */
110 if (WARN_ON(kvm_sve_max_vl > SVE_VL_ARCH_MAX))
111 kvm_sve_max_vl = SVE_VL_ARCH_MAX;
112
113 /*
114 * Don't even try to make use of vector lengths that
115 * aren't available on all CPUs, for now:
116 */
117 if (kvm_sve_max_vl < sve_max_vl())
118 pr_warn("KVM: SVE vector length for guests limited to %u bytes\n",
119 kvm_sve_max_vl);
120 }
121
122 return 0;
123 }
124
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 37aeb7e817053fbf532b214aa02858b3c23af0b1
commit: 27dd57ae7b305c8c1bcf55eab82c45d85b605149 [20076/23714] x86/cpu: Load microcode during restore_processor_state()
config: x86_64-buildonly-randconfig-001-20240913 (https://download.01.org/0day-ci/archive/20240915/202409150309.lli3IYFh-lkp@…)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240915/202409150309.lli3IYFh-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/202409150309.lli3IYFh-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/power/cpu.c:27:
In file included from arch/x86/include/asm/mmu_context.h:12:
In file included from arch/x86/include/asm/pgalloc.h:7:
include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict]
425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
arch/x86/power/cpu.c:78: warning: Function parameter or member 'ctxt' not described in '__save_processor_state'
arch/x86/power/cpu.c:200: warning: Function parameter or member 'ctxt' not described in '__restore_processor_state'
>> arch/x86/power/.tmp_cpu.o: warning: objtool: missing symbol for section .exit.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 1910604f7315d411c0c10359055daddee968441f
commit: d91c6db8ca896824da23aab69dde9ce289222299 [2153/13948] cpuinspect: add CPU-inspect infrastructure
config: loongarch-randconfig-r133-20240913 (https://download.01.org/0day-ci/archive/20240914/202409141939.mPFkQsG4-lkp@…)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240914/202409141939.mPFkQsG4-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/202409141939.mPFkQsG4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/cpuinspect/sysfs.c:92:9: sparse: sparse: symbol 'patrol_complete_show' was not declared. Should it be static?
>> drivers/cpuinspect/sysfs.c:98:9: sparse: sparse: symbol 'cpu_utility_show' was not declared. Should it be static?
>> drivers/cpuinspect/sysfs.c:104:9: sparse: sparse: symbol 'cpu_utility_store' was not declared. Should it be static?
>> drivers/cpuinspect/sysfs.c:117:9: sparse: sparse: symbol 'patrol_times_show' was not declared. Should it be static?
>> drivers/cpuinspect/sysfs.c:123:9: sparse: sparse: symbol 'patrol_times_store' was not declared. Should it be static?
>> drivers/cpuinspect/sysfs.c:139:9: sparse: sparse: symbol 'start_patrol_store' was not declared. Should it be static?
--
>> drivers/cpuinspect/inspector.c:34:22: sparse: sparse: symbol 'prev_cpu_inspector' was not declared. Should it be static?
drivers/cpuinspect/inspector.c: note: in included file (through include/linux/rculist.h, include/linux/pid.h, include/linux/sched.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +/patrol_complete_show +92 drivers/cpuinspect/sysfs.c
91
> 92 ssize_t patrol_complete_show(struct device *dev, struct device_attribute *attr,
93 char *buf)
94 {
95 return sprintf(buf, "%d\n", !ci_core.inspect_on);
96 }
97
> 98 ssize_t cpu_utility_show(struct device *dev, struct device_attribute *attr,
99 char *buf)
100 {
101 return sprintf(buf, "%u\n", ci_core.cpu_utility);
102 }
103
> 104 ssize_t cpu_utility_store(struct device *dev, struct device_attribute *attr,
105 const char *buf, size_t size)
106 {
107 unsigned int cpu_util;
108
109 if (kstrtouint(buf, 10, &cpu_util) || cpu_util < 1 || cpu_util > 100)
110 return -EINVAL;
111
112 ci_core.cpu_utility = cpu_util;
113
114 return size;
115 }
116
> 117 ssize_t patrol_times_show(struct device *dev, struct device_attribute *attr,
118 char *buf)
119 {
120 return sprintf(buf, "%lu\n", ci_core.inspect_times);
121 }
122
> 123 ssize_t patrol_times_store(struct device *dev, struct device_attribute *attr,
124 const char *buf, size_t size)
125 {
126 /*
127 * It is not allowed to modify patrol times during the CPU
128 * inspection operation.
129 */
130 if (ci_core.inspect_on)
131 return -EBUSY;
132
133 if (kstrtoul(buf, 10, &ci_core.inspect_times))
134 return -EINVAL;
135
136 return size;
137 }
138
> 139 ssize_t start_patrol_store(struct device *dev, struct device_attribute *attr,
140 const char *buf, size_t size)
141 {
142 bool start_patrol = false;
143
144 if (strtobool(buf, &start_patrol) < 0)
145 return -EINVAL;
146
147 if (!mutex_trylock(&cpuinspect_lock))
148 return -EBUSY;
149
150 /*
151 * It is not allowed to start the inspection again during the
152 * inspection process.
153 */
154 if (start_patrol && (int) start_patrol == ci_core.inspect_on) {
155 mutex_unlock(&cpuinspect_lock);
156 return -EBUSY;
157 }
158
159 if (start_patrol == 0)
160 stop_inspect_threads();
161 else if (curr_cpu_inspector)
162 start_inspect_threads();
163
164 mutex_unlock(&cpuinspect_lock);
165 return size;
166 }
167
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Nick,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 37aeb7e817053fbf532b214aa02858b3c23af0b1
commit: b8ba22a604e4d0a3ad8e23af22f432e12b6f1a65 [17239/23714] nvme: fix compat address handling in several ioctls
config: arm64-randconfig-003-20240913 (https://download.01.org/0day-ci/archive/20240914/202409141821.nKd5ypu2-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409141821.nKd5ypu2-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/202409141821.nKd5ypu2-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/nvme/host/core.c: In function 'nvme_to_user_ptr':
>> drivers/nvme/host/core.c:1163:27: error: 'compat_uptr_t' undeclared (first use in this function); did you mean 'compat_time_t'?
1163 | ptrval = (compat_uptr_t)ptrval;
| ^~~~~~~~~~~~~
| compat_time_t
drivers/nvme/host/core.c:1163:27: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/nvme/host/core.c:1163:41: error: expected ';' before 'ptrval'
1163 | ptrval = (compat_uptr_t)ptrval;
| ^~~~~~
| ;
vim +1163 drivers/nvme/host/core.c
1154
1155 /*
1156 * Convert integer values from ioctl structures to user pointers, silently
1157 * ignoring the upper bits in the compat case to match behaviour of 32-bit
1158 * kernels.
1159 */
1160 static void __user *nvme_to_user_ptr(uintptr_t ptrval)
1161 {
1162 if (in_compat_syscall())
> 1163 ptrval = (compat_uptr_t)ptrval;
1164 return (void __user *)ptrval;
1165 }
1166
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
From: Michal Koutný <mkoutny(a)suse.com>
mainline inclusion
from mainline-v6.3-rc4
commit a3f547addcaa10df5a226526bc9e2d9a94542344
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IARGQX
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
The commit 97e3d26b5e5f ("x86/mm: Randomize per-cpu entry area") fixed
an omission of KASLR on CPU entry areas. It doesn't take into account
KASLR switches though, which may result in unintended non-determinism
when a user wants to avoid it (e.g. debugging, benchmarking).
Generate only a single combination of CPU entry areas offsets -- the
linear array that existed prior randomization when KASLR is turned off.
Since we have 3f148f331814 ("x86/kasan: Map shadow for percpu pages on
demand") and followups, we can use the more relaxed guard
kasrl_enabled() (in contrast to kaslr_memory_enabled()).
Fixes: 97e3d26b5e5f ("x86/mm: Randomize per-cpu entry area")
Signed-off-by: Michal Koutný <mkoutny(a)suse.com>
Signed-off-by: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/all/20230306193144.24605-1-mkoutny%40suse.com
Signed-off-by: Kaixiong Yu <yukaixiong(a)huawei.com>
---
arch/x86/mm/cpu_entry_area.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index 88e2cc4d4e75..7ae8a9d836b4 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -11,6 +11,7 @@
#include <asm/fixmap.h>
#include <asm/desc.h>
#include <asm/kasan.h>
+#include <asm/setup.h>
static DEFINE_PER_CPU_PAGE_ALIGNED(struct entry_stack_page, entry_stack_storage);
@@ -30,6 +31,12 @@ static __init void init_cea_offsets(void)
unsigned int max_cea;
unsigned int i, j;
+ if (!kaslr_enabled()) {
+ for_each_possible_cpu(i)
+ per_cpu(_cea_offset, i) = i;
+ return;
+ }
+
max_cea = (CPU_ENTRY_AREA_MAP_SIZE - PAGE_SIZE) / CPU_ENTRY_AREA_SIZE;
/* O(sodding terrible) */
--
2.34.1