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 B9F3DC33CAF for ; Thu, 16 Jan 2020 20:36:21 +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 8BDB520730 for ; Thu, 16 Jan 2020 20:36:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uSfrZk6c"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="dryW2bgx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BDB520730 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=hebAaIR4CzOQHkxHgcRHSE9bEsId5I+TVoSjvViYhHM=; b=uSfrZk6cBP23r+ YLb2RVcpu+syrwm4bxofdpQimESWCYPQY7fvjQvKgSs8H4vw2gP5g82fZOvlXmgoIo/uL+Iy0mY9u 6/sW5w4gYSFPVgFxiz46DBXJVWlD1ZBrVDgANwtD6jP4qFYKJ8O1CqKZD4V19KT4kvi3R9TSD+MBR kBjJY7I1vetS/1jD7I149UI7aqwLuKWblX9b7GQqskGN2aagzEZeftrnVOyUa2rj+e7BgeXiL6kYD hJnX4ota0dR1rZTf4/xxHUS4qGihCcrO5Pppwnxq7JDHpDjelEquBjkIRCNGh+e8RzG2GjaB/qtPL K4uVTaMV9YoMUSuSW+Qw==; 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 1isBsK-00084t-81; Thu, 16 Jan 2020 20:36:20 +0000 Received: from mail-vk1-xa43.google.com ([2607:f8b0:4864:20::a43]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1isBsH-00083i-BT for linux-arm-kernel@lists.infradead.org; Thu, 16 Jan 2020 20:36:18 +0000 Received: by mail-vk1-xa43.google.com with SMTP id d17so6045898vke.5 for ; Thu, 16 Jan 2020 12:36:14 -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=RV6fXTo3b3qoT7vSlLu9LZXPKWnKYVEBYLBa7aJ3coE=; b=dryW2bgxQT3TcmKHyF7k3/UkFi2E2Qunh6WctF3kjeRnNJDiSxf7obYQetkLkkmU/f rsRO4G1R9NHiQfiB7IbS/g3e201MDYpYRfm3I3lKZQuJ6YOovOwoFVhI0kbjkNwOxZtP m0dEx+VXLI9Cl6w4dCABDOZNZ3pChr94FxH3Dz3EX4sWv6ulIjkhtRpxwc+9VzwfxebA cjQgmaLfTXvQy+lU5KMD7jPpMrGjZ09Pd0UPfHvYS5HSHD7Naska9ofDRIcdvtGMBkNE kQkpg/ELqolO16Xjr3izfosdUsgTcuHhXOL5clFLaqYqXnnDVzR4Q0VRcIwAYcdwoE7u IvEA== 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=RV6fXTo3b3qoT7vSlLu9LZXPKWnKYVEBYLBa7aJ3coE=; b=aSV86yiQkdkEspi3yf8egyWMXGhPEKQQXU0JD7ZEGIcC3MJXhsbaxnJc6hRazQX0MR Ma6F+qBEnE5tkQgAaNujjvexQH5SFYlaRLjcO4wpWZA9UeWuka2FrbY+gwKAMTBfDtH+ K2Ulh5XLKJu/v26p9L71mRRHvoLq61dP/NHgOQw7xMZ63ATPqnaru6gQN4QAk90d1j53 WdfAfC5NAW34s76tVGb74b/m8v00tyoh3QfT4wOW8N8bwH8UJbvIDqQBmqgRqKF9yNZp 9k9jlHp7yjDmNE+bSk/tAmiDIbeeBzsmyM8srQWWxpqY/9giX77DA1MCXiohdhziVzhf E3tA== X-Gm-Message-State: APjAAAXZZEWBlfrQZi1IuEKc2wjb49Gs72FC5f8s9NMSYZxhguG3Q9+O UbD5W7TGdBKfCY0rOiwToUAL25gtPs1WAcPJeZ6Gqg== X-Google-Smtp-Source: APXvYqy3hookrrU/Buxl44KY5o3vqIMbrfDIWbbyEY39r9m+d/9XpIDAayToTJcBMK5GJtdqCaMmmDL594aQGbaPCAk= X-Received: by 2002:a1f:2910:: with SMTP id p16mr18939592vkp.71.1579206972944; Thu, 16 Jan 2020 12:36:12 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191206221351.38241-1-samitolvanen@google.com> <20191206221351.38241-12-samitolvanen@google.com> <20200116174450.GD21396@willie-the-truck> In-Reply-To: <20200116174450.GD21396@willie-the-truck> From: Sami Tolvanen Date: Thu, 16 Jan 2020 12:36:01 -0800 Message-ID: Subject: Re: [PATCH v6 11/15] arm64: efi: restore x18 if it was corrupted To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200116_123617_416693_DE67BCC9 X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. 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 , Ard Biesheuvel , Masahiro Yamada , Catalin Marinas , Jann Horn , Nick Desaulniers , LKML , Steven Rostedt , Miguel Ojeda , clang-built-linux , Masami Hiramatsu , Marc Zyngier , Kernel Hardening , Laura Abbott , Dave Martin , linux-arm-kernel 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, Jan 16, 2020 at 9:45 AM Will Deacon wrote: > > On Fri, Dec 06, 2019 at 02:13:47PM -0800, Sami Tolvanen wrote: > > -0: b efi_handle_corrupted_x18 // tail call > > +0: > > +#ifdef CONFIG_SHADOW_CALL_STACK > > + /* > > + * Restore x18 before returning to instrumented code. This is > > + * safe because the wrapper is called with preemption disabled and > > + * a separate shadow stack is used for interrupts. > > + */ > > + mov x18, x2 > > +#endif > > Why not restore it regardless of CONFIG_SHADOW_CALL_STACK? The ifdefs are here only because restoring the register without SCS isn't actually necessary, but I'm fine with dropping them (and editing the comment) in the next version if you prefer. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel