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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 85832C2BA83 for ; Wed, 12 Feb 2020 17:31:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5ADAE2168B for ; Wed, 12 Feb 2020 17:31:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BtezE3UK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728844AbgBLRbC (ORCPT ); Wed, 12 Feb 2020 12:31:02 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:38223 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726982AbgBLRbC (ORCPT ); Wed, 12 Feb 2020 12:31:02 -0500 Received: by mail-vs1-f68.google.com with SMTP id r18so2030375vso.5 for ; Wed, 12 Feb 2020 09:31:01 -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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=BtezE3UKOP32S7Hgi6uAZOCn9BCk1YLzZTI/31neMRdDIAastd/PkKexEg5uWIeSlq /hFI/msrF2GQcVhisW/RaJNrJGmFkKA4SeD0lHwdM4ey9ghkS/K+yx90I62OEmTesdwF xzMU/2Mq+v9/Okdl/2mUjBYKqE6P9vJw2KVomx5TFhjbaK/lu0Q6tw2rFDTRVzvD2KxL boPGPbPxe+RpyEehZt6ohw9y9NodMcdQmgyDLVMfAAlCQ41OBvoUAldOafMsvbSOhhvM Ujf9+E+XNGlSxbjxgY5T1BHWqvckIdfOYnsyRjOxsWx6G6V+xqkaOcye9xpAB/GIw4Zn EW+A== 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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=BTtNqvPUhg+LpmzaHm/rHRHIwky3dnp2bqcXfZr32ZREQgpIAl4Zvc3i87VoSCYcKN KJa+ywz+S5k4tPtt59375NEhAFYpZ13pUObnzYoI2zR60iyTt/GUrabPp+XgjijhZ5L7 BeE50TnXAv7sgkymTjZ0Vsnj1Jpq3Jm0zj3QMZAPkXnlfqaPkTzTgm93i1C6ap4EP1EY +Ix59rKLD1wpuaWLNdl0EYDBDrZOP+aFzBCEyK57EDpGHAduHD5kMJy7hW9H2w3uUCBb QWxNqWNAZeA8xt02WarocaMPQ/BkY1R0N0vvH01QuGHEzo8wP1IBZ0jzHGtv8zhgxz3v 2emg== X-Gm-Message-State: APjAAAWnG2x7CvzcO63KuiWkEjSYjjbcQ3aK56vyZPA9ria1uu0abH6G OoIoLYU0kaBLgEAMLgS4deu54gb1omr6Wgo4AyQZzA== X-Google-Smtp-Source: APXvYqyjKo/YFw4KoPFfCCWJOIKf5+SsU5ZWgCMmPdEkaicagM609YliueP7WkCTKw6TDAOHNRXlU3z7/h7iIoQqHFg= X-Received: by 2002:a67:f4d2:: with SMTP id s18mr12516774vsn.15.1581528660711; Wed, 12 Feb 2020 09:31:00 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20200128184934.77625-1-samitolvanen@google.com> <20200128184934.77625-10-samitolvanen@google.com> <6f62b3c0-e796-e91c-f53b-23bd80fcb065@arm.com> <20200210175214.GA23318@willie-the-truck> <20200210180327.GB20840@lakrids.cambridge.arm.com> <20200210180740.GA24354@willie-the-truck> <20200210182431.GC20840@lakrids.cambridge.arm.com> <20200211095401.GA8560@willie-the-truck> In-Reply-To: <20200211095401.GA8560@willie-the-truck> From: Sami Tolvanen Date: Wed, 12 Feb 2020 09:30:49 -0800 Message-ID: Subject: Re: [PATCH v7 09/11] arm64: disable SCS for hypervisor code To: Will Deacon Cc: Mark Rutland , James Morse , Catalin Marinas , Steven Rostedt , Masami Hiramatsu , Ard Biesheuvel , Dave Martin , Kees Cook , Laura Abbott , Marc Zyngier , Nick Desaulniers , Jann Horn , Miguel Ojeda , Masahiro Yamada , clang-built-linux , Kernel Hardening , linux-arm-kernel , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 11, 2020 at 1:54 AM Will Deacon wrote: > Thanks, I missed that. It's annoying that we'll end up needing /both/ > -ffixed-x18 *and* the save/restore around guest transitions, but if we > actually want to use SCS for the VHE code then I see that it will be > required. > > Sami -- can you restore -ffixed-x18 and then try the function attribute > as suggested by James, please? Sure. Adding __noscs to __hyp_text and not filtering out any of the flags in the Makefile appears to work. I'll update this in the next version. Sami 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 A59EDC2BA83 for ; Wed, 12 Feb 2020 17:31:18 +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 7B71A2082F for ; Wed, 12 Feb 2020 17:31:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RNPqOl+Z"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="BtezE3UK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B71A2082F 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=PmSeHSc5b8ad0JnCRwftVXbItN2wXRLcuysG8tE4mZI=; b=RNPqOl+Z+TleQ9 +lxIwzqL0eSzVRo8+Z5Ek5/REcK84kIB/NfBDtzRYB49qp2Wn6EP6gWEsjQU7Bj8vVl2wH1xJP+nW h5sg9Nnm3bjGoYKXsU8zAjzG5nd0zjTcgkDAg37NoyQtZSec++TX/K/YlwXJE0NuueQU6QYMgjdHN HbfRaLHP+bHHlMXYgDa19lmm7zxwr0SvF6+2+AA3Kx0R5jMKSiK0i8G1fmVfOxitoIpXSKTOmvr7T Ak3kkKWdc8N2NIDdKWOaqpyo/83O48YaBYQOWjUbUtIupUv1EgaCDcmmlREQ0sZcftpONAbIwar+6 fuLJwz0f9SzvagAtW//g==; 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 1j1vqt-0003NA-Sx; Wed, 12 Feb 2020 17:31:07 +0000 Received: from mail-vs1-xe41.google.com ([2607:f8b0:4864:20::e41]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1vqq-0003MH-MO for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2020 17:31:05 +0000 Received: by mail-vs1-xe41.google.com with SMTP id b79so1677164vsd.9 for ; Wed, 12 Feb 2020 09:31:01 -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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=BtezE3UKOP32S7Hgi6uAZOCn9BCk1YLzZTI/31neMRdDIAastd/PkKexEg5uWIeSlq /hFI/msrF2GQcVhisW/RaJNrJGmFkKA4SeD0lHwdM4ey9ghkS/K+yx90I62OEmTesdwF xzMU/2Mq+v9/Okdl/2mUjBYKqE6P9vJw2KVomx5TFhjbaK/lu0Q6tw2rFDTRVzvD2KxL boPGPbPxe+RpyEehZt6ohw9y9NodMcdQmgyDLVMfAAlCQ41OBvoUAldOafMsvbSOhhvM Ujf9+E+XNGlSxbjxgY5T1BHWqvckIdfOYnsyRjOxsWx6G6V+xqkaOcye9xpAB/GIw4Zn EW+A== 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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=WeK+Ai67TrRRzoiapnQNK5WSdmTXOVcTaE/LzU6mVaa9s8APAeOGjTdwUPCCvOpihs 9iZZbx8YjD8j+Y33T8cbXEjEzSyGkF+Olo+E4VFSsElUKBoRWq0yGtzAG8EChHcb4mkp +6idNjTTl3Z4VXmNRJE7JB48pYdDIqmD/jh0mGvoPQCyTYAw519gtHYP6r9iVDMwKMut 7atX8JmsXCMSodV+i//EzhtcIMGIGCD7EzneFnF6lHAKQ278Xo91IHUwIMnchZVjbtly 0sSgQ4+ughaULjICk9kwoJk1agPtx8rZquEEPe423k/Q+3bKhSmFOsXzq6Hgve92SZru Qa0w== X-Gm-Message-State: APjAAAUD8cc5vCW5AJxt6bRFL0yuS7JE9D1Hs51HFbgr58TIVrG30RrM DgIeLgCq7Bw2ft5mWsjDgWjTYhQW3djQxkqBCKH5uA== X-Google-Smtp-Source: APXvYqyjKo/YFw4KoPFfCCWJOIKf5+SsU5ZWgCMmPdEkaicagM609YliueP7WkCTKw6TDAOHNRXlU3z7/h7iIoQqHFg= X-Received: by 2002:a67:f4d2:: with SMTP id s18mr12516774vsn.15.1581528660711; Wed, 12 Feb 2020 09:31:00 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20200128184934.77625-1-samitolvanen@google.com> <20200128184934.77625-10-samitolvanen@google.com> <6f62b3c0-e796-e91c-f53b-23bd80fcb065@arm.com> <20200210175214.GA23318@willie-the-truck> <20200210180327.GB20840@lakrids.cambridge.arm.com> <20200210180740.GA24354@willie-the-truck> <20200210182431.GC20840@lakrids.cambridge.arm.com> <20200211095401.GA8560@willie-the-truck> In-Reply-To: <20200211095401.GA8560@willie-the-truck> From: Sami Tolvanen Date: Wed, 12 Feb 2020 09:30:49 -0800 Message-ID: Subject: Re: [PATCH v7 09/11] arm64: disable SCS for hypervisor code To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_093104_757474_3D287F36 X-CRM114-Status: GOOD ( 10.06 ) 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 , James Morse , 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 Tue, Feb 11, 2020 at 1:54 AM Will Deacon wrote: > Thanks, I missed that. It's annoying that we'll end up needing /both/ > -ffixed-x18 *and* the save/restore around guest transitions, but if we > actually want to use SCS for the VHE code then I see that it will be > required. > > Sami -- can you restore -ffixed-x18 and then try the function attribute > as suggested by James, please? Sure. Adding __noscs to __hyp_text and not filtering out any of the flags in the Makefile appears to work. I'll update this in the next version. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 F288CC2BA83 for ; Wed, 12 Feb 2020 17:31:20 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 4F29A2082F for ; Wed, 12 Feb 2020 17:31:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BtezE3UK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F29A2082F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-17796-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 29904 invoked by uid 550); 12 Feb 2020 17:31:13 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 29879 invoked from network); 12 Feb 2020 17:31:12 -0000 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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=BtezE3UKOP32S7Hgi6uAZOCn9BCk1YLzZTI/31neMRdDIAastd/PkKexEg5uWIeSlq /hFI/msrF2GQcVhisW/RaJNrJGmFkKA4SeD0lHwdM4ey9ghkS/K+yx90I62OEmTesdwF xzMU/2Mq+v9/Okdl/2mUjBYKqE6P9vJw2KVomx5TFhjbaK/lu0Q6tw2rFDTRVzvD2KxL boPGPbPxe+RpyEehZt6ohw9y9NodMcdQmgyDLVMfAAlCQ41OBvoUAldOafMsvbSOhhvM Ujf9+E+XNGlSxbjxgY5T1BHWqvckIdfOYnsyRjOxsWx6G6V+xqkaOcye9xpAB/GIw4Zn EW+A== 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=XgpctoHh6dg1wxvj3BzSThVl8kpcEhXa3sNGXPcFbT4=; b=aqKrwywDhUyQ/iKY6OcxTKsPzo49Kc0aEI1x0mkJB3bJBbqR7HcsRI52dTFyxwPxVa pzPL7Tt5OoTDMZQjqwYXz0NxReYg1xgpMMLagl5bz++GTOkjTO2qN4U7n7YgYjSn4GCy /yuU8m3DPy29cJNyfX8V//ZeSz+y/2CR1hCGKPFZmc+LMeMIgcP80TCc5RK8Sv9kAMBM ugqxlvaNggdl+7oA8ISrqRoywYivJcWhMA3vewEwqqerkSLu8j6Zs1s+FRR9FXa3Pz2+ huv59O6RSIlrGSDC8vX72twpSSDI3bZJ0Q+Y5d4eAVEn4rGIGH31ucNppeAttEijuUJ/ f94g== X-Gm-Message-State: APjAAAWfY5IY97s5qMD1yLjn25EkvZIx6JiEzXkzfeMedbJXEZ4px5lc DmtmiD4vdPIOWDf8NRAlxiYJn2hcWqHqdzDGwvUBvg== X-Google-Smtp-Source: APXvYqyjKo/YFw4KoPFfCCWJOIKf5+SsU5ZWgCMmPdEkaicagM609YliueP7WkCTKw6TDAOHNRXlU3z7/h7iIoQqHFg= X-Received: by 2002:a67:f4d2:: with SMTP id s18mr12516774vsn.15.1581528660711; Wed, 12 Feb 2020 09:31:00 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20200128184934.77625-1-samitolvanen@google.com> <20200128184934.77625-10-samitolvanen@google.com> <6f62b3c0-e796-e91c-f53b-23bd80fcb065@arm.com> <20200210175214.GA23318@willie-the-truck> <20200210180327.GB20840@lakrids.cambridge.arm.com> <20200210180740.GA24354@willie-the-truck> <20200210182431.GC20840@lakrids.cambridge.arm.com> <20200211095401.GA8560@willie-the-truck> In-Reply-To: <20200211095401.GA8560@willie-the-truck> From: Sami Tolvanen Date: Wed, 12 Feb 2020 09:30:49 -0800 Message-ID: Subject: Re: [PATCH v7 09/11] arm64: disable SCS for hypervisor code To: Will Deacon Cc: Mark Rutland , James Morse , Catalin Marinas , Steven Rostedt , Masami Hiramatsu , Ard Biesheuvel , Dave Martin , Kees Cook , Laura Abbott , Marc Zyngier , Nick Desaulniers , Jann Horn , Miguel Ojeda , Masahiro Yamada , clang-built-linux , Kernel Hardening , linux-arm-kernel , LKML Content-Type: text/plain; charset="UTF-8" On Tue, Feb 11, 2020 at 1:54 AM Will Deacon wrote: > Thanks, I missed that. It's annoying that we'll end up needing /both/ > -ffixed-x18 *and* the save/restore around guest transitions, but if we > actually want to use SCS for the VHE code then I see that it will be > required. > > Sami -- can you restore -ffixed-x18 and then try the function attribute > as suggested by James, please? Sure. Adding __noscs to __hyp_text and not filtering out any of the flags in the Makefile appears to work. I'll update this in the next version. Sami