Prev: [PATCH 3/3] __set_personality: no need to check the old ->exec_domain
Next: [PATCH 1/3] sys_personality: validate personality before set_personality()
From: Oleg Nesterov on 27 May 2010 11:40 On 05/26, Roland McGrath wrote: > > > 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. > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |