Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp716873yba; Wed, 24 Apr 2019 08:29:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMvW7Bg+yqnbtokUcdIZSdI+G2az42FURMRsoaMFNbK2dAjJrbqVRTm4TtOLUywSraPWQm X-Received: by 2002:a62:26c1:: with SMTP id m184mr34280403pfm.102.1556119756289; Wed, 24 Apr 2019 08:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556119756; cv=none; d=google.com; s=arc-20160816; b=zycBo6QdmCOX703OKu39XkppFmbzrD7Bjc5x4hpi1avp5NLBu+PKEqp1c5hFItfF+s dJBLrJmnS1/rzB/vz/jUy9yt1FrVpHW3KNGsmvarn110vtqawsz+kPgWQJQTcN/MzTp+ XQ2z23H8mLoX/Y9F1vOsYXVOLPO89aExbQXs/y3wBtzTpaDFLwebKeIPjqgvdD04X9Lc gQCIkD6Rb2rzoKrHhOeRMqKK37CKx9XKjEdxn0B7UxIoRZLW/HCSB/tEKj9DzobQxSnf Qui7JwjSS8kz/hniXJHxIM5rx3ayRTErpz2PlvjAfhV7lSgxZknAvy1vX5X6CC14aXzU BGdw== 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=AuAXMy3iLCz73+j1txs+aAZdmlzykjM9QU0ANC1hzHo=; b=xHOCvW72UgsFLAVqOtAATH3fYa9tf8OkkScHihuKMu7zZDnrz38gtTO/RxWutwwxDm ea3I5YDJWYUCRfxvebfO/fP0LM/16ly3xZRi+5cmvTt2AqQMBWE+1+IUHISwjSlq+UFZ mYkqYMoS0AY2HWpTEbm5I1rWEHt7isuc7Ey5/zyIm12Js+crFkfRbMM8fvl98EjDnGLY gXENO/y6EKcy35AdxWi4VAdesr0TIyuT1P0Lr7m1abkjkAhQnqW8WzoUMDJdrQc7iSTZ K4eweS6oFf4maN6p8Gs7xKW8h69SBZ5QD2rn9gapMsqAfESgvTZBV0/JWU8bzOWPUS74 98og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=N0nkysab; 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 l10si1673980pgq.334.2019.04.24.08.29.00; Wed, 24 Apr 2019 08:29:16 -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=N0nkysab; 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 S1731421AbfDXP0K (ORCPT + 99 others); Wed, 24 Apr 2019 11:26:10 -0400 Received: from mail.efficios.com ([167.114.142.138]:57984 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731233AbfDXPZn (ORCPT ); Wed, 24 Apr 2019 11:25:43 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id ECF101D91FB; 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 rcqGGMwzfx31; Wed, 24 Apr 2019 11:25:42 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 4CD241D91F3; Wed, 24 Apr 2019 11:25:42 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4CD241D91F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1556119542; bh=AuAXMy3iLCz73+j1txs+aAZdmlzykjM9QU0ANC1hzHo=; h=From:To:Date:Message-Id; b=N0nkysab/vOtfmikmM/vvgwMtJg7Nu6dd5AZ+yTDeRkOp960fQGaCwhWp6Ez8wjj3 U2l0ziw8hKSvq6oeWhytQZFgmgO9BHNx2M3hnJIyKUNp09bI/dxAs9yPVwlgBfe3g0 tjTG+2KvQEnLsqRdieWSrN1fMqHQ5JqSdOw8W88Ovu4g7OOR87OKb27I9a5dylExaL 8ebzsAZSU7oqnH0nUERH8sSwC0qKM/kaFA9YAqEN0A03tqqlO05B41Q7H3kBj84zp4 gMGHVdYDJDO23gO3txSwuhSYPFdrduI4oQL91wsKxqTzr6cupX8yZmFP04B1RCVQt8 jzNTqcOnJmABQ== 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 fsFpeYlmSrc1; Wed, 24 Apr 2019 11:25:42 -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 228721D91BF; Wed, 24 Apr 2019 11:25:40 -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 , Paul Burton , James Hogan , Ralf Baechle , linux-mips@linux-mips.org Subject: [RFC PATCH for 5.2 10/10] rseq/selftests: mips: use break instruction for RSEQ_SIG Date: Wed, 24 Apr 2019 11:25:02 -0400 Message-Id: <20190424152502.14246-11-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 break as guard instruction for the restartable sequence abort handler. Previously, the chosen signature was simply data, based on the assumption that it could always sit in a literal pool. However, some compilation environments favor disabling literal pool. Therefore, ensure the signature is a valid uncommon trap instruction. Signed-off-by: Mathieu Desnoyers CC: Paul Burton CC: James Hogan Cc: Ralf Baechle Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Boqun Feng Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org --- tools/testing/selftests/rseq/rseq-mips.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rseq/rseq-mips.h b/tools/testing/selftests/rseq/rseq-mips.h index fe3eabcdcbe5..eb53a6adfbbb 100644 --- a/tools/testing/selftests/rseq/rseq-mips.h +++ b/tools/testing/selftests/rseq/rseq-mips.h @@ -7,7 +7,11 @@ * (C) Copyright 2016-2018 - Mathieu Desnoyers */ -#define RSEQ_SIG 0x53053053 +/* + * RSEQ_SIG uses the break instruction. The instruction pattern is + * 0350000d break 0x350 + */ +#define RSEQ_SIG 0x0350000d #define rseq_smp_mb() __asm__ __volatile__ ("sync" ::: "memory") #define rseq_smp_rmb() rseq_smp_mb() -- 2.11.0