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]
Date:   Thu, 15 Nov 2018 15:35:23 +0530
From:   Firoz Khan <firoz.khan@...aro.org>
To:     Max Filippov <jcmvbkbc@...il.com>
Cc:     Chris Zankel <chris@...kel.net>, linux-xtensa@...ux-xtensa.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        y2038 Mailman List <y2038@...ts.linaro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Arch <linux-arch@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        Marcin Juszkiewicz <marcin.juszkiewicz@...aro.org>
Subject: Re: [PATCH v2 1/3] xtensa: add __NR_syscalls along with __NR_syscall_count

Hi Max,

On Wed, 14 Nov 2018 at 05:19, Max Filippov <jcmvbkbc@...il.com> wrote:
>
> Hi Firoz,
>
> I have one more question:
>
> On Tue, Nov 13, 2018 at 2:20 AM Firoz Khan <firoz.khan@...aro.org> wrote:
> > The 2nd option will be the recommended one. For that, I
> > added the __NR_syscalls macro in uapi/asm/unistd.h along
> > with __NR_syscall_count asm/unistd.h. The macro __NR_sys-
> > calls also added for making the name convention same across
> > all architecture. While __NR_syscalls isn't strictly part
> > of the uapi, having it as part of the generated header to
> > simplifies the implementation. We also need to enclose
> > this macro with #ifdef __KERNEL__ to avoid side effects.
>
> Looking at the include/uapi/asm-generic/unistd.h I see that
> __NR_syscalls is not guarded by the #ifdef __KERNEL__,
> why should it be guarded for xtensa?

__NR_syscalls for kernel. So this macro is present in asm/unistd.h
rather than uapi/asm/unistd.h. As I mentioned in the patch, it would
be better to keep in uapi/asm/unistd.h to count the number of syscalls.
But this will create some side effect. So I was guarded with __KERNEL__.
In order to come up with common implementation, I kept this for all
architecture.

>
> If we remove __NR_syscall_count from the uapi header I'd
> suggest dropping it completely and switching its two current
> users to __NR_syscalls.

I'm not removing the __NR_syscall_count macro; just place it
in asm/unistd.h file for the above reason.

FYI, I made sure that the kernel will build with my patch. I would
appreciate if you can perform the boot test on the actual platform.

Thanks
Firoz
>
> --
> Thanks.
> -- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ