Re: [PATCH v2] livepatch: x86: make kASLR logic more accurate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux