From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.seebs.net (mail.seebs.net [162.213.38.76]) by mail.openembedded.org (Postfix) with ESMTP id 33D0E719A4 for ; Sat, 24 Mar 2018 01:17:52 +0000 (UTC) Received: from seebsdell (unknown [24.196.59.174]) by mail.seebs.net (Postfix) with ESMTPSA id 525012E892F; Fri, 23 Mar 2018 20:17:53 -0500 (CDT) Date: Fri, 23 Mar 2018 20:17:51 -0500 From: Seebs To: Andre McCurdy Message-ID: <20180323201751.31380cef@seebsdell> In-Reply-To: References: <20180323112820.12bc94a4@seebsdell> <20180323114939.218c0607@seebsdell> <1521848850.11431.36.camel@linuxfoundation.org> <20180323185655.51d96c05@seebsdell> <20180323193625.594f2093@seebsdell> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Cc: Enrico Scholz , OE-core Subject: Re: pseudo: host user contamination X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 01:17:52 -0000 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 23 Mar 2018 18:10:21 -0700 Andre McCurdy wrote: > The syscall wrapper in musl handles 6 additional arguments - > unconditionally. Based on that you might not need to interpret > anything - just extract 6 arguments and pass them on? > > long syscall(long n, ...) > { > va_list ap; > syscall_arg_t a,b,c,d,e,f; > va_start(ap, n); > a=va_arg(ap, syscall_arg_t); > b=va_arg(ap, syscall_arg_t); > c=va_arg(ap, syscall_arg_t); > d=va_arg(ap, syscall_arg_t); > e=va_arg(ap, syscall_arg_t); > f=va_arg(ap, syscall_arg_t); > va_end(ap); > return __syscall_ret(__syscall(n,a,b,c,d,e,f)); > } That is the sort of thing which *might* work, but which is potentially subject to arch-specific calling conventions or strangeness. It's worth a try, I guess? But I also think it may be worth just having all the people maintaining stuff that expects this go yell at coreutils about bad implementation choices, like "bypass libc to make raw syscalls when you are not, in fact, implementing libc". -s