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: <20141106163237.GA4075@treble.hsd1.ky.comcast.net>
Date:	Thu, 6 Nov 2014 10:32:37 -0600
From:	Josh Poimboeuf <jpoimboe@...hat.com>
To:	Seth Jennings <sjenning@...hat.com>
Cc:	Jiri Kosina <jkosina@...e.cz>, Vojtech Pavlik <vojtech@...e.cz>,
	Steven Rostedt <rostedt@...dmis.org>,
	live-patching@...r.kernel.org, kpatch@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kernel: add support for live patching

On Thu, Nov 06, 2014 at 10:20:49AM -0600, Seth Jennings wrote:
> On Thu, Nov 06, 2014 at 04:11:37PM +0100, Jiri Kosina wrote:
> > On Thu, 6 Nov 2014, Seth Jennings wrote:
> > > +/****************************************
> > > + * dynamic relocations (load-time linker)
> > > + ****************************************/
> > > +
> > > +/*
> > > + * external symbols are located outside the parent object (where the parent
> > > + * object is either vmlinux or the kmod being patched).
> > > + */
> > 
> > I have no ideas what dynrela is, and quickly reading the source doesn't 
> > really help too much.
> > 
> > Could you please provide some explanation / pointer to some documentation, 
> > explaining what exactly it is, and why should it be part of the common 
> > infrastructure?
> 
> Yes, I should explain it.
> 
> This is something that is currently only used in the kpatch approach.
> It allows the patching core to do dynamic relocations on the new
> function code, similar to what the kernel module linker does, but this
> works for non-exported symbols as well.
> 
> This is so the patch module doesn't have to do a kallsyms lookup on
> every non-exported symbol that the new functions use.
> 
> The fields of the dynrela structure are those of a normal ELF rela
> entry, except for the "external" field, which conveys information about
> where the core module should go looking for the symbol referenced in the
> dynrela entry.

BTW, use of the dynrelas is optional, but highly recommended.  The
kGraft approach of manually doing a kallsyms lookup for each
non-exported symbol is inherently dangerous because of duplicate
symbols.

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