New patches for kernels
This commit is contained in:
56
patches/11647f99b4de6bc460e106e876f72fc7af3e54a6-1.patch
Normal file
56
patches/11647f99b4de6bc460e106e876f72fc7af3e54a6-1.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
From 11647f99b4de6bc460e106e876f72fc7af3e54a6 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dmueller@suse.com>
|
||||
Date: Tue, 14 Jan 2020 18:53:41 +0100
|
||||
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
|
||||
|
||||
commit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.
|
||||
|
||||
gcc 10 will default to -fno-common, which causes this error at link
|
||||
time:
|
||||
|
||||
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||
|
||||
This is because both dtc-lexer as well as dtc-parser define the same
|
||||
global symbol yyloc. Before with -fcommon those were merged into one
|
||||
defintion. The proper solution would be to to mark this as "extern",
|
||||
however that leads to:
|
||||
|
||||
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
|
||||
26 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
In file included from dtc-lexer.l:24:
|
||||
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
|
||||
127 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
which means the declaration is completely redundant and can just be
|
||||
dropped.
|
||||
|
||||
Signed-off-by: Dirk Mueller <dmueller@suse.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
[robh: cherry-pick from upstream]
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
[nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of
|
||||
e039139be8c2, where dtc-lexer.l started being used]
|
||||
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Change-Id: I7f299451e99aab09375883546e47505ec0937c26
|
||||
---
|
||||
scripts/dtc/dtc-lexer.l | 1 -
|
||||
scripts/dtc/dtc-lexer.lex.c_shipped | 1 -
|
||||
2 files changed, 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||
index c600603044f..cf7707be43a 100644
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
119
patches/selinux-use-kernel-socket-definitions.patch
Normal file
119
patches/selinux-use-kernel-socket-definitions.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
From mboxrd@z Thu Jan 1 00:00:00 1970
|
||||
Return-Path: <SRS0=jEy8=RA=vger.kernel.org=selinux-owner@kernel.org>
|
||||
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=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,
|
||||
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,
|
||||
SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,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 DD858C43381
|
||||
for <selinux@archiver.kernel.org>; Mon, 25 Feb 2019 01:05:03 +0000 (UTC)
|
||||
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
|
||||
by mail.kernel.org (Postfix) with ESMTP id 8311C2087C
|
||||
for <selinux@archiver.kernel.org>; Mon, 25 Feb 2019 01:05:03 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=paulo.ac header.i=@paulo.ac header.b="yRU1o+ym"
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S1726168AbfBYBFD (ORCPT <rfc822;selinux@archiver.kernel.org>);
|
||||
Sun, 24 Feb 2019 20:05:03 -0500
|
||||
Received: from mail.paulo.ac ([51.15.136.203]:52908 "EHLO mail.paulo.ac"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1725991AbfBYBFC (ORCPT <rfc822;selinux@vger.kernel.org>);
|
||||
Sun, 24 Feb 2019 20:05:02 -0500
|
||||
X-Greylist: delayed 566 seconds by postgrey-1.27 at vger.kernel.org; Sun, 24 Feb 2019 20:05:02 EST
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by mail.paulo.ac (Postfix) with ESMTP id 756DF1C1398;
|
||||
Mon, 25 Feb 2019 00:55:35 +0000 (UTC)
|
||||
Received: from localhost.localdomain (unknown [187.113.195.120])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.paulo.ac (Postfix) with ESMTPSA id 71DD61C1142;
|
||||
Mon, 25 Feb 2019 00:55:32 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=paulo.ac; s=201902;
|
||||
t=1551056133; bh=R/0dX4dbid0/AowT97SOz2ChbGvDbrDkKr1ct+DvqXg=;
|
||||
h=From:To:Cc:Subject:Date:From;
|
||||
b=yRU1o+ymYhKMstjps5ABNvRk+qptMLWIXt+uFXRTO25OmHkhEtxufFCqINwtzs+9N
|
||||
N11s5FKSPjc7xGbhDzQzl+kdAr/4deqWHkkcRdN6Mj4m9CNBWIMWYIwV8c8ZTY7n5x
|
||||
TQGNu/u766Tl3AuxCymKmPwRAy9xmPrFCjoUVduLN/3oLDG0nofUsfi4kmLELO1dmu
|
||||
dicQIFbUTGYCpeQEOHNgyN68eBkCN0qd7KF3/ezKUWoWH7bdvQjVw0q91uZNmnlUZN
|
||||
23TmfKv3gkSZc9e63EmaEa4+fi5mdjbyRiLX5WJg3OM9TDsDohiScK5cf7sjL+4Lkf
|
||||
jrtIVqzCjGr1Q==
|
||||
From: Paulo Alcantara <paulo@paulo.ac>
|
||||
To: selinux@vger.kernel.org
|
||||
Cc: paul@paul-moore.com, Paulo Alcantara <paulo@paulo.ac>
|
||||
Subject: [PATCH] selinux: use kernel linux/socket.h definitions for PF_MAX
|
||||
Date: Sun, 24 Feb 2019 21:55:28 -0300
|
||||
Message-Id: <20190225005528.28371-1-paulo@paulo.ac>
|
||||
X-Mailer: git-send-email 2.20.1
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Sender: selinux-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <selinux.vger.kernel.org>
|
||||
X-Mailing-List: selinux@vger.kernel.org
|
||||
List-Archive: <https://lore.kernel.org/selinux/>
|
||||
|
||||
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.
|
||||
|
||||
Signed-off-by: Paulo Alcantara <paulo@paulo.ac>
|
||||
---
|
||||
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 1ceedea847dd..544ca126a8a8 100644
|
||||
--- a/scripts/selinux/genheaders/genheaders.c
|
||||
+++ b/scripts/selinux/genheaders/genheaders.c
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
-#include <sys/socket.h>
|
||||
|
||||
struct security_class_mapping {
|
||||
const char *name;
|
||||
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c
|
||||
index 073fe7537f6c..6d51b74bc679 100644
|
||||
--- a/scripts/selinux/mdp/mdp.c
|
||||
+++ b/scripts/selinux/mdp/mdp.c
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
-#include <sys/socket.h>
|
||||
|
||||
static void usage(char *name)
|
||||
{
|
||||
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
|
||||
index bd5fe0d3204a..201f7e588a29 100644
|
||||
--- a/security/selinux/include/classmap.h
|
||||
+++ b/security/selinux/include/classmap.h
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#include <linux/capability.h>
|
||||
+#include <linux/socket.h>
|
||||
|
||||
#define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \
|
||||
"getattr", "setattr", "lock", "relabelfrom", "relabelto", "append", "map"
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user