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: <8cce2725-9efe-44e8-b071-f921874d7649@suse.com>
Date: Mon, 17 Feb 2025 12:01:52 +0200
From: Nikolay Borisov <nik.borisov@...e.com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
 tony.luck@...el.com
Subject: Re: [PATCH v2 1/3] x86/mce/inject: Remove call to mce_notify_irq()



On 16.02.25 г. 18:10 ч., Borislav Petkov wrote:
> On Mon, Feb 10, 2025 at 05:47:04PM +0200, Nikolay Borisov wrote:
>> The call is actually a noop because when the MCE is raised the early
>> notifier is the only call site that correctly calls mce_notify_irq()
>> because it also sets mce_need_notify. Remove this call and as a result
>> make mce_notify_irq() static
>>
>> Signed-off-by: Nikolay Borisov <nik.borisov@...e.com>
>> ---
>>   arch/x86/include/asm/mce.h       |  2 --
>>   arch/x86/kernel/cpu/mce/core.c   | 44 ++++++++++++++++----------------
>>   arch/x86/kernel/cpu/mce/inject.c |  1 -
>>   3 files changed, 22 insertions(+), 25 deletions(-)
> 
> So what you're looking at are the remnants of the old soft-inject of MCE
> errors. And it seems that we lost some of that functionality along the way and
> no one has noticed because, well, it seems no one uses it anymore.
> 
> In order to understand how this thing was supposed to work, checkout
> 
> ea149b36c7f5 ("x86, mce: add basic error injection infrastructure")


The original code in  ea149b36c7f5 was setting the notify_user bit via

raise_mce()->machine_check_poll()->mce_log(),
  mce_notify_user() - consumes notify_user set in mce_log above.


  subsequently in 011d82611172 ("RAS: Add a Corrected Errors Collector") 
you factored out the code from mce_log() mce_first_notifier, where the 
bit setting remains to this day, but since it's been removed from 
mce_log() it made the call in raise_local() defunct.


Considering that no one complained about this after all these years and 
that the dev-mcelog is deprecated I think it still makes sense to make 
mce_notify_irq() private

> 
> and follow what raise_mce() does and pay attention to notify_user which is
> what mce_need_notify was called back then.
> 
> Remember to have fun :-P
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ