Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2181151yba; Mon, 15 Apr 2019 06:39:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSdfqUBs5ZNfROWEK6gUUSuX8Tc7e+Jj90Nv1QhNMNqVqN9B+GRXznZJDWg+YhyX0jgWHO X-Received: by 2002:a65:5202:: with SMTP id o2mr13213717pgp.402.1555335589095; Mon, 15 Apr 2019 06:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555335589; cv=none; d=google.com; s=arc-20160816; b=L66TDF+loFp7lBdJL0qqeIN0Mnz9JuSGoJ6iozfqOAMl1btnZha5edEvT98eDGHEAt uUjVNAPHD4deYrP/OAD6odNJ6XApJ7Zg/dcq8Oya+YGBZueruMZGa88PZWUmsAwyB1si Fc4AZDdWQfnO9WhsT+uYBftRY9XprVy4ALpH4R6KDmpH+GQSRdA8rm0zUYv1D8HWrQNL ygFRpF6eMhjgBfE9BVS3dwU6k7DLFWnqA0Oren64P3mCZdCn6gEynRA4RO3UA4U/JwfT ZupJyi1H8Q2yhzBfixq7Y+Brer0JpIdokXVrm2KAteeRGcHGKiqoA5MoQZpsNQIZfzRL mdsg== 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=6W8UOxj+5vWBjrJvO0dDS19EwvcULP0VSPJvBnO8b1A=; b=vTpiklkJ+vuDjVEivmq3tc1FpQYb4xswz9rOXujjheCc/Pgxn7rVHw410YqZa/bh2M Kh7kJLVxodDpF1jF94Ye41eBb14D29/Y4PQBE99SZ4PSq2tjAqEWDG10yZx4tNPdQCMR AVeMEimry3L9+5Nyu9YhI0siB06uvNGg2G6TnNaXoWllSqXVcX8YYN8iaF9DsPT9uglC +kLsPj/NeIu4DOOBVjEkj5nCDj2kyayKOIJptot4M1Z/WXYKujgQv6nwCIfgusZtzTq6 e2qf3EnQJCKHkXDSLM2id2TUQOwMpwzx+akWU1msNmLoOniSc72TdEO15Ffzu2/oMgoo jG/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Lx3e2sDR; 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 c20si45024554pfi.259.2019.04.15.06.39.32; Mon, 15 Apr 2019 06:39:49 -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=Lx3e2sDR; 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 S1727436AbfDONhY (ORCPT + 99 others); Mon, 15 Apr 2019 09:37:24 -0400 Received: from mail.efficios.com ([167.114.142.138]:41780 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbfDONhX (ORCPT ); Mon, 15 Apr 2019 09:37:23 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 355431810C3; Mon, 15 Apr 2019 09:37:22 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id XiHIcA4Aq8MH; Mon, 15 Apr 2019 09:37:21 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 891DA1810BF; Mon, 15 Apr 2019 09:37:21 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 891DA1810BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1555335441; bh=6W8UOxj+5vWBjrJvO0dDS19EwvcULP0VSPJvBnO8b1A=; h=Date:From:To:Message-ID:MIME-Version; b=Lx3e2sDRktIwYLHJ93/3F4SYOEqCIGSUVPSj3/kD3aD7A27jBYC4o0L7J+Prnxf1s kN5GYBvLUfeFE992Ve8iiiu1kDSK35QQbWmGlk1wzHNxuh47IgG2NeTInxBijOa00W frbLlvgb8bdumrTnSWaU/9nYYyZ5yJ8jNyaOYDS8495+xuRqIRYuEL1D3yee5K4Rxr OSKR7+56c12eaTKa4cbJrIPPawjsDemJ5/HuWPpooVYlM36dRmsi5vIpA6qreZf0Jm BGjt5v9Z0Kda9Qrdj749rJD2Yga86950G7dupVTQbjICNKJ8nDoWp79mldOeyoNe0G OkbFClka4JPMA== 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 NkulOQjzQ8zE; Mon, 15 Apr 2019 09:37:21 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 697851810A8; Mon, 15 Apr 2019 09:37:21 -0400 (EDT) Date: Mon, 15 Apr 2019 09:37:21 -0400 (EDT) From: Mathieu Desnoyers To: peter maydell Cc: Will Deacon , libc-alpha , linux-kernel , carlos , richard earnshaw Message-ID: <71495082.295.1555335441325.JavaMail.zimbra@efficios.com> In-Reply-To: References: <1050734985.2625.1554838340011.JavaMail.zimbra@efficios.com> <1933578130.3292.1554928159928.JavaMail.zimbra@efficios.com> <20190411164219.GE29081@fuggles.cambridge.arm.com> <1469455003.811.1555005112414.JavaMail.zimbra@efficios.com> <936773156.261.1555333890988.JavaMail.zimbra@efficios.com> Subject: Re: rseq/arm32: choosing rseq code signature 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: rseq/arm32: choosing rseq code signature Thread-Index: VZEg1Ag6Z/BBTTsrujcfED6/RqHFqg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 15, 2019, at 9:30 AM, peter maydell peter.maydell@linaro.org wrote: > On Mon, 15 Apr 2019 at 14:11, Mathieu Desnoyers > wrote: >> >> ----- On Apr 11, 2019, at 3:55 PM, peter maydell peter.maydell@linaro.org wrote: >> >> > On Thu, 11 Apr 2019 at 18:51, Mathieu Desnoyers >> > wrote: >> >> * This translates to the following instruction pattern in the T16 instruction >> >> * set: >> >> * >> >> * little endian: >> >> * def3 udf #243 ; 0xf3 >> >> * e7f5 b.n <7f5> >> >> * >> >> * big endian: >> >> * e7f5 b.n <7f5> >> >> * def3 udf #243 ; 0xf3 >> > >> > Do we really care about big-endian instruction-ordering for Thumb? >> > It requires (AIUI) either an ARMv7R CPU which implements and sets >> > SCTLR.IE to 1, or a v6-or-earlier CPU using BE32, and it's going to >> > be even rarer than normal BE8 big-endian... >> >> I don't think we care enough about it to look for a trick to >> turn the branch into something else (which would not branch away from the >> udf instruction), but considering this signature will be ABI, it's good to >> be thorough documentation-wise and cover all existing cases. > > I think if you want to document it it would be helpful to > readers to make it clear that this is the ultra-rare > big-endian-instruction-order "big endian Thumb", not the only > moderately-rare little-endian-instructions-big-endian-data > "big endian Thumb". I'm actually very much concerned about environments with big endian data and little endian code. Which gcc compiler flags do I need to use to test it ? I'm concerned about a signature mismatch between what is passed to the rseq system call ("data-endian signature") and what is generated in the code ("instruction-endian signature"). Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com