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: <CY8PR11MB71342DE5B54F519A7E7C882B894E2@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Thu, 24 Oct 2024 02:21:05 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Avadhut Naik <avadhut.naik@....com>, "x86@...nel.org" <x86@...nel.org>,
	"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"linux-trace-kernel@...r.kernel.org" <linux-trace-kernel@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"bp@...en8.de" <bp@...en8.de>, "Luck, Tony" <tony.luck@...el.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "mingo@...hat.com"
	<mingo@...hat.com>, "rostedt@...dmis.org" <rostedt@...dmis.org>,
	"mchehab@...nel.org" <mchehab@...nel.org>, "yazen.ghannam@....com"
	<yazen.ghannam@....com>, "john.allen@....com" <john.allen@....com>
Subject: RE: [PATCH v7 1/5] x86/mce: Add wrapper for struct mce to export
 vendor specific info

> From: Avadhut Naik <avadhut.naik@....com>
> [...]
> Subject: [PATCH v7 1/5] x86/mce: Add wrapper for struct mce to export
> vendor specific info
> 
> Currently, exporting new additional machine check error information involves
> adding new fields for the same at the end of the struct mce.
> This additional information can then be consumed through mcelog or
> tracepoint.
> 
> However, as new MSRs are being added (and will be added in the future) by
> CPU vendors on their newer CPUs with additional machine check error
> information to be exported, the size of struct mce will balloon on some CPUs,
> unnecessarily, since those fields are vendor-specific. Moreover, different CPU
> vendors may export the additional information in varying sizes.
> 
> The problem particularly intensifies since struct mce is exposed to userspace
> as part of UAPI. It's bloating through vendor-specific data should be avoided
> to limit the information being sent out to userspace.
> 
> Add a new structure mce_hw_err to wrap the existing struct mce. The same
> will prevent its ballooning since vendor-specifc data, if any, can now be
> exported through a union within the wrapper structure and through
> __dynamic_array in mce_record tracepoint.
> 
> Furthermore, new internal kernel fields can be added to the wrapper struct
> without impacting the user space API.
> 
> [Yazen: Add last commit message paragraph.]
> 
> Suggested-by: Borislav Petkov (AMD) <bp@...en8.de>
> Signed-off-by: Avadhut Naik <avadhut.naik@....com>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
> Signed-off-by: Avadhut Naik <avadhut.naik@....com>
> ---
> Changes in v2:
> [1] https://lore.kernel.org/linux-edac/20240521125434.1555845-1-
> yazen.ghannam@....com/
> [2] https://lore.kernel.org/linux-edac/20240523155641.2805411-1-
> yazen.ghannam@....com/
> 
> 1. Drop dependencies on sets [1] and [2] above and rebase on top of
> tip/master.
> 
> Changes in v3:
> 1. Move wrapper changes required in mce_read_aux() and
> mce_no_way_out() to this patch from the second patch.
> 2. Fix SoB chain to properly reflect the patch path.
> 
> Changes in v4:
> 1. Rebase on of tip/master to avoid merge conflicts.
> 2. Resolve kernel test robot's warning on the use of memset() in
> do_machine_check().
> 
> Changes in v5:
> 1. No changes except rebasing on top of tip/master.
> 
> Changes in v6:
> 1. Rebase on top of tip/master.
> 2. Introduce to_mce_hw_err macro to eliminate changes required in notifier
> chain callback functions, especially callback functions of EDAC drivers.
> 3. Change third parameter of __mc_scan_banks() to a pointer to the new
> wrapper structure and make the required changes accordingly.
> 
> Changes in v7:
> 1. Rebase on top of tip/master.
> 2. Fix initialization of struct mce_hw_err *final in do_machine_check().

As my comments resolved in v6 and v7,

    Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>

-Qiuxu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ