lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYs7n-XF0xoWJMUtwdc9p95-_53ZpyQrQ1xEsot1vmwAvQ@mail.gmail.com>
Date:   Wed, 28 Oct 2020 00:57:14 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Jens Axboe <axboe@...nel.dk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>, Kyle Huey <me@...ehuey.com>
Cc:     lkft-triage@...ts.linaro.org
Subject: Re: [PATCH] Fix compat regression in process_vm_rw()

On Wed, 28 Oct 2020 at 00:49, damian
<damian.tometzki@...ilie-tometzki.de> wrote:
>
> On Mo, 26. Okt 18:03, Jens Axboe wrote:
> > The removal of compat_process_vm_{readv,writev} didn't change
> > process_vm_rw(), which always assumes it's not doing a compat syscall.
> > Instead of passing in 'false' unconditionally for 'compat', make it
> > conditional on in_compat_syscall().
> >
> > Fixes: c3973b401ef2 ("mm: remove compat_process_vm_{readv,writev}")
> > Reported-by: Kyle Huey <me@...ehuey.com>
> > Signed-off-by: Jens Axboe <axboe@...nel.dk>
> >
> > ---
> >
> > diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c
> > index fd12da80b6f2..05676722d9cd 100644
> > --- a/mm/process_vm_access.c
> > +++ b/mm/process_vm_access.c
> > @@ -273,7 +273,8 @@ static ssize_t process_vm_rw(pid_t pid,
> >               return rc;
> >       if (!iov_iter_count(&iter))
> >               goto free_iov_l;
> > -     iov_r = iovec_from_user(rvec, riovcnt, UIO_FASTIOV, iovstack_r, false);
> > +     iov_r = iovec_from_user(rvec, riovcnt, UIO_FASTIOV, iovstack_r,
> > +                             in_compat_syscall());
> >       if (IS_ERR(iov_r)) {
> >               rc = PTR_ERR(iov_r);
> >               goto free_iov_l;
> >
> > --
> > Jens Axboe
> >
> Hello Jens,
>
> i got the following error when i try to build.
>
> m/process_vm_access.c: In Funktion »process_vm_rw«:
> mm/process_vm_access.c:277:5: Fehler: Implizite Deklaration der Funktion »in_compat_syscall«; meinten Sie »in_ia32_syscall«? [-Werror=implicit-function-declaration]
>   277 |     in_compat_syscall());
>       |     ^~~~~~~~~~~~~~~~~
>       |     in_ia32_syscall
>

I have also noticed this build failure on Linus's mainline master branch.

x86_64 : FAILED
i386: FAILED
arm: FAILED

make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=x86 HOSTCC=gcc
CC="sccache gcc" O=build

50../mm/process_vm_access.c: In function ‘process_vm_rw’:
51../mm/process_vm_access.c:277:5: error: implicit declaration of
function ‘in_compat_syscall’; did you mean ‘in_ia32_syscall’?
[-Werror=implicit-function-declaration]
52 277 | in_compat_syscall());
53 | ^~~~~~~~~~~~~~~~~
54 | in_ia32_syscall
55cc1: some warnings being treated as errors


Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>

full test build log:
https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline/-/jobs/815202967


-- 
Linaro LKFT
https://lkft.linaro.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ