From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12488 Path: news.gmane.org!.POSTED!not-for-mail From: Nicholas Wilson Newsgroups: gmane.linux.lib.musl.general Subject: Re: TLS storage offsets for TLS_ABOVE_TP Date: Fri, 9 Feb 2018 20:39:51 +0000 Message-ID: References: ,<20180209200322.GJ1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518208698 13034 195.159.176.226 (9 Feb 2018 20:38:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2018 20:38:18 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-12504-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 09 21:38:14 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ekFQs-0002ku-ES for gllmg-musl@m.gmane.org; Fri, 09 Feb 2018 21:38:06 +0100 Original-Received: (qmail 13827 invoked by uid 550); 9 Feb 2018 20:40:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13799 invoked from network); 9 Feb 2018 20:40:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realvnc.onmicrosoft.com; s=selector1-realvnc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kbXhFs7CSssXHZCwqe/tDB1BqzyHxG5bKt5QT6JC95A=; b=kCtDX2jTyXvEsehxXG2wnuysqWVu3TzsHomfH1ZjZjwlmlYSNh6d6gjteco4F8xmpUlwWDdyJHIRG84D+Svb4II2Pc4mITCjaBq30aYfs8WtrIxYUB0Zj0JC2iOhz/VCUfC2FvQOiyOw4n7V78Opoi41HY5nS6xtJxbuv46sx00= Thread-Topic: [musl] TLS storage offsets for TLS_ABOVE_TP Thread-Index: AQHToc3LpwLt+qc8e0mibWaiCHzqSqOcfncAgAAJBow= In-Reply-To: <20180209200322.GJ1627@brightrain.aerifal.cx> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nicholas.wilson@realvnc.com; x-originating-ip: [81.96.233.38] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0502MB2917;7:dqW2RyfftlqKmQJY8try9QIgWQtdhUqhKStAkIedd66L7H9Lz4C6x07l3Jxn6bSXknFqp/HHM0uozZC12ozyfxLf4j360V9GWkpO4J9dfouUopruFr2mOxn3VDGopajVgZmyhu5NUbjpAkCMrJCVQGKJadWQ6/8NBb1N7ICbKTqZYVDbnd5ooKZFZzi4J3Qv4wQHcN0hcb79jXCq9Pqz5pAfPtiDWejL1AoiGQlvddc4RNdWdEBRyO6f41wqJtd7 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 7d4f70c6-dee5-4c25-8133-08d56ffd4527 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:DB6PR0502MB2917; x-ms-traffictypediagnostic: DB6PR0502MB2917: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231101)(2400082)(944501161)(3002001)(6041288)(2016111802025)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(6043046)(6072148)(201708071742011);SRVR:DB6PR0502MB2917;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0502MB2917; x-forefront-prvs: 057859F9C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(39840400004)(39380400002)(366004)(396003)(189003)(199004)(68736007)(7736002)(3280700002)(8936002)(6116002)(106356001)(3660700001)(3846002)(2906002)(2351001)(102836004)(81156014)(1730700003)(8676002)(66066001)(74316002)(316002)(305945005)(186003)(7696005)(76176011)(229853002)(81166006)(6436002)(6506007)(5660300001)(55016002)(14454004)(53936002)(6246003)(5640700003)(5250100002)(99286004)(478600001)(9686003)(105586002)(97736004)(33656002)(2501003)(86362001)(25786009)(26005)(2950100002)(6916009)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0502MB2917;H:DB6PR0502MB3016.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: realvnc.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Rwrw7XTGLuancgI7jOsN753tFPbV5yplaS6CPsLxYaKE5q8+oRC1F/wk+rWtK5lksGXkoR6Tsv6N1uLAaYSs0A== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-MS-Exchange-CrossTenant-Network-Message-Id: 7d4f70c6-dee5-4c25-8133-08d56ffd4527 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2018 20:39:51.7606 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9ad766d3-c6a5-4458-8c58-244e7c118728 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0502MB2917 X-OriginatorOrg: realvnc.com Xref: news.gmane.org gmane.linux.lib.musl.general:12488 Archived-At: Hi Rich, Thanks as ever for your helpful response. It sounds like these things need to written up somewhere; if there isn't a = document maybe some code comments would help in the future, if someone else= is confused (or trying like me to port to a new arch). So on a new arch, we can be free to put the TP wherever we want with respec= t to the TLS block, as long as the linker and Musl agree on the distance be= tween them. I'll pick 2*sizeof(void*) for Wasm to match Arm/AArch64 (I pref= er "variant 1" to "variant 2" given the generated code sequence is simpler = for the local exec model that Wasm will use). It's a shame that the glibc spec is so out of date, perhaps a Musl wiki pag= e would be helpful as a reference too? All the best, Nick=