Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp678182yba; Thu, 18 Apr 2019 07:51:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVn4ZsiUDfr6HmwZP05Am1d1izwBGmnbzaj+4BROuvvngeWzeQgIoI6SQhC38IiccCmSVJ X-Received: by 2002:a17:902:e9:: with SMTP id a96mr76495327pla.176.1555599087141; Thu, 18 Apr 2019 07:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555599087; cv=none; d=google.com; s=arc-20160816; b=GqTPd+yC90NNmN6fx1TV11guFn4BpFZQnQhwhWs+rlTQv4sVeCwCFZ4t/60lwj+ZIZ 1vJKn+EWec0oyWLyMPMAV0kuRkN6UA6MA1uiu/Vh3A8pOorSU7HPb/tNijPZiBYPz6eA tUYPxYVKlSw6OQ/7bD0oP/8tBfaiY9l4KYyCTudTS+mTS9eEpWrDI4YKGkMi1ZREoFqA 1yaB2Oc5SEU4hwrUOSMgXlQ1WEPv6o3n8lA8Xk0M/w/zBofAzZAE39n6uO5BM7hulsgY YumxY++abFCruPPuH3neNE6NeItzxXsMTRAzI5Spg8U275YFHy0j3yveXmx/mtvDNCF9 XykQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=lpOTd076K1Qyr+Zh8y6rMFkJ23ypr0A61bk02QEFsqM=; b=XXdhE4DDPe9k9RbwYl3gEmtc7tDZmpYXuiArpcly6RjHHc3FDRKOknvz17OezAsGXv sDjUGTZvEqAHXvGGybAGBB+bFCBTcQn4aaHAENVUQDXwyAuRHlkxf4jCSWb93L3YXxe+ op11u4jWF29VXubL27mEntbBhvHAbTq3yaU7K35yO0WzJTBcCCwTxa3yOQocmE+Wo6nQ H84a3m5BRopnxWYCT1HnuAfqSUStkmAw2XjmMkWZ8etmIo9VI+GLrf1XJocLSMVnSQn7 lco8MZlmb29BKGM8fdhXq8VxiOzeI9otWAPVfNNxZrEmS9m/eQpcoNNkBJffoI+0oRhY SAwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22si2457271pfi.167.2019.04.18.07.51.12; Thu, 18 Apr 2019 07:51:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389002AbfDROsq (ORCPT + 99 others); Thu, 18 Apr 2019 10:48:46 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:46778 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733192AbfDROsq (ORCPT ); Thu, 18 Apr 2019 10:48:46 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hH8L8-0006BE-Gk from joseph_myers@mentor.com ; Thu, 18 Apr 2019 07:48:38 -0700 Received: from digraph.polyomino.org.uk (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 18 Apr 2019 15:48:34 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1hH8L4-0001wM-5v; Thu, 18 Apr 2019 14:48:34 +0000 Date: Thu, 18 Apr 2019 14:48:34 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Mathieu Desnoyers CC: Will Deacon , carlos , Florian Weimer , Szabolcs Nagy , libc-alpha , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Dave Watson , Paul Turner , Rich Felker , linux-kernel , linux-api Subject: Re: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v8) In-Reply-To: <1066731871.915.1555593471194.JavaMail.zimbra@efficios.com> Message-ID: References: <20190416173216.9028-1-mathieu.desnoyers@efficios.com> <20190416173216.9028-2-mathieu.desnoyers@efficios.com> <364803063.586.1555516769056.JavaMail.zimbra@efficios.com> <1770787324.668.1555530989646.JavaMail.zimbra@efficios.com> <1066731871.915.1555593471194.JavaMail.zimbra@efficios.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Apr 2019, Mathieu Desnoyers wrote: > The approach above should work for arm32 be8 vs be32 linker weirdness. > > For aarch64, I think we can simply do: > > /* > * aarch64 -mbig-endian generates mixed endianness code vs data: > * little-endian code and big-endian data. Ensure the RSEQ_SIG signature > * matches code endianness. > */ > #define RSEQ_SIG_CODE 0xd428bc00 /* BRK #0x45E0. */ > > #ifdef __ARM_BIG_ENDIAN > #define RSEQ_SIG_DATA 0x00bc28d4 /* BRK #0x45E0. */ > #else > #define RSEQ_SIG_DATA RSEQ_SIG_CODE > #endif > > #define RSEQ_SIG RSEQ_SIG_DATA > > Feedback is most welcome, You'll also need __ASSEMBLER__ conditionals in the installed sys/rseq.h header so that it only defines constants and doesn't include any C declarations in that case, if RSEQ_SIG_CODE is meant to be usable in .S files rather than just inline asm in C files. -- Joseph S. Myers joseph@codesourcery.com