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.LSU.2.21.1804091547190.20943@pobox.suse.cz>
Date:   Mon, 9 Apr 2018 15:53:03 +0200 (CEST)
From:   Miroslav Benes <mbenes@...e.cz>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
cc:     Petr Mladek <pmladek@...e.com>, Jiri Kosina <jikos@...nel.org>,
        Jason Baron <jbaron@...mai.com>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        Jessica Yu <jeyu@...nel.org>,
        Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
        live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/8] livepatch: Add atomic replace

> > +	 * see klp_init_object_loaded().
> > +	 */
> > +	if (!func->new_func && !func->nop)
> >  		return -EINVAL;
> 
> >  
> >  	INIT_LIST_HEAD(&func->stack_node);
> > @@ -742,6 +920,9 @@ static int klp_init_object_loaded(struct klp_patch *patch,
> >  			return -ENOENT;
> >  		}
> >  
> > +		if (func->nop)
> > +			func->new_func = (void *)func->old_addr;
> > +
> 
> These changes make it more obvious that 'new_func' isn't quite the right
> name.  It should really be 'new_addr' IMO.

I think we wanted to point out the difference from old_addr which is 
initialized with the symbol name while new_func is initialized with the 
new function itself (function pointer). I agree though that it looks 
awkward in this context and I'm not against changing it to new_addr.

Petr, could you also add a note to the changelog why we need to setup 
new_func for nop functions, please? It's not obvious because of the hack 
in klp_ftrace_handler() 
(klp_cancel_transition()->...->klp_check_stack_func() needs it).

Miroslav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ