Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp715266yba; Wed, 24 Apr 2019 08:27:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBKaWLhOr1b/izkyEr7sHNT4m/rRdyCEyBCxm2MtDBu3dclBWvL/0v1FtHZ9eZLb3tX9oQ X-Received: by 2002:a62:6ec6:: with SMTP id j189mr35237547pfc.195.1556119662561; Wed, 24 Apr 2019 08:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556119662; cv=none; d=google.com; s=arc-20160816; b=cMF4SJ2CT00noX4xGZjGf7+aEi5s+7a6lYkftj++pzf0PPwO/AKeYwZbcqa6f1FwhX IyZW+x9HYbHTzQUhVnOh1LJKgv0qvOHwStFllzWIn82LBvDgoGY39ZFg8+JiKAZrTmme M19wWvcLGKjvOFHbXAINh2mO7WPTmcRzVHYJPizP6P13B7D3DEF/E7OmV0EMz9MeKtMx LGutCPlUwu3HUCtstmW0iUjoiJHRhZ6gtD0MpRfO3gY0RdzRiTReAUoFel+uBk1nRYIC qgA6COZiaYoUby3TWPJsHTxbC7kly3/dfDiEx+YlEr+detvflEChuk/A5UDxObcOnxLx idFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=wPddiBdShBppXNiDLwqz7lNkyC8NrgYYgntI0yfX9Z0=; b=KYBM+PeHwVBSfCoYVttsKbLD3rvi9szDX9jVuqx5G7ZA3d2jCrFIlg+oIr4j5td1kl Ur5iu//KAnvPwqETt0yPx1Ll3rMo9BwEYHX0QC3q+Mnv/l5AdGEWLiVIpyXz5KOd9pI+ 7PnIh5LGh93qnU500/aW8KplgbRDzfB4R+8/lpry2Nm9ZYS1z38huoOLEHf4/SIc2Gt3 zvbyePajSPaMOW4a3weTlEiJg6p849XTFnwgGMzWurxJZacIjU35NmI+TyOYPq1nWN9x 2+qH0xrQvenjblFNguIQBhleSfTsB2+VUtIwr787PuydXKpFeK0kU6xLHhq9CGRHq2BH KL0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b="tmS/Zbxu"; 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 j6si13641686pgq.127.2019.04.24.08.27.27; Wed, 24 Apr 2019 08:27:42 -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="tmS/Zbxu"; 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 S1731455AbfDXP0L (ORCPT + 99 others); Wed, 24 Apr 2019 11:26:11 -0400 Received: from mail.efficios.com ([167.114.142.138]:58022 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731224AbfDXPZn (ORCPT ); Wed, 24 Apr 2019 11:25:43 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 5393A1D91F4; Wed, 24 Apr 2019 11:25:42 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id B8pzYMaloWiC; Wed, 24 Apr 2019 11:25:41 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id AB1DB1D91E6; Wed, 24 Apr 2019 11:25:41 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com AB1DB1D91E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1556119541; bh=wPddiBdShBppXNiDLwqz7lNkyC8NrgYYgntI0yfX9Z0=; h=From:To:Date:Message-Id; b=tmS/ZbxuL7ei/mhwDZhmwkI4wjM5IqnIQELAJFcGBGCJvIsB2ZUGG0HGBc4MUFTgp /C5XP2TGYWgsxLiidsEDrSec8gaN3sE1VQtmYHOhBL5Ifj9amUtQPLyXhHG/YEgsnP VSIcMSwuJuR0a9baitflWCWM9J8+6vNYnWBum3NJCxeTF2NPA7kZTGdQIiIZ899Y7X jjGyTQFPuajZpdFsaf13sh61IEPKyS92ytvIMJDVK6m0yuq8FiUhXJotWjuzsjmEBi 7aKEZVKcxvp9GDxK20eFlxf0ZgJPAKuUxP7MMSTigq+Pq3e1c8LCNzquEKlkKYHIF4 mOHsQmfOmz91w== 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 XgDReCUcN929; Wed, 24 Apr 2019 11:25:41 -0400 (EDT) Received: from thinkos.internal.efficios.com (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) by mail.efficios.com (Postfix) with ESMTPSA id 31B981D91BE; Wed, 24 Apr 2019 11:25:39 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra , "Paul E . McKenney" , Boqun Feng Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Thomas Gleixner , Andy Lutomirski , Dave Watson , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H . Peter Anvin" , Andi Kleen , Chris Lameter , Ben Maurer , Steven Rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Joel Fernandes , Shuah Khan , Mathieu Desnoyers , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alan Modra , linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH for 5.2 09/10] rseq/selftests: powerpc code signature: generate valid instructions Date: Wed, 24 Apr 2019 11:25:01 -0400 Message-Id: <20190424152502.14246-10-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190424152502.14246-1-mathieu.desnoyers@efficios.com> References: <20190424152502.14246-1-mathieu.desnoyers@efficios.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use "twui" as the guard instruction for the restartable sequence abort handler. Signed-off-by: Mathieu Desnoyers CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Boqun Feng CC: Peter Zijlstra CC: "Paul E. McKenney" CC: Alan Modra CC: linuxppc-dev@lists.ozlabs.org --- tools/testing/selftests/rseq/rseq-ppc.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rseq/rseq-ppc.h b/tools/testing/selftests/rseq/rseq-ppc.h index 9df18487fa9f..76be90196fe4 100644 --- a/tools/testing/selftests/rseq/rseq-ppc.h +++ b/tools/testing/selftests/rseq/rseq-ppc.h @@ -6,7 +6,15 @@ * (C) Copyright 2016-2018 - Boqun Feng */ -#define RSEQ_SIG 0x53053053 +/* + * RSEQ_SIG is used with the following trap instruction: + * + * powerpc-be: 0f e5 00 0b twui r5,11 + * powerpc64-le: 0b 00 e5 0f twui r5,11 + * powerpc64-be: 0f e5 00 0b twui r5,11 + */ + +#define RSEQ_SIG 0x0fe5000b #define rseq_smp_mb() __asm__ __volatile__ ("sync" ::: "memory", "cc") #define rseq_smp_lwsync() __asm__ __volatile__ ("lwsync" ::: "memory", "cc") -- 2.11.0