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: <d3f554b8-4fc5-efe8-1ca2-aa95c7e76eb8@amd.com>
Date:   Fri, 24 Jun 2022 15:34:42 -0700
From:   Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     x86@...nel.org, linux-edac@...r.kernel.org,
        linux-kernel@...r.kernel.org, Tony Luck <tony.luck@...el.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Yazen Ghannam <yazen.ghannam@....com>
Subject: Re: [PATCH v5] x86/mce: Check for writes ignored in MCA_STATUS
 register

Hi Boris,

On 6/22/2022 10:29 AM, Borislav Petkov wrote:
> On Fri, Jun 10, 2022 at 07:25:15PM +0000, Smita Koralahalli wrote:
>>   arch/x86/kernel/cpu/mce/inject.c   | 50 +++++++++++++++++++++++++++++-
>>   arch/x86/kernel/cpu/mce/internal.h |  2 +-
>>   2 files changed, 50 insertions(+), 2 deletions(-)
> I've simplified, improved and removed some stuff. See if that still
> works on that platform which ignores writes.

I tested out the patch. Its not behaving as expected. The module fails 
silently
again.
> +	cpu = get_cpu();
> +
> +	for (bank = 0; bank < MAX_NR_BANKS; ++bank) {
> +		u64 status = MCI_STATUS_VAL, ipid;
> +
> +		/* Check whether bank is populated */
> +		rdmsrl(MSR_AMD64_SMCA_MCx_IPID(bank), ipid);
> +		if (!ipid)
> +			continue;
> +
> +		toggle_hw_mce_inject(cpu, true);
> +
> +		if (wrmsrl_safe(mca_msr_reg(bank, MCA_STATUS), status)) {

The wrmsrl_safe() doesn't throw an error here.
I think we need to read back the written value and check for it whatsoever.
What do you think?

Thanks,
Smita
> +			hw_injection_possible = false;
> +			pr_warn("Platform does not allow *hardware* error injection."
> +				"Try using APEI EINJ instead.\n");
> +		}
> +
> +		toggle_hw_mce_inject(cpu, false);
> +
> +		break;
> +	}
> +
> +	put_cpu();
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ