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: <87cyb6q1aj.ffs@tglx>
Date: Sat, 14 Jun 2025 08:34:28 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Khalid Ali <khaliidcaliy@...il.com>, peterz@...radead.org, luto@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] include/linux: Fix outdated comment on entry-common.h

On Fri, Jun 13 2025 at 20:58, Khalid Ali wrote:
> Thanks and noted, however just asking why syscall_enter_from_user_mode() isn't calling
> syscall_enter_from_user_mode_prepare() i don't get it why #1 and #2 is redone, is it because
> of instrumentations since syscall_enter_from_user_mode_prepare() is calling instrumentation_end()?

Nothing is redone. All call sites of syscall_enter_from_user_mode() have
to:

    1) invoke enter_from_user_mode()

    2) enable interrupts

in that very order.

syscall_enter_from_user_mode_prepare() is a helper function which
combines both. It was more widely used in the early implementations of
this infrastructure, but it's usage got reduced to one call site.

All other call sites invoke enter_from_user_mode() and then enable
interrupts before calling syscall_enter_from_user_mode().

That has nothing to do with instrumentation_end(). See
Documentation/core-api/entry.rst for an explanation of noinstr and
instrumentation_begin/end().

> Maybe we need to determine if instrumentation_end() is neccessary for
> syscall_enter_from_user_mode_prepare().

It's already determined. See documentation...

> As i know the only place where syscall_enter_from_user_mode_prepare()
> is called is arch/x86/entry/syscall_32.c, on that source when the
> function returns they begin the instrumentation again using
> instrumentation_begin(). So i think with little adjusment of that
> source file and removing instrumentation_end() on
> syscall_enter_from_user_mode_prepare() then we can use
> syscall_enter_from_user_mode_prepare() as we did. Yet don't know the
> reason, however suspect some duplication.

Can you please stop making uninformed assumptions? It's documented how
this works and there is neither duplication nor anything you can remove.

> Another thing i should indicate if you don't agree with me is, can we
> change the comment the function to enter_from_user_mode(), and with
> little adjusment make steps as you mentioned.

Did you read what I wrote:

>> So yes, the comment is outdated, but it needs to describe the above
>> requirements and not something pulled out of thin air.

?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ