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: <eab8db58-1eb5-40f7-b7c9-e58558937bf4@roeck-us.net>
Date: Tue, 6 Aug 2024 09:42:23 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
 x86@...nel.org
Subject: Re: [tip: x86/urgent] x86/mm: Fix pti_clone_entry_text() for i386

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ