From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4807 invoked by alias); 18 May 2012 17:05:42 -0000 Received: (qmail 4790 invoked by uid 22791); 18 May 2012 17:05:40 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 17:05:27 +0000 Received: from [10.7.0.95] (10.9.0.23) by USMAExch2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server id 14.0.694.0; Fri, 18 May 2012 13:05:26 -0400 Message-ID: <4FB68155.5000109@tilera.com> Date: Fri, 18 May 2012 17:05:00 -0000 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Joseph S. Myers" CC: Subject: Re: [PATCH] tilegx: provide a setxid.h to handle negative uids References: <201205172053.q4HKrjdU035038@gx-1.internal.tilera.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00109.txt.bz2 On 5/17/2012 7:20 PM, Joseph S. Myers wrote: > On Thu, 17 May 2012, Chris Metcalf wrote: > >> We observed a bug where setreuid(-1, -1) was becoming >> setreuid(4294967295, 4294967295) instead, and therefore failing, >> instead of doing nothing and returning success. > For MIPS there was such an issue but it was concluded that it was a kernel > bug and the kernel should properly extend syscall arguments passed from > userspace; see the references in bug 4459. Is tilegx doing things > differently from that? Thanks for the pointer. Some searching around tracked it down the SYSCALL_WRAPPERS config option, which I've now enabled for tilegx, and which appears to do exactly the right thing in terms of handling sub-word size arguments. I'll see if I can push it to 3.4 and to -stable. -- Chris Metcalf, Tilera Corp. http://www.tilera.com