From patchwork Thu Jun 6 13:01:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1111118 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.b="HpAJM0bc"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45KQlM6P07z9sNk; Thu, 6 Jun 2019 23:01:17 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hYs0y-00045K-8Z; Thu, 06 Jun 2019 13:01:08 +0000 Received: from mail-wm1-f68.google.com ([209.85.128.68]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1hYs0u-00044X-75 for kernel-team@lists.ubuntu.com; Thu, 06 Jun 2019 13:01:04 +0000 Received: by mail-wm1-f68.google.com with SMTP id z23so2338320wma.4 for ; Thu, 06 Jun 2019 06:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ybXb/jnfS9f1fII5E7PwPCfGODKC3fugkDh59k3ef3g=; b=HpAJM0bcSkIwEsihEGbmENgIesQSRWPHlLq5y3CRN11+FyN7wYJNTl5gl3yEh3Toqc g1GbQsFrc/Lovp8APS7cFHqGaJBQ72fGqoKVZcUOFUc8vYE+lAGrA36Zjj0DZBFq6s2j KCse1OxYb7uQF0G1yuwaT1/iXMRwTp/io0xxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=ybXb/jnfS9f1fII5E7PwPCfGODKC3fugkDh59k3ef3g=; b=VDuQ5qHVrbQQFFOGKm5UyO/98MEhIHtg3/twWDFX9BO8p8w02dRBx4+YpPHddEQdqs OFJzeUs/PSRgXacDUaRJBtGDQ0Iz5VrXWw3UqbnxUFzSFXbMGINoaV4JyP3Eb+FQosSf wuSfcuIahoqxEtuyxoHkW41TKPuTv3BrASsfbpDxjUTpe/COn1c0OA+TRlqf61wcZO6k bjfHiZY7QvP/pYVyClm6rz+eIAMjyZedonH9fkz7jhaRl2g5Xiv5+DwseG6M87tGHFZx m/ggF1RlRd3OyeXf1P2vlCp/LdA6gg2OZDxu+gCHIuM9SeKPTmN1COXKH0tgrwLims6V uIDg== X-Gm-Message-State: APjAAAWzSj3IajglmABuwqft9Txqi0IUZoWOmsYP451DSZJL9p2HtJix 78EspG4ogB0NW9jdpoNIRSip4N7NO4tjVQ== X-Google-Smtp-Source: APXvYqwdoljEyQU7m9QpBEeUo5sCqQfF8p32N0fk5GYjjwsHT3+zbwXiF098orMEmIWQ37K3N+bpQQ== X-Received: by 2002:a1c:e90f:: with SMTP id q15mr13318094wmc.89.1559826062336; Thu, 06 Jun 2019 06:01:02 -0700 (PDT) Received: from localhost (9.a.8.f.7.f.e.f.f.f.2.3.f.4.a.1.1.4.e.1.c.6.e.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:de6c:1e41:1a4f:32ff:fef7:f8a9]) by smtp.gmail.com with ESMTPSA id 34sm1179008wre.32.2019.06.06.06.01.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 06 Jun 2019 06:01:01 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][Bionic][PATCH] selinux: use kernel linux/socket.h for genheaders and mdp Date: Thu, 6 Jun 2019 14:01:00 +0100 Message-Id: <20190606130100.30278-1-xnox@ubuntu.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paulo Alcantara , Stephen Smalley , Paul Moore , stable@vger.kernel.org Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Paulo Alcantara BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1823429 When compiling genheaders and mdp from a newer host kernel, the following error happens: In file included from scripts/selinux/genheaders/genheaders.c:18: ./security/selinux/include/classmap.h:238:2: error: #error New address family defined, please update secclass_map. #error New address family defined, please update secclass_map. ^~~~~ make[3]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[2]: *** [scripts/Makefile.build:599: scripts/selinux/genheaders] Error 2 make[1]: *** [scripts/Makefile.build:599: scripts/selinux] Error 2 make[1]: *** Waiting for unfinished jobs.... Instead of relying on the host definition, include linux/socket.h in classmap.h to have PF_MAX. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara Acked-by: Stephen Smalley [PM: manually merge in mdp.c, subject line tweaks] Signed-off-by: Paul Moore (cherry picked from commit dfbd199a7cfe3e3cd8531e1353cdbd7175bfbc5e) Signed-off-by: Dimitri John Ledkov --- scripts/selinux/genheaders/genheaders.c | 1 - scripts/selinux/mdp/mdp.c | 1 - security/selinux/include/classmap.h | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index fa48fabcb330..3cc4893d98cc 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c @@ -9,7 +9,6 @@ #include #include #include -#include struct security_class_mapping { const char *name; diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c index ffe8179f5d41..c29fa4a6228d 100644 --- a/scripts/selinux/mdp/mdp.c +++ b/scripts/selinux/mdp/mdp.c @@ -32,7 +32,6 @@ #include #include #include -#include static void usage(char *name) { diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index acdee7795297..5ae315ab060b 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include +#include #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \ "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append", "map"