linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Apr 28
       [not found] <20200428181006.06b4e3bc@canb.auug.org.au>
@ 2020-04-28 19:04 ` Nathan Chancellor
  2020-04-29  1:24   ` Minchan Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2020-04-28 19:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Andrew Morton, Minchan Kim, linux-mm, linux-s390

On Tue, Apr 28, 2020 at 06:10:06PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20200424:
> 
> The qcom tree still had its build failure for which I reverted a commit.
> 
> The hwmon-staging tree gained a build failure for which I reverted
> a commit.
> 
> The mac80211-next tree gained a build failure so I used the version
> from next-20200424.
> 
> The drm-misc tree still had its build failure for which I disabled a
> COMPILE_TEST setting.
> 
> The akpm-current tree gained a conflict against the risc-v tree.
> 
> The akpm tree lost a patch that turned up elsewhere.
> 
> Non-merge commits (relative to Linus' tree): 4451
>  5474 files changed, 151275 insertions(+), 63274 deletions(-)

I am seeing the following build error on s390 defconfig, caused by
commit 743f242d65ec ("mm: support compat_sys_process_madvise").
Apologies if it has already been reported, I did a search of lore and
found nothing.

Cheers,
Nathan

$ make -j$(nproc) -s ARCH=s390 CROSS_COMPILE=s390x-linux- defconfig all
...
mm/madvise.c: In function '__se_compat_sys_process_madvise':
./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_162' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
  394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |                                      ^
./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
  375 |    prefix ## suffix();    \
      |    ^~~~~~
./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
  394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |  ^~~~~~~~~~~~~~~~
./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
   18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
      |  ^~~~~~~~~~~~
./include/linux/syscalls.h:110:27: note: in expansion of macro '__SC_DELOUSE'
  110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
      |                           ^
./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
  111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
  112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
  113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
  114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
      |                      ^~~~~
./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
   80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
      |                                    ^~~~~
./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
   66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~
mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
 1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
      | ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_164' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
  394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |                                      ^
./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
  375 |    prefix ## suffix();    \
      |    ^~~~~~
./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
  394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |  ^~~~~~~~~~~~~~~~
./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
   18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
      |  ^~~~~~~~~~~~
./include/linux/syscalls.h:108:27: note: in expansion of macro '__SC_DELOUSE'
  108 | #define __MAP1(m,t,a,...) m(t,a)
      |                           ^
./include/linux/syscalls.h:109:35: note: in expansion of macro '__MAP1'
  109 | #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:110:35: note: in expansion of macro '__MAP2'
  110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
  111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
  112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
  113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
      |                                   ^~~~~~
./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
  114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
      |                      ^~~~~
./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
   80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
      |                                    ^~~~~
./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
   66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~
mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
 1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
      | ^~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:266: mm/madvise.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1723: mm] Error 2
make[1]: *** Waiting for unfinished jobs....
...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for Apr 28
  2020-04-28 19:04 ` linux-next: Tree for Apr 28 Nathan Chancellor
@ 2020-04-29  1:24   ` Minchan Kim
  2020-04-29  1:34     ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Minchan Kim @ 2020-04-29  1:24 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Andrew Morton, linux-mm, linux-s390

Hello,

On Tue, Apr 28, 2020 at 12:04:59PM -0700, Nathan Chancellor wrote:
> On Tue, Apr 28, 2020 at 06:10:06PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Changes since 20200424:
> > 
> > The qcom tree still had its build failure for which I reverted a commit.
> > 
> > The hwmon-staging tree gained a build failure for which I reverted
> > a commit.
> > 
> > The mac80211-next tree gained a build failure so I used the version
> > from next-20200424.
> > 
> > The drm-misc tree still had its build failure for which I disabled a
> > COMPILE_TEST setting.
> > 
> > The akpm-current tree gained a conflict against the risc-v tree.
> > 
> > The akpm tree lost a patch that turned up elsewhere.
> > 
> > Non-merge commits (relative to Linus' tree): 4451
> >  5474 files changed, 151275 insertions(+), 63274 deletions(-)
> 
> I am seeing the following build error on s390 defconfig, caused by
> commit 743f242d65ec ("mm: support compat_sys_process_madvise").
> Apologies if it has already been reported, I did a search of lore and
> found nothing.
> 
> Cheers,
> Nathan
> 
> $ make -j$(nproc) -s ARCH=s390 CROSS_COMPILE=s390x-linux- defconfig all
> ...
> mm/madvise.c: In function '__se_compat_sys_process_madvise':
> ./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_162' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
>   394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>       |                                      ^
> ./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
>   375 |    prefix ## suffix();    \
>       |    ^~~~~~
> ./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
>   394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>    50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>       |  ^~~~~~~~~~~~~~~~
> ./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
>    18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
>       |  ^~~~~~~~~~~~
> ./include/linux/syscalls.h:110:27: note: in expansion of macro '__SC_DELOUSE'
>   110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
>       |                           ^
> ./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
>   111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
>   112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
>   113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
>   114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
>       |                      ^~~~~
> ./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
>    80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
>       |                                    ^~~~~
> ./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
>    66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
>       |  ^~~~~~~~~~~~~~~~~~~~~~
> mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
>  1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
>       | ^~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_164' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
>   394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>       |                                      ^
> ./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
>   375 |    prefix ## suffix();    \
>       |    ^~~~~~
> ./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
>   394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>    50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>       |  ^~~~~~~~~~~~~~~~
> ./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
>    18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
>       |  ^~~~~~~~~~~~
> ./include/linux/syscalls.h:108:27: note: in expansion of macro '__SC_DELOUSE'
>   108 | #define __MAP1(m,t,a,...) m(t,a)
>       |                           ^
> ./include/linux/syscalls.h:109:35: note: in expansion of macro '__MAP1'
>   109 | #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:110:35: note: in expansion of macro '__MAP2'
>   110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
>   111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
>   112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
>   113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
>       |                                   ^~~~~~
> ./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
>   114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
>       |                      ^~~~~
> ./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
>    80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
>       |                                    ^~~~~
> ./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
>    66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
>       |  ^~~~~~~~~~~~~~~~~~~~~~
> mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
>  1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
>       | ^~~~~~~~~~~~~~~~~~~~~~
> make[2]: *** [scripts/Makefile.build:266: mm/madvise.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [Makefile:1723: mm] Error 2
> make[1]: *** Waiting for unfinished jobs....
> ...

Could you try this patch? I think it should fix it.

From 3f993353c310a027f138d822a79ce49770fe6e50 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan@kernel.org>
Date: Tue, 28 Apr 2020 18:20:24 -0700
Subject: [PATCH] mm: fix s390 compat build error

Nathan reported build error with sys_compat_process_madvise.
This patch should fix it.

Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 include/linux/compat.h | 5 +++--
 mm/madvise.c           | 9 ++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/include/linux/compat.h b/include/linux/compat.h
index 1134ba3e61d0..19c524513cbb 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -820,9 +820,10 @@ asmlinkage long compat_sys_pwritev64v2(unsigned long fd,
 		unsigned long vlen, loff_t pos, rwf_t flags);
 #endif
 
-asmlinkage ssize_t compat_sys_process_madvise(int which,
+asmlinkage ssize_t compat_sys_process_madvise(compat_int_t which,
 		compat_pid_t upid, const struct compat_iovec __user *vec,
-		unsigned long vlen, int behavior, unsigned long flags);
+		compat_ulong_t vlen, compat_int_t behavior,
+		compat_ulong_t flags);
 
 /*
  * Deprecated system calls which are still defined in
diff --git a/mm/madvise.c b/mm/madvise.c
index 8fec261457a6..99c06d5f0785 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1311,9 +1311,12 @@ SYSCALL_DEFINE6(process_madvise, int, which, pid_t, upid,
 }
 
 #ifdef CONFIG_COMPAT
-COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
-		const struct compat_iovec __user *, vec, unsigned long, vlen,
-		int, behavior, unsigned long, flags)
+COMPAT_SYSCALL_DEFINE6(process_madvise, compat_int_t, which,
+			compat_pid_t, upid,
+			const struct compat_iovec __user *, vec,
+			compat_ulong_t, vlen,
+			compat_int_t, behavior,
+			compat_ulong_t, flags)
 
 {
 	ssize_t ret;
-- 
2.26.2.303.gf8c07b1a785-goog




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for Apr 28
  2020-04-29  1:24   ` Minchan Kim
@ 2020-04-29  1:34     ` Nathan Chancellor
  2020-04-29  1:54       ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2020-04-29  1:34 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Andrew Morton, linux-mm, linux-s390

On Tue, Apr 28, 2020 at 06:24:21PM -0700, Minchan Kim wrote:
> Hello,
> 
> On Tue, Apr 28, 2020 at 12:04:59PM -0700, Nathan Chancellor wrote:
> > On Tue, Apr 28, 2020 at 06:10:06PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Changes since 20200424:
> > > 
> > > The qcom tree still had its build failure for which I reverted a commit.
> > > 
> > > The hwmon-staging tree gained a build failure for which I reverted
> > > a commit.
> > > 
> > > The mac80211-next tree gained a build failure so I used the version
> > > from next-20200424.
> > > 
> > > The drm-misc tree still had its build failure for which I disabled a
> > > COMPILE_TEST setting.
> > > 
> > > The akpm-current tree gained a conflict against the risc-v tree.
> > > 
> > > The akpm tree lost a patch that turned up elsewhere.
> > > 
> > > Non-merge commits (relative to Linus' tree): 4451
> > >  5474 files changed, 151275 insertions(+), 63274 deletions(-)
> > 
> > I am seeing the following build error on s390 defconfig, caused by
> > commit 743f242d65ec ("mm: support compat_sys_process_madvise").
> > Apologies if it has already been reported, I did a search of lore and
> > found nothing.
> > 
> > Cheers,
> > Nathan
> > 
> > $ make -j$(nproc) -s ARCH=s390 CROSS_COMPILE=s390x-linux- defconfig all
> > ...
> > mm/madvise.c: In function '__se_compat_sys_process_madvise':
> > ./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_162' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
> >   394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >       |                                      ^
> > ./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
> >   375 |    prefix ## suffix();    \
> >       |    ^~~~~~
> > ./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
> >   394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> >    50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> >       |  ^~~~~~~~~~~~~~~~
> > ./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
> >    18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
> >       |  ^~~~~~~~~~~~
> > ./include/linux/syscalls.h:110:27: note: in expansion of macro '__SC_DELOUSE'
> >   110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
> >       |                           ^
> > ./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
> >   111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
> >   112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
> >   113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
> >   114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
> >       |                      ^~~~~
> > ./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
> >    80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
> >       |                                    ^~~~~
> > ./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
> >    66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
> >       |  ^~~~~~~~~~~~~~~~~~~~~~
> > mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
> >  1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
> >       | ^~~~~~~~~~~~~~~~~~~~~~
> > ./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_164' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
> >   394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >       |                                      ^
> > ./include/linux/compiler.h:375:4: note: in definition of macro '__compiletime_assert'
> >   375 |    prefix ## suffix();    \
> >       |    ^~~~~~
> > ./include/linux/compiler.h:394:2: note: in expansion of macro '_compiletime_assert'
> >   394 |  _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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> >    50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> >       |  ^~~~~~~~~~~~~~~~
> > ./arch/s390/include/asm/compat.h:18:2: note: in expansion of macro 'BUILD_BUG_ON'
> >    18 |  BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \
> >       |  ^~~~~~~~~~~~
> > ./include/linux/syscalls.h:108:27: note: in expansion of macro '__SC_DELOUSE'
> >   108 | #define __MAP1(m,t,a,...) m(t,a)
> >       |                           ^
> > ./include/linux/syscalls.h:109:35: note: in expansion of macro '__MAP1'
> >   109 | #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:110:35: note: in expansion of macro '__MAP2'
> >   110 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP3'
> >   111 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP4'
> >   112 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP5'
> >   113 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
> >       |                                   ^~~~~~
> > ./include/linux/syscalls.h:114:22: note: in expansion of macro '__MAP6'
> >   114 | #define __MAP(n,...) __MAP##n(__VA_ARGS__)
> >       |                      ^~~~~
> > ./arch/s390/include/asm/syscall_wrapper.h:80:36: note: in expansion of macro '__MAP'
> >    80 |   long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
> >       |                                    ^~~~~
> > ./include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
> >    66 |  COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
> >       |  ^~~~~~~~~~~~~~~~~~~~~~
> > mm/madvise.c:1314:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
> >  1314 | COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
> >       | ^~~~~~~~~~~~~~~~~~~~~~
> > make[2]: *** [scripts/Makefile.build:266: mm/madvise.o] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [Makefile:1723: mm] Error 2
> > make[1]: *** Waiting for unfinished jobs....
> > ...
> 
> Could you try this patch? I think it should fix it.
> 
> From 3f993353c310a027f138d822a79ce49770fe6e50 Mon Sep 17 00:00:00 2001
> From: Minchan Kim <minchan@kernel.org>
> Date: Tue, 28 Apr 2020 18:20:24 -0700
> Subject: [PATCH] mm: fix s390 compat build error
> 
> Nathan reported build error with sys_compat_process_madvise.
> This patch should fix it.
> 
> Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> Signed-off-by: Minchan Kim <minchan@kernel.org>

Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build

> ---
>  include/linux/compat.h | 5 +++--
>  mm/madvise.c           | 9 ++++++---
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/compat.h b/include/linux/compat.h
> index 1134ba3e61d0..19c524513cbb 100644
> --- a/include/linux/compat.h
> +++ b/include/linux/compat.h
> @@ -820,9 +820,10 @@ asmlinkage long compat_sys_pwritev64v2(unsigned long fd,
>  		unsigned long vlen, loff_t pos, rwf_t flags);
>  #endif
>  
> -asmlinkage ssize_t compat_sys_process_madvise(int which,
> +asmlinkage ssize_t compat_sys_process_madvise(compat_int_t which,
>  		compat_pid_t upid, const struct compat_iovec __user *vec,
> -		unsigned long vlen, int behavior, unsigned long flags);
> +		compat_ulong_t vlen, compat_int_t behavior,
> +		compat_ulong_t flags);
>  
>  /*
>   * Deprecated system calls which are still defined in
> diff --git a/mm/madvise.c b/mm/madvise.c
> index 8fec261457a6..99c06d5f0785 100644
> --- a/mm/madvise.c
> +++ b/mm/madvise.c
> @@ -1311,9 +1311,12 @@ SYSCALL_DEFINE6(process_madvise, int, which, pid_t, upid,
>  }
>  
>  #ifdef CONFIG_COMPAT
> -COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
> -		const struct compat_iovec __user *, vec, unsigned long, vlen,
> -		int, behavior, unsigned long, flags)
> +COMPAT_SYSCALL_DEFINE6(process_madvise, compat_int_t, which,
> +			compat_pid_t, upid,
> +			const struct compat_iovec __user *, vec,
> +			compat_ulong_t, vlen,
> +			compat_int_t, behavior,
> +			compat_ulong_t, flags)
>  
>  {
>  	ssize_t ret;
> -- 
> 2.26.2.303.gf8c07b1a785-goog
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for Apr 28
  2020-04-29  1:34     ` Nathan Chancellor
@ 2020-04-29  1:54       ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2020-04-29  1:54 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Minchan Kim, Linux Next Mailing List, Linux Kernel Mailing List,
	Andrew Morton, linux-mm, linux-s390

[-- Attachment #1: Type: text/plain, Size: 3360 bytes --]

Hi all,

On Tue, 28 Apr 2020 18:34:35 -0700 Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> On Tue, Apr 28, 2020 at 06:24:21PM -0700, Minchan Kim wrote:
> > 
> > On Tue, Apr 28, 2020 at 12:04:59PM -0700, Nathan Chancellor wrote: 
> > > 
> > > I am seeing the following build error on s390 defconfig, caused by
> > > commit 743f242d65ec ("mm: support compat_sys_process_madvise").
> > > Apologies if it has already been reported, I did a search of lore and
> > > found nothing.
> > > 
> > > Cheers,
> > > Nathan
> > > 
> > > $ make -j$(nproc) -s ARCH=s390 CROSS_COMPILE=s390x-linux- defconfig all
> > > ...
> > > mm/madvise.c: In function '__se_compat_sys_process_madvise':
> > > ./include/linux/compiler.h:394:38: error: call to '__compiletime_assert_162' declared with attribute error: BUILD_BUG_ON failed: sizeof(unsigned long) > 4 && !__TYPE_IS_PTR(unsigned long)
> > >   394 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > >       |                                      ^
> > 
> > Could you try this patch? I think it should fix it.
> > 
> > From 3f993353c310a027f138d822a79ce49770fe6e50 Mon Sep 17 00:00:00 2001
> > From: Minchan Kim <minchan@kernel.org>
> > Date: Tue, 28 Apr 2020 18:20:24 -0700
> > Subject: [PATCH] mm: fix s390 compat build error
> > 
> > Nathan reported build error with sys_compat_process_madvise.
> > This patch should fix it.
> > 
> > Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> > Signed-off-by: Minchan Kim <minchan@kernel.org>  
> 
> Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build
> 
> > ---
> >  include/linux/compat.h | 5 +++--
> >  mm/madvise.c           | 9 ++++++---
> >  2 files changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/include/linux/compat.h b/include/linux/compat.h
> > index 1134ba3e61d0..19c524513cbb 100644
> > --- a/include/linux/compat.h
> > +++ b/include/linux/compat.h
> > @@ -820,9 +820,10 @@ asmlinkage long compat_sys_pwritev64v2(unsigned long fd,
> >  		unsigned long vlen, loff_t pos, rwf_t flags);
> >  #endif
> >  
> > -asmlinkage ssize_t compat_sys_process_madvise(int which,
> > +asmlinkage ssize_t compat_sys_process_madvise(compat_int_t which,
> >  		compat_pid_t upid, const struct compat_iovec __user *vec,
> > -		unsigned long vlen, int behavior, unsigned long flags);
> > +		compat_ulong_t vlen, compat_int_t behavior,
> > +		compat_ulong_t flags);
> >  
> >  /*
> >   * Deprecated system calls which are still defined in
> > diff --git a/mm/madvise.c b/mm/madvise.c
> > index 8fec261457a6..99c06d5f0785 100644
> > --- a/mm/madvise.c
> > +++ b/mm/madvise.c
> > @@ -1311,9 +1311,12 @@ SYSCALL_DEFINE6(process_madvise, int, which, pid_t, upid,
> >  }
> >  
> >  #ifdef CONFIG_COMPAT
> > -COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid,
> > -		const struct compat_iovec __user *, vec, unsigned long, vlen,
> > -		int, behavior, unsigned long, flags)
> > +COMPAT_SYSCALL_DEFINE6(process_madvise, compat_int_t, which,
> > +			compat_pid_t, upid,
> > +			const struct compat_iovec __user *, vec,
> > +			compat_ulong_t, vlen,
> > +			compat_int_t, behavior,
> > +			compat_ulong_t, flags)
> >  
> >  {
> >  	ssize_t ret;

I have applied that fix to linux-next for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-29  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200428181006.06b4e3bc@canb.auug.org.au>
2020-04-28 19:04 ` linux-next: Tree for Apr 28 Nathan Chancellor
2020-04-29  1:24   ` Minchan Kim
2020-04-29  1:34     ` Nathan Chancellor
2020-04-29  1:54       ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).