arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 8 months ago
config: mips-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161836.SB5KUxha-lk...)
compiler: mips64el-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# 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 ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/ kernel/
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason(a)upwardaccess.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v8 1/3] bluetooth: msft: Handle MSFT Monitor Device Event
by kernel test robot
Hi Manish,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20211215]
[cannot apply to bluetooth/master v5.16-rc5]
[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/Manish-Mandlik/bluetooth-msft-Ha...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: arc-randconfig-r043-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161736.WMgjxclO-lk...)
compiler: arc-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://github.com/0day-ci/linux/commit/db0604d7b0d0308963bdc1465b486be11...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Manish-Mandlik/bluetooth-msft-Handle-MSFT-Monitor-Device-Event/20211216-124056
git checkout db0604d7b0d0308963bdc1465b486be11d5fdcb6
# save the config file 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 net/bluetooth/
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 >>):
In file included from include/linux/wait.h:7,
from include/linux/poll.h:8,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
net/bluetooth/msft.c: In function 'msft_le_cancel_monitor_advertisement_cb':
>> net/bluetooth/msft.c:306:42: error: 'dev' undeclared (first use in this function); did you mean 'hdev'?
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~
include/linux/list.h:717:14: note: in definition of macro 'list_for_each_entry_safe'
717 | for (pos = list_first_entry(head, typeof(*pos), member), \
| ^~~
net/bluetooth/msft.c:306:42: note: each undeclared identifier is reported only once for each function it appears in
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~
include/linux/list.h:717:14: note: in definition of macro 'list_for_each_entry_safe'
717 | for (pos = list_first_entry(head, typeof(*pos), member), \
| ^~~
In file included from arch/arc/include/asm/cache.h:28,
from include/linux/cache.h:6,
from include/linux/time.h:5,
from include/linux/ktime.h:24,
from include/linux/poll.h:7,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:513:9: note: in expansion of macro 'container_of'
513 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:524:9: note: in expansion of macro 'list_entry'
524 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:717:20: note: in expansion of macro 'list_first_entry'
717 | for (pos = list_first_entry(head, typeof(*pos), member), \
| ^~~~~~~~~~~~~~~~
net/bluetooth/msft.c:306:17: note: in expansion of macro 'list_for_each_entry_safe'
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/wait.h:7,
from include/linux/poll.h:8,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
>> net/bluetooth/msft.c:306:47: error: 'tmp' undeclared (first use in this function); did you mean 'tm'?
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~
include/linux/list.h:718:17: note: in definition of macro 'list_for_each_entry_safe'
718 | n = list_next_entry(pos, member); \
| ^
In file included from arch/arc/include/asm/cache.h:28,
from include/linux/cache.h:6,
from include/linux/time.h:5,
from include/linux/ktime.h:24,
from include/linux/poll.h:7,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:513:9: note: in expansion of macro 'container_of'
513 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:557:9: note: in expansion of macro 'list_entry'
557 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:718:21: note: in expansion of macro 'list_next_entry'
718 | n = list_next_entry(pos, member); \
| ^~~~~~~~~~~~~~~
net/bluetooth/msft.c:306:17: note: in expansion of macro 'list_for_each_entry_safe'
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/wait.h:7,
from include/linux/poll.h:8,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
include/linux/list.h:717:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
717 | for (pos = list_first_entry(head, typeof(*pos), member), \
| ^
net/bluetooth/msft.c:306:17: note: in expansion of macro 'list_for_each_entry_safe'
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arc/include/asm/cache.h:28,
from include/linux/cache.h:6,
from include/linux/time.h:5,
from include/linux/ktime.h:24,
from include/linux/poll.h:7,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:513:9: note: in expansion of macro 'container_of'
513 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:557:9: note: in expansion of macro 'list_entry'
557 | list_entry((pos)->member.next, typeof(*(pos)), member)
| ^~~~~~~~~~
include/linux/list.h:720:27: note: in expansion of macro 'list_next_entry'
720 | pos = n, n = list_next_entry(n, member))
| ^~~~~~~~~~~~~~~
net/bluetooth/msft.c:306:17: note: in expansion of macro 'list_for_each_entry_safe'
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/wait.h:7,
from include/linux/poll.h:8,
from include/net/bluetooth/bluetooth.h:28,
from net/bluetooth/msft.c:6:
include/linux/list.h:720:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
720 | pos = n, n = list_next_entry(n, member))
| ^
net/bluetooth/msft.c:306:17: note: in expansion of macro 'list_for_each_entry_safe'
306 | list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +306 net/bluetooth/msft.c
265
266 static void msft_le_cancel_monitor_advertisement_cb(struct hci_dev *hdev,
267 u8 status, u16 opcode,
268 struct sk_buff *skb)
269 {
270 struct msft_cp_le_cancel_monitor_advertisement *cp;
271 struct msft_rp_le_cancel_monitor_advertisement *rp;
272 struct adv_monitor *monitor;
273 struct msft_monitor_advertisement_handle_data *handle_data;
274 struct msft_data *msft = hdev->msft_data;
275 int err;
276 bool pending;
277
278 if (status)
279 goto done;
280
281 rp = (struct msft_rp_le_cancel_monitor_advertisement *)skb->data;
282 if (skb->len < sizeof(*rp)) {
283 status = HCI_ERROR_UNSPECIFIED;
284 goto done;
285 }
286
287 hci_dev_lock(hdev);
288
289 cp = hci_sent_cmd_data(hdev, hdev->msft_opcode);
290 handle_data = msft_find_handle_data(hdev, cp->handle, false);
291
292 if (handle_data) {
293 monitor = idr_find(&hdev->adv_monitors_idr,
294 handle_data->mgmt_handle);
295
296 if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED)
297 monitor->state = ADV_MONITOR_STATE_REGISTERED;
298
299 /* Do not free the monitor if it is being removed due to
300 * suspend. It will be re-monitored on resume.
301 */
302 if (monitor && !msft->suspending)
303 hci_free_adv_monitor(hdev, monitor);
304
305 /* Clear any monitored devices by this Adv Monitor */
> 306 list_for_each_entry_safe(dev, tmp, &hdev->monitored_devices,
307 list) {
308 if (dev->handle == handle_data->mgmt_handle) {
309 list_del(&dev->list);
310 kfree(dev);
311 }
312 }
313
314 list_del(&handle_data->list);
315 kfree(handle_data);
316 }
317
318 /* If remove all monitors is required, we need to continue the process
319 * here because the earlier it was paused when waiting for the
320 * response from controller.
321 */
322 if (msft->pending_remove_handle == 0) {
323 pending = hci_remove_all_adv_monitor(hdev, &err);
324 if (pending) {
325 hci_dev_unlock(hdev);
326 return;
327 }
328
329 if (err)
330 status = HCI_ERROR_UNSPECIFIED;
331 }
332
333 hci_dev_unlock(hdev);
334
335 done:
336 if (!msft->suspending)
337 hci_remove_adv_monitor_complete(hdev, status);
338 }
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[djwong-xfs:repair-symlink-swapext 322/325] fs/xfs/libxfs/xfs_symlink_remote.c:239:1: warning: no previous prototype for function 'xfs_symlink_remote_read'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: b0cad080048a93ceeae93b51a0cab55c85c5a7ec [322/325] xfs: move remote symlink target read function to libxfs
config: riscv-randconfig-r042-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161727.ehXN074t-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout b0cad080048a93ceeae93b51a0cab55c85c5a7ec
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/xfs/
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 >>):
fs/xfs/libxfs/xfs_symlink_remote.c:28:1: warning: no previous prototype for function 'xfs_symlink_blocks' [-Wmissing-prototypes]
xfs_symlink_blocks(
^
fs/xfs/libxfs/xfs_symlink_remote.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:38:1: warning: no previous prototype for function 'xfs_symlink_hdr_set' [-Wmissing-prototypes]
xfs_symlink_hdr_set(
^
fs/xfs/libxfs/xfs_symlink_remote.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:68:1: warning: no previous prototype for function 'xfs_symlink_hdr_ok' [-Wmissing-prototypes]
xfs_symlink_hdr_ok(
^
fs/xfs/libxfs/xfs_symlink_remote.c:67:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:167:1: warning: no previous prototype for function 'xfs_symlink_local_to_remote' [-Wmissing-prototypes]
xfs_symlink_local_to_remote(
^
fs/xfs/libxfs/xfs_symlink_remote.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:206:1: warning: no previous prototype for function 'xfs_symlink_shortform_verify' [-Wmissing-prototypes]
xfs_symlink_shortform_verify(
^
fs/xfs/libxfs/xfs_symlink_remote.c:205:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
xfs_failaddr_t
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:239:1: warning: no previous prototype for function 'xfs_symlink_remote_read' [-Wmissing-prototypes]
xfs_symlink_remote_read(
^
fs/xfs/libxfs/xfs_symlink_remote.c:238:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
6 warnings generated.
vim +/xfs_symlink_remote_read +239 fs/xfs/libxfs/xfs_symlink_remote.c
236
237 /* Read a remote symlink target into the buffer. */
238 int
> 239 xfs_symlink_remote_read(
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[android-common:android12-5.10 13859/13862] mm/memory.c:4724:9: error: implicit declaration of function 'mmu_notifier_trylock'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 70c9301d9c4be76630901189cc7376eb22115a3b
commit: 6971350406a366f4565bdc6b17c08ddd577f27f3 [13859/13862] ANDROID: fix mmu_notifier race caused by not taking mmap_lock during SPF
config: x86_64-randconfig-r023-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161751.Fj2RIlo4-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 6971350406a366f4565bdc6b17c08ddd577f27f3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> mm/memory.c:4724:9: error: implicit declaration of function 'mmu_notifier_trylock' [-Werror,-Wimplicit-function-declaration]
if (!mmu_notifier_trylock(vmf->vma->vm_mm)) {
^
1 error generated.
vim +/mmu_notifier_trylock +4724 mm/memory.c
4616
4617 /*
4618 * These routines also need to handle stuff like marking pages dirty
4619 * and/or accessed for architectures that don't do it in hardware (most
4620 * RISC architectures). The early dirtying is also good on the i386.
4621 *
4622 * There is also a hook called "update_mmu_cache()" that architectures
4623 * with external mmu caches can use to update those (ie the Sparc or
4624 * PowerPC hashed page tables that act as extended TLBs).
4625 *
4626 * We enter with non-exclusive mmap_lock (to exclude vma changes, but allow
4627 * concurrent faults).
4628 *
4629 * The mmap_lock may have been released depending on flags and our return value.
4630 * See filemap_fault() and __lock_page_or_retry().
4631 */
4632 static vm_fault_t handle_pte_fault(struct vm_fault *vmf)
4633 {
4634 pte_t entry;
4635 vm_fault_t ret = 0;
4636
4637 if (unlikely(pmd_none(*vmf->pmd))) {
4638 /*
4639 * In the case of the speculative page fault handler we abort
4640 * the speculative path immediately as the pmd is probably
4641 * in the way to be converted in a huge one. We will try
4642 * again holding the mmap_sem (which implies that the collapse
4643 * operation is done).
4644 */
4645 if (vmf->flags & FAULT_FLAG_SPECULATIVE)
4646 return VM_FAULT_RETRY;
4647 /*
4648 * Leave __pte_alloc() until later: because vm_ops->fault may
4649 * want to allocate huge page, and if we expose page table
4650 * for an instant, it will be difficult to retract from
4651 * concurrent faults and from rmap lookups.
4652 */
4653 vmf->pte = NULL;
4654 } else if (!(vmf->flags & FAULT_FLAG_SPECULATIVE)) {
4655 /*
4656 * If a huge pmd materialized under us just retry later. Use
4657 * pmd_trans_unstable() via pmd_devmap_trans_unstable() instead
4658 * of pmd_trans_huge() to ensure the pmd didn't become
4659 * pmd_trans_huge under us and then back to pmd_none, as a
4660 * result of MADV_DONTNEED running immediately after a huge pmd
4661 * fault in a different thread of this mm, in turn leading to a
4662 * misleading pmd_trans_huge() retval. All we have to ensure is
4663 * that it is a regular pmd that we can walk with
4664 * pte_offset_map() and we can do that through an atomic read
4665 * in C, which is what pmd_trans_unstable() provides.
4666 */
4667 if (pmd_devmap_trans_unstable(vmf->pmd))
4668 return 0;
4669 /*
4670 * A regular pmd is established and it can't morph into a huge
4671 * pmd from under us anymore at this point because we hold the
4672 * mmap_lock read mode and khugepaged takes it in write mode.
4673 * So now it's safe to run pte_offset_map().
4674 * This is not applicable to the speculative page fault handler
4675 * but in that case, the pte is fetched earlier in
4676 * handle_speculative_fault().
4677 */
4678 vmf->pte = pte_offset_map(vmf->pmd, vmf->address);
4679 vmf->orig_pte = *vmf->pte;
4680
4681 /*
4682 * some architectures can have larger ptes than wordsize,
4683 * e.g.ppc44x-defconfig has CONFIG_PTE_64BIT=y and
4684 * CONFIG_32BIT=y, so READ_ONCE cannot guarantee atomic
4685 * accesses. The code below just needs a consistent view
4686 * for the ifs and we later double check anyway with the
4687 * ptl lock held. So here a barrier will do.
4688 */
4689 barrier();
4690 if (pte_none(vmf->orig_pte)) {
4691 pte_unmap(vmf->pte);
4692 vmf->pte = NULL;
4693 }
4694 }
4695
4696 if (!vmf->pte) {
4697 if (vma_is_anonymous(vmf->vma))
4698 return do_anonymous_page(vmf);
4699 else if ((vmf->flags & FAULT_FLAG_SPECULATIVE) &&
4700 !vmf_allows_speculation(vmf))
4701 return VM_FAULT_RETRY;
4702 else
4703 return do_fault(vmf);
4704 }
4705
4706 if (!pte_present(vmf->orig_pte))
4707 return do_swap_page(vmf);
4708
4709 if (pte_protnone(vmf->orig_pte) && vma_is_accessible(vmf->vma))
4710 return do_numa_page(vmf);
4711
4712 if (!pte_spinlock(vmf))
4713 return VM_FAULT_RETRY;
4714 entry = vmf->orig_pte;
4715 if (unlikely(!pte_same(*vmf->pte, entry))) {
4716 update_mmu_tlb(vmf->vma, vmf->address, vmf->pte);
4717 goto unlock;
4718 }
4719 if (vmf->flags & FAULT_FLAG_WRITE) {
4720 if (!pte_write(entry)) {
4721 if (!(vmf->flags & FAULT_FLAG_SPECULATIVE))
4722 return do_wp_page(vmf);
4723
> 4724 if (!mmu_notifier_trylock(vmf->vma->vm_mm)) {
4725 ret = VM_FAULT_RETRY;
4726 goto unlock;
4727 }
4728
4729 ret = do_wp_page(vmf);
4730 mmu_notifier_unlock(vmf->vma->vm_mm);
4731 return ret;
4732 }
4733 entry = pte_mkdirty(entry);
4734 }
4735 entry = pte_mkyoung(entry);
4736 if (ptep_set_access_flags(vmf->vma, vmf->address, vmf->pte, entry,
4737 vmf->flags & FAULT_FLAG_WRITE)) {
4738 update_mmu_cache(vmf->vma, vmf->address, vmf->pte);
4739 } else {
4740 /* Skip spurious TLB flush for retried page fault */
4741 if (vmf->flags & FAULT_FLAG_TRIED)
4742 goto unlock;
4743 if (vmf->flags & FAULT_FLAG_SPECULATIVE)
4744 ret = VM_FAULT_RETRY;
4745 /*
4746 * This is needed only for protection faults but the arch code
4747 * is not yet telling us if this is a protection fault or not.
4748 * This still avoids useless tlb flushes for .text page faults
4749 * with threads.
4750 */
4751 if (vmf->flags & FAULT_FLAG_WRITE)
4752 flush_tlb_fix_spurious_fault(vmf->vma, vmf->address);
4753 }
4754 unlock:
4755 pte_unmap_unlock(vmf->pte, vmf->ptl);
4756 return ret;
4757 }
4758
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 06/17] fortify: Detect struct member overflows in memcpy() at compile-time
by kernel test robot
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5 next-20211215]
[cannot apply to rdma/for-next axboe-block/for-next kvm/queue tip/x86/core mkp-scsi/for-next jejb-scsi/for-next]
[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/Kees-Cook/Enable-strict-compile-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git aa50faff4416c869b52dff68a937c84d29e12f4b
config: i386-randconfig-s002-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161632.BTEfICUX-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/80c8d2aae95aae6bd09e3ef84b74d0afe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kees-Cook/Enable-strict-compile-time-memcpy-fortify-checks/20211214-064002
git checkout 80c8d2aae95aae6bd09e3ef84b74d0afe631abae
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/video/fbdev/geode/
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 >>)
>> drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs
>> drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *gp_regs @@
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:30:9: sparse: got void [noderef] __iomem *gp_regs
>> drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs
>> drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *dc_regs @@
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:31:9: sparse: got void [noderef] __iomem *dc_regs
>> drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs
>> drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *vid_regs @@
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:32:9: sparse: got void [noderef] __iomem *vid_regs
>> drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem *
>> drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem *
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: expected void const *
drivers/video/fbdev/geode/suspend_gx.c:33:9: sparse: got void [noderef] __iomem *
vim +30 drivers/video/fbdev/geode/suspend_gx.c
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 13
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 14 static void gx_save_regs(struct gxfb_par *par)
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 15 {
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 16 int i;
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 17
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 18 /* wait for the BLT engine to stop being busy */
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 19 do {
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 20 i = read_gp(par, GP_BLT_STATUS);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 21 } while (i & (GP_BLT_STATUS_BLT_PENDING | GP_BLT_STATUS_BLT_BUSY));
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 22
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 23 /* save MSRs */
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 24 rdmsrl(MSR_GX_MSR_PADSEL, par->msr.padsel);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 25 rdmsrl(MSR_GLCP_DOTPLL, par->msr.dotpll);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 26
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 27 write_dc(par, DC_UNLOCK, DC_UNLOCK_UNLOCK);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 28
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 29 /* save registers */
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 @30 memcpy(par->gp, par->gp_regs, sizeof(par->gp));
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 @31 memcpy(par->dc, par->dc_regs, sizeof(par->dc));
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 @32 memcpy(par->vp, par->vid_regs, sizeof(par->vp));
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 @33 memcpy(par->fp, par->vid_regs + VP_FP_START, sizeof(par->fp));
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 34
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 35 /* save the palette */
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 36 write_dc(par, DC_PAL_ADDRESS, 0);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 37 for (i = 0; i < ARRAY_SIZE(par->pal); i++)
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 38 par->pal[i] = read_dc(par, DC_PAL_DATA);
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 39 }
46fb6f110dfc3f drivers/video/geode/suspend_gx.c Andres Salomon 2008-04-28 40
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v2 4/4] coresight: etm3x: Don't trace PID for non-root PID namespace
by kernel test robot
Hi Leo,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.16-rc5]
[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/Leo-Yan/coresight-etm-Correct-PI...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2585cf9dfaaddf00b069673f27bb3f8530e2039c
config: arm-buildonly-randconfig-r003-20211213 (https://download.01.org/0day-ci/archive/20211214/202112140344.viPmOWp6-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/81d5f47788c40d34c8159d64d4505eb48...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Leo-Yan/coresight-etm-Correct-PID-tracing-for-non-root-namespace/20211213-201632
git checkout 81d5f47788c40d34c8159d64d4505eb485254e8f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/hwtracing/coresight/
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/hwtracing/coresight/coresight-etm3x-core.c:344:7: error: implicit declaration of function 'task_is_in_init_pid_ns' [-Werror,-Wimplicit-function-declaration]
if (!task_is_in_init_pid_ns(current))
^
1 error generated.
vim +/task_is_in_init_pid_ns +344 drivers/hwtracing/coresight/coresight-etm3x-core.c
301
302 #define ETM3X_SUPPORTED_OPTIONS (ETMCR_CYC_ACC | \
303 ETMCR_TIMESTAMP_EN | \
304 ETMCR_RETURN_STACK)
305
306 static int etm_parse_event_config(struct etm_drvdata *drvdata,
307 struct perf_event *event)
308 {
309 struct etm_config *config = &drvdata->config;
310 struct perf_event_attr *attr = &event->attr;
311
312 if (!attr)
313 return -EINVAL;
314
315 /* Clear configuration from previous run */
316 memset(config, 0, sizeof(struct etm_config));
317
318 if (attr->exclude_kernel)
319 config->mode = ETM_MODE_EXCL_KERN;
320
321 if (attr->exclude_user)
322 config->mode = ETM_MODE_EXCL_USER;
323
324 /* Always start from the default config */
325 etm_set_default(config);
326
327 /*
328 * By default the tracers are configured to trace the whole address
329 * range. Narrow the field only if requested by user space.
330 */
331 if (config->mode)
332 etm_config_trace_mode(config);
333
334 /*
335 * At this time only cycle accurate, return stack and timestamp
336 * options are available.
337 */
338 if (attr->config & ~ETM3X_SUPPORTED_OPTIONS)
339 return -EINVAL;
340
341 config->ctrl = attr->config;
342
343 /* Don't trace contextID when runs in non-root PID namespace */
> 344 if (!task_is_in_init_pid_ns(current))
345 config->ctrl &= ~ETMCR_CTXID_SIZE;
346
347 /*
348 * Possible to have cores with PTM (supports ret stack) and ETM
349 * (never has ret stack) on the same SoC. So if we have a request
350 * for return stack that can't be honoured on this core then
351 * clear the bit - trace will still continue normally
352 */
353 if ((config->ctrl & ETMCR_RETURN_STACK) &&
354 !(drvdata->etmccer & ETMCCER_RETSTACK))
355 config->ctrl &= ~ETMCR_RETURN_STACK;
356
357 return 0;
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[android-common:android12-5.10 13859/13862] mm/memory.c:4724:9: error: implicit declaration of function 'mmu_notifier_trylock'; did you mean 'mmu_notifier_unlock'?
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 70c9301d9c4be76630901189cc7376eb22115a3b
commit: 6971350406a366f4565bdc6b17c08ddd577f27f3 [13859/13862] ANDROID: fix mmu_notifier race caused by not taking mmap_lock during SPF
config: x86_64-randconfig-r033-20211214 (https://download.01.org/0day-ci/archive/20211216/202112161632.kQZI4tAz-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 6971350406a366f4565bdc6b17c08ddd577f27f3
# save the config file 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 >>):
mm/memory.c: In function 'handle_pte_fault':
>> mm/memory.c:4724:9: error: implicit declaration of function 'mmu_notifier_trylock'; did you mean 'mmu_notifier_unlock'? [-Werror=implicit-function-declaration]
4724 | if (!mmu_notifier_trylock(vmf->vma->vm_mm)) {
| ^~~~~~~~~~~~~~~~~~~~
| mmu_notifier_unlock
cc1: some warnings being treated as errors
vim +4724 mm/memory.c
4616
4617 /*
4618 * These routines also need to handle stuff like marking pages dirty
4619 * and/or accessed for architectures that don't do it in hardware (most
4620 * RISC architectures). The early dirtying is also good on the i386.
4621 *
4622 * There is also a hook called "update_mmu_cache()" that architectures
4623 * with external mmu caches can use to update those (ie the Sparc or
4624 * PowerPC hashed page tables that act as extended TLBs).
4625 *
4626 * We enter with non-exclusive mmap_lock (to exclude vma changes, but allow
4627 * concurrent faults).
4628 *
4629 * The mmap_lock may have been released depending on flags and our return value.
4630 * See filemap_fault() and __lock_page_or_retry().
4631 */
4632 static vm_fault_t handle_pte_fault(struct vm_fault *vmf)
4633 {
4634 pte_t entry;
4635 vm_fault_t ret = 0;
4636
4637 if (unlikely(pmd_none(*vmf->pmd))) {
4638 /*
4639 * In the case of the speculative page fault handler we abort
4640 * the speculative path immediately as the pmd is probably
4641 * in the way to be converted in a huge one. We will try
4642 * again holding the mmap_sem (which implies that the collapse
4643 * operation is done).
4644 */
4645 if (vmf->flags & FAULT_FLAG_SPECULATIVE)
4646 return VM_FAULT_RETRY;
4647 /*
4648 * Leave __pte_alloc() until later: because vm_ops->fault may
4649 * want to allocate huge page, and if we expose page table
4650 * for an instant, it will be difficult to retract from
4651 * concurrent faults and from rmap lookups.
4652 */
4653 vmf->pte = NULL;
4654 } else if (!(vmf->flags & FAULT_FLAG_SPECULATIVE)) {
4655 /*
4656 * If a huge pmd materialized under us just retry later. Use
4657 * pmd_trans_unstable() via pmd_devmap_trans_unstable() instead
4658 * of pmd_trans_huge() to ensure the pmd didn't become
4659 * pmd_trans_huge under us and then back to pmd_none, as a
4660 * result of MADV_DONTNEED running immediately after a huge pmd
4661 * fault in a different thread of this mm, in turn leading to a
4662 * misleading pmd_trans_huge() retval. All we have to ensure is
4663 * that it is a regular pmd that we can walk with
4664 * pte_offset_map() and we can do that through an atomic read
4665 * in C, which is what pmd_trans_unstable() provides.
4666 */
4667 if (pmd_devmap_trans_unstable(vmf->pmd))
4668 return 0;
4669 /*
4670 * A regular pmd is established and it can't morph into a huge
4671 * pmd from under us anymore at this point because we hold the
4672 * mmap_lock read mode and khugepaged takes it in write mode.
4673 * So now it's safe to run pte_offset_map().
4674 * This is not applicable to the speculative page fault handler
4675 * but in that case, the pte is fetched earlier in
4676 * handle_speculative_fault().
4677 */
4678 vmf->pte = pte_offset_map(vmf->pmd, vmf->address);
4679 vmf->orig_pte = *vmf->pte;
4680
4681 /*
4682 * some architectures can have larger ptes than wordsize,
4683 * e.g.ppc44x-defconfig has CONFIG_PTE_64BIT=y and
4684 * CONFIG_32BIT=y, so READ_ONCE cannot guarantee atomic
4685 * accesses. The code below just needs a consistent view
4686 * for the ifs and we later double check anyway with the
4687 * ptl lock held. So here a barrier will do.
4688 */
4689 barrier();
4690 if (pte_none(vmf->orig_pte)) {
4691 pte_unmap(vmf->pte);
4692 vmf->pte = NULL;
4693 }
4694 }
4695
4696 if (!vmf->pte) {
4697 if (vma_is_anonymous(vmf->vma))
4698 return do_anonymous_page(vmf);
4699 else if ((vmf->flags & FAULT_FLAG_SPECULATIVE) &&
4700 !vmf_allows_speculation(vmf))
4701 return VM_FAULT_RETRY;
4702 else
4703 return do_fault(vmf);
4704 }
4705
4706 if (!pte_present(vmf->orig_pte))
4707 return do_swap_page(vmf);
4708
4709 if (pte_protnone(vmf->orig_pte) && vma_is_accessible(vmf->vma))
4710 return do_numa_page(vmf);
4711
4712 if (!pte_spinlock(vmf))
4713 return VM_FAULT_RETRY;
4714 entry = vmf->orig_pte;
4715 if (unlikely(!pte_same(*vmf->pte, entry))) {
4716 update_mmu_tlb(vmf->vma, vmf->address, vmf->pte);
4717 goto unlock;
4718 }
4719 if (vmf->flags & FAULT_FLAG_WRITE) {
4720 if (!pte_write(entry)) {
4721 if (!(vmf->flags & FAULT_FLAG_SPECULATIVE))
4722 return do_wp_page(vmf);
4723
> 4724 if (!mmu_notifier_trylock(vmf->vma->vm_mm)) {
4725 ret = VM_FAULT_RETRY;
4726 goto unlock;
4727 }
4728
4729 ret = do_wp_page(vmf);
4730 mmu_notifier_unlock(vmf->vma->vm_mm);
4731 return ret;
4732 }
4733 entry = pte_mkdirty(entry);
4734 }
4735 entry = pte_mkyoung(entry);
4736 if (ptep_set_access_flags(vmf->vma, vmf->address, vmf->pte, entry,
4737 vmf->flags & FAULT_FLAG_WRITE)) {
4738 update_mmu_cache(vmf->vma, vmf->address, vmf->pte);
4739 } else {
4740 /* Skip spurious TLB flush for retried page fault */
4741 if (vmf->flags & FAULT_FLAG_TRIED)
4742 goto unlock;
4743 if (vmf->flags & FAULT_FLAG_SPECULATIVE)
4744 ret = VM_FAULT_RETRY;
4745 /*
4746 * This is needed only for protection faults but the arch code
4747 * is not yet telling us if this is a protection fault or not.
4748 * This still avoids useless tlb flushes for .text page faults
4749 * with threads.
4750 */
4751 if (vmf->flags & FAULT_FLAG_WRITE)
4752 flush_tlb_fix_spurious_fault(vmf->vma, vmf->address);
4753 }
4754 unlock:
4755 pte_unmap_unlock(vmf->pte, vmf->ptl);
4756 return ret;
4757 }
4758
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 1/2] ARM: dts: omap3-n900: Fix lp5523 for multi color
by kernel test robot
Hi Merlijn,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on pavel-leds/for-next tmlind-omap/for-next linus/master v5.16-rc5 next-20211214]
[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/Merlijn-Wajer/Fix-RGB-status-LED...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce: make ARCH=arm dtbs_check
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
dtcheck warnings: (new ones prefixed by >>)
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/pwm: failed to match any schema with compatible: ['ti,twl4030-pwm']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/pwmled: failed to match any schema with compatible: ['ti,twl4030-pwmled']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/pwrbutton: failed to match any schema with compatible: ['ti,twl4030-pwrbutton']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/keypad: failed to match any schema with compatible: ['ti,twl4030-keypad']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/audio: failed to match any schema with compatible: ['ti,twl4030-audio']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/power: failed to match any schema with compatible: ['ti,twl4030-power-n900', 'ti,twl4030-power-idle-osc-off']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48070000/twl@48/power: failed to match any schema with compatible: ['ti,twl4030-power-n900', 'ti,twl4030-power-idle-osc-off']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48072000/tlv320aic3x@18: failed to match any schema with compatible: ['ti,tlv320aic3x']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48072000/tlv320aic3x@19: failed to match any schema with compatible: ['ti,tlv320aic3x']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48072000/led-controller@30: failed to match any schema with compatible: ['adi,adp1653']
>> arch/arm/boot/dts/omap3-n900.dt.yaml: lp5523@32: 'enable-gpios' does not match any of the regexes: '(^led@[0-9a-f]$|led)', 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48072000/tpa6130a2@60: failed to match any schema with compatible: ['ti,tpa6130a2']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48072000/si4713@63: failed to match any schema with compatible: ['silabs,si4713']
arch/arm/boot/dts/omap3-n900.dt.yaml: lis3lv02d@1d: 'Vdd-supply', 'Vdd_IO-supply', 'st,axis-x', 'st,axis-y', 'st,axis-z', 'st,click-latency', 'st,click-single-x', 'st,click-single-y', 'st,click-single-z', 'st,click-threshold-x', 'st,click-threshold-y', 'st,click-threshold-z', 'st,click-time-limit', 'st,hipass1-disable', 'st,hipass2-disable', 'st,irq2-click', 'st,max-limit-x', 'st,max-limit-y', 'st,max-limit-z', 'st,min-limit-x', 'st,min-limit-y', 'st,min-limit-z', 'st,wakeup-threshold', 'st,wakeup-x-hi', 'st,wakeup-y-hi', 'st,wakeup2-threshold', 'st,wakeup2-z-hi' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/iio/st,st-sensors.yaml
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48060000/camera@3e: failed to match any schema with compatible: ['toshiba,et8ek8']
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/i2c@48060000/dac@c: failed to match any schema with compatible: ['adi,ad5820']
arch/arm/boot/dts/omap3-n900.dt.yaml: tsc2005@0: $nodename:0: 'tsc2005@0' does not match '^touchscreen(@.*)?$'
From schema: Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yaml
arch/arm/boot/dts/omap3-n900.dt.yaml:0:0: /ocp@68000000/spi@480ba000/wl1251@0: failed to match any schema with compatible: ['ti,wl1251']
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[djwong-xfs:repair-symlink-swapext 313/325] include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_344' declared with attribute error: BUILD_BUG_ON failed: xfbtree_bbsize() != xfo_to_bb(1)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: 53f0df23f10ebce0fd9e928cafd6a6c11dd9effc [313/325] xfs: support in-memory btrees
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20211216/202112161552.z3DAtTY4-lk...)
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/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout 53f0df23f10ebce0fd9e928cafd6a6c11dd9effc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash fs/xfs/
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 >>):
In file included from <command-line>:
fs/xfs/scrub/xfbtree.c: In function 'xfbtree_ptr_to_daddr':
>> include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_344' declared with attribute error: BUILD_BUG_ON failed: xfbtree_bbsize() != xfo_to_bb(1)
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:316:25: note: in definition of macro '__compiletime_assert'
316 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
fs/xfs/scrub/xfbtree.c:165:9: note: in expansion of macro 'BUILD_BUG_ON'
165 | BUILD_BUG_ON(xfbtree_bbsize() != xfo_to_bb(1));
| ^~~~~~~~~~~~
vim +/__compiletime_assert_344 +335 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 326 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 328 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 329 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 330 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 331 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 332 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 333 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 334 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @335 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 336
:::::: The code at line 335 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week