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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 BE268CA9EAF for ; Thu, 24 Oct 2019 12:04:27 +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 874EE21906 for ; Thu, 24 Oct 2019 12:04:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UoROnzGx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 874EE21906 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.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:MIME-Version:References:In-Reply-To: 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=8Vzg5pupcwWKabw88bIlO3FAEbpuqnLNsYJ1gTTCSew=; b=UoROnzGx0aFuDs gNnz2uOpjsjKMSopxpLVoaQW4WWEXHkMjih+sei2ppl4cY3zSadrjtLsAIUV/9R00+eA/ssFou2mT C6zapfSGdD3rCO8W+Pcz5ADi70ivxkSM4oHdXIcP9ngAc8saUvCco630TI3stMR1UfEs7ud6FTF4X Ag1dv0ebzVSiXQQ17gb6VIwS8eQv/wjG/G1rDxR/pqgNS6PNuK/QnZVIvAXPC0MX7mF0NhiGDrMDo Bpz4EcL/bjPhEJcISRMYQ+POnmcYEjGbo7xMnNvQJ8NEbNk+1xYTb1HSlbdHGWYwCL6DEh+wwzHZu dOI3l7K9BxPStbCSzqAQ==; 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 1iNbqs-0000bj-QL; Thu, 24 Oct 2019 12:04:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNbqo-0000Zt-2J for linux-arm-kernel@lists.infradead.org; Thu, 24 Oct 2019 12:04:24 +0000 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3894520856; Thu, 24 Oct 2019 12:04:20 +0000 (UTC) Date: Thu, 24 Oct 2019 08:04:18 -0400 From: Steven Rostedt To: Sami Tolvanen Subject: Re: [PATCH 06/18] add support for Clang's Shadow Call Stack (SCS) Message-ID: <20191024080418.35423b36@gandalf.local.home> In-Reply-To: References: <20191018161033.261971-1-samitolvanen@google.com> <20191018161033.261971-7-samitolvanen@google.com> <20191022162826.GC699@lakrids.cambridge.arm.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_050422_139866_377471B6 X-CRM114-Status: GOOD ( 16.53 ) 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 , Catalin Marinas , Kernel Hardening , Nick Desaulniers , LKML , Masahiro Yamada , clang-built-linux , Laura Abbott , Will Deacon , 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 Wed, 23 Oct 2019 09:59:09 -0700 Sami Tolvanen wrote: > On Tue, Oct 22, 2019 at 9:28 AM Mark Rutland wrote: > > I think it would be preferable to follow the example of CC_FLAGS_FTRACE > > so that this can be filtered out, e.g. > > > > ifdef CONFIG_SHADOW_CALL_STACK > > CFLAGS_SCS := -fsanitize=shadow-call-stack > > KBUILD_CFLAGS += $(CFLAGS_SCS) > > export CC_FLAGS_SCS > > endif > > > > ... with removal being: > > > > CFLAGS_REMOVE := $(CC_FLAGS_SCS) > > > > ... or: > > > > CFLAGS_REMOVE_obj.o := $(CC_FLAGS_SCS) > > > > That way you only need to define the flags once, so the enable and > > disable falgs remain in sync by construction. > > CFLAGS_REMOVE appears to be only implemented for objects, which means > there's no convenient way to filter out flags for everything in > arch/arm64/kvm/hyp, for example. I could add a CFLAGS_REMOVE > separately for each object file, or we could add something like > ccflags-remove-y to complement ccflags-y, which should be relatively > simple. Masahiro, do you have any suggestions? > You can remove a CFLAGS for a whole directory. lib, kernel/trace and others do this. Look at kernel/trace/Makefile, we have: ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) Where it removes CC_FLAGS_FTRACE from CFLAGS for all objects in the directory. -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel