[PATCH 1/6] ARM: spectre-bhb: enable for Cortex-A15
Jon Hunter
jonathanh at nvidia.com
Tue Jun 7 07:35:20 PDT 2022
On 07/06/2022 15:32, Ard Biesheuvel wrote:
> On Tue, 7 Jun 2022 at 16:30, Jon Hunter <jonathanh at nvidia.com> wrote:
>>
>>
>> On 24/05/2022 18:03, Russell King (Oracle) wrote:
>>> On Tue, May 24, 2022 at 03:50:17PM +0100, Jon Hunter wrote:
>>>> Hi Ard,
>>>>
>>>> On 28/03/2022 14:47, Ard Biesheuvel wrote:
>>>>> The Spectre-BHB mitigations were inadvertently left disabled for
>>>>> Cortex-A15, due to the fact that cpu_v7_bugs_init() is not called in
>>>>> that case. So fix that.
>>>>>
>>>>> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
>>>>> ---
>>>>> arch/arm/mm/proc-v7-bugs.c | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c
>>>>> index 06dbfb968182..fb9f3eb6bf48 100644
>>>>> --- a/arch/arm/mm/proc-v7-bugs.c
>>>>> +++ b/arch/arm/mm/proc-v7-bugs.c
>>>>> @@ -288,6 +288,7 @@ void cpu_v7_ca15_ibe(void)
>>>>> {
>>>>> if (check_spectre_auxcr(this_cpu_ptr(&spectre_warned), BIT(0)))
>>>>> cpu_v7_spectre_v2_init();
>>>>> + cpu_v7_spectre_bhb_init();
>>>>> }
>>>>> void cpu_v7_bugs_init(void)
>>>>
>>>>
>>>> Since this patch has been merged, I am seeing a ton of messages when booting
>>>> Linux on tegra124-jetson-tk1 ...
>>>>
>>>> [ 1233.327547] CPU0: Spectre BHB: using loop workaround
>>>> [ 1233.327795] CPU1: Spectre BHB: using loop workaround
>>>> [ 1233.328270] CPU1: Spectre BHB: using loop workaround
>>>
>>> Now that you mention this, I vaguely remember some email on the list a
>>> while ago about this being caused by something like cpuidle - but I'm
>>> unable to find it now.
>>>
>>>> [0] https://lore.kernel.org/linux-arm-kernel/20220519161310.1489625-1-dmitry.osipenko@collabora.com/T/
>>>
>>> That was probably it.
>>>
>>> We can't really do this for the other print, because the system status
>>> can change as a result of CPUs being brought online. :(
>>>
>>
>> Does it make sense to only print the message if/when the method changes
>> as opposed to every time the CPUs are brought online? That way, there
>> would still be at least one print showing the current method. I believe
>> that is what Ard had proposed.
>>
>
> A fix for this issue is already in linux-next:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bafa10435c4f34f4b9bda8fc7ee6e4330ebca3ea
Ah wonderful! Sorry I had missed that. Once merged can we pull into
stable as well?
Jon
--
nvpublic
More information about the linux-arm-kernel
mailing list