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:	Tue, 24 May 2016 15:31:35 -0700
From:	Dave Hansen <dave@...1.net>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	linux-kernel@...r.kernel.org, dave.hansen@...ux.intel.com,
	tony.luck@...el.com, bp@...en8.de, linux-edac@...r.kernel.org,
	x86@...nel.org, luto@...nel.org
Subject: Re: [PATCH] x86, signals: add missing signal_compat code for x86
 features

On 05/20/2016 12:05 AM, Ingo Molnar wrote:
>> We've added a few features to siginfo over the past few years and
>> neglected to add them to arch/x86/kernel/signal_compat.c:
>>
>>    1. The si_addr_lsb used in SIGBUS's sent for machine checks
>>    2. The upper/lower bounds for MPX SIGSEGV faults
>>    3. The protection key for pkey faults
>>
>> I caught this with some protection keys unit tests and realized
>> it affected a few more features.
> 
> Hm, while fixing this, could we please also add individual unit tests to 
> tools/testing/selftests/x86/, and also structure the code in a fashion or add a 
> comment or so to make sure future extensions add both a compat handler and a unit 
> test as well?

The test that found this was one of the tests I'm submitting with
protection keys, so that's covered.  I also improved my out-of-tree MPX
tests to cover this too.  I can submit a version of those to be kept
in-tree.

Tony / Borislav, do we have tests for the machine check code that could
have caught this?

> I.e. perhaps do a (build time) fixed-size check of siginfo structure in the compat 
> code, and break the build if that check has not been updated? Or something like 
> that.

A size check of all the individual parts of the structure would help.
But it won't be good enough to catch everything.  Protection keys, for
example, piggybacked on the space that MPX already carved out.  So a
size check would not have caught it.

I'll probably go the heavy commenting route, along with some size checks
to _help_.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ