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:	Thu, 31 Dec 2015 13:22:19 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Tony Luck <tony.luck@...il.com>
Cc:	Robert <elliott@....com>, Borislav Petkov <bp@...en8.de>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, X86 ML <x86@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Williams, Dan J" <dan.j.williams@...el.com>,
	Ingo Molnar <mingo@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-nvdimm <linux-nvdimm@...1.01.org>
Subject: Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover
 from machine checks

On Jan 1, 2016 4:30 AM, "Tony Luck" <tony.luck@...il.com> wrote:
>
> On Wed, Dec 30, 2015 at 3:32 PM, Tony Luck <tony.luck@...il.com> wrote:
> > Fifth is just a hack because I clearly didn't understand what I was
> > doing in parts 2&3 because my new class shows up as '3' not '1'!
> >
> > Andy: Can you explain the assembler/linker arithmetic for the class?
>
> Never mind ... figured it out.
>
> The fixup entry in the extable is:
>
> label - . + 0x2000000 - BIAS
>
> The "label - ." part evaluates to a smallish negative value (because
> the .fixup section is bundled in towards the end of .text, and the
> ex_table section comes right after.
>
> Then you add 0x20000000 to get a positive number, then *subtract*
> the BIAS.  I'd picked BIAS = 0x40000000 thinking that would show
> up directly in class bits. But 0x1ffff000 - 0x40000000 is 0xdffff000
> so bits 31 & 31 are both set, and this is class3
>
> I switched to BIAS 0xC0000000 ... and now I get class 1 entries
> (bit31=0, bit30=1).
>
> New patch series coming soon.

That all sounds correct.

You could also just to s/UACCESS/INDIRECT/ or whatever and leave using
the next bit for whoever does the uaccess part, too.  After all,
introducing the "uaccess" class without actually implementing it isn't
very useful.

>
> -Tony
--
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