From: Guenter Roeck <linux@roeck-us.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
x86@kernel.org
Subject: Re: [tip: x86/urgent] x86/mm: Fix pti_clone_entry_text() for i386
Date: Tue, 6 Aug 2024 09:42:23 -0700 [thread overview]
Message-ID: <eab8db58-1eb5-40f7-b7c9-e58558937bf4@roeck-us.net> (raw)
In-Reply-To: <20240806155922.GH12673@noisy.programming.kicks-ass.net>
On 8/6/24 08:59, Peter Zijlstra wrote:
> On Tue, Aug 06, 2024 at 05:46:53PM +0200, Peter Zijlstra wrote:
>> On Tue, Aug 06, 2024 at 05:05:15PM +0200, Peter Zijlstra wrote:
>>> On Tue, Aug 06, 2024 at 04:56:32PM +0200, Peter Zijlstra wrote:
>>>> On Tue, Aug 06, 2024 at 07:25:42AM -0700, Guenter Roeck wrote:
>>>>
>>>>> I created http://server.roeck-us.net/qemu/x86-v6.11-rc2/ with all
>>>>> the relevant information. Please let me know if you need anything else.
>>>>
>>>> So I grabbed that config, stuck it in the build dir I used last time and
>>>> upgraded gcc-13 from 13.2 ro 13.3. But alas, my build runs successfully
>>>> :/
>>>>
>>>> Is there anything else special I missed?
>>>
>>> run.sh is not exacrlty the same this time, different CPU model, that
>>> made it go.
>>>
>>> OK, lemme poke at this.
>>
>> Urgh, so crypto's late_initcall() does user-mode-helper based modprobe
>> looking for algorithms before we kick off /bin/init :/
>>
>> This makes things difficult.
>>
>> Urgh.
>
> So the problem is that mark_readonly() splits a code PMD due to NX. Then
> the second pti_clone_entry_text() finds a kernel PTE but a user PMD
> mapping for the same address (from the early clone) and gets upset.
>
> And we can't run mark_readonly() sooner, because initcall expect stuff
> to be RW. But initcalls do modprobe, which runs user crap before we're
> done initializing everything.
>
> This is a right mess, and I really don't know what to do.
And there was me thinking this one should be easy to solve. Oh well.
Maybe Linus has an idea ? I am getting a bit wary to reporting all those
weird problems to him, though.
Guenter
next prev parent reply other threads:[~2024-08-06 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 10:55 tip-bot2 for Peter Zijlstra
2024-08-06 4:52 ` Guenter Roeck
2024-08-06 8:50 ` Peter Zijlstra
2024-08-06 14:25 ` Guenter Roeck
2024-08-06 14:56 ` Peter Zijlstra
2024-08-06 15:05 ` Peter Zijlstra
2024-08-06 15:46 ` Peter Zijlstra
2024-08-06 15:59 ` Peter Zijlstra
2024-08-06 16:42 ` Guenter Roeck [this message]
2024-08-06 18:48 ` Peter Zijlstra
2024-08-06 19:12 ` Guenter Roeck
2024-08-06 20:16 ` Guenter Roeck
2024-08-07 13:51 ` [tip: x86/urgent] x86/mm: Fix PTI for i386 some more tip-bot2 for Thomas Gleixner
2024-08-01 13:03 [tip: x86/urgent] x86/mm: Fix pti_clone_entry_text() for i386 tip-bot2 for Peter Zijlstra
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=eab8db58-1eb5-40f7-b7c9-e58558937bf4@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--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®