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] [day] [month] [year] [list]
Date:	Tue, 15 Mar 2016 12:37:21 +0100 (CET)
From:	Miroslav Benes <mbenes@...e.cz>
To:	Josh Poimboeuf <jpoimboe@...hat.com>
cc:	sjenning@...hat.com, vojtech@...e.com, jikos@...nel.org,
	pmladek@...e.cz, mpe@...erman.id.au, live-patching@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] klp: remove superfluous errors in asm/livepatch.h

On Fri, 4 Mar 2016, Josh Poimboeuf wrote:

> On Fri, Mar 04, 2016 at 10:53:39AM +0100, Miroslav Benes wrote:
> > There is an #error in asm/livepatch.h for both x86 and s390 in
> > !CONFIG_LIVEPATCH cases. It does not make much sense as pointed out by
> > Michael Ellerman. One can happily include asm/livepatch.h with
> > CONFIG_LIVEPATCH. Remove it as useless.
> > 
> > Suggested-by: Michael Ellerman <mpe@...erman.id.au>
> > Signed-off-by: Miroslav Benes <mbenes@...e.cz>
> 
> Looks fine to me.  While we're at it, do we even need the '#ifdef
> CONFIG_LIVEPATCH' in these files?  And in include/linux/livepatch.h?

IIRC there was a reason to this. If you build a patch module on (against) 
the kernel with CONFIG_LIVEPATCH=n the build fails immediately with 
those ifdefs, because there is no declaration of needed symbols present 
(klp_register_patch(), data structures and such). Without ifdefs the build 
succeeds and modprobe/insmod fails. The former could be advantageous in 
some scenarios. 

But since the guard in include/linux/livepatch.h (which is the only 
important header file in fact) returns with Jessica's patches for better 
reason there is no point to discuss this further :)

Miroslav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ