From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128369 invoked by alias); 14 Sep 2017 13:44:50 -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 128337 invoked by uid 89); 14 Sep 2017 13:44:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f178.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BUdqucLUn2TdzqsLn6k6PscKcaGomOww+1ERU/Fv5mc=; b=diHTGi/mkxijtoSSwTuhqHOyR3QBuQ88KU8yh6QY5+pipM2DUy/2dX5J5kXWbZe6l2 YA1RyFL9/b4Kin2j6C4zua5BH9+AvMmKgaUQzt15vdFsE+FmQxG3D9KgZf32leBKJulb Kpmx6SnY0omvBrfZtw+Geljva3hhWSiqnA8ITrxoXKFIHAldBlluispFuR7u7YaLt2OH QwHKeNYGiRD94SyrlBy5NWKrRyHip9pH9kM1GvpKx1sb27WagrjqddwGKHG45INA405k HKiZpY+vODy8a6TQCWooAWQcnt3UTzGbKArd4sh43g0PnCQ0rc0oGI+eIamwFm3WzIi6 vldA== X-Gm-Message-State: AHPjjUgIWH8E5UKSWsDnyJSV3S+eLHE8FB27jyQLWLoM2XGxxuIBmb5K oJaHGh4N3XVJn7r1mk8CQw== X-Google-Smtp-Source: AOwi7QDJC7dgqH5sSTycMIqPiIb5icIrgVevJg7SaKKw9d7asR119AjCdAokfQewWVnqU+5VpteDww== X-Received: by 10.237.62.200 with SMTP id o8mr31687638qtf.294.1505396686172; Thu, 14 Sep 2017 06:44:46 -0700 (PDT) Subject: Re: [PATCH v2] Use execveat syscall in fexecve To: Andreas Schwab Cc: libc-alpha@sourceware.org References: <87bmmmlpe1.fsf@mid.deneb.enyo.de> <2a21b0d6-5f62-a711-2b4a-616ebb798963@linaro.org> From: Adhemerval Zanella Message-ID: Date: Thu, 14 Sep 2017 13:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00617.txt.bz2 On 14/09/2017 05:04, Andreas Schwab wrote: > On Sep 11 2017, Adhemerval Zanella wrote: > >> I would prefer it to use INLINE_SYSCALL_CALL. And since the idea is not to >> clobber errno I think we can do: >> >> #ifdef __NR_execvat >> INTERNAL_SYSCALL_DECL (err); >> int val = INTERNAL_SYSCALL_CALL (execveat, fd, argv, envp, AT_EMPTY_PATH); >> if (INTERNAL_SYSCALL_ERROR_P (val, err) != ENOSYS) >> return -1; >> #endif > > No, that would be wrong. Either the exec succeeds, then errno no longer > exits, otherwise errno needs to be set before we return. > > Andreas. > Right, errno does need to be setup (I misread the man for some reason).