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: <AB2D78307A5FD403+20250506023053.541751-1-chenlinxuan@uniontech.com>
Date: Tue,  6 May 2025 10:30:53 +0800
From: Chen Linxuan <chenlinxuan@...ontech.com>
To: hch@....de
Cc: akpm@...ux-foundation.org,
	alex.williamson@...hat.com,
	andreyknvl@...il.com,
	axboe@...nel.dk,
	boqun.feng@...il.com,
	boris.ostrovsky@...cle.com,
	bp@...en8.de,
	changbin.du@...el.com,
	chenlinxuan@...ontech.com,
	dave.hansen@...ux.intel.com,
	dvyukov@...gle.com,
	hannes@...xchg.org,
	hpa@...or.com,
	jackmanb@...gle.com,
	jarkko@...nel.org,
	jgg@...pe.ca,
	jgross@...e.com,
	justinstitt@...gle.com,
	kasan-dev@...glegroups.com,
	kbusch@...nel.org,
	kevin.tian@...el.com,
	kvm@...r.kernel.org,
	linux-integrity@...r.kernel.org,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	linux-nvme@...ts.infradead.org,
	llvm@...ts.linux.dev,
	masahiroy@...nel.org,
	mathieu.desnoyers@...icios.com,
	mhocko@...e.com,
	mingo@...hat.com,
	morbo@...gle.com,
	nathan@...nel.org,
	nick.desaulniers+lkml@...il.com,
	nicolas.schier@...ux.dev,
	paulmck@...nel.org,
	peterhuewe@....de,
	peterz@...radead.org,
	sagi@...mberg.me,
	shameerali.kolothum.thodi@...wei.com,
	surenb@...gle.com,
	tglx@...utronix.de,
	torvalds@...ux-foundation.org,
	vbabka@...e.cz,
	virtualization@...ts.linux.dev,
	wentao@...ontech.com,
	x86@...nel.org,
	xen-devel@...ts.xenproject.org,
	yishaih@...dia.com,
	ziy@...dia.com
Subject: Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE

On Tue, 29 Apr 2025 14:35:04 +0200 Christoph Hellwig wrote:

> On Tue, Apr 29, 2025 at 12:06:04PM +0800, Chen Linxuan via B4 Relay wrote:
>
> > This series introduces a new kernel configuration option NO_AUTO_INLINE,
> > which can be used to disable the automatic inlining of functions.
> >
> > This will allow the function tracer to trace more functions
> > because it only traces functions that the compiler has not inlined.
>
> This still feels like a bad idea because it is extremely fragile.

I'm not entirely sure if we're on the same page regarding this issue.
However, I'd like to address the concerns about the fragility of NO_AUTO_INLINE.

Maintaining NO_AUTO_INLINE to function correctly is indeed challenging,
and I share some reservations about whether it should exist as a Kbuild option,
which is precisely why this patch series is submitted as an RFC.
I cannot even guarantee that I've addressed all existing issues in the current
kernel repository with this patch series, as testing all possible compilation
configurations is beyond my capabilities.

Looking at the functions where I've added __always_inline in this patch series,
nearly all of them require inlining specifically because their calls need to be
resolved at compile time.

The fundamental source of this fragility stems from the fact that compiler
auto-inlining decisions aren't well-defined. If these functions were to change
in the future for unrelated reasons - for example, if they became longer - and
the compiler consequently decided not to automatically inline them, these same
issues would surface regardless.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ