From patchwork Thu Jun 6 13:03:12 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: 1111122 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="DGS/lHpf"; 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 45KQnk6tY8z9s4Y; Thu, 6 Jun 2019 23:03:22 +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 1hYs34-0004E0-Au; Thu, 06 Jun 2019 13:03:18 +0000 Received: from mail-wr1-f66.google.com ([209.85.221.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1hYs30-0004Do-Pb for kernel-team@lists.ubuntu.com; Thu, 06 Jun 2019 13:03:14 +0000 Received: by mail-wr1-f66.google.com with SMTP id m3so2360227wrv.2 for ; Thu, 06 Jun 2019 06:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ybXb/jnfS9f1fII5E7PwPCfGODKC3fugkDh59k3ef3g=; b=DGS/lHpfBxDqLZs9nRrCN9M8E8czb8HtzEBy/hdqPTPKdEi2GhtkF5iL3V9NX6sks0 jhJM0cXIoZoiemB0wxOB8UPDVZuHrM03x4THkK+oDWaKw0R4nUoDWex4V7XnYzzrzU35 Gwzt7sNXd1xZpRxXu/ipswsGxr9UeNXc/6iyE= 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:subject:date:message-id :mime-version:content-transfer-encoding; bh=ybXb/jnfS9f1fII5E7PwPCfGODKC3fugkDh59k3ef3g=; b=gl39X6YoUpAJPMvljb3tVwadE9+ypzSx8/jlSgQeT+5yrSM1I3ep4/6q1j98q9z56B xfe143LTojVz7pxB3u4BfePWxHP920Ay2kLtbrWPm6v0fMJ+EmRYz76YWIB9Bv/x/y8y hpnnAphywghc51taLoa54xSFHNTnT46INCmzfi5s+DSJjRK0IpPCUMzCBykVQx8GAk6a U/gfw8UlEvs8J4a5TDysmeFPltA5TKPVaoNdyEKUMf/1oNgpAAI5U6MYaFkKGdsQpigS aBCEhKJUnjFyuZatj0tWRnM9DJyhPfx9D2NnQGj4Lc3l+BEn3RkLem22BDCHMqzGkkYH U2ig== X-Gm-Message-State: APjAAAXa1Di0vE7gXK5ZKQ1j+vlMGe3JlG+hYJoUqdy47mkT/Bzp2IdO jOXjCAN9pIBeC8bxPzb5TRkulqsd+LogmA== X-Google-Smtp-Source: APXvYqz5RsxDjP6sdj24arH2skBaQeGkt3f1naGhYEMnuxvVPm3AauoQny4IOetU04TD1plXoIVtFg== X-Received: by 2002:a5d:6849:: with SMTP id o9mr13118627wrw.196.1559826193916; Thu, 06 Jun 2019 06:03:13 -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 k66sm2037732wmb.34.2019.06.06.06.03.13 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 06 Jun 2019 06:03:13 -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:03:12 +0100 Message-Id: <20190606130312.30510-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: , 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 Acked-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader --- 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"