[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424133133.40122-1-xieyuanbin1@huawei.com>
Date: Thu, 24 Apr 2025 21:31:33 +0800
From: xieyuanbin1 <xieyuanbin1@...wei.com>
To: <linux@...linux.org.uk>
CC: <liaohua4@...wei.com>, <lincheng8@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<nixiaoming@...wei.com>, <sfr@...b.auug.org.au>, <wangbing6@...wei.com>,
<wangfangpeng1@...wei.com>, <will@...nel.org>, <xieyuanbin1@...wei.com>
Subject: RE: [PATCH] ARM: spectre-v2: fix unstable cpu get
From: Xie Yuanbin <xieyuanbin1@...wei.com>
>> From: Xie Yuanbin <xieyuanbin1@...wei.com>
>>
>> When a user program accesses the kernel address,
>
>Please see
>https://lore.kernel.org/all/795c9463-452e-bf64-1cc0-c318ccecb1da@I-love.SAKURA.ne.jp/T/
>
>As I see it, this can't be fixed - certainly not in this way due to the
>reasons I set out in the above thread.
Oh, I'm sorry that I haven't noticed that someone has submitted similar patch before.
I've actually thought about a similar problem. In areas other than put_cpu/get_cpu, tasks may be scheduled to other CPUs, this cpu actually does not execute the spectre code.
However, in this case, a context_switch must be happended. Inside switch_mm, the spectre code is still executed, so I didn't think of it as a problem.
But there is a situation, if we switch to another thread of **this** process, we will not execute switch_mm, which is so sad.
As mentioned in the previous patch discussion, this is only an alarm. However, I do not think so. On heterogeneous CPUs, the spectre code of different cores may have different implementations.
If another cpu's fn is executed, there may be illegal instruction and panic.
User processes can attack this point, which is very dangerous.
Powered by blists - more mailing lists