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: <20190409203412.GE6150@zn.tnic>
Date:   Tue, 9 Apr 2019 22:34:12 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     "Ghannam, Yazen" <Yazen.Ghannam@....com>
Cc:     "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH RESEND 2/5] x86/MCE: Handle MCA controls in a per_cpu way

On Mon, Apr 08, 2019 at 06:55:59PM +0000, Ghannam, Yazen wrote:
> We already have the case where some banks are not initialized either
> due to quirks or because they are Read-as-Zero, but we don't try to
> skip creating their files. With this full set (see patch 5), an unused
> bank will return a control value of 0.

So set_bank() is changed to do:

@@ -2088,7 +2097,7 @@ static ssize_t set_bank(struct device *s, struct device_attribute *attr,
        if (kstrtou64(buf, 0, &new) < 0)
                return -EINVAL;

-       if (bank >= mca_cfg.banks)
+       if (bank >= per_cpu(num_banks, s->id))
                return -EINVAL;


How would that work if the disabled/not-present bank is in the middle?
The old example: bank3 on CPU5.

> Would that be sufficient to indicate that a bank is not used?

Well, it should not allow for any control bits to be set and it should
have the proper bank number.

> But I do have a couple of thoughts:

> 1) Will missing banks confuse users? As mentioned, we already have the
> case of unused/uninitialized banks today, but we don't skip their file
> creation. a) Will this affect any userspace tools?

I guess it would be easier if we keep creating all files but denote properly
which banks are disabled.

> 2) Is the added complexity for file creation/destruction worth it? As
> mentioned, the file will return 0 for unused/uninitialized banks.

Yeah.

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ