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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6761DC43331 for ; Thu, 7 Nov 2019 16:26:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 356502084D for ; Thu, 7 Nov 2019 16:26:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YFV5NE80"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="jZ5+6wBU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 356502084D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=JqrC8gA5UqNSunExsPzXoFm1H0EEmFXrXvcxCqiTLd0=; b=YFV5NE80WjCKMi rwbeLZXjtRc1Id+zCAe5QU4DHUfu8vrEQkW+frlblYuZCO8rPc1WhcNU3Jx1UlqcS8BxAK/e6PHFK piIt+OLGazQc3qQKvQUvON8nJi6T+RxWuTFaFnOYDP8AhiZ7XSwsKowkL90if18bQpvNB9AjlWHWl i1RSlfQ9AAla483AHej175GzJ7+qghCkRHK3SnopZNqHJdU+mrXSuKQ8iXi2tNSCdzSvfkI87DYrQ DeGCzuPlIqfYf8CMXW40ZjLCdvx3hPTnO/JVlp53Tyl32Q0eXeh7n1PQc3yLUUQ33noq5DkT5llSs jSR6UIoiXd161l+vyklw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSkcX-0006gb-0k; Thu, 07 Nov 2019 16:26:53 +0000 Received: from mail-ua1-x944.google.com ([2607:f8b0:4864:20::944]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSkcT-0006fe-Io for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2019 16:26:50 +0000 Received: by mail-ua1-x944.google.com with SMTP id n41so776879uae.2 for ; Thu, 07 Nov 2019 08:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AHVtna/ZK+ShoKE32vj/oIbQxq9UojFvas7d10KE8fg=; b=jZ5+6wBUk83wQPpJmxaIJELl84GXA/0+SmIJmGXKvPs+KkSBCCgqHgiiibcWA8tRTA HujJfE7DBIWcM4BdMqqm6Hcz+9CU85jfwEisPSpmYX8SNxvApOvMGdldNngt4QFlmguy L9WnpbCJuTK9/aD4SnBylkT5OXPccTKbvcPGHh1zNsTtz8OVlthkWe7v5As5buBEZozX Jz55FqoRAWXkZ9JM6qJpTKAC26iMxf6eygQfKLebtlCRS+d76RCGYyoBCD/ETzxuMdUU WKTMq/WWxlASzp8vUChued4POTmR6TtUPEetUvMBxAXDXrkob1IGUEAmcarqNNHiev2a mTgg== 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=AHVtna/ZK+ShoKE32vj/oIbQxq9UojFvas7d10KE8fg=; b=luZCbYOoHbmiCxsA6SFCDEIWaiZVAYBRmldo7dsdPB0B+gkjgZJ0ffortYHXsJHMsd stP8n+9mVrQWr6xdoD6rrsC9uCZLYz9IecMg4q/iew6Dk/+hwTefo1uy+9JnF94KMgzd L5EAmqd/cTsiIhK3yLJGgQMLH2HRkajZNnQmdmQNLvS5DCF12PGgztDVfm1RnMIfJz/t jINeOlVARc2bjz39SHs0pgEqFrISnU+8+L6xOwxSXfr9/D0HgBRCCT93J/JcXjOSoqhs 1A3LZVa/TDDj5FoR6yvgPpZCvdPISaKPZQLTcWTO7t/PQcQUdS3fl6QaOqKgw7mZJRXQ qcsw== X-Gm-Message-State: APjAAAUGOTI2oagEE0I1Vgs1b6Js4osnhA1QMpVKgd/xmOs9K5OUV2PF P7qBfOMO8UT53wnpq+9W39A9NfkGYJxVDEjDXynTDg== X-Google-Smtp-Source: APXvYqyLUUrZngxfbpK2EJw4lHfelTLISIcLLsL1NXa8kNArn8q1ZLsKkeVxBc7Gqn8x30++WT7p1IgHdkDpA3Dvs2U= X-Received: by 2002:ab0:2381:: with SMTP id b1mr2931374uan.106.1573144001488; Thu, 07 Nov 2019 08:26:41 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191105235608.107702-1-samitolvanen@google.com> <20191105235608.107702-12-samitolvanen@google.com> In-Reply-To: From: Sami Tolvanen Date: Thu, 7 Nov 2019 08:26:30 -0800 Message-ID: Subject: Re: [PATCH v5 11/14] arm64: efi: restore x18 if it was corrupted To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191107_082649_620991_D55BA33B X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kees Cook , Jann Horn , Masahiro Yamada , Catalin Marinas , Kernel Hardening , Nick Desaulniers , linux-kernel , Steven Rostedt , Miguel Ojeda , clang-built-linux , Masami Hiramatsu , Marc Zyngier , Laura Abbott , Will Deacon , Dave Martin , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 7, 2019 at 2:51 AM Ard Biesheuvel wrote: > > On Wed, 6 Nov 2019 at 05:46, Miguel Ojeda > wrote: > > > > On Wed, Nov 6, 2019 at 12:56 AM Sami Tolvanen wrote: > > > > > > If we detect a corrupted x18 and SCS is enabled, restore the register > > > before jumping back to instrumented code. This is safe, because the > > > wrapper is called with preemption disabled and a separate shadow stack > > > is used for interrupt handling. > > > > In case you do v6: I think putting the explanation about why this is > > safe in the existing comment would be best given it is justifying a > > subtlety of the code rather than the change itself. Ard? > > > > Agreed, but only if you have to respin for other reasons. Sure, sounds good to me. I'll update the comment if other changes are needed. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel