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 616DBC433DB for ; Wed, 3 Mar 2021 22:59:21 +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 9F5B464EF9 for ; Wed, 3 Mar 2021 22:59:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F5B464EF9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ACULAB.COM 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:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vnWRmdh7nJtHP8y6SIgoulBNMSXxFHWqfsWAsWz3zzk=; b=in+ss5TMcPvM35f2Q8/qOoNnR VfOuxQUUROfipCwU+Lrd4d5Ng5mXsPse/T7MEcm4KildQagkLxNpMl/+VU7YmXLFHH8x4cBrbsouc 4wjOzLYkI4Wz/gwHQHHHlwulSy5P2U62ZSQApf0SV/sta+drfHh5rEwkY+eYQJg/jEtst/p4hP2o1 9zXjsxzOYtsVYj9HyNv5ww65UvT5WRH8+1s7jp7SFJquFHWh2vq0KumrZ9Oq0LZ/toDyMeRYdgEkZ KL3i+cQwPtzdWfYoX2rqx/e9KzJORdVlHxkqSHAC0T2HJz2lCsgowTrx5QXSDB8YpTgMz8NqRcPRM wTHNwJRTw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHaOE-006pPP-41; Wed, 03 Mar 2021 22:54:46 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHTSz-005OVi-NE for linux-arm-kernel@lists.infradead.org; Wed, 03 Mar 2021 15:31:16 +0000 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-129-p7FEIIrCNG6cb_3HeC64uw-1; Wed, 03 Mar 2021 15:29:45 +0000 X-MC-Unique: p7FEIIrCNG6cb_3HeC64uw-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 3 Mar 2021 15:29:37 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Wed, 3 Mar 2021 15:29:37 +0000 From: David Laight To: 'Linus Walleij' , Will Deacon CC: Jian Cai , Nick Desaulniers , Manoj Gupta , Luis Lozano , clang-built-linux , Nathan Chancellor , Russell King , Catalin Marinas , James Morris , "Serge E. Hallyn" , Arnd Bergmann , Masahiro Yamada , Kees Cook , Ard Biesheuvel , =?utf-8?B?QW5kcmVhcyBGw6RyYmVy?= , "Ingo Molnar" , Marc Zyngier , Andrew Morton , Mike Rapoport , Mark Rutland , David Brazdil , James Morse , Linux ARM , Linux Kernel Mailing List , "linux-security-module@vger.kernel.org" Subject: RE: [PATCH v4] ARM: Implement SLS mitigation Thread-Topic: [PATCH v4] ARM: Implement SLS mitigation Thread-Index: AQHXEECBQRoTQnOC90iuKvtWWC/yz6pyYx/A Date: Wed, 3 Mar 2021 15:29:37 +0000 Message-ID: <49e8725f29ab4ecda6d669e9216bca29@AcuMS.aculab.com> References: <20210219201852.3213914-1-jiancai@google.com> <20210219230841.875875-1-jiancai@google.com> <20210222115816.GA8605@willie-the-truck> <20210223100453.GB10254@willie-the-truck> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US 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 From: Linus Walleij > Sent: 03 March 2021 15:19 > > On Tue, Feb 23, 2021 at 11:05 AM Will Deacon wrote: > > On Mon, Feb 22, 2021 at 01:50:06PM -0800, Jian Cai wrote: > > > I am not sure if there are any plans to protect assembly code and I > > > will leave it to the Arm folks since they know a whole lot better. But > > > even without that part, we should still have better protection, > > > especially when overhead does not look too bad: I did some preliminary > > > experiments on ChromeOS, code size of vmlinux increased 3%, and there > > > were no noticeable changes to run-time performance of the benchmarks I > > > used. > > > > If the mitigation is required, I'm not sure I see a lot of point in only > > doing a half-baked job of it. It feels a bit like a box-ticking exercise, > > in which case any overhead is too much. > > I wrote some suggestions on follow-ups in my reply, and I can > help out doing some of the patches, I think. > > Since ARM32 RET is mov pc, <> > git grep 'mov.*pc,' | wc -l gives 93 sites in arch/arm. > I suppose these need to come out: > > mov pc, lr > dsb(nsh); > isb(); Won't that go horribly wrong for conditional returns? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel