[morse:mpam/snapshot/v5.15 90/139] include/linux/cacheinfo.h:115:10: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.15
head: ce3629841262f725a5f3a327403fcaf0e604a85e
commit: 7cfc8ff4c2167d8b7da45a3a5f7f7f98de31bcde [90/139] cacheinfo: Allow for >32-bit cache 'id'
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?i...
git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
git fetch --no-tags morse mpam/snapshot/v5.15
git checkout 7cfc8ff4c2167d8b7da45a3a5f7f7f98de31bcde
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/base/cacheinfo.c:12:
include/linux/cacheinfo.h: In function 'get_cpu_cacheinfo_id':
>> include/linux/cacheinfo.h:115:10: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
115 | return ~0ULL;
| ^
include/linux/cacheinfo.h:121:11: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
121 | return ~0ULL;
| ^
include/linux/cacheinfo.h:125:9: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
125 | return ~0ULL;
| ^
vim +115 include/linux/cacheinfo.h
104
105 /*
106 * Get the id of the cache associated with @cpu at level @level.
107 * cpuhp lock must be held.
108 */
109 static inline unsigned long get_cpu_cacheinfo_id(int cpu, int level)
110 {
111 struct cpu_cacheinfo *ci = get_cpu_cacheinfo(cpu);
112 int i;
113
114 if (!ci->info_list)
> 115 return ~0ULL;
116
117 for (i = 0; i < ci->num_leaves; i++) {
118 if (ci->info_list[i].level == level) {
119 if (ci->info_list[i].attributes & CACHE_ID)
120 return ci->info_list[i].id;
121 return ~0ULL;
122 }
123 }
124
125 return ~0ULL;
126 }
127
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:5.10-2.1.x-imx 11426/15242] drivers/firmware/imx/s400-api.c:161:16: warning: no previous prototype for 'imx_soc_device_register'
by kernel test robot
Hi Alice,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.10-2.1.x-imx
head: 3b81a70be1099d44fdafaa6766bf75a2bd9e297e
commit: 3bc399ee42d1bb2c1d442bb524711eda588f13ca [11426/15242] MLK-25423-2 firmware: imx: register i.MX8ULP SoC device
config: parisc-randconfig-r036-20211004 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/3bc399ee42d1bb2c1d442bb524...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.10-2.1.x-imx
git checkout 3bc399ee42d1bb2c1d442bb524711eda588f13ca
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/firmware/imx/s400-api.c:161:16: warning: no previous prototype for 'imx_soc_device_register' [-Wmissing-prototypes]
161 | struct device *imx_soc_device_register(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/imx_soc_device_register +161 drivers/firmware/imx/s400-api.c
160
> 161 struct device *imx_soc_device_register(void)
162 {
163 struct soc_device_attribute *attr;
164 struct soc_device *dev;
165 u32 v[4];
166 int err;
167
168 s400_api_export->tx_msg.header = 0x17970206;
169 s400_api_export->tx_msg.data[0] = 0x1;
170 err = imx_s400_api_call(s400_api_export, v);
171 if (err)
172 return NULL;
173
174 attr = kzalloc(sizeof(*attr), GFP_KERNEL);
175 if (!attr)
176 return NULL;
177
178 attr->family = kasprintf(GFP_KERNEL, "Freescale i.MX");
179 attr->revision = kasprintf(GFP_KERNEL, "unknown");
180 attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", (u64)v[3] << 32 | v[0]);
181 attr->soc_id = kasprintf(GFP_KERNEL, "i.MX8ULP");
182
183 dev = soc_device_register(attr);
184 if (IS_ERR(dev)) {
185 kfree(attr->soc_id);
186 kfree(attr->serial_number);
187 kfree(attr->revision);
188 kfree(attr->family);
189 kfree(attr);
190 return ERR_CAST(dev);
191 }
192
193 return soc_device_to_device(dev);
194 }
195
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
block/blk-mq.c:324:26: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 128459062bc994355027e190477c432ec5b5638a block: cache rq_flags inside blk_mq_rq_ctx_init()
date: 4 weeks ago
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 128459062bc994355027e190477c432ec5b5638a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> block/blk-mq.c:324:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int rq_flags @@ got restricted req_flags_t [usertype] @@
block/blk-mq.c:324:26: sparse: expected unsigned int rq_flags
block/blk-mq.c:324:26: sparse: got restricted req_flags_t [usertype]
>> block/blk-mq.c:333:26: sparse: sparse: invalid assignment: |=
>> block/blk-mq.c:333:26: sparse: left side has type unsigned int
>> block/blk-mq.c:333:26: sparse: right side has type restricted req_flags_t
block/blk-mq.c:335:26: sparse: sparse: invalid assignment: |=
block/blk-mq.c:335:26: sparse: left side has type unsigned int
block/blk-mq.c:335:26: sparse: right side has type restricted req_flags_t
>> block/blk-mq.c:336:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted req_flags_t [usertype] rq_flags @@ got unsigned int rq_flags @@
block/blk-mq.c:336:22: sparse: expected restricted req_flags_t [usertype] rq_flags
block/blk-mq.c:336:22: sparse: got unsigned int rq_flags
vim +324 block/blk-mq.c
311
312 static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
313 unsigned int tag, u64 alloc_time_ns)
314 {
315 struct blk_mq_ctx *ctx = data->ctx;
316 struct blk_mq_hw_ctx *hctx = data->hctx;
317 struct request_queue *q = data->q;
318 struct elevator_queue *e = q->elevator;
319 struct blk_mq_tags *tags = blk_mq_tags_from_data(data);
320 struct request *rq = tags->static_rqs[tag];
321 unsigned int rq_flags = 0;
322
323 if (e) {
> 324 rq_flags = RQF_ELV;
325 rq->tag = BLK_MQ_NO_TAG;
326 rq->internal_tag = tag;
327 } else {
328 rq->tag = tag;
329 rq->internal_tag = BLK_MQ_NO_TAG;
330 }
331
332 if (data->flags & BLK_MQ_REQ_PM)
> 333 rq_flags |= RQF_PM;
334 if (blk_queue_io_stat(q))
335 rq_flags |= RQF_IO_STAT;
> 336 rq->rq_flags = rq_flags;
337
338 if (blk_mq_need_time_stamp(rq))
339 rq->start_time_ns = ktime_get_ns();
340 else
341 rq->start_time_ns = 0;
342 /* csd/requeue_work/fifo_time is initialized before use */
343 rq->q = q;
344 rq->mq_ctx = ctx;
345 rq->mq_hctx = hctx;
346 rq->cmd_flags = data->cmd_flags;
347 rq->rq_disk = NULL;
348 rq->part = NULL;
349 #ifdef CONFIG_BLK_RQ_ALLOC_TIME
350 rq->alloc_time_ns = alloc_time_ns;
351 #endif
352 rq->io_start_time_ns = 0;
353 rq->stats_sectors = 0;
354 rq->nr_phys_segments = 0;
355 #if defined(CONFIG_BLK_DEV_INTEGRITY)
356 rq->nr_integrity_segments = 0;
357 #endif
358 rq->timeout = 0;
359 rq->end_io = NULL;
360 rq->end_io_data = NULL;
361
362 data->ctx->rq_dispatched[op_is_sync(data->cmd_flags)]++;
363 blk_crypto_rq_set_defaults(rq);
364 INIT_LIST_HEAD(&rq->queuelist);
365 /* tag was already set */
366 WRITE_ONCE(rq->deadline, 0);
367 refcount_set(&rq->ref, 1);
368
369 if (rq->rq_flags & RQF_ELV) {
370 struct elevator_queue *e = data->q->elevator;
371
372 rq->elv.icq = NULL;
373 INIT_HLIST_NODE(&rq->hash);
374 RB_CLEAR_NODE(&rq->rb_node);
375
376 if (!op_is_flush(data->cmd_flags) &&
377 e->type->ops.prepare_request) {
378 if (e->type->icq_cache)
379 blk_mq_sched_assign_ioc(rq);
380
381 e->type->ops.prepare_request(rq);
382 rq->rq_flags |= RQF_ELVPRIV;
383 }
384 }
385
386 data->hctx->queued++;
387 return rq;
388 }
389
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:5.10-2.1.x-imx 11267/15242] clk-composite-8m.c:undefined reference to `imx_src_is_m4_enabled'
by kernel test robot
Hi Robin,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.10-2.1.x-imx
head: 3b81a70be1099d44fdafaa6766bf75a2bd9e297e
commit: 94edc79e7319431d303ba9f150381f40b9cd636b [11267/15242] LF-4103: firmware: imx: svc: misc: fix build error
config: nios2-randconfig-r005-20211004 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/94edc79e7319431d303ba9f150...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.10-2.1.x-imx
git checkout 94edc79e7319431d303ba9f150381f40b9cd636b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
nios2-linux-ld: drivers/clk/imx/clk-composite-8m.o: in function `imx8m_clk_hw_composite_flags':
>> clk-composite-8m.c:(.text+0x430): undefined reference to `imx_src_is_m4_enabled'
clk-composite-8m.c:(.text+0x430): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-gate2.o: in function `clk_gate2_do_shared_clks':
>> clk-gate2.c:(.text+0x84): undefined reference to `imx_src_is_m4_enabled'
clk-gate2.c:(.text+0x84): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-pfd.o: in function `clk_pfd_enable':
>> clk-pfd.c:(.text+0x38): undefined reference to `imx_src_is_m4_enabled'
clk-pfd.c:(.text+0x38): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-pfd.o: in function `clk_pfd_disable':
clk-pfd.c:(.text+0x98): undefined reference to `imx_src_is_m4_enabled'
clk-pfd.c:(.text+0x98): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-pllv3.o: in function `clk_pllv3_wait_lock':
>> clk-pllv3.c:(.text+0x184): undefined reference to `imx_src_is_m4_enabled'
clk-pllv3.c:(.text+0x184): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-pllv3.o:clk-pllv3.c:(.text+0x3d0): more undefined references to `imx_src_is_m4_enabled' follow
drivers/clk/imx/clk-pllv3.o: in function `clk_pllv3_do_shared_clks':
clk-pllv3.c:(.text+0x3d0): relocation truncated to fit: R_NIOS2_CALL26 against `imx_src_is_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-imx8mm.o: in function `imx8mm_clocks_probe':
>> clk-imx8mm.c:(.text+0x14c): undefined reference to `check_m4_enabled'
clk-imx8mm.c:(.text+0x14c): relocation truncated to fit: R_NIOS2_CALL26 against `check_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-imx8mp.o: in function `imx8mp_clocks_probe':
>> clk-imx8mp.c:(.text+0x2e4): undefined reference to `check_m4_enabled'
clk-imx8mp.c:(.text+0x2e4): relocation truncated to fit: R_NIOS2_CALL26 against `check_m4_enabled'
nios2-linux-ld: drivers/clk/imx/clk-imx8mq.o: in function `imx8mq_clocks_probe':
>> clk-imx8mq.c:(.text+0x48): undefined reference to `check_m4_enabled'
clk-imx8mq.c:(.text+0x48): relocation truncated to fit: R_NIOS2_CALL26 against `check_m4_enabled'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[rppt:pks/v0.0 18/27] arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git pks/v0.0
head: eed09ce6622d550ab5b10a86e7dd6c2ff6bd59d9
commit: 32e6645b0f3c84ee6e8d9a5566dffa5003821e37 [18/27] x86, mm: Protect page tables with PKS
config: x86_64-randconfig-a012-20211103 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/commit/?id...
git remote add rppt https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git
git fetch --no-tags rppt pks/v0.0
git checkout 32e6645b0f3c84ee6e8d9a5566dffa5003821e37
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: arch/x86/entry/common.o: in function `pkrs_restore_irq':
>> arch/x86/entry/common.c:304: undefined reference to `write_pkrs'
ld: arch/x86/entry/common.o: in function `pkrs_save_set_irq':
arch/x86/entry/common.c:293: undefined reference to `write_pkrs'
ld: arch/x86/kernel/process_64.o: in function `__switch_to':
>> arch/x86/kernel/process_64.c:661: undefined reference to `write_pkrs'
ld: arch/x86/kernel/cpu/common.o: in function `identify_cpu':
>> arch/x86/kernel/cpu/common.c:1601: undefined reference to `setup_pks'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
>> ld: arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
>> ld: arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
>> ld: arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
>> arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
>> arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `enable_pgtable_write':
arch/x86/mm/pgtable.c:959: undefined reference to `pks_mk_readwrite'
ld: arch/x86/mm/pgtable.o: in function `disable_pgtable_write':
arch/x86/mm/pgtable.c:965: undefined reference to `pks_mk_readonly'
ld: arch/x86/mm/pgtable.o: in function `pks_page_init':
arch/x86/mm/pgtable.c:974: undefined reference to `pks_key_alloc'
ld: arch/x86/mm/pgtable.c:982: undefined reference to `pks_key_free'
vim +959 arch/x86/mm/pgtable.c
955
956 void enable_pgtable_write(void)
957 {
958 if (pks_page_en)
> 959 pks_mk_readwrite(STATIC_TABLE_KEY);
960 }
961
962 void disable_pgtable_write(void)
963 {
964 if (pks_page_en)
> 965 pks_mk_readonly(STATIC_TABLE_KEY);
966 }
967
968 static int __init pks_page_init(void)
969 {
970 /*
971 * TODO: Needs global keys to be initially set globally readable, for now
972 * warn if its not the expected static key
973 */
> 974 pks_key = pks_key_alloc("PKS protected page tables");
975 if (pks_key < 0)
976 goto out;
977 WARN_ON(pks_key != STATIC_TABLE_KEY);
978
979 pks_page_en = !init_grouped_page_cache(&gpc_pks, GFP_KERNEL | PGTABLE_HIGHMEM,
980 _pks_protect, _pks_unprotect);
981 if (!pks_page_en)
> 982 pks_key_free(pks_key);
983
984 out:
985 return !pks_page_en;
986 }
987
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:5.10-2.1.x-imx 11497/15242] drivers/video/backlight/pwm_bl.c:261:17: warning: 'strncpy' specified bound 16 equals destination size
by kernel test robot
Hi Sandor,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.10-2.1.x-imx
head: 3b81a70be1099d44fdafaa6766bf75a2bd9e297e
commit: 92123fc24af3d55dc3db2d862754fc2da1bccc8a [11497/15242] LF-3541: video/backligh: fix Coverity Issue: 9551473 Copy into fixed size buffer
config: sparc64-randconfig-p001-20210927 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/92123fc24af3d55dc3db2d8627...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.10-2.1.x-imx
git checkout 92123fc24af3d55dc3db2d862754fc2da1bccc8a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/video/backlight/pwm_bl.c: In function 'pwm_backlight_parse_dt':
>> drivers/video/backlight/pwm_bl.c:261:17: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
261 | strncpy(data->fb_id, names, sizeof(data->fb_id));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +261 drivers/video/backlight/pwm_bl.c
240
241 static int pwm_backlight_parse_dt(struct device *dev,
242 struct platform_pwm_backlight_data *data)
243 {
244 struct device_node *node = dev->of_node;
245 unsigned int num_levels = 0;
246 unsigned int levels_count;
247 unsigned int num_steps = 0;
248 struct property *prop;
249 unsigned int *table;
250 int length;
251 u32 value;
252 int ret;
253 const char *names;
254
255 if (!node)
256 return -ENODEV;
257
258 memset(data, 0, sizeof(*data));
259
260 if (!of_property_read_string(node, "fb-names", &names)) {
> 261 strncpy(data->fb_id, names, sizeof(data->fb_id));
262 data->check_fb = &pwm_backlight_check_fb_name;
263 }
264
265 /*
266 * These values are optional and set as 0 by default, the out values
267 * are modified only if a valid u32 value can be decoded.
268 */
269 of_property_read_u32(node, "post-pwm-on-delay-ms",
270 &data->post_pwm_on_delay);
271 of_property_read_u32(node, "pwm-off-delay-ms", &data->pwm_off_delay);
272
273 /*
274 * Determine the number of brightness levels, if this property is not
275 * set a default table of brightness levels will be used.
276 */
277 prop = of_find_property(node, "brightness-levels", &length);
278 if (!prop)
279 return 0;
280
281 data->max_brightness = length / sizeof(u32);
282
283 /* read brightness levels from DT property */
284 if (data->max_brightness > 0) {
285 size_t size = sizeof(*data->levels) * data->max_brightness;
286 unsigned int i, j, n = 0;
287
288 data->levels = devm_kzalloc(dev, size, GFP_KERNEL);
289 if (!data->levels)
290 return -ENOMEM;
291
292 ret = of_property_read_u32_array(node, "brightness-levels",
293 data->levels,
294 data->max_brightness);
295 if (ret < 0)
296 return ret;
297
298 ret = of_property_read_u32(node, "default-brightness-level",
299 &value);
300 if (ret < 0)
301 return ret;
302
303 data->dft_brightness = value;
304
305 /*
306 * This property is optional, if is set enables linear
307 * interpolation between each of the values of brightness levels
308 * and creates a new pre-computed table.
309 */
310 of_property_read_u32(node, "num-interpolated-steps",
311 &num_steps);
312
313 /*
314 * Make sure that there is at least two entries in the
315 * brightness-levels table, otherwise we can't interpolate
316 * between two points.
317 */
318 if (num_steps) {
319 if (data->max_brightness < 2) {
320 dev_err(dev, "can't interpolate\n");
321 return -EINVAL;
322 }
323
324 /*
325 * Recalculate the number of brightness levels, now
326 * taking in consideration the number of interpolated
327 * steps between two levels.
328 */
329 for (i = 0; i < data->max_brightness - 1; i++) {
330 if ((data->levels[i + 1] - data->levels[i]) /
331 num_steps)
332 num_levels += num_steps;
333 else
334 num_levels++;
335 }
336 num_levels++;
337 dev_dbg(dev, "new number of brightness levels: %d\n",
338 num_levels);
339
340 /*
341 * Create a new table of brightness levels with all the
342 * interpolated steps.
343 */
344 size = sizeof(*table) * num_levels;
345 table = devm_kzalloc(dev, size, GFP_KERNEL);
346 if (!table)
347 return -ENOMEM;
348
349 /* Fill the interpolated table. */
350 levels_count = 0;
351 for (i = 0; i < data->max_brightness - 1; i++) {
352 value = data->levels[i];
353 n = (data->levels[i + 1] - value) / num_steps;
354 if (n > 0) {
355 for (j = 0; j < num_steps; j++) {
356 table[levels_count] = value;
357 value += n;
358 levels_count++;
359 }
360 } else {
361 table[levels_count] = data->levels[i];
362 levels_count++;
363 }
364 }
365 table[levels_count] = data->levels[i];
366
367 /*
368 * As we use interpolation lets remove current
369 * brightness levels table and replace for the
370 * new interpolated table.
371 */
372 devm_kfree(dev, data->levels);
373 data->levels = table;
374
375 /*
376 * Reassign max_brightness value to the new total number
377 * of brightness levels.
378 */
379 data->max_brightness = num_levels;
380 }
381
382 data->max_brightness--;
383 }
384 return 0;
385 }
386
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hare-scsi-devel:scsi-private.v2 15/21] drivers/scsi/aacraid/linit.c:641:35: error: request for member 'dev' in something not a structure or union
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: e6b8e84251bef24827e609d3a87c5d6652302b85 [15/21] aacraid: add 'owner' field to 'struct fib'
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-private.v2
git checkout e6b8e84251bef24827e609d3a87c5d6652302b85
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/aacraid/linit.c: In function 'fib_count_iter':
drivers/scsi/aacraid/linit.c:641:35: error: dereferencing 'void *' pointer [-Werror]
641 | struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
| ^~
>> drivers/scsi/aacraid/linit.c:641:35: error: request for member 'dev' in something not a structure or union
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from drivers/scsi/aacraid/linit.c:33:
At top level:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/dev +641 drivers/scsi/aacraid/linit.c
637
638 static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data, bool reserved)
639 {
640 struct fib_count_data *fib_count = data;
> 641 struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
642
643 switch (fibptr->owner) {
644 case AAC_OWNER_FIRMWARE:
645 fib_count->fwcnt++;
646 break;
647 case AAC_OWNER_ERROR_HANDLER:
648 fib_count->ehcnt++;
649 break;
650 case AAC_OWNER_LOWLEVEL:
651 fib_count->llcnt++;
652 break;
653 case AAC_OWNER_MIDLEVEL:
654 fib_count->mlcnt++;
655 break;
656 default:
657 fib_count->krlcnt++;
658 break;
659 }
660 return true;
661 }
662
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[toke:xdp-queueing-01 2/9] kernel/bpf/btf.c:4550:9: error: initialized field overwritten
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-queueing-01
head: 7cdc645073a59261514e56e1a4c6d0dac1b24b32
commit: 64155ff31b7e15635ccae5395cf57caa0834faba [2/9] xdp: add dequeue program type for getting packets from a PIFO
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id...
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke xdp-queueing-01
git checkout 64155ff31b7e15635ccae5395cf57caa0834faba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/bpf/btf.c:4550:9: error: initialized field overwritten [-Werror=override-init]
4550 | 0, /* avoid empty array */
| ^
kernel/bpf/btf.c:4550:9: note: (near initialization for 'bpf_ctx_convert_map[32]')
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5876:29: error: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5876 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5913:9: error: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5913 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
cc1: all warnings being treated as errors
vim +4550 kernel/bpf/btf.c
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4524
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4525 #define BPF_MAP_TYPE(_id, _ops)
f2e10bff16a0fdd Andrii Nakryiko 2020-04-28 4526 #define BPF_LINK_TYPE(_id, _name)
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4527 static union {
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4528 struct bpf_ctx_convert {
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4529 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4530 prog_ctx_type _id##_prog; \
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4531 kern_ctx_type _id##_kern;
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4532 #include <linux/bpf_types.h>
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4533 #undef BPF_PROG_TYPE
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4534 } *__t;
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4535 /* 't' is written once under lock. Read many times. */
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4536 const struct btf_type *t;
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4537 } bpf_ctx_convert;
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4538 enum {
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4539 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4540 __ctx_convert##_id,
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4541 #include <linux/bpf_types.h>
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4542 #undef BPF_PROG_TYPE
ce27709b8162e5c Alexei Starovoitov 2019-11-27 4543 __ctx_convert_unused, /* to avoid empty enum in extreme .config */
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4544 };
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4545 static u8 bpf_ctx_convert_map[] = {
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4546 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4547 [_id] = __ctx_convert##_id,
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4548 #include <linux/bpf_types.h>
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4549 #undef BPF_PROG_TYPE
4c80c7bc583a87d Arnd Bergmann 2019-12-10 @4550 0, /* avoid empty array */
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4551 };
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4552 #undef BPF_MAP_TYPE
f2e10bff16a0fdd Andrii Nakryiko 2020-04-28 4553 #undef BPF_LINK_TYPE
91cc1a99740e2ed Alexei Starovoitov 2019-11-14 4554
:::::: The code at line 4550 was first introduced by commit
:::::: 4c80c7bc583a87ded5f61906f81256b57c795806 bpf: Fix build in minimal configurations, again
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Daniel Borkmann <daniel(a)iogearbox.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v3 1/5] hugetlb: add demote hugetlb page sysfs interfaces
by kernel test robot
Hi Mike,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on v5.15]
[cannot apply to hnaz-mm/master linus/master next-20211112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mike-Kravetz/hugetlb-add-demote-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/5829c115b143a240099ed1da793e684f6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mike-Kravetz/hugetlb-add-demote-split-page-functionality/20211002-015415
git checkout 5829c115b143a240099ed1da793e684f6dd8c2d8
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mm/hugetlb.c: In function 'demote_size_show':
>> mm/hugetlb.c:3533:16: error: variable 'demote_size' set but not used [-Werror=unused-but-set-variable]
3533 | unsigned long demote_size;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/demote_size +3533 mm/hugetlb.c
3528
3529 static ssize_t demote_size_show(struct kobject *kobj,
3530 struct kobj_attribute *attr, char *buf)
3531 {
3532 struct hstate *h;
> 3533 unsigned long demote_size;
3534 int nid;
3535
3536 h = kobj_to_hstate(kobj, &nid);
3537 demote_size = h->demote_order;
3538
3539 return sysfs_emit(buf, "%lukB\n",
3540 (unsigned long)(PAGE_SIZE << h->demote_order) / SZ_1K);
3541 }
3542
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week