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: <20131016073539.5a48f65e.m.chehab@samsung.com>
Date:	Wed, 16 Oct 2013 07:35:39 -0300
From:	Mauro Carvalho Chehab <m.chehab@...sung.com>
To:	Borislav Petkov <bp@...en8.de>
Cc:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
	"Chen, Gong" <gong.chen@...ux.intel.com>, tony.luck@...el.com,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
	Aristeu Rozanski Filho <arozansk@...hat.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 8/8] ACPI / trace: Add trace interface for eMCA driver

Em Wed, 16 Oct 2013 11:16:40 +0200
Borislav Petkov <bp@...en8.de> escreveu:

> On Tue, Oct 15, 2013 at 09:43:46PM -0300, Mauro Carvalho Chehab wrote:
> > > +		const uuid_le *fru_id,
> > Using a custom typedef here seems problematic, as that can make userspace
> > interface more complicated.

> It is defined in a userspace header: include/uapi/linux/uuid.h

Hmm... a non-packed structure is defined there. Ok, it has 16 bytes.
I generally avoid using non-packed structs on uapi, as the compiler
alignment rules can cause troubles if kernelspace is compiled with 64
bits, and userspace with 32 bits. In this specific case, it looks ok.
 
> 
> > > >>> +		char *fru_text,
> > > >>> +		u64 error_count,
> > > >>> +		u32 severity,
> > > >>> +		u64 phy_addr,
> > > >>> +		char *mem_loc),
> > 
> > By looking on the rest of the changes, the mem_loc can now contain the 
> > right location of the memory error, including on what DIMM the error
> > happened. It can also (optionally) contain the DIMM label.
> 
> No, dimm_loc contains the label.

Yeah, right. This is badly named, then.

Anyway, the dimm_loc is filled from DMI table by dmi_memdev_name().
Based on past experiences, this can be problematic, as manufactures tend
to re-use the same DMI table on machines with different layouts.

Tony/Chen,

Are there any changes with regards to that, like some enforcement policy
for BIOS manufacturers to make it right?

If not, then I think we still need EDAC's code to allow overriding those
labels by the ones actually found on the system.

> > Also, userspace needs to know what's the granularity for the error
> > that an eMCA driver will give, in order to adjust its policies.
> 
> u32 error_count

I'm talking about granularity, not error count. I mean: how the memory
is organized, what happens with errors that could be affecting more than
one DIMM (for example, on mirrored memories), etc.

Userspace can only do something useful if it knows what kind of support
the hardware error mechanism is providing.

> > If you don't create the EDAC nodes, it means that userspace doesn't
> > have any glue about what error information will be provided.
> 
> Of course it does - it is a tracepoint. There's no need for EDAC at all
> with eMCA present on the system.

Well, try to write some code on userspace to discover what's the error.

An error threshold mechanism on userspace will only work if userspace 
knows that the error belongs to the same DIMM.

If several different DIMMs are showing errors at the very same channel, and
replacing those dimms don't happen, that likely means that the channel BUS
is damaged.

What I'm saying is that hiding those information from userspace doesn't
help at all to improve the quality of the error report mechanism.

I can't see any reason why hiding those information from userspace.

The tracepoint interface is not for that. Such data is provided via sysfs,
and should be used for the application to properly tune their algorithms.

> > In any case, this is provided by the EDAC core functions that describe
> > the memory in details. So, IMHO, get rid of EDAC is a big mistake.
> 
> No one said we're getting rid of EDAC - we're basically disabling its
> services on machines with eMCA because we simply don't need it.

We do need, if we want do do a good job decoding the errors.

> > It is also nice to allow the user to choose his preferred mechanism,
> > when more than one is properly supported on a given system.
> 
> We did this with firmware-first reporting so I don't see any need
> for user interaction. When you have eMCA on the system, you disable
> everything else reporting memory errors and go to sleep. So, similar to
> firmware first.
> 
> If eMCA turns out to have f*cked BIOS implementations - which I don't
> doubt - then we can add a chicken bit similar to "acpi=nocmcff"
> 
> It is that simple.
> 

Works for me.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ