Skip to content

(Was: Q: sys_personality() && misc oddities)

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sys_personality: validate personality before set_personality()kernel/exec_domain.c+2 -211 replies
2/3sys_personality: make sure (int)personality >= 0kernel/exec_domain.c+2 -12 replies
3/3__set_personality: no need to check the old ->exec_domainkernel/exec_domain.c+4 -130 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchWenming ZhangH. Peter Anvin
1/3Pointed-out-by Pointed-out-by A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] (Was: Q: sys_personality() && misc oddities)
Quoted 7 lines · Roland McGrath
Quoted 3 lines

Yes, libc itself is fine. But from the application's pov, personality() returns int, not long.

That doesn't really matter to error/success ambiguity. Since what I said is true, it won't ever return exactly -1 for a non-error. But even if it did, the application can use errno=0;personality(x);errno!=0 checking.

Agreed! to me this looks like the user-space bug, but there are people who disagree.

Probably my initial email wasn't clear, I'll try to explain this better in the changelog.

Quoted 7 lines
Quoted 5 lines

How about

	if (personality != 0xffffffff) {
		if (personality >= 0x7fffffff)
			return -EINVAL;

Sure.

OK. Please see the patches.

1/3 - obviously makes sense to me 2/3 - not sure
3/3 - simple cleanup, doesn't depend on 1-2

Oleg.