Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp845871imm; Wed, 6 Jun 2018 06:53:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBTWhU7gOxuvzCibzPs8vpSnZ2Sn4msDbFy3B8ZSHeYf/u5ZAeeAXn6xennx1IrpKg6fov X-Received: by 2002:a17:902:781:: with SMTP id 1-v6mr3359891plj.150.1528293189957; Wed, 06 Jun 2018 06:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528293189; cv=none; d=google.com; s=arc-20160816; b=oe7wR8PcVRpmZV7YD6UVoqudsJzJKd9f9JHlhljhXTr85YAwH2zQBxg/9/5f7qjrSO CJQtsfGxqoHwGRwThRjAw8GqiiU6pF7yl+GzLlNDzn6gOHvgEykPtv0dXi6Pr1hqFwYO vDzyCgfkexhcDQTRvFIph70vkxkZxNv3H3fOqwX4odMq9W5lq4zioV9YJsYoSdMwR/2V ic3cMH+Qkk4j5jLROunpJT34oYcHs9LCEHbVd4YL9rl+Za0OpETUYHHFrY9NIizVHEso R1pl8/74ef7n8UpoG9YuQftex+IMU4jS+U5ul4wzTNmZrLGb/yJYL/k2V1ciFwIYQec1 l74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature:arc-authentication-results; bh=5Yxw987WFK6JFtTYZurIzgaLGNqcjiy+I5AXVRwBTgI=; b=z/TKldrVOhNegjBhAg8Rx/4AiJeJMQ2GBhJ23Fe8gLw7NUVelWwjd2lHB3TOHq19g5 d5ee3Nb/1TokxWgLO/xrQSJMb5+2zUVp+dsCDSDp+U65DyoxkEu0Le8earAankoFxhJl X4IxOY9uSwadfyhZu46gZ2X1PZn90uz4bCJMESGJl1Bu7rI3iiNQiO3XvaoKhkzVDuKd 0XMem118QvXip/qMhaAocwFGaveEn2u1Vc5qIW0nBoAKBylGv0ZRnRBC+wwcydUZgxrb hOHb4itPsFISbLoXulQTfJxTHZbK4RC9PNaxwgN1/CLyNPwgQmP+xaAdVSnPOuqGfJmy ELfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=PY4i56As; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7-v6si9731385pfh.303.2018.06.06.06.52.55; Wed, 06 Jun 2018 06:53:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=PY4i56As; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbeFFNwZ (ORCPT + 99 others); Wed, 6 Jun 2018 09:52:25 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:48681 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbeFFNwX (ORCPT ); Wed, 6 Jun 2018 09:52:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1528293143; x=1559829143; h=from:to:subject:date:message-id:mime-version; bh=5Yxw987WFK6JFtTYZurIzgaLGNqcjiy+I5AXVRwBTgI=; b=PY4i56AsZF/cp+SMDUsUsZUVRmmZUW471pDTJRoxDA9nGJHU+biOk7iU 42e/ZiN2onUuBlP/Z2qrlGbneMYE17Zg8vHlUcCDlkXbrJgN4Gi59qN2Y s2jtWwPKvhe1oCJD2Y2QTbPCyuZkzqiWUvpPUvtRcpkryWsgBs7BCURRC c=; X-IronPort-AV: E=Sophos;i="5.49,483,1520899200"; d="scan'208";a="735681358" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-1e-97fdccfd.us-east-1.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Jun 2018 13:52:18 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-97fdccfd.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w56DqFxV005478 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 6 Jun 2018 13:52:17 GMT Received: from EX13D03UEE004.ant.amazon.com (10.43.62.93) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 6 Jun 2018 13:52:16 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D03UEE004.ant.amazon.com (10.43.62.93) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 6 Jun 2018 13:52:16 +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; Wed, 6 Jun 2018 13:52:16 +0000 From: Norbert Manthey To: , , , Subject: Make CONFIG_NET and CONFIG_SECCOMP_FILTER independent of CONFIG_NET Date: Wed, 6 Jun 2018 15:52:00 +0200 Message-ID: <1528293127-23825-1-git-send-email-nmanthey@amazon.de> X-Mailer: git-send-email 2.7.4 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 Dear all, currently, KVM and SECCOMP rely on functionality of CONFIG_NET, and hence the latter has to be enabled when building the kernel for the first two configurations. However, there exists scenarios where the system does not need networking, but KVM and SECCOMP filters. To reduce the kernel image size for these scenarios, and to be able to drop active code, this commit series allows to enable CONFIG_KVM and CONFIG_SECCOMP_FILTER without using CONFIG_NET. The functionality that is required for seccomp filters is kept in the same files and - after reordering the source code - is guarded with a single ifdef per file. I hope these changes are useful for other scenarios than the one I currently face. Best, Norbert 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