Re: linux-next: Tree for Apr 28

From: Stephen Rothwell
Date: Tue Apr 28 2020 - 21:55:49 EST


Hi all,

On Tue, 28 Apr 2020 18:34:35 -0700 Nathan Chancellor <natechancellor@xxxxxxxxx> 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@xxxxxxxxxx>
> > 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@xxxxxxxxx>
> > Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
>
> Tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx> # 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: pgpUx01C_im8w.pgp
Description: OpenPGP digital signature