From: Thomas Gleixner <tglx@linutronix.de>
To: Khalid Ali <khaliidcaliy@gmail.com>,
peterz@infradead.org, luto@kernel.org
Cc: linux-kernel@vger.kernel.org, Khalid Ali <khaliidcaliy@gmail.com>
Subject: Re: [PATCH] include/linux: Fix outdated comment on entry-common.h
Date: Fri, 13 Jun 2025 18:28:54 +0200 [thread overview]
Message-ID: <8734c3ip15.ffs@tglx> (raw)
In-Reply-To: <20250608195043.4953-1-khaliidcaliy@gmail.com>
On Sun, Jun 08 2025 at 19:48, Khalid Ali wrote:
'include/linux:' is not a valid prefix. See the documentation I pointed
you to in the other reply.
> From: Khalid Ali <khaliidcaliy@gmail.com>
>
> On most calls to this function, syscall_enter_from_user_mode_prepare()
> never get called as the comment indicates.
>
> Privious kernel version i used to see things happen as the function documentation
> indicated (syscall_enter_from_user_mode_prepare() called before
> syscall_enter_from_user_mode_work), however it seems now some things
> have changed which makes that point irrevelant. Most preparations that
> function does is handled manually by enter_from_user_mode() and
> some other places. So this makes it misleading.
>
> The point is remove strict function call indication on documentation as might be outdated
> one day in the future. There multiple places currently called
> syscall_enter_from_user_mode_work() without
> syscall_enter_from_user_mode_prepare() get called so that will make it
> condition not met.
That's again incomprehensible word salad.
You are right that the comment is not longer accurate, but your fixup
makes it even worse.
The real condition for calling this function is:
1) enter_from_user_mode() has been invoked
2) interrupts have been enabled
3) Architecture specific work has been done
#1 must be the first thing. #2 and #3 have no ordering requirements.
syscall_enter_from_user_mode_prepare() does #1 and #2 together and in
the original implementation this was used in more places. So yes, the
comment is outdated, but it needs to describe the above requirements and
not something pulled out of thin air.
Thanks,
tglx
next prev parent reply other threads:[~2025-06-13 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-08 19:48 [PATCH] include/linux: Fix outdated comment on entry-common.h Khalid Ali
2025-06-13 16:28 ` Thomas Gleixner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-13 20:58 Khalid Ali
2025-06-14 6:34 ` Thomas Gleixner
2025-06-14 11:42 ` Khalid Ali
2025-06-14 6:21 [PATCH] kernel/entry: Remove some redundancy checks on syscall works Thomas Gleixner
2025-06-14 12:04 ` [PATCH] include/linux: Fix outdated comment on entry-common.h Khalid Ali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734c3ip15.ffs@tglx \
--to=tglx@linutronix.de \
--cc=khaliidcaliy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox