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]
Date: Mon, 18 Dec 2023 07:54:20 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Shuai Xue <xueshuai@...ux.alibaba.com>
Cc: bp@...en8.de, rafael@...nel.org, wangkefeng.wang@...wei.com,
	tanxiaofei@...wei.com, mawupeng1@...wei.com, tony.luck@...el.com,
	linmiaohe@...wei.com, naoya.horiguchi@....com, james.morse@....com,
	will@...nel.org, jarkko@...nel.org, linux-acpi@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, linux-edac@...r.kernel.org,
	acpica-devel@...ts.linuxfoundation.org, stable@...r.kernel.org,
	x86@...nel.org, justin.he@....com, ardb@...nel.org,
	ying.huang@...el.com, ashish.kalra@....com,
	baolin.wang@...ux.alibaba.com, tglx@...utronix.de, mingo@...hat.com,
	dave.hansen@...ux.intel.com, lenb@...nel.org, hpa@...or.com,
	robert.moore@...el.com, lvying6@...wei.com, xiexiuqi@...wei.com,
	zhuo.song@...ux.alibaba.com
Subject: Re: [PATCH v10 4/4] ACPI: APEI: handle synchronous exceptions in
 task work

On Mon, Dec 18, 2023 at 02:45:21PM +0800, Shuai Xue wrote:
> Hardware errors could be signaled by asynchronous interrupt, e.g. when an
> error is detected by a background scrubber, or signaled by synchronous
> exception, e.g. when a CPU tries to access a poisoned cache line. Both
> synchronous and asynchronous error are queued as a memory_failure() work
> and handled by a dedicated kthread in workqueue.
> 
> However, the memory failure recovery sends SIBUS with wrong BUS_MCEERR_AO
> si_code for synchronous errors in early kill mode, even MF_ACTION_REQUIRED
> is set. The main problem is that the memory failure work is handled in
> kthread context but not the user-space process which is accessing the
> corrupt memory location, so it will send SIGBUS with BUS_MCEERR_AO si_code
> to the user-space process instead of BUS_MCEERR_AR in kill_proc().
> 
> To this end, queue memory_failure() as a task_work so that the current
> context in memory_failure() is exactly belongs to the process consuming
> poison data and it will send SIBBUS with proper si_code.
> 
> Signed-off-by: Shuai Xue <xueshuai@...ux.alibaba.com>
> Tested-by: Ma Wupeng <mawupeng1@...wei.com>
> Reviewed-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> Reviewed-by: Xiaofei Tan <tanxiaofei@...wei.com>
> Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
>  drivers/acpi/apei/ghes.c | 77 +++++++++++++++++++++++-----------------
>  include/acpi/ghes.h      |  3 --
>  mm/memory-failure.c      | 13 -------
>  3 files changed, 44 insertions(+), 49 deletions(-)
> 


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ