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: <87placw0dx.ffs@tglx>
Date: Fri, 24 Oct 2025 21:44:10 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Xie Yuanbin <qq570070308@...il.com>, linux@...linux.org.uk,
 mathieu.desnoyers@...icios.com, paulmck@...nel.org, pjw@...nel.org,
 palmer@...belt.com, aou@...s.berkeley.edu, alex@...ti.fr,
 hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
 borntraeger@...ux.ibm.com, svens@...ux.ibm.com, davem@...emloft.net,
 andreas@...sler.com, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, hpa@...or.com, luto@...nel.org,
 peterz@...radead.org, acme@...nel.org, namhyung@...nel.org,
 mark.rutland@....com, alexander.shishkin@...ux.intel.com,
 jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
 anna-maria@...utronix.de, frederic@...nel.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
 bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com,
 qq570070308@...il.com, thuth@...hat.com, riel@...riel.com,
 akpm@...ux-foundation.org, david@...hat.com, lorenzo.stoakes@...cle.com,
 segher@...nel.crashing.org, ryan.roberts@....com,
 max.kellermann@...os.com, urezki@...il.com, nysal@...ux.ibm.com
Cc: x86@...nel.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
 linux-s390@...r.kernel.org, sparclinux@...r.kernel.org,
 linux-perf-users@...r.kernel.org, will@...nel.org
Subject: Re: [PATCH 3/3] Set the subfunctions called by finish_task_switch
 to be inline

On Sat, Oct 25 2025 at 02:35, Xie Yuanbin wrote:
>  #ifndef MODULE
>  #define finish_arch_post_lock_switch \
>  	finish_arch_post_lock_switch
> -static inline void finish_arch_post_lock_switch(void)
> +static __always_inline void finish_arch_post_lock_switch_ainline(void)
>  {
>  	struct mm_struct *mm = current->mm;
>  
>  	if (mm && mm->context.switch_pending) {
>  		/*
>  		 * Preemption must be disabled during cpu_switch_mm() as we
>  		 * have some stateful cache flush implementations. Check
>  		 * switch_pending again in case we were preempted and the
>  		 * switch to this mm was already done.
>  		 */
>  		preempt_disable();
>  		if (mm->context.switch_pending) {
>  			mm->context.switch_pending = 0;
>  			cpu_switch_mm(mm->pgd, mm);
>  		}
>  		preempt_enable_no_resched();
>  	}
>  }
> +static inline void finish_arch_post_lock_switch(void)
> +{
> +	finish_arch_post_lock_switch_ainline();

What is exactly the point of this indirection. Why can't you just mark
finish_arch_post_lock_switch() __always_inline and be done with it?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ