Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581763pxb; Thu, 4 Mar 2021 15:25:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxNvBKsn998fXWwxgO3Uz4PxW5dKrk2iFmFjU6NLW+eDSNvJR+jqj64ziWhGhDioawEuw4 X-Received: by 2002:aa7:c983:: with SMTP id c3mr6840535edt.185.1614900323587; Thu, 04 Mar 2021 15:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614900323; cv=none; d=google.com; s=arc-20160816; b=rDBtdD9Zs3BWNmhzLnC3IAxyh2bZzXDZnp5wEN44X28bltspzeDRvW3yepDJbKRpR9 mt9eXmOohj9I6krN9Sosag7sFhxPKnl6okETeHu1e3grXjHrT6lP/OwP75cgUQj7U0Zu 5aDPy1b9ebJKecWEth0WJ/3i6ti+11yyafawt3nHr6Pe5o1+o3MuOZCf//hxxg5/t5aO MoXUwwTd48rfXCy/k2wtUgx+SMEpzAopn83NVIqkaZeB+wjWdl0zsDksf6TqD7W4LTpC FIXhwVqLiks0X5LPg8k465H6ZwUj8u28NSxEbm7P/XIyeoLB+Um8qDDYgzPnUimUFtR6 jzSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=q7aMRHBSl7NHJrCVQqtGWHia3CjmS5YDu6hw58y3144=; b=UP9UwpY716xeJ5hV6m5hw5DgYU1cEmTBcj9iQkrQkDqtBKm8rdLMbDCX3kYkylybxS XTKFuylzEc6PvSEGnajuic7+BqLbZmhA/8hxBedQbhxhf6/3WXIHyKEhbFEsvsjk4eLD E8Wi/TIIGn6kUWvrSx2DcrFQv74ay75TMBgT58KtrE0E67vaS7KNG8civE6YNtHKJKxS qzv462xjPBIDqy7D1cRn4cq/A4dKmoHiyoUsDqp3Vhe6dQMhj1QgVqlKAsuXXW7YegNZ ddBg23iKVuXnVe+U2N+0qdwa9qZ7CtUuUbCzrFag/HO2BinP0CUm+27CfdnKq005BOoP p92g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hkdy5FBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si349742ejr.191.2021.03.04.15.25.01; Thu, 04 Mar 2021 15:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hkdy5FBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1835810AbhCCSE4 (ORCPT + 99 others); Wed, 3 Mar 2021 13:04:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383657AbhCCPcz (ORCPT ); Wed, 3 Mar 2021 10:32:55 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 378C4C061762 for ; Wed, 3 Mar 2021 07:31:55 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id t9so35847ljt.8 for ; Wed, 03 Mar 2021 07:31:55 -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=q7aMRHBSl7NHJrCVQqtGWHia3CjmS5YDu6hw58y3144=; b=hkdy5FBkaxL7oFI9pp6BeMVjXk1o2Zt23WsIuuhAsSqtfX/Lkdh5QXZgzfKaUqS23u K1jHi7CUCZWk0Tkq6ilWcqzhkppJcMDQOoYIxXUmwHI2+IaLdiUHbPxeswfkA7qqhSpS pKYdrnKYGY5zt2oWiN6416OdUPfJu0fiXi//jCyntJwgs/F1zHyBTUmwr/An0H1g3sMV oJZt/kEFBbGvwmrsSdX3jRgJWTFiUjUTu25FSHX53XSGUD5hVjhAwZSTTuH+ALJIyY0M cN/yOfXiA+5ZEUP7GtBNG6upTHFbP7F3jvQDN5n5C09CWxqFX03vtp9XWckYZv0S1u+e aPaw== 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=q7aMRHBSl7NHJrCVQqtGWHia3CjmS5YDu6hw58y3144=; b=Hloonc7ljZIuXDkMdoPVYS5xgJAiuHCe6nmv1tgrsgfrkKLIpk1jSmACvkzn5N5ABg Tv6op09Kf4HnV7Hlziqv6PQ/v4ofhy/JPKltrKuEdQ8xXzpeVxcl+Lajtzlks4mwR6xW GdtN3DKJ2S5JXHEQKfQph9Y8xFwbMnDtqcjwcaQ88yuvEEyLJbYZ/iodhEIaAGzPgFYC zzRclKhPrF+WYy1w98SvKWiN0+QDgsjqs1GLExtQy2KYtr8QGsiTE0s936EQaLuEEx+y carKg0iAiSrUcwaQH63BXqXu9Za91J7Gp4r1wC2a5Lr+NvqlSTkIKjOOfmDvZIGhwKTr rwyg== X-Gm-Message-State: AOAM532Mm4qblBRm0cfcsrLh4S4zRUujWarjMm0cA+FhL2ubeSYhnRC1 jbJh5IwZbTiEA1/h8E1rUm+81uhWG1v1EbuNKSiA4w== X-Received: by 2002:a2e:864a:: with SMTP id i10mr14866199ljj.467.1614785512273; Wed, 03 Mar 2021 07:31:52 -0800 (PST) MIME-Version: 1.0 References: <20210219201852.3213914-1-jiancai@google.com> <20210219230841.875875-1-jiancai@google.com> <20210222115816.GA8605@willie-the-truck> <20210223100453.GB10254@willie-the-truck> <49e8725f29ab4ecda6d669e9216bca29@AcuMS.aculab.com> In-Reply-To: <49e8725f29ab4ecda6d669e9216bca29@AcuMS.aculab.com> From: Linus Walleij Date: Wed, 3 Mar 2021 16:31:41 +0100 Message-ID: Subject: Re: [PATCH v4] ARM: Implement SLS mitigation To: David Laight Cc: Will Deacon , 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?Q?Andreas_F=C3=A4rber?= , 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 3, 2021 at 4:29 PM David Laight wrote: > > On Tue, Feb 23, 2021 at 11:05 AM Will Deacon wrote: > > 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? It will so I would not insert it after those. It has to be on a case-by-base basis, I am not planning any search and replace operations. Yours, Linus Walleij