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]
Date:	Mon, 28 Sep 2015 13:07:36 +0000
From:	Matthew Fortune <Matthew.Fortune@...tec.com>
To:	Alex Smith <alex@...x-smith.me.uk>,
	Markos Chandras <Markos.Chandras@...tec.com>
CC:	linux-mips <linux-mips@...ux-mips.org>,
	Alex Smith <Alex.Smith@...tec.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/3] MIPS: Initial implementation of a VDSO

Alex Smith <alex@...x-smith.me.uk> writes:
> > +
> > +       /* lapc <symbol> is an alias to addiupc reg, <symbol> - .
> > +        *
> > +        * We can't use addiupc because there is no label-label
> > +        * support for the addiupc reloc
> > +        */
> > +       __asm__("lapc   %0, _start                      \n"
> > +               : "=r" (addr) : :);
> 
> Just curious - if lapc is just an alias to addiupc, why does that work
> but not addiupc? IIRC I did try addiupc previously but removed it
> because it wasn't working, didn't know about lapc!

This is just an unfortunate quirk of how the implementation is done in
binutils. We don't recognise the special case that:

addiupc <reg>, <sym> - .

is the same as

lapc <reg>, <sym>

And therefore don't know that we can just use the MIPS_PC19_S2 reloc
(name of that reloc may not be perfectly correct). It is a special
case as the RHS of the expression in ADDIUPC above can be theoretically
anything so we only support assembly time constants with addiupc.

Apart from the need to document the LAPC alias somewhere I'm not sure
we need do anything to improve addiupc itself particularly.

Thanks,
Matthew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ