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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 EFC79CA9EC9 for ; Fri, 1 Nov 2019 04:02:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C38BA2085B for ; Fri, 1 Nov 2019 04:02:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="d20dfeMU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbfKAECR (ORCPT ); Fri, 1 Nov 2019 00:02:17 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38401 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbfKAECR (ORCPT ); Fri, 1 Nov 2019 00:02:17 -0400 Received: by mail-pg1-f193.google.com with SMTP id j30so2127637pgn.5 for ; Thu, 31 Oct 2019 21:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BAe1ln5Hx2gY8GJiVnbrjacBTRiF8zYUc3i9OMgoBV4=; b=d20dfeMUMO7iAV+Fn0SFBoJceIxy/S9eCh9MpKcU+8Svi9/nIYjbdD5L/UkHZhnzix JkU7VA7dyGF/sNbCwHD80C0s1IhuF/GjsyEtDZet5D5R19m1YB1nTHn4RH8s+keb8EXh TN5h9u8K3SVZV7Ba8Rr1S3a6ZJ8AbVBGmjB00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BAe1ln5Hx2gY8GJiVnbrjacBTRiF8zYUc3i9OMgoBV4=; b=hL97CqILMPJb4ZZL1oOrdAVuyWOeHXGNMPH/gfGZNgA1VSseNwUMmTN0e7jggP0ug1 M6VvHwIxehmVTTIMawHjZTRMzhbwDgi8QAHWC8/LTZs+Jn9qr8ugm63rgZ7Jec1mNsk2 YL0+T13RwUZAUkT54ywj/0ITvdQhYNZZryKVA9Ata9q4L6xM0fRVjthSy10eDOxQiu6T Nz2Ex7LF1S8FOxL2WrigUXvPtASSK8jduCdWj3eLbqTGwkTsy6QsY0rrLCnVgFh5/MSq ytnQhgIIvkka0P/6pCzVvOfUpYdnrrontbhKXjtoa3J+hn90qDGAq5315oBAySBC0t+L F7DA== X-Gm-Message-State: APjAAAV7BP8ixh7wQcIjMHF9hVALR/EUTWmF/+35IV5wvq+TzXuWtq0r TYoL6CZ1oVffBfNig9Sin2WJBA== X-Google-Smtp-Source: APXvYqyPHiOd3taHNtWSlPaVTh8guZzdREmzdQBPCQtoOfjQY9wgtCAJXeLozcbxVyvdbHL+RNqt5g== X-Received: by 2002:a62:b616:: with SMTP id j22mr10383274pff.201.1572580936603; Thu, 31 Oct 2019 21:02:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e5sm6101564pfa.110.2019.10.31.21.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 21:02:15 -0700 (PDT) Date: Thu, 31 Oct 2019 21:02:14 -0700 From: Kees Cook To: samitolvanen@google.com Cc: Will Deacon , Catalin Marinas , Steven Rostedt , Masami Hiramatsu , Ard Biesheuvel , Dave Martin , Laura Abbott , Mark Rutland , Nick Desaulniers , Jann Horn , Miguel Ojeda , Masahiro Yamada , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 16/17] arm64: disable SCS for hypervisor code Message-ID: <201910312101.2A014A8F@keescook> References: <20191018161033.261971-1-samitolvanen@google.com> <20191031164637.48901-1-samitolvanen@google.com> <20191031164637.48901-17-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031164637.48901-17-samitolvanen@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 31, 2019 at 09:46:36AM -0700, samitolvanen@google.com wrote: > Filter out CC_FLAGS_SCS for code that runs at a different exception > level. > > Suggested-by: Steven Rostedt (VMware) > Signed-off-by: Sami Tolvanen (Does it make any sense to merge all of these "disable under SCS" patches? I guess not, since they're each different areas...) Reviewed-by: Kees Cook -Kees > --- > arch/arm64/kvm/hyp/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile > index ea710f674cb6..17ea3da325e9 100644 > --- a/arch/arm64/kvm/hyp/Makefile > +++ b/arch/arm64/kvm/hyp/Makefile > @@ -28,3 +28,6 @@ GCOV_PROFILE := n > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > KCOV_INSTRUMENT := n > + > +# remove the SCS flags from all objects in this directory > +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) > -- > 2.24.0.rc0.303.g954a862665-goog > -- Kees Cook 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 6DF4ECA9EC9 for ; Fri, 1 Nov 2019 04:02:26 +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 430B82083E for ; Fri, 1 Nov 2019 04:02:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iIMYq+bh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="d20dfeMU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 430B82083E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=psuj2LlzdsTmXjWJU3y02Ao+oJSodLWLT6lbhEYnuco=; b=iIMYq+bh20O1tL sdrBshFxH1ouqp/Sv4vo4v23D8NFiM9zX3yPIn3VJq18e7zlgmE3pEQbcd1mQKkV0JF7uimlzLUBI 4U8XmOz6i+ZfqU24V/qLrhGcBrjMgOoQjcJ7o6bA9kDzAUszrCBX2xI7IMvGVX8vOJOKjULKId5b8 69zujGuivEi+8mMWb1pyfyitgVyfZ+MuJTF4dpqizCT66czkeRtZPoSXkiyJ42G+N76q3Go+hnOW/ r0jHHv9OiiiHUJTF5Ol9ESc0WFBhpNHeRuDnlvXjpCcRtD35AotmO/eHzx4lfpbRRfR6GOqd8469k 76apogG07t6qcu1dYvsA==; 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 1iQO8h-0004kF-NS; Fri, 01 Nov 2019 04:02:19 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQO8e-0004jt-Vy for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2019 04:02:18 +0000 Received: by mail-pg1-x541.google.com with SMTP id e10so5595859pgd.11 for ; Thu, 31 Oct 2019 21:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BAe1ln5Hx2gY8GJiVnbrjacBTRiF8zYUc3i9OMgoBV4=; b=d20dfeMUMO7iAV+Fn0SFBoJceIxy/S9eCh9MpKcU+8Svi9/nIYjbdD5L/UkHZhnzix JkU7VA7dyGF/sNbCwHD80C0s1IhuF/GjsyEtDZet5D5R19m1YB1nTHn4RH8s+keb8EXh TN5h9u8K3SVZV7Ba8Rr1S3a6ZJ8AbVBGmjB00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BAe1ln5Hx2gY8GJiVnbrjacBTRiF8zYUc3i9OMgoBV4=; b=ea1NHE9XemwXXBtxB1KEHStkHHiX4Ifzw9131D1snZCsPKjuzd4qnQvq2lP4zfslyO qmtQZBRvRz++HWOGnLQR27T3wv3jZjNbL8NWqSJ5+7n+0Fh4o2ipYRTnEV5qPwhByRkj mi63Ip4Nr0lOq7FaNLYxVuagCrALiAkeU+/UIJU4vv/83tsTd8g3VfGUKJYsAiNWcI9O wtCmVwRODMtgZtZUgjgyTWip9k3oBmWu+Fe0PTACcLjn9mR4liWo7obcKvLutQX9amAx tF97aXzcxPu+UPv1OlflMzHEtXb1S4AemoylXD0nBm8hmsKfVZDMqytbx4x2eFBSKrrw r91g== X-Gm-Message-State: APjAAAU8LBUQlhDs1mg9/1DtmNzgFYrLLDJV+KE/ZG6NIaw+1wMNnHKl yhO8w6MP5ERfdyDS81CSKNR5iw== X-Google-Smtp-Source: APXvYqyPHiOd3taHNtWSlPaVTh8guZzdREmzdQBPCQtoOfjQY9wgtCAJXeLozcbxVyvdbHL+RNqt5g== X-Received: by 2002:a62:b616:: with SMTP id j22mr10383274pff.201.1572580936603; Thu, 31 Oct 2019 21:02:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e5sm6101564pfa.110.2019.10.31.21.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 21:02:15 -0700 (PDT) Date: Thu, 31 Oct 2019 21:02:14 -0700 From: Kees Cook To: samitolvanen@google.com Subject: Re: [PATCH v3 16/17] arm64: disable SCS for hypervisor code Message-ID: <201910312101.2A014A8F@keescook> References: <20191018161033.261971-1-samitolvanen@google.com> <20191031164637.48901-1-samitolvanen@google.com> <20191031164637.48901-17-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191031164637.48901-17-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191031_210217_028756_BD8CD2EA X-CRM114-Status: GOOD ( 14.54 ) 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 , clang-built-linux@googlegroups.com, Ard Biesheuvel , Masahiro Yamada , Catalin Marinas , Jann Horn , Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , Miguel Ojeda , Masami Hiramatsu , kernel-hardening@lists.openwall.com, Laura Abbott , Will Deacon , Dave Martin , linux-arm-kernel@lists.infradead.org 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, Oct 31, 2019 at 09:46:36AM -0700, samitolvanen@google.com wrote: > Filter out CC_FLAGS_SCS for code that runs at a different exception > level. > > Suggested-by: Steven Rostedt (VMware) > Signed-off-by: Sami Tolvanen (Does it make any sense to merge all of these "disable under SCS" patches? I guess not, since they're each different areas...) Reviewed-by: Kees Cook -Kees > --- > arch/arm64/kvm/hyp/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile > index ea710f674cb6..17ea3da325e9 100644 > --- a/arch/arm64/kvm/hyp/Makefile > +++ b/arch/arm64/kvm/hyp/Makefile > @@ -28,3 +28,6 @@ GCOV_PROFILE := n > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > KCOV_INSTRUMENT := n > + > +# remove the SCS flags from all objects in this directory > +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) > -- > 2.24.0.rc0.303.g954a862665-goog > -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel