Re: [PATCH v2 21/24] dyndbg: adapt header macros to pass print-class
by kernel test robot
Hi Jim,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on next-20200613]
[cannot apply to jeyu/modules-next linux/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jim-Cromie/dynamic_debug-cleanup...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git df2fbf5bfa0e7fff8b4784507e4d68f200454318
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 >>, old ones prefixed by <<):
drivers/dma/iop-adma.c: In function 'iop_adma_alloc_chan_resources':
drivers/dma/iop-adma.c:448:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
448 | hw_desc = (char *) iop_chan->device->dma_desc_pool;
| ^
drivers/dma/iop-adma.c:450:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
450 | (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE];
| ^
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/dma/iop-adma.c:13:
drivers/dma/iop-adma.c: In function 'iop_adma_probe':
drivers/dma/iop-adma.c:1302:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1302 | (void *) adev->dma_desc_pool);
| ^
include/linux/dynamic_debug.h:130:15: note: in definition of macro '__dynamic_func_call_cl'
130 | func(&id, ##__VA_ARGS__); | ^~~~~~~~~~~
>> include/linux/dynamic_debug.h:170:2: note: in expansion of macro '_dynamic_func_call_cl'
170 | _dynamic_func_call_cl(cl, fmt, __dynamic_dev_dbg, | ^~~~~~~~~~~~~~~~~~~~~
>> include/linux/dynamic_debug.h:184:2: note: in expansion of macro 'dynamic_dev_dbg_cl'
184 | dynamic_dev_dbg_cl(0, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/dma/iop-adma.c:1300:2: note: in expansion of macro 'dev_dbg'
1300 | dev_dbg(&pdev->dev, "%s: allocated descriptor pool virt %p phys %pn",
| ^~~~~~~
vim +/_dynamic_func_call_cl +170 include/linux/dynamic_debug.h
126
127 #define __dynamic_func_call_cl(cl, id, fmt, func, ...) do { \
128 DEFINE_DYNAMIC_DEBUG_METADATA_CL(cl, id, fmt); \
129 if (DYNAMIC_DEBUG_BRANCH(id)) \
130 func(&id, ##__VA_ARGS__); \
131 } while (0)
132 #define __dynamic_func_call(id, fmt, func, ...) \
133 __dynamic_func_call_cl(0, id, fmt, func, ...)
134
135 #define __dynamic_func_call_no_desc_cl(cl, id, fmt, func, ...) do { \
136 DEFINE_DYNAMIC_DEBUG_METADATA_CL(cl, id, fmt); \
137 if (DYNAMIC_DEBUG_BRANCH(id)) \
138 func(__VA_ARGS__); \
139 } while (0)
140 #define __dynamic_func_call_no_desc(cl, id, fmt, func, ...) \
141 __dynamic_func_call_no_desc_cl(0, cl, id, fmt, func, ##__VA_ARGS__)
142
143 /*
144 * "Factory macro" for generating a call to func, guarded by a
145 * DYNAMIC_DEBUG_BRANCH. The dynamic debug descriptor will be
146 * initialized using the fmt argument. The function will be called with
147 * the address of the descriptor as first argument, followed by all
148 * the varargs. Note that fmt is repeated in invocations of this
149 * macro.
150 */
151 #define _dynamic_func_call_cl(cl, fmt, func, ...) \
152 __dynamic_func_call_cl(cl, __UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
153 #define _dynamic_func_call(fmt, func, ...) \
154 _dynamic_func_call_cl(0, fmt, func, ##__VA_ARGS__)
155 /*
156 * A variant that does the same, except that the descriptor is not
157 * passed as the first argument to the function; it is only called
158 * with precisely the macro's varargs.
159 */
160 #define _dynamic_func_call_no_desc_cl(cl, fmt, func, ...) \
161 __dynamic_func_call_no_desc_cl(cl, __UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
162 #define _dynamic_func_call_no_desc(fmt, func, ...) \
163 _dynamic_func_call_no_desc_cl(0, fmt, func, ##__VA_ARGS__)
164
165 #define dynamic_pr_debug_cl(cl, fmt, ...) \
166 _dynamic_func_call_cl(cl, fmt, __dynamic_pr_debug, \
167 pr_fmt(fmt), ##__VA_ARGS__)
168
169 #define dynamic_dev_dbg_cl(cl, dev, fmt, ...) \
> 170 _dynamic_func_call_cl(cl, fmt, __dynamic_dev_dbg, \
171 dev, fmt, ##__VA_ARGS__)
172
173 #define dynamic_netdev_dbg_cl(cl, dev, fmt, ...) \
174 _dynamic_func_call_cl(cl, fmt, __dynamic_netdev_dbg, \
175 dev, fmt, ##__VA_ARGS__)
176
177 #define dynamic_ibdev_dbg_cl(cl, dev, fmt, ...) \
178 _dynamic_func_call_cl(cl, fmt, __dynamic_ibdev_dbg, \
179 dev, fmt, ##__VA_ARGS__)
180
181 #define dynamic_pr_debug(...) \
182 dynamic_pr_debug_cl(0, ##__VA_ARGS__)
183 #define dynamic_dev_dbg(...) \
> 184 dynamic_dev_dbg_cl(0, ##__VA_ARGS__)
185 #define dynamic_netdev_dbg(...) \
186 dynamic_netdev_dbg_cl(0, ##__VA_ARGS__)
187 #define dynamic_ibdev_dbg(...) \
188 dynamic_ibdev_dbg_cl(0, ##__VA_ARGS__)
189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] staging: android: ashmem.c: Cleanup
by kernel test robot
Hi Dio,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[cannot apply to aa5af974127d317071d6225a0f3678c5f520e7ce]
url: https://github.com/0day-ci/linux/commits/Dio-Putra/staging-android-ashmem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git af7b4801030c07637840191c69eb666917e4135d
config: powerpc-randconfig-r016-20200614 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project c669a1ed6386d57a75a602b53266466dae1e1d84)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>, old ones prefixed by <<):
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/android/ashmem.c:26:
In file included from include/linux/shmem_fs.h:6:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:118:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/android/ashmem.c:26:
In file included from include/linux/shmem_fs.h:6:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:120:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/android/ashmem.c:26:
In file included from include/linux/shmem_fs.h:6:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:122:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/android/ashmem.c:26:
In file included from include/linux/shmem_fs.h:6:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:124:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/staging/android/ashmem.c:418:16: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops = *vmfile->f_op;
~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:370:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
drivers/staging/android/ashmem.c:419:21: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops.mmap = ashmem_vmfile_mmap;
~~~~~~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:370:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
drivers/staging/android/ashmem.c:420:34: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops.get_unmapped_area =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:370:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
6 warnings and 3 errors generated.
vim +418 drivers/staging/android/ashmem.c
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 367
11980c2ac4ccfa Robert Love 2011-12-20 368 static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
11980c2ac4ccfa Robert Love 2011-12-20 369 {
7fe32ab69ec805 Dio Putra 2020-06-14 370 static const struct file_operations vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 371 struct ashmem_area *asma = file->private_data;
11980c2ac4ccfa Robert Love 2011-12-20 372 int ret = 0;
11980c2ac4ccfa Robert Love 2011-12-20 373
11980c2ac4ccfa Robert Love 2011-12-20 374 mutex_lock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 375
11980c2ac4ccfa Robert Love 2011-12-20 376 /* user needs to SET_SIZE before mapping */
59848d6aded59a Alistair Strachan 2018-06-19 377 if (!asma->size) {
11980c2ac4ccfa Robert Love 2011-12-20 378 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 379 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 380 }
11980c2ac4ccfa Robert Love 2011-12-20 381
8632c614565d0c Alistair Strachan 2018-06-19 382 /* requested mapping size larger than object size */
8632c614565d0c Alistair Strachan 2018-06-19 383 if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
11980c2ac4ccfa Robert Love 2011-12-20 384 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 385 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 386 }
11980c2ac4ccfa Robert Love 2011-12-20 387
11980c2ac4ccfa Robert Love 2011-12-20 388 /* requested protection bits must match our allowed protection mask */
59848d6aded59a Alistair Strachan 2018-06-19 389 if ((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
59848d6aded59a Alistair Strachan 2018-06-19 390 calc_vm_prot_bits(PROT_MASK, 0)) {
11980c2ac4ccfa Robert Love 2011-12-20 391 ret = -EPERM;
11980c2ac4ccfa Robert Love 2011-12-20 392 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 393 }
56f76fc68492af Arve Hjønnevåg 2011-12-20 394 vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
11980c2ac4ccfa Robert Love 2011-12-20 395
11980c2ac4ccfa Robert Love 2011-12-20 396 if (!asma->file) {
11980c2ac4ccfa Robert Love 2011-12-20 397 char *name = ASHMEM_NAME_DEF;
11980c2ac4ccfa Robert Love 2011-12-20 398 struct file *vmfile;
11980c2ac4ccfa Robert Love 2011-12-20 399
11980c2ac4ccfa Robert Love 2011-12-20 400 if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0')
11980c2ac4ccfa Robert Love 2011-12-20 401 name = asma->name;
11980c2ac4ccfa Robert Love 2011-12-20 402
11980c2ac4ccfa Robert Love 2011-12-20 403 /* ... and allocate the backing shmem file */
11980c2ac4ccfa Robert Love 2011-12-20 404 vmfile = shmem_file_setup(name, asma->size, vma->vm_flags);
7f44cb0ba88b40 Viresh Kumar 2015-07-31 405 if (IS_ERR(vmfile)) {
11980c2ac4ccfa Robert Love 2011-12-20 406 ret = PTR_ERR(vmfile);
11980c2ac4ccfa Robert Love 2011-12-20 407 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 408 }
97fbfef6bd5978 Shuxiao Zhang 2017-04-06 409 vmfile->f_mode |= FMODE_LSEEK;
11980c2ac4ccfa Robert Love 2011-12-20 410 asma->file = vmfile;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 411 /*
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 412 * override mmap operation of the vmfile so that it can't be
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 413 * remapped which would lead to creation of a new vma with no
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 414 * asma permission checks. Have to override get_unmapped_area
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 415 * as well to prevent VM_BUG_ON check for f_ops modification.
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 416 */
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 417 if (!vmfile_fops.mmap) {
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @418 vmfile_fops = *vmfile->f_op;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 419 vmfile_fops.mmap = ashmem_vmfile_mmap;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 420 vmfile_fops.get_unmapped_area =
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 421 ashmem_vmfile_get_unmapped_area;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 422 }
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 423 vmfile->f_op = &vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 424 }
11980c2ac4ccfa Robert Love 2011-12-20 425 get_file(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 426
11980c2ac4ccfa Robert Love 2011-12-20 427 /*
11980c2ac4ccfa Robert Love 2011-12-20 428 * XXX - Reworked to use shmem_zero_setup() instead of
11980c2ac4ccfa Robert Love 2011-12-20 429 * shmem_set_file while we're in staging. -jstultz
11980c2ac4ccfa Robert Love 2011-12-20 430 */
11980c2ac4ccfa Robert Love 2011-12-20 431 if (vma->vm_flags & VM_SHARED) {
11980c2ac4ccfa Robert Love 2011-12-20 432 ret = shmem_zero_setup(vma);
11980c2ac4ccfa Robert Love 2011-12-20 433 if (ret) {
11980c2ac4ccfa Robert Love 2011-12-20 434 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 435 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 436 }
44960f2a7b63e2 John Stultz 2018-07-31 437 } else {
44960f2a7b63e2 John Stultz 2018-07-31 438 vma_set_anonymous(vma);
11980c2ac4ccfa Robert Love 2011-12-20 439 }
11980c2ac4ccfa Robert Love 2011-12-20 440
11980c2ac4ccfa Robert Love 2011-12-20 441 if (vma->vm_file)
11980c2ac4ccfa Robert Love 2011-12-20 442 fput(vma->vm_file);
11980c2ac4ccfa Robert Love 2011-12-20 443 vma->vm_file = asma->file;
11980c2ac4ccfa Robert Love 2011-12-20 444
11980c2ac4ccfa Robert Love 2011-12-20 445 out:
11980c2ac4ccfa Robert Love 2011-12-20 446 mutex_unlock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 447 return ret;
11980c2ac4ccfa Robert Love 2011-12-20 448 }
11980c2ac4ccfa Robert Love 2011-12-20 449
:::::: The code at line 418 was first introduced by commit
:::::: 6d67b0290b4b84c477e6a2fc6e005e174d3c7786 staging: android: ashmem: Disallow ashmem memory from being remapped
:::::: TO: Suren Baghdasaryan <surenb(a)google.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] staging: android: ashmem.c: Cleanup
by kernel test robot
Hi Dio,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[cannot apply to aa5af974127d317071d6225a0f3678c5f520e7ce]
url: https://github.com/0day-ci/linux/commits/Dio-Putra/staging-android-ashmem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git af7b4801030c07637840191c69eb666917e4135d
config: x86_64-randconfig-m001-20200614 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
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 >>, old ones prefixed by <<):
drivers/staging/android/ashmem.c: In function 'ashmem_mmap':
>> drivers/staging/android/ashmem.c:418:16: error: assignment of read-only variable 'vmfile_fops'
418 | vmfile_fops = *vmfile->f_op;
| ^
>> drivers/staging/android/ashmem.c:419:21: error: assignment of member 'mmap' in read-only object
419 | vmfile_fops.mmap = ashmem_vmfile_mmap;
| ^
>> drivers/staging/android/ashmem.c:420:34: error: assignment of member 'get_unmapped_area' in read-only object
420 | vmfile_fops.get_unmapped_area =
| ^
vim +/vmfile_fops +418 drivers/staging/android/ashmem.c
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 367
11980c2ac4ccfa Robert Love 2011-12-20 368 static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
11980c2ac4ccfa Robert Love 2011-12-20 369 {
7fe32ab69ec805 Dio Putra 2020-06-14 370 static const struct file_operations vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 371 struct ashmem_area *asma = file->private_data;
11980c2ac4ccfa Robert Love 2011-12-20 372 int ret = 0;
11980c2ac4ccfa Robert Love 2011-12-20 373
11980c2ac4ccfa Robert Love 2011-12-20 374 mutex_lock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 375
11980c2ac4ccfa Robert Love 2011-12-20 376 /* user needs to SET_SIZE before mapping */
59848d6aded59a Alistair Strachan 2018-06-19 377 if (!asma->size) {
11980c2ac4ccfa Robert Love 2011-12-20 378 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 379 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 380 }
11980c2ac4ccfa Robert Love 2011-12-20 381
8632c614565d0c Alistair Strachan 2018-06-19 382 /* requested mapping size larger than object size */
8632c614565d0c Alistair Strachan 2018-06-19 383 if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
11980c2ac4ccfa Robert Love 2011-12-20 384 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 385 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 386 }
11980c2ac4ccfa Robert Love 2011-12-20 387
11980c2ac4ccfa Robert Love 2011-12-20 388 /* requested protection bits must match our allowed protection mask */
59848d6aded59a Alistair Strachan 2018-06-19 389 if ((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
59848d6aded59a Alistair Strachan 2018-06-19 390 calc_vm_prot_bits(PROT_MASK, 0)) {
11980c2ac4ccfa Robert Love 2011-12-20 391 ret = -EPERM;
11980c2ac4ccfa Robert Love 2011-12-20 392 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 393 }
56f76fc68492af Arve Hjønnevåg 2011-12-20 394 vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
11980c2ac4ccfa Robert Love 2011-12-20 395
11980c2ac4ccfa Robert Love 2011-12-20 396 if (!asma->file) {
11980c2ac4ccfa Robert Love 2011-12-20 397 char *name = ASHMEM_NAME_DEF;
11980c2ac4ccfa Robert Love 2011-12-20 398 struct file *vmfile;
11980c2ac4ccfa Robert Love 2011-12-20 399
11980c2ac4ccfa Robert Love 2011-12-20 400 if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0')
11980c2ac4ccfa Robert Love 2011-12-20 401 name = asma->name;
11980c2ac4ccfa Robert Love 2011-12-20 402
11980c2ac4ccfa Robert Love 2011-12-20 403 /* ... and allocate the backing shmem file */
11980c2ac4ccfa Robert Love 2011-12-20 404 vmfile = shmem_file_setup(name, asma->size, vma->vm_flags);
7f44cb0ba88b40 Viresh Kumar 2015-07-31 405 if (IS_ERR(vmfile)) {
11980c2ac4ccfa Robert Love 2011-12-20 406 ret = PTR_ERR(vmfile);
11980c2ac4ccfa Robert Love 2011-12-20 407 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 408 }
97fbfef6bd5978 Shuxiao Zhang 2017-04-06 409 vmfile->f_mode |= FMODE_LSEEK;
11980c2ac4ccfa Robert Love 2011-12-20 410 asma->file = vmfile;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 411 /*
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 412 * override mmap operation of the vmfile so that it can't be
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 413 * remapped which would lead to creation of a new vma with no
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 414 * asma permission checks. Have to override get_unmapped_area
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 415 * as well to prevent VM_BUG_ON check for f_ops modification.
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 416 */
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 417 if (!vmfile_fops.mmap) {
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @418 vmfile_fops = *vmfile->f_op;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @419 vmfile_fops.mmap = ashmem_vmfile_mmap;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @420 vmfile_fops.get_unmapped_area =
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 421 ashmem_vmfile_get_unmapped_area;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 422 }
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 423 vmfile->f_op = &vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 424 }
11980c2ac4ccfa Robert Love 2011-12-20 425 get_file(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 426
11980c2ac4ccfa Robert Love 2011-12-20 427 /*
11980c2ac4ccfa Robert Love 2011-12-20 428 * XXX - Reworked to use shmem_zero_setup() instead of
11980c2ac4ccfa Robert Love 2011-12-20 429 * shmem_set_file while we're in staging. -jstultz
11980c2ac4ccfa Robert Love 2011-12-20 430 */
11980c2ac4ccfa Robert Love 2011-12-20 431 if (vma->vm_flags & VM_SHARED) {
11980c2ac4ccfa Robert Love 2011-12-20 432 ret = shmem_zero_setup(vma);
11980c2ac4ccfa Robert Love 2011-12-20 433 if (ret) {
11980c2ac4ccfa Robert Love 2011-12-20 434 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 435 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 436 }
44960f2a7b63e2 John Stultz 2018-07-31 437 } else {
44960f2a7b63e2 John Stultz 2018-07-31 438 vma_set_anonymous(vma);
11980c2ac4ccfa Robert Love 2011-12-20 439 }
11980c2ac4ccfa Robert Love 2011-12-20 440
11980c2ac4ccfa Robert Love 2011-12-20 441 if (vma->vm_file)
11980c2ac4ccfa Robert Love 2011-12-20 442 fput(vma->vm_file);
11980c2ac4ccfa Robert Love 2011-12-20 443 vma->vm_file = asma->file;
11980c2ac4ccfa Robert Love 2011-12-20 444
11980c2ac4ccfa Robert Love 2011-12-20 445 out:
11980c2ac4ccfa Robert Love 2011-12-20 446 mutex_unlock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 447 return ret;
11980c2ac4ccfa Robert Love 2011-12-20 448 }
11980c2ac4ccfa Robert Love 2011-12-20 449
:::::: The code at line 418 was first introduced by commit
:::::: 6d67b0290b4b84c477e6a2fc6e005e174d3c7786 staging: android: ashmem: Disallow ashmem memory from being remapped
:::::: TO: Suren Baghdasaryan <surenb(a)google.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jirislaby:devel 65/69] arch/arm64/kernel/head.S:420: Error: symbol `SYM_L_LOCAL' is already defined
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 94ff56d3b360c9a7dc6d0bb3f3f26ec3f5f58592
commit: fc32f1ee21f93af9cd4f597d7c749dd42939e23e [65/69] linkage: asm/x86, perform symbol pair checking (per group)
config: arm64-randconfig-r026-20200612 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project d7e6f116f4517952fbdf5ad4b5ff67e378600c60)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout fc32f1ee21f93af9cd4f597d7c749dd42939e23e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>, old ones prefixed by <<):
arch/arm64/kernel/head.S: Assembler messages:
>> arch/arm64/kernel/head.S:279: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:420: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/head.S:420: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:495: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:662: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:662: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:705: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/head.S:705: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/head.S:723: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:723: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/head.S:729: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:729: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:741: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:741: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:764: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:764: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:800: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:800: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/head.S:826: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:826: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/head.S:846: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:846: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:857: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:857: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/kernel/head.S:962: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/head.S:962: Error: symbol `SYM_L_LOCAL' is already defined
/tmp/head-76229b.s: Error: .size expression for el2_setup does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for set_cpu_boot_mode_flag does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __create_page_tables does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __primary_switch does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __primary_switched does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for secondary_startup does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for secondary_holding_pen does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for secondary_entry does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __cpu_secondary_check52bitva does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __enable_mmu does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __secondary_switched does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __secondary_too_slow does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __no_granule_support does not evaluate to a constant
/tmp/head-76229b.s: Error: .size expression for __relocate_kernel does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/reloc_test_syms.S: Assembler messages:
>> arch/arm64/kernel/reloc_test_syms.S:8: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:14: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/reloc_test_syms.S:14: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:20: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:20: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:27: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:27: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:34: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:34: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:44: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:44: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:52: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:52: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:58: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:58: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:63: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:63: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:71: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:71: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/reloc_test_syms.S:79: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/reloc_test_syms.S:79: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for absolute_data64 does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for absolute_data32 does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for absolute_data16 does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for signed_movw does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for unsigned_movw does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_adrp does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_adrp_far does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_adr does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_data64 does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_data32 does not evaluate to a constant
/tmp/reloc_test_syms-bf46d9.s: Error: .size expression for relative_data16 does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/entry.S: Assembler messages:
>> arch/arm64/kernel/entry.S:901: Error: junk at end of line, first unrecognized character is `('
/tmp/entry-290aa7.s: Error: .size expression for cpu_switch_to does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/entry-fpsimd.S: Assembler messages:
>> arch/arm64/kernel/entry-fpsimd.S:19: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/entry-fpsimd.S:29: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/entry-fpsimd.S:29: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/entry-fpsimd.S:35: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/entry-fpsimd.S:35: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/entry-fpsimd.S:40: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/entry-fpsimd.S:40: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/kernel/entry-fpsimd.S:45: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/entry-fpsimd.S:45: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/entry-fpsimd-66374e.s: Error: .size expression for fpsimd_save_state does not evaluate to a constant
/tmp/entry-fpsimd-66374e.s: Error: .size expression for fpsimd_load_state does not evaluate to a constant
/tmp/entry-fpsimd-66374e.s: Error: .size expression for sve_save_state does not evaluate to a constant
/tmp/entry-fpsimd-66374e.s: Error: .size expression for sve_load_state does not evaluate to a constant
/tmp/entry-fpsimd-66374e.s: Error: .size expression for sve_get_vl does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/hyp-stub.S: Assembler messages:
>> arch/arm64/kernel/hyp-stub.S:109: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/hyp-stub.S:116: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/hyp-stub.S:116: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/hyp-stub-9b7a23.s: Error: .size expression for __hyp_set_vectors does not evaluate to a constant
/tmp/hyp-stub-9b7a23.s: Error: .size expression for __hyp_reset_vectors does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/smccc-call.S: Assembler messages:
>> arch/arm64/kernel/smccc-call.S:33: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/smccc-call.S:44: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/smccc-call.S:44: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/smccc-call-e892d2.s: Error: .size expression for __arm_smccc_smc does not evaluate to a constant
/tmp/smccc-call-e892d2.s: Error: .size expression for __arm_smccc_hvc does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kernel/sleep.S: Assembler messages:
>> arch/arm64/kernel/sleep.S:65: Error: junk at end of line, first unrecognized character is `('
arch/arm64/kernel/sleep.S:113: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/kernel/sleep.S:113: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/sleep-0b7984.s: Error: .size expression for __cpu_suspend_enter does not evaluate to a constant
/tmp/sleep-0b7984.s: Error: .size expression for _cpu_resume does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/mm/cache.S: Assembler messages:
>> arch/arm64/mm/cache.S:27: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:40: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/mm/cache.S:40: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:80: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:80: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:108: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:108: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:122: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:122: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:141: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:142: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:142: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:180: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/mm/cache.S:180: Error: symbol `SYM_L_LOCAL' is already defined
arch/arm64/mm/cache.S:181: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:181: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:203: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:203: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:219: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:219: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:230: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:230: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/cache.S:242: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/cache.S:242: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/cache-6d3f62.s: Error: .size expression for __flush_icache_range does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __flush_cache_user_range does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for invalidate_icache_range does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __flush_dcache_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __clean_dcache_area_pou does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __inval_dcache_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __dma_inv_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __clean_dcache_area_poc does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __dma_clean_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __clean_dcache_area_pop does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __dma_flush_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __dma_map_area does not evaluate to a constant
/tmp/cache-6d3f62.s: Error: .size expression for __dma_unmap_area does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/mm/proc.S: Assembler messages:
>> arch/arm64/mm/proc.S:64: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/proc.S:101: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/mm/proc.S:101: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/proc.S:182: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/proc.S:182: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/proc.S:222: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/proc.S:222: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/mm/proc.S:407: Error: junk at end of line, first unrecognized character is `('
arch/arm64/mm/proc.S:407: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/proc-2e1b71.s: Error: .size expression for cpu_do_suspend does not evaluate to a constant
/tmp/proc-2e1b71.s: Error: .size expression for cpu_do_resume does not evaluate to a constant
/tmp/proc-2e1b71.s: Error: .size expression for idmap_cpu_replace_ttbr1 does not evaluate to a constant
/tmp/proc-2e1b71.s: Error: .size expression for idmap_kpti_install_ng_mappings does not evaluate to a constant
/tmp/proc-2e1b71.s: Error: .size expression for __cpu_setup does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/kvm/hyp.S: Assembler messages:
>> arch/arm64/kvm/hyp.S:31: Error: junk at end of line, first unrecognized character is `('
/tmp/hyp-a75cac.s: Error: .size expression for __kvm_call_hyp does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
--
arch/arm64/xen/hypercall.S: Assembler messages:
>> arch/arm64/xen/hypercall.S:74: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:75: Error: junk at end of line, first unrecognized character is `('
>> arch/arm64/xen/hypercall.S:75: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:76: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:76: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:77: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:77: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:78: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:78: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:79: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:79: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:80: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:80: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:81: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:81: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:82: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:82: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:83: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:83: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:84: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:84: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:85: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:85: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:86: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:86: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:87: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:87: Error: symbol `SYM_L_GLOBAL' is already defined
arch/arm64/xen/hypercall.S:89: Error: junk at end of line, first unrecognized character is `('
arch/arm64/xen/hypercall.S:89: Error: symbol `SYM_L_GLOBAL' is already defined
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_xen_version does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_console_io does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_grant_table_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_sched_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_event_channel_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_hvm_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_memory_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_physdev_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_vcpu_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_tmem_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_platform_op_raw does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_multicall does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_vm_assist does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for HYPERVISOR_dm_op does not evaluate to a constant
/tmp/hypercall-472250.s: Error: .size expression for privcmd_call does not evaluate to a constant
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
..
vim +420 arch/arm64/kernel/head.S
0370b31e48454d Steve Capper 2018-01-11 266
0370b31e48454d Steve Capper 2018-01-11 267 compute_indices \vstart, \vend, #SWAPPER_BLOCK_SHIFT, #PTRS_PER_PTE, \istart, \iend, \count
0370b31e48454d Steve Capper 2018-01-11 268 bic \count, \phys, #SWAPPER_BLOCK_SIZE - 1
0370b31e48454d Steve Capper 2018-01-11 269 populate_entries \tbl, \count, \istart, \iend, \flags, #SWAPPER_BLOCK_SIZE, \tmp
034edabe6cf1d0 Laura Abbott 2014-11-21 270 .endm
034edabe6cf1d0 Laura Abbott 2014-11-21 271
034edabe6cf1d0 Laura Abbott 2014-11-21 272 /*
034edabe6cf1d0 Laura Abbott 2014-11-21 273 * Setup the initial page tables. We only setup the barest amount which is
034edabe6cf1d0 Laura Abbott 2014-11-21 274 * required to get the kernel running. The following sections are required:
034edabe6cf1d0 Laura Abbott 2014-11-21 275 * - identity mapping to enable the MMU (low address, TTBR0)
034edabe6cf1d0 Laura Abbott 2014-11-21 276 * - first few MB of the kernel linear mapping to jump to once the MMU has
61bd93ce801bb6 Ard Biesheuvel 2015-06-01 277 * been enabled
034edabe6cf1d0 Laura Abbott 2014-11-21 278 */
c63d9f82db9439 Mark Brown 2020-02-18 @279 SYM_FUNC_START_LOCAL(__create_page_tables)
f80fb3a3d50843 Ard Biesheuvel 2016-01-26 280 mov x28, lr
034edabe6cf1d0 Laura Abbott 2014-11-21 281
034edabe6cf1d0 Laura Abbott 2014-11-21 282 /*
8eb7e28d4c642c Jun Yao 2018-09-24 283 * Invalidate the init page tables to avoid potential dirty cache lines
8eb7e28d4c642c Jun Yao 2018-09-24 284 * being evicted. Other page tables are allocated in rodata as part of
8eb7e28d4c642c Jun Yao 2018-09-24 285 * the kernel image, and thus are clean to the PoC per the boot
8eb7e28d4c642c Jun Yao 2018-09-24 286 * protocol.
034edabe6cf1d0 Laura Abbott 2014-11-21 287 */
8eb7e28d4c642c Jun Yao 2018-09-24 288 adrp x0, init_pg_dir
2b5548b68199c1 Jun Yao 2018-09-24 289 adrp x1, init_pg_end
0370b31e48454d Steve Capper 2018-01-11 290 sub x1, x1, x0
d46befef4c03fb Robin Murphy 2017-07-25 291 bl __inval_dcache_area
034edabe6cf1d0 Laura Abbott 2014-11-21 292
034edabe6cf1d0 Laura Abbott 2014-11-21 293 /*
8eb7e28d4c642c Jun Yao 2018-09-24 294 * Clear the init page tables.
034edabe6cf1d0 Laura Abbott 2014-11-21 295 */
8eb7e28d4c642c Jun Yao 2018-09-24 296 adrp x0, init_pg_dir
2b5548b68199c1 Jun Yao 2018-09-24 297 adrp x1, init_pg_end
0370b31e48454d Steve Capper 2018-01-11 298 sub x1, x1, x0
034edabe6cf1d0 Laura Abbott 2014-11-21 299 1: stp xzr, xzr, [x0], #16
034edabe6cf1d0 Laura Abbott 2014-11-21 300 stp xzr, xzr, [x0], #16
034edabe6cf1d0 Laura Abbott 2014-11-21 301 stp xzr, xzr, [x0], #16
034edabe6cf1d0 Laura Abbott 2014-11-21 302 stp xzr, xzr, [x0], #16
d46befef4c03fb Robin Murphy 2017-07-25 303 subs x1, x1, #64
d46befef4c03fb Robin Murphy 2017-07-25 304 b.ne 1b
034edabe6cf1d0 Laura Abbott 2014-11-21 305
b03cc885328e3c Ard Biesheuvel 2016-04-18 306 mov x7, SWAPPER_MM_MMUFLAGS
034edabe6cf1d0 Laura Abbott 2014-11-21 307
034edabe6cf1d0 Laura Abbott 2014-11-21 308 /*
034edabe6cf1d0 Laura Abbott 2014-11-21 309 * Create the identity mapping.
034edabe6cf1d0 Laura Abbott 2014-11-21 310 */
aea73abb902651 Ard Biesheuvel 2016-08-16 311 adrp x0, idmap_pg_dir
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 312 adrp x3, __idmap_text_start // __pa(__idmap_text_start)
dd006da21646f1 Ard Biesheuvel 2015-03-19 313
b6d00d47e81a49 Steve Capper 2019-08-07 314 #ifdef CONFIG_ARM64_VA_BITS_52
67e7fdfcc6824a Steve Capper 2018-12-06 315 mrs_s x6, SYS_ID_AA64MMFR2_EL1
67e7fdfcc6824a Steve Capper 2018-12-06 316 and x6, x6, #(0xf << ID_AA64MMFR2_LVA_SHIFT)
67e7fdfcc6824a Steve Capper 2018-12-06 317 mov x5, #52
67e7fdfcc6824a Steve Capper 2018-12-06 318 cbnz x6, 1f
67e7fdfcc6824a Steve Capper 2018-12-06 319 #endif
90ec95cda91a02 Steve Capper 2019-08-07 320 mov x5, #VA_BITS_MIN
67e7fdfcc6824a Steve Capper 2018-12-06 321 1:
5383cc6efed137 Steve Capper 2019-08-07 322 adr_l x6, vabits_actual
67e7fdfcc6824a Steve Capper 2018-12-06 323 str x5, [x6]
67e7fdfcc6824a Steve Capper 2018-12-06 324 dmb sy
67e7fdfcc6824a Steve Capper 2018-12-06 325 dc ivac, x6 // Invalidate potentially stale cache line
67e7fdfcc6824a Steve Capper 2018-12-06 326
dd006da21646f1 Ard Biesheuvel 2015-03-19 327 /*
fa2a8445b1d381 Kristina Martsenko 2017-12-13 328 * VA_BITS may be too small to allow for an ID mapping to be created
fa2a8445b1d381 Kristina Martsenko 2017-12-13 329 * that covers system RAM if that is located sufficiently high in the
fa2a8445b1d381 Kristina Martsenko 2017-12-13 330 * physical address space. So for the ID map, use an extended virtual
fa2a8445b1d381 Kristina Martsenko 2017-12-13 331 * range in that case, and configure an additional translation level
fa2a8445b1d381 Kristina Martsenko 2017-12-13 332 * if needed.
fa2a8445b1d381 Kristina Martsenko 2017-12-13 333 *
dd006da21646f1 Ard Biesheuvel 2015-03-19 334 * Calculate the maximum allowed value for TCR_EL1.T0SZ so that the
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 335 * entire ID map region can be mapped. As T0SZ == (64 - #bits used),
dd006da21646f1 Ard Biesheuvel 2015-03-19 336 * this number conveniently equals the number of leading zeroes in
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 337 * the physical address of __idmap_text_end.
dd006da21646f1 Ard Biesheuvel 2015-03-19 338 */
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 339 adrp x5, __idmap_text_end
dd006da21646f1 Ard Biesheuvel 2015-03-19 340 clz x5, x5
dd006da21646f1 Ard Biesheuvel 2015-03-19 341 cmp x5, TCR_T0SZ(VA_BITS) // default T0SZ small enough?
fa2a8445b1d381 Kristina Martsenko 2017-12-13 342 b.ge 1f // .. then skip VA range extension
dd006da21646f1 Ard Biesheuvel 2015-03-19 343
0c20856c260236 Mark Rutland 2015-03-24 344 adr_l x6, idmap_t0sz
0c20856c260236 Mark Rutland 2015-03-24 345 str x5, [x6]
0c20856c260236 Mark Rutland 2015-03-24 346 dmb sy
0c20856c260236 Mark Rutland 2015-03-24 347 dc ivac, x6 // Invalidate potentially stale cache line
dd006da21646f1 Ard Biesheuvel 2015-03-19 348
fa2a8445b1d381 Kristina Martsenko 2017-12-13 349 #if (VA_BITS < 48)
fa2a8445b1d381 Kristina Martsenko 2017-12-13 350 #define EXTRA_SHIFT (PGDIR_SHIFT + PAGE_SHIFT - 3)
fa2a8445b1d381 Kristina Martsenko 2017-12-13 351 #define EXTRA_PTRS (1 << (PHYS_MASK_SHIFT - EXTRA_SHIFT))
fa2a8445b1d381 Kristina Martsenko 2017-12-13 352
fa2a8445b1d381 Kristina Martsenko 2017-12-13 353 /*
fa2a8445b1d381 Kristina Martsenko 2017-12-13 354 * If VA_BITS < 48, we have to configure an additional table level.
fa2a8445b1d381 Kristina Martsenko 2017-12-13 355 * First, we have to verify our assumption that the current value of
fa2a8445b1d381 Kristina Martsenko 2017-12-13 356 * VA_BITS was chosen such that all translation levels are fully
fa2a8445b1d381 Kristina Martsenko 2017-12-13 357 * utilised, and that lowering T0SZ will always result in an additional
fa2a8445b1d381 Kristina Martsenko 2017-12-13 358 * translation level to be configured.
fa2a8445b1d381 Kristina Martsenko 2017-12-13 359 */
fa2a8445b1d381 Kristina Martsenko 2017-12-13 360 #if VA_BITS != EXTRA_SHIFT
fa2a8445b1d381 Kristina Martsenko 2017-12-13 361 #error "Mismatch between VA_BITS and page size/number of translation levels"
dd006da21646f1 Ard Biesheuvel 2015-03-19 362 #endif
dd006da21646f1 Ard Biesheuvel 2015-03-19 363
fa2a8445b1d381 Kristina Martsenko 2017-12-13 364 mov x4, EXTRA_PTRS
fa2a8445b1d381 Kristina Martsenko 2017-12-13 365 create_table_entry x0, x3, EXTRA_SHIFT, x4, x5, x6
fa2a8445b1d381 Kristina Martsenko 2017-12-13 366 #else
fa2a8445b1d381 Kristina Martsenko 2017-12-13 367 /*
fa2a8445b1d381 Kristina Martsenko 2017-12-13 368 * If VA_BITS == 48, we don't have to configure an additional
fa2a8445b1d381 Kristina Martsenko 2017-12-13 369 * translation level, but the top-level table has more entries.
fa2a8445b1d381 Kristina Martsenko 2017-12-13 370 */
fa2a8445b1d381 Kristina Martsenko 2017-12-13 371 mov x4, #1 << (PHYS_MASK_SHIFT - PGDIR_SHIFT)
fa2a8445b1d381 Kristina Martsenko 2017-12-13 372 str_l x4, idmap_ptrs_per_pgd, x5
fa2a8445b1d381 Kristina Martsenko 2017-12-13 373 #endif
fa2a8445b1d381 Kristina Martsenko 2017-12-13 374 1:
fa2a8445b1d381 Kristina Martsenko 2017-12-13 375 ldr_l x4, idmap_ptrs_per_pgd
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 376 mov x5, x3 // __pa(__idmap_text_start)
5dfe9d7d23c26d Ard Biesheuvel 2015-06-01 377 adr_l x6, __idmap_text_end // __pa(__idmap_text_end)
0370b31e48454d Steve Capper 2018-01-11 378
0370b31e48454d Steve Capper 2018-01-11 379 map_memory x0, x1, x3, x6, x7, x3, x4, x10, x11, x12, x13, x14
034edabe6cf1d0 Laura Abbott 2014-11-21 380
034edabe6cf1d0 Laura Abbott 2014-11-21 381 /*
034edabe6cf1d0 Laura Abbott 2014-11-21 382 * Map the kernel image (starting with PHYS_OFFSET).
034edabe6cf1d0 Laura Abbott 2014-11-21 383 */
2b5548b68199c1 Jun Yao 2018-09-24 384 adrp x0, init_pg_dir
18b9c0d6419382 Ard Biesheuvel 2016-04-18 385 mov_q x5, KIMAGE_VADDR + TEXT_OFFSET // compile time __va(_text)
f80fb3a3d50843 Ard Biesheuvel 2016-01-26 386 add x5, x5, x23 // add KASLR displacement
fa2a8445b1d381 Kristina Martsenko 2017-12-13 387 mov x4, PTRS_PER_PGD
18b9c0d6419382 Ard Biesheuvel 2016-04-18 388 adrp x6, _end // runtime __pa(_end)
18b9c0d6419382 Ard Biesheuvel 2016-04-18 389 adrp x3, _text // runtime __pa(_text)
18b9c0d6419382 Ard Biesheuvel 2016-04-18 390 sub x6, x6, x3 // _end - _text
18b9c0d6419382 Ard Biesheuvel 2016-04-18 391 add x6, x6, x5 // runtime __va(_end)
0370b31e48454d Steve Capper 2018-01-11 392
0370b31e48454d Steve Capper 2018-01-11 393 map_memory x0, x1, x5, x6, x7, x3, x4, x10, x11, x12, x13, x14
034edabe6cf1d0 Laura Abbott 2014-11-21 394
034edabe6cf1d0 Laura Abbott 2014-11-21 395 /*
034edabe6cf1d0 Laura Abbott 2014-11-21 396 * Since the page tables have been populated with non-cacheable
9d2d75ede59bc1 Gavin Shan 2020-04-28 397 * accesses (MMU disabled), invalidate those tables again to
9d2d75ede59bc1 Gavin Shan 2020-04-28 398 * remove any speculatively loaded cache lines.
034edabe6cf1d0 Laura Abbott 2014-11-21 399 */
9d2d75ede59bc1 Gavin Shan 2020-04-28 400 dmb sy
9d2d75ede59bc1 Gavin Shan 2020-04-28 401
aea73abb902651 Ard Biesheuvel 2016-08-16 402 adrp x0, idmap_pg_dir
9d2d75ede59bc1 Gavin Shan 2020-04-28 403 adrp x1, idmap_pg_end
9d2d75ede59bc1 Gavin Shan 2020-04-28 404 sub x1, x1, x0
9d2d75ede59bc1 Gavin Shan 2020-04-28 405 bl __inval_dcache_area
9d2d75ede59bc1 Gavin Shan 2020-04-28 406
9d2d75ede59bc1 Gavin Shan 2020-04-28 407 adrp x0, init_pg_dir
2b5548b68199c1 Jun Yao 2018-09-24 408 adrp x1, init_pg_end
0370b31e48454d Steve Capper 2018-01-11 409 sub x1, x1, x0
d46befef4c03fb Robin Murphy 2017-07-25 410 bl __inval_dcache_area
034edabe6cf1d0 Laura Abbott 2014-11-21 411
f80fb3a3d50843 Ard Biesheuvel 2016-01-26 412 ret x28
c63d9f82db9439 Mark Brown 2020-02-18 413 SYM_FUNC_END(__create_page_tables)
034edabe6cf1d0 Laura Abbott 2014-11-21 414
034edabe6cf1d0 Laura Abbott 2014-11-21 415 /*
a871d354f795c4 Ard Biesheuvel 2015-03-04 416 * The following fragment of code is executed with the MMU enabled.
b929fe320e5f3c Ard Biesheuvel 2016-08-31 417 *
b929fe320e5f3c Ard Biesheuvel 2016-08-31 418 * x0 = __PHYS_OFFSET
034edabe6cf1d0 Laura Abbott 2014-11-21 419 */
c63d9f82db9439 Mark Brown 2020-02-18 @420 SYM_FUNC_START_LOCAL(__primary_switched)
60699ba18b69ff Ard Biesheuvel 2016-08-31 421 adrp x4, init_thread_union
60699ba18b69ff Ard Biesheuvel 2016-08-31 422 add sp, x4, #THREAD_SIZE
c02433dd6de32f Mark Rutland 2016-11-03 423 adr_l x5, init_task
c02433dd6de32f Mark Rutland 2016-11-03 424 msr sp_el0, x5 // Save thread_info
60699ba18b69ff Ard Biesheuvel 2016-08-31 425
:::::: The code at line 420 was first introduced by commit
:::::: c63d9f82db94399022a193cdfd57dbafa2a871cb arm64: head.S: Convert to modern annotations for assembly functions
:::::: TO: Mark Brown <broonie(a)kernel.org>
:::::: CC: Catalin Marinas <catalin.marinas(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [RFC 1/4] futex2: Add new futex interface
by kernel test robot
Hi "André,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on kselftest/next]
[also build test WARNING on tip/x86/asm v5.7]
[cannot apply to linus/master linux/master next-20200613]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Andr-Almeida/futex2-Add-new-fute...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: arm-randconfig-r006-20200612 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project d7e6f116f4517952fbdf5ad4b5ff67e378600c60)
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>, old ones prefixed by <<):
>> <stdin>:1520:2: warning: syscall futex_wait not implemented [-W#warnings]
#warning syscall futex_wait not implemented
^
>> <stdin>:1523:2: warning: syscall futex_wake not implemented [-W#warnings]
#warning syscall futex_wake not implemented
^
2 warnings generated.
--
>> <stdin>:1520:2: warning: syscall futex_wait not implemented [-W#warnings]
#warning syscall futex_wait not implemented
^
>> <stdin>:1523:2: warning: syscall futex_wake not implemented [-W#warnings]
#warning syscall futex_wake not implemented
^
2 warnings generated.
--
>> <stdin>:1520:2: warning: syscall futex_wait not implemented [-W#warnings]
#warning syscall futex_wait not implemented
^
>> <stdin>:1523:2: warning: syscall futex_wake not implemented [-W#warnings]
#warning syscall futex_wake not implemented
^
2 warnings generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[rcar:gmsl/dev 32/37] drivers/media/i2c/max9286.c:1482:13: warning: data argument not used by format string
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 0ee7afa8fd0cf3a613f9d643d42f2c7c9774c204
commit: 6649a879907dbffc1da93cf5c6af372910801b7f [32/37] DNI: max9286 of_ref_read debug
config: powerpc64-randconfig-r025-20200614 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project c669a1ed6386d57a75a602b53266466dae1e1d84)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git checkout 6649a879907dbffc1da93cf5c6af372910801b7f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>, old ones prefixed by <<):
>> drivers/media/i2c/max9286.c:1482:13: warning: data argument not used by format string [-Wformat-extra-args]
__LINE__, of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
drivers/media/i2c/max9286.c:1489:13: warning: data argument not used by format string [-Wformat-extra-args]
__LINE__, of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
drivers/media/i2c/max9286.c:1520:13: warning: data argument not used by format string [-Wformat-extra-args]
__LINE__, of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
3 warnings generated.
vim +1482 drivers/media/i2c/max9286.c
1413
1414 static int max9286_probe(struct i2c_client *client)
1415 {
1416 struct max9286_priv *priv;
1417 int ret;
1418
1419 priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
1420 if (!priv)
1421 return -ENOMEM;
1422
1423 mutex_init(&priv->mutex);
1424
1425 priv->client = client;
1426 i2c_set_clientdata(client, priv);
1427
1428 priv->gpiod_pwdn = devm_gpiod_get_optional(&client->dev, "enable",
1429 GPIOD_OUT_HIGH);
1430 if (IS_ERR(priv->gpiod_pwdn))
1431 return PTR_ERR(priv->gpiod_pwdn);
1432
1433 gpiod_set_consumer_name(priv->gpiod_pwdn, "max9286-pwdn");
1434 gpiod_set_value_cansleep(priv->gpiod_pwdn, 1);
1435
1436 /* Wait at least 4ms before the I2C lines latch to the address */
1437 if (priv->gpiod_pwdn)
1438 usleep_range(4000, 5000);
1439
1440 /*
1441 * We can have multiple MAX9286 instances on the same physical I2C
1442 * bus, and I2C children behind ports of separate MAX9286 instances
1443 * having the same I2C address. As the MAX9286 starts by default with
1444 * all ports enabled, we need to disable all ports on all MAX9286
1445 * instances before proceeding to further initialize the devices and
1446 * instantiate children.
1447 *
1448 * Start by just disabling all channels on the current device. Then,
1449 * if all other MAX9286 on the parent bus have been probed, proceed
1450 * to initialize them all, including the current one.
1451 */
1452 max9286_i2c_mux_close(priv);
1453
1454 /*
1455 * The MAX9286 initialises with auto-acknowledge enabled by default.
1456 * This means that if multiple MAX9286 devices are connected to an I2C
1457 * bus, another MAX9286 could ack I2C transfers meant for a device on
1458 * the other side of the GMSL links for this MAX9286 (such as a
1459 * MAX9271). To prevent that disable auto-acknowledge early on; it
1460 * will be enabled later as needed.
1461 */
1462 max9286_configure_i2c(priv, false);
1463
1464 ret = max9286_register_gpio(priv);
1465 if (ret)
1466 goto err_powerdown;
1467
1468 priv->regulator = devm_regulator_get(&client->dev, "poc");
1469 if (IS_ERR(priv->regulator)) {
1470 if (PTR_ERR(priv->regulator) != -EPROBE_DEFER)
1471 dev_err(&client->dev,
1472 "Unable to get PoC regulator (%ld)\n",
1473 PTR_ERR(priv->regulator));
1474 else
1475 dev_err(&client->dev, "Regulator not yet available -EPROBE_DEFER...\n");
1476
1477 ret = PTR_ERR(priv->regulator);
1478 goto err_powerdown;
1479 }
1480
1481 dev_err(&client->dev, "A) of_node pre parse_dt %d.\n",
> 1482 __LINE__, of_ref_read(client->dev.of_node));
1483
1484 ret = max9286_parse_dt(priv);
1485 if (ret)
1486 goto err_powerdown;
1487
1488 dev_err(&client->dev, "B) of_node post parse_dt %d.\n",
1489 __LINE__, of_ref_read(client->dev.of_node));
1490
1491 /* Add any userspace support before we return early. */
1492 max9286_debugfs_init(priv);
1493
1494 dev_err(&client->dev, "Pre-init");
1495
1496 ret = device_for_each_child(client->dev.parent, &client->dev,
1497 max9286_is_bound);
1498 if (ret)
1499 return 0;
1500
1501 dev_dbg(&client->dev,
1502 "All max9286 probed: start initialization sequence\n");
1503 ret = device_for_each_child(client->dev.parent, NULL,
1504 max9286_init);
1505 if (ret < 0)
1506 goto err_cleanup_dt;
1507
1508 /* Leave the mux channels disabled until they are selected. */
1509 max9286_i2c_mux_close(priv);
1510
1511 return 0;
1512
1513 err_cleanup_dt:
1514 max9286_cleanup_dt(priv);
1515 max9286_debugfs_remove(priv);
1516 err_powerdown:
1517 gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);
1518
1519 dev_err(&client->dev, "C) of_node post parse_dt %d.\n",
1520 __LINE__, of_ref_read(client->dev.of_node));
1521
1522 return ret;
1523 }
1524
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-review:UPDATE-20200613-235004/Borislav-Petkov/x86-msr-Filter-MSR-writes/20200612-185246 1/1] arch/x86/kernel/msr.c:281:28: sparse: sparse: incorrect type in argument 1 (different modifiers)
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200613-235004/Borislav-...
head: 24611fae296234f2f3d5e95062d44390a482887b
commit: 24611fae296234f2f3d5e95062d44390a482887b [1/1] x86/msr: Filter MSR writes
config: i386-randconfig-s001-20200612 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 24611fae296234f2f3d5e95062d44390a482887b
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>)
>> arch/x86/kernel/msr.c:281:28: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected char *str @@ got char const *val @@
>> arch/x86/kernel/msr.c:281:28: sparse: expected char *str
>> arch/x86/kernel/msr.c:281:28: sparse: got char const *val
vim +281 arch/x86/kernel/msr.c
278
279 static int set_allow_writes(const char *val, const struct kernel_param *cp)
280 {
> 281 char *s = strstrip(val);
282
283 if (!strcmp(s, "on"))
284 allow_writes = MSR_WRITES_ON;
285 else if (!strcmp(s, "off"))
286 allow_writes = MSR_WRITES_OFF;
287 else
288 allow_writes = MSR_WRITES_DEFAULT;
289
290 return 0;
291 }
292
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:dev-queue 5/56] drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2271:15: error: redefinition of 'truesize'
by kernel test robot
Hi Jesper,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 29d895410271a950e0b58ed9990bc2933b200ef7
commit: 0ca4b678d984828b7cdbd1d585e995f983853483 [5/56] ixgbe: fix XDP redirect on archs with PAGE_SIZE above 4K
config: alpha-randconfig-r014-20200612 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
git checkout 0ca4b678d984828b7cdbd1d585e995f983853483
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 >>, old ones prefixed by <<):
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_rx_buffer_flip':
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2271:15: error: redefinition of 'truesize'
2271 | unsigned int truesize = ring_uses_build_skb(rx_ring) ?
| ^~~~~~~~
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2267:15: note: previous definition of 'truesize' was here
2267 | unsigned int truesize = ixgbe_rx_frame_truesize(rx_ring, size);
| ^~~~~~~~
vim +/truesize +2271 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
2262
2263 static void ixgbe_rx_buffer_flip(struct ixgbe_ring *rx_ring,
2264 struct ixgbe_rx_buffer *rx_buffer,
2265 unsigned int size)
2266 {
2267 unsigned int truesize = ixgbe_rx_frame_truesize(rx_ring, size);
2268 #if (PAGE_SIZE < 8192)
2269 rx_buffer->page_offset ^= truesize;
2270 #else
> 2271 unsigned int truesize = ring_uses_build_skb(rx_ring) ?
2272 SKB_DATA_ALIGN(IXGBE_SKB_PAD + size) +
2273 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) :
2274 SKB_DATA_ALIGN(size);
2275
2276 rx_buffer->page_offset += truesize;
2277 #endif
2278 }
2279
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months