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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SUBJ_OBFU_PUNCT_FEW autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23659 invoked from network); 7 Dec 2020 10:15:45 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 7 Dec 2020 10:15:45 -0000 Received: (qmail 5700 invoked by uid 550); 7 Dec 2020 10:15:40 -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 32677 invoked from network); 7 Dec 2020 10:10:32 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BVbGuRDnB77RlR7+NKRGqhAnr+M3YEt7uEYILMnkayMyNgEBaPSTHz59ZJ2Awn54gbUn5tJyBTfcw1xR4JiZuyAfRvx9hwtePEpzR76Sb9SrAkEBHIyc33OQO07rD0oyBRxPR5BCgqg4UY9d4pGwNPKiQAfPpkaX3IZ1RZJD69UoekG5UkaIBJj5I+XCYC/SDI0xBxf/Qsehu4mg4FN/A3oB3MHaSJRm5HNFASy5KrH5aioCaR1aiYX2mlM3Wly/1Gp+zEuW1WZxjBQZmHovjHBNicwDewU0oZdMd6cnUizyawURCZa4ADIznmM+KhdligTAwrMj8lXy/EvjHnUhyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YVSgYdg/34Fui9/VAuwGfswGBvKtNLMuKvQ5rG9QHIQ=; b=alJJI+gS+4GDKFG9jmWgWoPDARWg93mWiSVwugtHieRiKjfbo+vBgHZ4W1zgtlTGZwtqxBL4TtNo+dFSxEhc50Vb9Bl24MEO5vfeqD/6onPUIqQrxtmlbz9mfKprMkiIs59RO3yVkfGc/mOsSYNAlVhcvMO6wxKf4H31saAudDNIW0PeAxzeDSfWe+8AzZdbAXbmjWGXRC+DgCUR29v1Yjb0neH3vffICeNXv50BEqYSMejmjbofedQnjsMCc8g8ksZeZdUFqBNjXOqBwRFxICCdZLlHUvIumpfwwLAwNJhbPLLw/a8sGfVaygjlZERyxP/Vqo/BS7LBulrZiUCJ1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=enea.com; dmarc=pass action=none header.from=enea.com; dkim=pass header.d=enea.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Enea.onmicrosoft.com; s=selector2-Enea-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YVSgYdg/34Fui9/VAuwGfswGBvKtNLMuKvQ5rG9QHIQ=; b=nKcRa2NjHPBjsYV6bKqAB7LcjRAQB/2p2alWHv+XWnvExy1KWCc0+P6rKjxpb30Kp2Yvy0rmWcDxkIREhUx3rTv60Yiza1cEcJBXPENt2KVHQQQ4UYiEg9SoO7dIaKp9oKpoVqVsSpS8qEx/YXDvOmVwzFue6d13NnUbtrTeesw= From: Bogdan Nistor To: "musl@lists.openwall.com" Thread-Topic: pthread_mutexattr_getprotocol() issue Thread-Index: AdbMgRd7lHXq3A5OTM6+HJ782La4oA== Date: Mon, 7 Dec 2020 10:09:54 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.openwall.com; dkim=none (message not signed) header.d=none;lists.openwall.com; dmarc=none action=none header.from=enea.com; x-originating-ip: [82.76.159.122] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dea2dc18-af98-4a37-3f76-08d89a983e6f x-ms-traffictypediagnostic: VE1PR03MB5245: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V3elmtXXmuP9kjpj2ssgN+D4glXytM+iLYs/az39DOCGvkoIxKxAbMzMaXTtaWliHHucuedB2u01IW/L7/THMpgZbp88BqKcmwT1qccz2qqGaqGjubJUmmKYEV7XDZhC66FLL0EOV5kn1dc52uFC6VdB+u7oLF+B0lIW+KasJYFnj1QofYNKp80h2HrV1gDqOgPnc8qKzMT5fbXzETb9m6RmnFpjG32u7TWuLbnJg+v94u9whCZ3YRj/luVBXLHgi5tdkuA6BgzBm1Qdgh7mehfJAnYbtzr9/QYfJx4YKKghXivOcYFK7j3qNzAbj3JXXAVR3JJgdl6sUZgALqvcUsSbPQGypXDFVlSZbEPX5CxehDZ72i9aUyMOPkdR5ZU1eTpkr6X03pdxG/793a3nnQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR03MB5248.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(39840400004)(376002)(366004)(346002)(396003)(136003)(64756008)(66476007)(2906002)(52536014)(6506007)(8936002)(5660300002)(478600001)(76116006)(66556008)(55016002)(6916009)(166002)(966005)(316002)(66446008)(9686003)(71200400001)(8676002)(83380400001)(86362001)(66946007)(7696005)(186003)(26005)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?U7/z4Zz2cY/7BmwFUfoHg5uKjyytCZoAfQwqfwADP5pyA8R1hf4vvs7vQhQ6?= =?us-ascii?Q?vkGlWipZ8Z0eN3M5cBEOn6Y/dJWq2uIpQkrhxWytm4sXD3vhOSjS3gt/67U5?= =?us-ascii?Q?aFiCuS6e84lFI/wCKawYedUmxsahTf9KnZor7NBgiBbyE7adSiSKz3fR1uC8?= =?us-ascii?Q?D01aZiKiuOxXanJYuFuoqTnp2QFXNC9l1V5mx/SsEClZfjeoIFKGUtojstiT?= =?us-ascii?Q?DcpK4dU71rZYrIm5X9lF7SsIG8eFjC9JWb0GJkHFUeb6Qv6ufGzsv+cZPk0O?= =?us-ascii?Q?1kg+0AnjBUvt6YWbcgUZqjJGTvH6jdPt6MF4esXFcCobJQCmNVbF4mhlN1UP?= =?us-ascii?Q?5PGzE1+ixC6YK1IUnE7Z7r1otAjGCoTKN2bvXtAgdlnhRikPTv4K8WkIHzuV?= =?us-ascii?Q?vIm340vljnFfJufbcvoInw7F363fEACMlj3sMYf8aVqeBDptCqXrzlRoqW6O?= =?us-ascii?Q?sJR2FRTzAbIrEfXFjp8rsJvCBKB9/E+pJa7h4Gc9bQxklYn15WVjOfEOo0Xt?= =?us-ascii?Q?7GmClDf2cllGfaxa4k2omJazASj7rxPfUAqdWD2Cppexr7UqxGa31ayXtTFn?= =?us-ascii?Q?h/dIDzsSmtIazcBzuovsIkhhXC0g1FI3yturwufik3MLJO4x6RAzHHygg1gz?= =?us-ascii?Q?Ou1vb5a66NCQa+BuMi7va55+yPucoLDxEOk3ko04FyMwCRAc0w9uByDFoDfr?= =?us-ascii?Q?bymD3bS2PZGNwv0PSeI05dEMwtdcCBfZvxzMQ/4D3eZ4rthcLjdbsxKTh1jk?= =?us-ascii?Q?oOyuzjthM26gfSlUBNXV5W+4/mTbmOvM2L7hQk5/haFC4RnhcilMbZrrn8jD?= =?us-ascii?Q?C16HWTayunFOGfF1sS36Z/Cx2xxh0rh+to8iGySfNBSEYr62Jzo9BQGNMn9G?= =?us-ascii?Q?hvZMmACgVrb9MqOfn80qzxpLICFQqGsaPMi9fkRQYDiscJi/RR3IV5acSQIn?= =?us-ascii?Q?s/WO5xZZxu+llsoGP0Fw0ptTl37+M6PIL9dFAJVP1rA=3D?= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_VE1PR03MB5248247EB66D8CF590CE204988CE0VE1PR03MB5248eurp_" MIME-Version: 1.0 X-OriginatorOrg: enea.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VE1PR03MB5248.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dea2dc18-af98-4a37-3f76-08d89a983e6f X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2020 10:09:54.2112 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8cdaed89-c47e-40b8-90b5-f28ad2c3fdca X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6KYNKwgB2p0mv4ACTAZXJANAcK8bjZbYZInrMYpQdTO8PY08O93VVOrELkL5lTFv X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR03MB5245 Subject: [musl] pthread_mutexattr_getprotocol() issue --_000_VE1PR03MB5248247EB66D8CF590CE204988CE0VE1PR03MB5248eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, While using MUSL C-library 1.1.22. we observed an issue with the pthread_mu= texattr_getprotocol() implementation. The same implementation is in the lat= est version also. When the priority inheritance mutexes were implemented, it seems that pthre= ad_mutexattr_getprotocol() wasn't updated to return the proper mutex protoc= ol type. The PI mutexes update was done in this commit: http://git.musl-libc.org/cgi= t/musl/commit/?id=3D54ca677983d47529bab8752315ac1a2b49888870 If possible, maybe the get protocol function can be updated in a future mer= ge. In order to fix the get protocol function, we changed it to: int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, in= t *restrict protocol) { if (a->__attr & 8) *protocol =3D PTHREAD_PRIO_INHERIT; else *protocol =3D PTHREAD_PRIO_NONE; return 0; } Best Regards, Bogdan Nistor Software Engineer Enterprise Business Unit Email Bogdan.Nistor@enea.com Phone +40 74 517 5795 Enea 319 Splaiul Independentei OB403A District 6 Bucharest 060044, ROMANIA [https://www.enea.com/globalassets/images/enea-email-signature.png] This message, including attachments, is CONFIDENTIAL. It may also be privil= eged or otherwise protected by law. If you received this email by mistake p= lease let us know by reply and then delete it from your system; you should = not copy it or disclose its contents to anyone. All messages sent to and fr= om Enea may be monitored to ensure compliance with internal policies and to= protect our business. Emails are not secure and cannot be guaranteed to be= error free as they can be intercepted, a mended, lost or destroyed, or con= tain viruses. The sender therefore does not accept liability for any errors= or omissions in the contents of this message, which arise as a result of e= mail transmission. Anyone who communicates with us by email accepts these r= isks. --_000_VE1PR03MB5248247EB66D8CF590CE204988CE0VE1PR03MB5248eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

While using MUSL C-library 1.1.= 22. we observed an issue with the pthread_mutexattr_getprotocol() implement= ation. The same implementation is in the latest version also.

When the priority inheritance m= utexes were implemented, it seems that pthread_mutexattr_getprotocol() wasn= ’t updated to return the proper mutex protocol type.

 

The PI mutexes update was done = in this commit: http://git.musl-libc.org/cgit/musl/commit/?id=3D54ca677983d47529bab8752315a= c1a2b49888870

 

If possible, maybe the get prot= ocol function can be updated in a future merge.

 

In order to fix the get protoco= l function, we changed it to:

int pthread_mutexattr_getprotoc= ol(const pthread_mutexattr_t *restrict a, int *restrict protocol)

{

   if (a->__attr &= amp; 8)

      =          *protocol =3D PTHREAD_PRIO= _INHERIT;

   else

      =          *protocol =3D PTHREAD_PRIO= _NONE;

     &= nbsp;         return 0;<= /span>

}

 

Best Regards,

Bogdan Nis= tor

Software Engi= neer
Enterprise Business Unit

Email

Bogdan.Nistor= @enea.com<= /p>

Phone

+40 74 517 57= 95


Enea
319 Splaiul Independentei
OB403A District 6
Bucharest 060044, ROMANIA

 <= /o:p>

 

 


This message, including attachments, is CONFIDENTIAL. It may also be privil= eged or otherwise protected by law. If you received this email by mist= ake please let us know by reply and then delete it from your system; you sh= ould not copy it or disclose its contents to anyone. All messages sent to and from Enea may be monitored to ensure c= ompliance with internal policies and to protect our business. Emails are no= t secure and cannot be guaranteed to be error free as they can be intercept= ed, a mended, lost or destroyed, or contain viruses. The sender therefore does not accept liability for any= errors or omissions in the contents of this message, which arise as a resu= lt of email transmission. Anyone who communicates with us by email accepts = these risks.
--_000_VE1PR03MB5248247EB66D8CF590CE204988CE0VE1PR03MB5248eurp_--