From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B92EC433E0 for ; Sat, 6 Mar 2021 12:27:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD7DA6501A for ; Sat, 6 Mar 2021 12:27:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD7DA6501A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DTB9UQKqT8XzIhpqTgGJSmGrilNQHHvjB2cq1Q01rEs=; b=mpnkgi3nXzchPYAkgW+EVtzwK 2WCbmBYTcRXqczkG6SFcz/N6/q2MaK06KnhBF9J3xCw/+VNqC18ZTgY8nkaC8rqEVN1mGpn2SeVtE ji+8AYX/bknJNA8Yq6088XJQRUti+2d9BRHwdDl40lTbup1QxIyx+ZLm5nPsWshoWYLBb9fLkw/rl myxtQ+IGhxDyoX+dJVdwfTtwBZrVyDu+1LmbWK0m+uj6X0bQZknV/0dm6iUdujJDX6r9nnWB9NKCe 40tigkTbZw4YuaGEXvTB0Ijhhg86GbZUM5jFd1ipRWsvLMOPcjDR57gISqSuGF9/Gwuk8iMeMn+BW cTNiqw8/A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIW0I-0031N0-FG; Sat, 06 Mar 2021 12:25:55 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIW0D-0031MG-98 for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 12:25:51 +0000 Received: by mail-lj1-x22a.google.com with SMTP id a17so7954485ljq.2 for ; Sat, 06 Mar 2021 04:25:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9QHA/auC828Jqan2akyk0NJH1AQcH9ax/tK0w9DMNcw=; b=RjeGfMg07ilX+5+ALabW4rNuZA59tc6R+55MKGqB7nmpBuwVwbWCyBDCJRIs9P7QTy 5BAqpbHKQPiz3s3ORQRNdCKy8vx+KKbW3sPbPHuvlcI4nj3wgl9sQS3bmaLvpE8vMwJ0 ngnc2n1J0TfkfJIorDuasnLUIGvdKUM9EERxb4uS4BOcxxDdAtv3fUxAErZSU4LJBbLe cXIQJuCKfywKJ+mPg7/Y0nTgHcq5BnkOI7u1cxBK+UHbj4j+tO/ilSEVW7cDKvI/IgTs SpLh7rpgi/11lncH87L6pRwn0bIKR2fzlSsGFGexrWck01+k15gXcybuHjkWZAYDXo+Z 6r8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9QHA/auC828Jqan2akyk0NJH1AQcH9ax/tK0w9DMNcw=; b=cM4nn+K+GXjpSG4gF1z+RCrAP/vhx8VNZgblqpg14ZxFVWhTFqK2efPaJtBV1AAsoU B1jFD+0N3dl9rD/d+xeZ8dWqDTgGGL2KBx+WsCH4EFnSGvrrnjJRUI7pFzxQTwCvSY1G vccz5ZeDA6xBY7fVnwz24agoXQ5HwhUHF6sKd/HYTSH9lSB+MerFUjeua/YSNSgXaUmw 9+tv9ne3t+RZaW4LlCQTLtcOOhmvoXvfz8Vmd1C270AwFjmjOam+qLXoZZD/W3UFNrHW 2dD89UrTgldwVySzPJoBXknjENEME0pNT91y15blrUzU9IY+e5tTEBhJ0HQ43tNafile qfvA== X-Gm-Message-State: AOAM533C0J3d/va6QeaTbmu51TIloV5GteSPvHQF05XgBvOhqdl9tFSe r0JY5/kiwznGwa8zl8LdUQeIdtiBGZ/1Vk6jYN4Few== X-Google-Smtp-Source: ABdhPJyENu+1DZB38ombukTrlidYFs75f5DQ8cOROWqImvC/TvRimyOKx2FAWAj2nHXanlTxlxY5o6G1svhNN/nzePQ= X-Received: by 2002:a2e:9cb:: with SMTP id 194mr8159473ljj.438.1615033547728; Sat, 06 Mar 2021 04:25:47 -0800 (PST) MIME-Version: 1.0 References: <20210223023125.2265845-1-jiancai@google.com> <20210223023542.2287529-1-jiancai@google.com> In-Reply-To: From: Linus Walleij Date: Sat, 6 Mar 2021 13:25:36 +0100 Message-ID: Subject: Re: [PATCH v5] ARM: Implement SLS mitigation To: Jian Cai Cc: Nick Desaulniers , Manoj Gupta , Luis Lozano , clang-built-linux , Nathan Chancellor , David Laight , Will Deacon , Russell King , Russell King , Catalin Marinas , James Morris , "Serge E. Hallyn" , Arnd Bergmann , Masahiro Yamada , Krzysztof Kozlowski , Marc Zyngier , Kees Cook , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Ard Biesheuvel , Ingo Molnar , Andrew Morton , Mike Rapoport , Mark Rutland , David Brazdil , James Morse , Linux ARM , "linux-kernel@vger.kernel.org" , linux-security-module@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_122549_779334_3F0287DD X-CRM114-Status: GOOD ( 22.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 5, 2021 at 12:23 AM Jian Cai wrote: > On Wed, Mar 3, 2021 at 7:04 AM Linus Walleij wrote: > > > > On Tue, Feb 23, 2021 at 3:36 AM Jian Cai wrote: > > > > > This patch adds CONFIG_HARDEN_SLS_ALL that can be used to turn on > > > -mharden-sls=all, which mitigates the straight-line speculation > > > vulnerability, speculative execution of the instruction following some > > > unconditional jumps. Notice -mharden-sls= has other options as below, > > > and this config turns on the strongest option. > > > > > > all: enable all mitigations against Straight Line Speculation that are implemented. > > > none: disable all mitigations against Straight Line Speculation. > > > retbr: enable the mitigation against Straight Line Speculation for RET and BR instructions. > > > blr: enable the mitigation against Straight Line Speculation for BLR instructions. > > > > I heard about compiler protection for this, so nice to see it happening! > > > > Would you happen to know if there is any plan to do the same for GCC? > > I know you folks at Google like LLVM, but if you know let us know. > > I think gcc also has these options. > https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html And how does that work with this part of your patch: +#define SLS_TEXT \ + ALIGN_FUNCTION(); \ + *(.text.__llvm_slsblr_thunk_*) This does not look compiler agnostic? Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel