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] [day] [month] [year] [list]
Date:   Mon, 8 Aug 2022 10:06:14 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-riscv@...ts.infradead.org, linux-arch@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional

On Mon, Aug 8, 2022 at 12:39 AM Randy Dunlap <rdunlap@...radead.org> wrote:
> On 8/7/22 12:44, Arnd Bergmann wrote:
> > On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@...radead.org> wrote:
> >>
> >
> > This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
> > arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
> > conditional on this, user space no longer sees the macro definition.
> >
> > It looks like you also drop the native definition on all architectures other
> > than riscv here. What we probably want is to just make all the
> > declarations in include/linux/compat.h unconditional and not have them
> > depend on architecture specific macros. Some of these may have
> > incompatible prototypes depending on the architecture, but if we run
> > into those, I would suggest we just give them unique names.
>
> Thanks for the comments.
>
> With the other patch to kernel/sys_ni.c, this one is no longer needed,

Ok.

> although I can look into making more entries in <linux/compat.h>
> unconditional.

This would be a nice cleanup, but it does involve making sure that
all prototypes are compatible with the implementation on each
architecture. I think we should definitely do this, it's just not as
simple as removing each #ifdef in linux/compat.h and linux/syscall.h

> That would also mean adding them to kernel/sys_ni.c, right?
> (if not already there)

That part should be completely independent. If the entry in
kernel/sys_ni.c is missing, that causes a link failure, while an
incorrect #ifdef would cause a compile-time error for the missing
prototype.

         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ