From: kernel test robot <lkp@intel.com>
To: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Simplify access_ok()
Date: Sun, 22 Mar 2026 06:33:29 +0800 [thread overview]
Message-ID: <202603220648.5ZKgsQIu-lkp@intel.com> (raw)
In-Reply-To: <56dd1a892279fade2292b7eef7a52112901ae2fd.1773770778.git.chleroy@kernel.org>
Hi Christophe,
kernel test robot noticed the following build errors:
[auto build test ERROR on v7.0-rc3]
[cannot apply to powerpc/next powerpc/fixes v7.0-rc4 linus/master next-20260320]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christophe-Leroy-CS-GROUP/powerpc-Simplify-access_ok/20260318-080252
base: v7.0-rc3
patch link: https://lore.kernel.org/r/56dd1a892279fade2292b7eef7a52112901ae2fd.1773770778.git.chleroy%40kernel.org
patch subject: [PATCH] powerpc: Simplify access_ok()
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20260322/202603220648.5ZKgsQIu-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260322/202603220648.5ZKgsQIu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603220648.5ZKgsQIu-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from include/linux/uaccess.h:13,
from include/linux/sched/task.h:13,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs/super_types.h:13,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:13:
arch/powerpc/include/asm/uaccess.h: In function '__access_ok':
>> arch/powerpc/include/asm/uaccess.h:42:77: error: expected ';' before ')' token
42 | return size <= TASK_SIZE && addr <= TASK_SIZE - size);
| ^
| ;
>> arch/powerpc/include/asm/uaccess.h:41:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
41 | else
| ^~~~
arch/powerpc/include/asm/uaccess.h:42:77: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
42 | return size <= TASK_SIZE && addr <= TASK_SIZE - size);
| ^
>> arch/powerpc/include/asm/uaccess.h:42:77: error: expected statement before ')' token
make[3]: *** [scripts/Makefile.build:184: arch/powerpc/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1333: prepare0] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +42 arch/powerpc/include/asm/uaccess.h
21
22 /*
23 * On powerpc64, TASK_SIZE_MAX is 0x0010000000000000 then even if both ptr and size
24 * are TASK_SIZE_MAX we are still inside the memory gap. So make it simple.
25 */
26 static __always_inline int __access_ok(const void __user *ptr, unsigned long size)
27 {
28 unsigned long addr = (unsigned long)ptr;
29
30 if (IS_ENABLED(CONFIG_PPC64)) {
31 BUILD_BUG_ON(!is_power_of_2(TASK_SIZE_MAX));
32 BUILD_BUG_ON(TASK_SIZE_MAX > 0x0010000000000000);
33
34 if (__builtin_constant_p(size))
35 return size <= TASK_SIZE_MAX && !(addr & ~(TASK_SIZE_MAX - 1));
36 else
37 return !((size | addr) & ~(TASK_SIZE_MAX - 1));
38 } else {
39 if (__builtin_constant_p(size) && size < SZ_128K)
40 return addr < TASK_SIZE;
> 41 else
> 42 return size <= TASK_SIZE && addr <= TASK_SIZE - size);
43 }
44 }
45
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-21 22:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 18:07 [PATCH] powerpc: Simplify access_ok() Christophe Leroy (CS GROUP)
2026-03-21 22:33 ` kernel test robot [this message]
2026-03-22 11:03 ` David Laight
2026-03-22 19:02 ` Christophe Leroy (CS GROUP)
2026-03-22 23:04 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603220648.5ZKgsQIu-lkp@intel.com \
--to=lkp@intel.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox