From 96abd16a47086784ebde8bd4c9ffadf9fb1a18f8 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Fri, 29 Jan 2021 07:13:05 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"selinux:=20Relocate=20ss=5Finitialize?= =?UTF-8?q?d=20and=20selinux=5Fenforcing=20to=20sep=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …arate 4k" This reverts commit 50240fa. That out of tree patch causes the resulting kernel image to be too large, causing ld.lld to error; since .bss is specified twice. Fixes the observed error: ld.lld: error: output file too large: 18446743524330100280 bytes when using LLD without LTO enabled. We observe similar errors with binutils 2.36+ Bug: 151154720 Reported-by: Matthias Maennich Debugged-by: Fangrui Song Signed-off-by: Nick Desaulniers Change-Id: Iebb8135630132cd4ae49f3d2d1e85bd61cfa6111 --- arch/arm64/kernel/vmlinux.lds.S | 8 -------- include/linux/init.h | 2 -- security/selinux/hooks.c | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index fd1c65b901dbc..78b2fec39ba07 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -68,10 +68,6 @@ jiffies = jiffies_64; #define TRAMP_TEXT #endif -#define RTIC_BSS \ - . = ALIGN(PAGE_SIZE); \ - KEEP(*(.bss.rtic)); \ - . = ALIGN(PAGE_SIZE); \ /* * The size of the PE/COFF section that covers the kernel image, which * runs from stext to _edata, must be a round multiple of the PE/COFF @@ -252,10 +248,6 @@ SECTIONS STABS_DEBUG HEAD_SYMBOLS - - .bss : { /* bss segment */ - RTIC_BSS - } } /* diff --git a/include/linux/init.h b/include/linux/init.h index bc719c7da7350..586dd187e22fc 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -322,8 +322,6 @@ void __init parse_early_options(char *cmdline); /* Data marked not to be saved by software suspend */ #define __nosavedata __section(.data..nosave) -#define __rticdata __attribute__((section(".bss.rtic"))) - #ifdef MODULE #define __exit_p(x) x #else diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e7778880c0932..ceb4621b3a996 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -100,7 +100,7 @@ #include "audit.h" #include "avc_ss.h" -struct selinux_state selinux_state __rticdata; +struct selinux_state selinux_state; /* SECMARK reference count */ static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);