From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58854 invoked by alias); 11 Sep 2017 20:38:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 58844 invoked by uid 89); 11 Sep 2017 20:38:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Mon, 11 Sep 2017 20:38:00 -0000 From: Joseph Myers To: Adhemerval Zanella CC: Subject: Re: [PATCH v2] Use execveat syscall in fexecve In-Reply-To: <2a21b0d6-5f62-a711-2b4a-616ebb798963@linaro.org> Message-ID: References: <87bmmmlpe1.fsf@mid.deneb.enyo.de> <2a21b0d6-5f62-a711-2b4a-616ebb798963@linaro.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-09/txt/msg00468.txt.bz2 On Mon, 11 Sep 2017, Adhemerval Zanella wrote: > > +# ifndef __ASSUME_EXECVEAT > > + if (errno != ENOSYS) > > + return -1; > > +# endif > > +#endif > > Do we really need to add another __ASSUME_* that eventually we will need to > cleanup? Can't we just check fo __NR_execvat, call it and if it fails with > ENOSYS use the current code as fallback? The drawback would be that the > fallback code would be mainly dead code for newer kernels. We have the ENOSYS code there and the subsequent fallback that will eventually need cleaning up *anyway*. Having the __ASSUME_* macro makes it obvious in future exactly what changes should be made for the cleanup and exactly when it is possible to do that cleanup. I think having such macros for any case with fallback code that can be cleaned up in future is a good idea for that reason. -- Joseph S. Myers joseph@codesourcery.com