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]
Message-ID: <CAKwvOdnKi9wABg4YxDocQ_WH0b2n14aiyP_2kfVWadPix=_AJg@mail.gmail.com>
Date: Fri, 5 Jan 2024 10:11:02 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, 
	Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, 
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org, 
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] x86/syscalls: shrink entry/syscall_64.i via IWYU

On Wed, Jan 3, 2024 at 4:13 PM Tanzir Hasan <tanzirh@...gle.com> wrote:
>
> This diff uses an open source tool include-what-you-use (IWYU) to modify
> the include list, changing indirect includes to direct includes. IWYU is
> implemented using the IWYUScripts github repository which is a tool that
> is currently undergoing development. These changes seek to improve build
> times.
>
> This change to entry/syscall_64.c resulted in a preprocessed size of
> entry/syscall_64.i from 64003 lines to 24509 lines (-62%) for the x86
> defconfig.
>
> Suggested-by: Al Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Tanzir Hasan <tanzirh@...gle.com>
> ---
>  arch/x86/entry/syscall_64.c | 18 ++++++++++++++----

Generally question to the CC list. Does anyone know //why//
sys_call_table is defined as asmlinkage?

I don't see why `extern "C"` or __attribute__((regparm(0))) would be
necessary here, but maybe I'm missing something?

I don't think that's necessary to refer to //data// defined in C from
inline asm.  Nothing in Documentation mentions this.

And honestly those two seem conflated IMO.  UAPI headers make sense to
use extern C.

assembler defined functions called from C should have regparm set so C
callers know about the i386 calling convention change.

Those seem orthogonal to me; do we ever have cases where BOTH make sense?
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ