Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp732604yba; Thu, 18 Apr 2019 08:40:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqZ6o+WtW7H4F7Hr3GuL2lt/CsxibxSZxLYZaFKqS1yPmi6Tm1UCLxRWY0PTMZfUa8fbVM X-Received: by 2002:a63:9246:: with SMTP id s6mr91241328pgn.316.1555602011536; Thu, 18 Apr 2019 08:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555602011; cv=none; d=google.com; s=arc-20160816; b=yMfNQ9GjqBsUtGTH5zhcc+Cd8Wn/95bd8jPqf1bcGBQ3lYlwXktNqois2qsM3GEBMI ZuDfZFrSqjFkUrwLft0J0NlWZa80gjzSvgAva2lSXPAwQWwtt3LjIYWJgpfeyovJ5GDM WZie2+9pdHzx1Lgu/t6cjy2UrzF3MnVWvHqae/SM5XY3cpsVAc1j44uj0WUBz1svdbt0 crwz2JCLpf6hcWh3B158D5asFM3/mnVr7wSwFvfNvfkK84UgOACmtI3APyLRzr2pJKeO jZ7e1Fbke/DlnIkd1KXpxDoX+/Yr2UhPIsQsq2dkswx4OO47kae7VBUQKanuJFAcrOm6 UUnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=5CMv8qZ4HwVF1Sby94Lwmwtanm6tpBExDcR+pw5Yp9I=; b=JHCAh6iVGaXKlkKdYx9djKnqmXILUy3XcThYXioBo13RKGarSP93e40F4Ch3GFBZKD kssztD7FhlZAv57GnusLiEslFbT2tJ9ezRu4L+6ErCaKRP31hzb+5/Iko/U50V4yLMxm x6SqZYoEPcLbTUd8adbRiyl8Fx5nCF3ka3ruOdwnIG3SngFnXw30l6pTs+R5VajLcScY Xo4QRE3uuYUqDcJZzNJkUAWswAhcdYb+LVDbxnq9NVvDhpCjN//TLXOnEop2iDLboFps cC8bB9p7m2ZwVCyVMmm9OFz7He9/OttK/6AxgVIBKQ4CArqwqWvT0EI9wPaqmlEFAzWG 7CqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b="UgPfO/Hd"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si2128558pgd.269.2019.04.18.08.39.56; Thu, 18 Apr 2019 08:40:11 -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; dkim=pass header.i=@efficios.com header.s=default header.b="UgPfO/Hd"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389563AbfDRPhS (ORCPT + 99 others); Thu, 18 Apr 2019 11:37:18 -0400 Received: from mail.efficios.com ([167.114.142.138]:34284 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387519AbfDRPhQ (ORCPT ); Thu, 18 Apr 2019 11:37:16 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 0F70B18C8B7; Thu, 18 Apr 2019 11:37:15 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 3DdFlkPAnvEo; Thu, 18 Apr 2019 11:37:14 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 8E6D618C8A9; Thu, 18 Apr 2019 11:37:14 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 8E6D618C8A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1555601834; bh=5CMv8qZ4HwVF1Sby94Lwmwtanm6tpBExDcR+pw5Yp9I=; h=Date:From:To:Message-ID:MIME-Version; b=UgPfO/HdRk9boDHYIYKV0205n+o9hxiYvEVDidcKGgnECP2f25NCj3LME6PNfe+Gr ygTYf1jML7YKga50vr3MDxWj01pVC6ClGH6v4iPEMbeZbmWt6XF4xA7VlTXHx6BNWV 5Th5AMmjUuNPbSzPON9EHVC7t+jKcF5i1AMf8lvWzokM04EKYjnBh858smyhGJT/Dl HsNJx08Y3ad53mk8pWRHXRRUCS3LGyQxHIxtdiVFdBHjtsJedFc0/2W+0hmpe7TGmU QeriboGzfSy/++Hv8vAPejrZMVMLBwU4v2JYKG00iRdeCRPcsJVDJLPzN12Wzt7kiQ IvA1ewIhP7T6Q== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id RQ2OYkA4kz9M; Thu, 18 Apr 2019 11:37:14 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 744C918C8A2; Thu, 18 Apr 2019 11:37:14 -0400 (EDT) Date: Thu, 18 Apr 2019 11:37:14 -0400 (EDT) From: Mathieu Desnoyers To: Joseph Myers 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 Message-ID: <1515751456.1060.1555601834395.JavaMail.zimbra@efficios.com> In-Reply-To: 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> Subject: Re: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v8) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.12_GA_3794 (ZimbraWebClient - FF66 (Linux)/8.8.12_GA_3794) Thread-Topic: glibc: Perform rseq(2) registration at C startup and thread creation (v8) Thread-Index: F1wC+FMSeBMlyzfAdd3W2xxk4GueFg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 18, 2019, at 10:48 AM, Joseph Myers joseph@codesourcery.com wrote: > 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. Good point! Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com