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: <alpine.LNX.2.00.1504252239540.16113@pobox.suse.cz>
Date:	Sat, 25 Apr 2015 22:42:52 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Josh Poimboeuf <jpoimboe@...hat.com>
cc:	Seth Jennings <sjenning@...hat.com>,
	Vojtech Pavlik <vojtech@...e.cz>,
	live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] livepatch: x86: make kASLR logic more accurate

On Fri, 24 Apr 2015, Josh Poimboeuf wrote:

> >  #if defined(CONFIG_RANDOMIZE_BASE)
> > -	/* KASLR is enabled, disregard old_addr from user */
> > -	func->old_addr = 0;
> > +	/* If KASLR has been enabled, adjust old_addr accordingly */
> > +	if (kaslr_enabled())
> > +		func->old_addr += klp_vmlinux_relocation_offset();
> >  #endif
> 
> Can we remove the #ifdef now?  It would probably be better to have an
> #ifdef in asm/setup.h for the kaslr_enabled() definition.

If we do that, we force all architectures that support (now, or at any 
point in the future) live patching to provide kaslr_enabled(), 
klp_vmlinux_relocation_offset() (or however it will be called), etc (even 
if they don't care a bit about kASLR) I would like to avoid that; it seems 
really unnecessary maintainance overhead imposed on archs.

Thanks,

-- 
Jiri Kosina
SUSE Labs
--
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