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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, T_DKIMWL_WL_HIGH,USER_AGENT_GIT 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 15D3DC43144 for ; Thu, 28 Jun 2018 12:47:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDCCC2736F for ; Thu, 28 Jun 2018 12:47:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="KXhttikx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDCCC2736F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934573AbeF1MrC (ORCPT ); Thu, 28 Jun 2018 08:47:02 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:12292 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933945AbeF1Mq7 (ORCPT ); Thu, 28 Jun 2018 08:46:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1530190019; x=1561726019; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=FKNYgZtSrmIMnUR0oi/2yCpKum1nTMlNXXnxyUNcG3A=; b=KXhttikxhCdqciKcoIAF06HQAEb/CNyqMzO99ypvmGA4FaKQDOpa071B HZNXeneIIzHdtgvkauqKfGzzLtPQ5oPLCwwZ4l7k7u+8I3A6hK0/fZRg1 baSKch8RBEczKWdb43QMksyzkSsMetY5c3gKv6ZSG9DmTybh8hy32pYBr w=; X-IronPort-AV: E=Sophos;i="5.51,283,1526342400"; d="scan'208";a="350176620" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2b-c300ac87.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Jun 2018 12:46:56 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2b-c300ac87.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w5SCkrgE108133 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 28 Jun 2018 12:46:54 GMT Received: from EX13D02EUB001.ant.amazon.com (10.43.166.150) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Jun 2018 12:46:43 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D02EUB001.ant.amazon.com (10.43.166.150) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Jun 2018 12:46:42 +0000 Received: from uc1a35a69ae4659.ant.amazon.com (10.28.85.80) by mail-relay.amazon.com (10.43.62.226) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 28 Jun 2018 12:46:40 +0000 From: Norbert Manthey To: Norbert Manthey , CC: Andrew Morton , Palmer Dabbelt , Geert Uytterhoeven , Kees Cook , "Luis R. Rodriguez" , Yury Norov , Nick Terrell , Matt Redfearn , Sebastian Andrzej Siewior Subject: [less-CONFIG_NET v2 4/8] seccomp: include nlattr Date: Thu, 28 Jun 2018 14:45:32 +0200 Message-ID: <1530189936-25780-5-git-send-email-nmanthey@amazon.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530189936-25780-1-git-send-email-nmanthey@amazon.de> References: <1530189936-25780-1-git-send-email-nmanthey@amazon.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When we want to use CONFIG_SECCOMP_FILTER without CONFIG_NET, we have to ensure that the required files that would be pulled in via CONFIG_NET are compiled when dropping CONFIG_NET. Here, we could also select CONFIG_NLATTR instead of pulling the file in explicitly. One could go even one step further and cut the only required function off, namely nla_find. This is part of the effort to split CONFIG_SECCOMP_FILTER and CONFIG_NET. Signed-off-by: Norbert Manthey --- lib/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 90dc552..8cd4909 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -157,7 +157,9 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o obj-$(CONFIG_DYNAMIC_DEBUG) += dynamic_debug.o -obj-$(CONFIG_NLATTR) += nlattr.o +ifneq ($(filter y,$(CONFIG_NLATTR) $(CONFIG_SECCOMP_FILTER)),) +obj-y += nlattr.o +endif obj-$(CONFIG_LRU_CACHE) += lru_cache.o -- 2.7.4 Amazon Development Center Germany GmbH Berlin - Dresden - Aachen main office: Krausenstr. 38, 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B