From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3566 invoked from network); 3 Aug 2021 09:18:30 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2021 09:18:30 -0000 Received: (qmail 19823 invoked by uid 550); 3 Aug 2021 09:18:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 19805 invoked from network); 3 Aug 2021 09:18:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bell-sw-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8jBL8NFqD5owKZs2RxKRT832FyOXpLo6jUyXI31GCKE=; b=hXZ6a56jQdjfSpMkHlTtEp8QzklWjOjHFhfsJ7qgaSxaqzir2Ei9TZSRzanmwtd0a5 /lo0fbQ1lt+6UfDcC8AK5K4Js4meSp7C3KcLOGONkWpWOtstcISOAAdB1rbf2HiesgLp aVJ4T3YGBRHcqGdAzndxCIVhSpr+tybiqTjpaEK2MqhJxrGk0piU40Gv+PnTiaehr+yb B8Kh5SUxqxzVs9fjdTLaF+fXTlKR2TKg3FU8auV2o6BmRsTIGaMvEm3kv0EOZJWtKAlX 7Y0RsuPNP9yVV7zx7LjiZHsbYGQpwHX5oUz2T71daK5e+FIQtWUQW/gM9D7TeVM+HkSj uExg== 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=8jBL8NFqD5owKZs2RxKRT832FyOXpLo6jUyXI31GCKE=; b=OhlywGpwipSumBi4fEfjA0+maQM+5slmqks9IjKD8CSEB4+wPtrlVRgRvsmRzcZMAH 1KNdrcIvT5PtipvnfIHIiYyXKlq1VWx+lJwaCNDN8Rj23iSMTuauaTZ9g6yDeUpHLmdH REiNxtMC17NOF6o2boAjm6GwsqqyXp0FMaE2N5tsdwO231e5XGe23SsAQZQEXB6D70iC 8nDfrsJ9IORuy4mQvKOIAIezCjMBCC5LW6Ey4VDJzxsL7vj5QsnX1Tz4HDWIpJtYZP0L TUpG+LzVmjHHadSFUWuDry8Y9GWX/yKeYt6rz/GyzYs99uLj9CDdEyoswaBC3+DINtPK nbOA== X-Gm-Message-State: AOAM533bqaSw9B0D3tF2ukXVbVZkCi3TmOm/N/XSOq+Oy4XZmlYoT2jr FWye/IzX0FAs3KpVgT1IIOTCbRc4i4Z8 X-Google-Smtp-Source: ABdhPJw8zJXc87WLRnTIJdDU5rqbgd1TlyFlalZghi8jGiokojUyDJk5T2EPpAtgXRTpFlVOfN2u4w== X-Received: by 2002:a05:651c:2105:: with SMTP id a5mr14337134ljq.259.1627982295893; Tue, 03 Aug 2021 02:18:15 -0700 (PDT) To: Rich Felker Cc: musl@lists.openwall.com References: <20210629133130.143543-1-aleksei.kodanev@bell-sw.com> <20210629144834.GP13220@brightrain.aerifal.cx> <0a862f77-4e57-fe2f-d1b3-ea8bcd626aa3@bell-sw.com> <20210629201014.GQ13220@brightrain.aerifal.cx> From: Alexey Kodanev Message-ID: Date: Tue, 3 Aug 2021 12:18:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210629201014.GQ13220@brightrain.aerifal.cx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [musl] [PATCH] nice: return EPERM instead of EACCES On 29.06.2021 23:10, Rich Felker wrote: > On Tue, Jun 29, 2021 at 06:45:42PM +0300, Alexey Kodanev wrote: >> On 29.06.2021 17:48, Rich Felker wrote: >>> Is there actually an issue here? setpriority is specified to fail with >>> EACCES already for this case; EPERM is only specified for targeting >>> other processes you don't have permission to target. Is Linux getting >>> this wrong for setpriority? >> >> No, it's fine for setpriority(), it just seems wrong for nice() >> to return EACCES in this case. >> >> LTP/nice04 test (setting nice(-10)) is failing with musl and POSIX >> indeed says that the errno should be EPERM, for nice(). > > Oh, sorry, I read it backwards and was thinking it was replacing EPERM > with EACCES. Indeed nice is supposed to return EPERM where setpriority > would return EACCES so I think this patch is correct. > Hi Rich, I wonder what is the status of this patch, didn't find it in git... is there any issue with it?