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: <4F90EAC1.6070508@zytor.com>
Date:	Thu, 19 Apr 2012 21:49:05 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	David Daney <david.s.daney@...il.com>,
	David Daney <ddaney.cavm@...il.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	Michal Marek <mmarek@...e.cz>, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v1 1/5] scripts: Add sortextable to sort the kernel's
 exception table.

On 04/19/2012 08:42 PM, H. Peter Anvin wrote:
> 
> I don't think we can get _ASM_EXTABLE() to do that work for us, because
> we'd need to subtract symbols from two different sections.  We would
> need the postprocessing tool to take care this, but guess what, we can
> do exactly that (and then, as I mentioned, just zero out the relocation
> section.)
> 

Ah, apparently it is possible to generate relocations relative to the
start of the current section:

# define _ASM_EXTABLE(from,to)      			\
        __ASM_EX_SEC ;              			\
        _ASM_ALIGN ;                			\
        .long (from)-__ex_table,(to)-__ex_table ;       \
        .previous

Then all the postprocessor would have to do is to zero out the
relocation section, and we would always just add the base of the
particular __ex_table section.

We need to make sure the module loader works, too, and not to break the
__{get,put}_user_ex macros (which would need to use a new variant of
_ASM_EXTABLE()).

There is still a disturbing number of open-coded __ex_table instances
too; those all need to be converted.

Looks like a worthwhile project but not for tonight.

All of this is for x86... other architectures would need to be converted
in whatever way is appropriate.

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