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:	Wed, 11 May 2016 08:06:27 +0200
From:	Mathias Krause <minipli@...glemail.com>
To:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Lutomirski <luto@...nel.org>,
	Borislav Petkov <bp@...e.de>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH] x86/extable: ensure entries are swapped completely when sorting

On 11 May 2016 at 07:46, Ard Biesheuvel <ard.biesheuvel@...aro.org> wrote:
> On 10 May 2016 at 23:07, Mathias Krause <minipli@...glemail.com> wrote:
>> The x86 exception table sorting was changed in commit 29934b0fb8ff
>> ("x86/extable: use generic search and sort routines") to use the arch
>> independent code in lib/extable.c. However, the patch was mangled
>> somehow on its way into the kernel from the last version posted at [1].
>> The committed version kind of attempted to incorporate the changes of
>> commit 548acf19234d ("x86/mm: Expand the exception table logic to allow
>> new handling options") as in _completely_ _ignoring_ the x86 specific
>> 'handler' member of struct exception_table_entry. This effectively broke
>> the sorting as entries will only partly be swapped now.
>>
>
> OK, it appears that Tony's patches grew a 'handler' field fairly late
> in their review cycle, and I didn't pick up on that. Apologies.

No need to apologize, as your patch *must* have created conflicts for
the committer applying it. It's just that those conflicts were
resolved wrongly. He/She should have asked you for a new version,
but... did not :/

>> Fortunately, the x86 Kconfig selects BUILDTIME_EXTABLE_SORT, so the
>> exception table doesn't need to be sorted at runtime. However, in case
>> that ever changes, we better not break the exception table sorting just
>> because of that.
>>
>
> BUILDTIME_EXTABLE_SORT applies to the core image only, but we still
> rely on the sorting routines for modules in that case. So I think this
> needs to be fixed right away.

Good point!

>
>> Fix this by providing a swap_ex_entry_fixup() macro that takes care of
>> the 'handler' member.
>>
>> [1] https://lkml.org/lkml/2016/1/27/232
>>
>> Signed-off-by: Mathias Krause <minipli@...glemail.com>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: Andy Lutomirski <luto@...nel.org>
>> Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
>> Cc: Borislav Petkov <bp@...e.de>
>> Cc: H. Peter Anvin <hpa@...ux.intel.com>
>> Cc: Ingo Molnar <mingo@...nel.org>
>> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Tony Luck <tony.luck@...el.com>
>
> Fixes: 29934b0fb8f ("x86/extable: use generic search and sort routines")
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
>
> Thanks,
> Ard.
>

Thanks,
Mathias

Powered by blists - more mailing lists