[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100527153522.GA13858@redhat.com>
Date: Thu, 27 May 2010 17:35:22 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Roland McGrath <roland@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Andi Kleen <andi@...stfloor.org>, "H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Richard Henderson <rth@...ddle.net>, wezhang@...hat.com,
linux-kernel@...r.kernel.org,
Michael Kerrisk <mtk.manpages@...il.com>,
William Cohen <wcohen@...hat.com>
Subject: [PATCH 0/3] (Was: Q: sys_personality() && misc oddities)
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists