Thread (13 messages) 13 messages, 4 authors, 2020-08-04

RE: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

From: David Laight <hidden>
Date: 2020-08-03 08:27:33
Also in: linux-api, linux-fsdevel, linux-integrity, linux-security-module, lkml

Possibly related (same subject, not in this thread)

From: Mark Rutland
Sent: 31 July 2020 19:32
...
quoted
It requires PC-relative data references. I have not worked on all architectures.
So, I need to study this. But do all ISAs support PC-relative data references?
Not all do, but pretty much any recent ISA will as it's a practical
necessity for fast position-independent code.
i386 has neither PC-relative addressing nor moves from %pc.
The cpu architecture knows that the sequence:
	call	1f  
1:	pop	%reg  
is used to get the %pc value so is treated specially so that
it doesn't 'trash' the return stack.

So PIC code isn't too bad, but you have to use the correct
sequence.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help