Thread (12 messages) flat view 12 messages, 5 authors, 2017-03-09
STALE3438d

[PATCH v1 1/4] syscalls: Restore address limit after a syscall

From: Thomas Garnier <hidden>
Date: 2017-03-08 22:27:18
Also in: linux-api

That make sense. I will optimize each architecture to not require a call.

On Wed, Mar 8, 2017 at 2:20 PM, Andy Lutomirski [off-list ref] wrote:
On Wed, Mar 8, 2017 at 1:58 PM, Russell King - ARM Linux
[off-list ref] wrote:
quoted
On Wed, Mar 08, 2017 at 01:38:41PM -0800, Thomas Garnier wrote:
quoted
This patch prevents a syscall to modify the address limit of the
caller. The address limit is kept by the syscall wrapper and restored
just after the syscall ends.
I would much rather architectures were given the opportunity to code up
checks like this efficiently (iow, inline in the exit path assembly),
rather than having to unconditionally call an additional function on
every syscall, with its register saving overheads.
Me too.  I think the two config choices should be:

(a) BUG_ON(!segment_eq(...));

(b) No generic check at all -- arch code will handle it

--Andy


-- 
Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help