From: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
To: linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com,
luto@kernel.org, peterz@infradead.org, mingo@redhat.com,
sohil.mehta@intel.com
Cc: x86@kernel.org, bp@alien8.de, tglx@linutronix.de, hpa@zytor.com
Subject: Re: [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options.
Date: Fri, 11 Aug 2023 16:27:17 -0700 [thread overview]
Message-ID: <295ea2ef-3480-856b-b93a-9ae36f7b2286@cs.kuleuven.be> (raw)
In-Reply-To: <20230811213628.40428-2-jo.vanbulck@cs.kuleuven.be>
On 11.08.23 14:36, Jo Van Bulck wrote:> static enum pti_mode {
> PTI_AUTO = 0,
> + PTI_FORCE_AUTO,
> PTI_FORCE_OFF,
> PTI_FORCE_ON
> } pti_mode;
I introduced a new PTI_FORCE_AUTO value here to make pti=auto override
any mitigations=off parameter. However, I realize now that this may
inadvertently affect other functions that test for pti_mode == PTI_AUTO
(eg in pti_kernel_image_global_ok()).
Having 2 constants PTI_AUTO and PTI_FORCE_AUTO is arguably not very
neat, so we should better get rid of this. I see several options:
- not have pti=auto override mitigations=off
- have a global var to indicate pti= argument was passed
- set pti_mode = PTI_AUTO in the pti_mode == PTI_FORCE_AUTO if branch
Not sure which option would best match kernel coding guidelines?
Best,
Jo
next prev parent reply other threads:[~2023-08-11 23:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 21:36 [PATCH v2 0/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline Jo Van Bulck
2023-08-11 21:36 ` [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options Jo Van Bulck
2023-08-11 23:27 ` Jo Van Bulck [this message]
2023-08-11 23:42 ` Dave Hansen
2023-08-11 23:58 ` Sohil Mehta
2023-08-12 0:08 ` Dave Hansen
2023-08-12 0:15 ` Sohil Mehta
2023-08-12 15:53 ` Jo Van Bulck
2023-08-12 15:54 [PATCH v2 0/1] " Jo Van Bulck
2023-08-12 15:54 ` [PATCH 1/1] " Jo Van Bulck
2023-08-14 21:12 ` Sohil Mehta
2023-08-18 22:33 ` Jo Van Bulck
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=295ea2ef-3480-856b-b93a-9ae36f7b2286@cs.kuleuven.be \
--to=jo.vanbulck@cs.kuleuven.be \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®