Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 82145766 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Michael Bestas
Browse files

Revert "selinux: Relocate ss_initialized and selinux_enforcing to separate 4k"



This reverts commit 50240fa8.

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.

Bug: 151154720
Reported-by: default avatarMatthias Maennich <maennich@google.com>
Debugged-by: default avatarFangrui Song <maskray@google.com>
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Change-Id: Iebb8135630132cd4ae49f3d2d1e85bd61cfa6111
parent d86598e7
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -76,10 +76,6 @@ jiffies = jiffies_64;
#define TRAMP_TEXT
#define TRAMP_TEXT
#endif
#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
 * 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
 * runs from stext to _edata, must be a round multiple of the PE/COFF
@@ -260,10 +256,6 @@ SECTIONS
	STABS_DEBUG
	STABS_DEBUG


	HEAD_SYMBOLS
	HEAD_SYMBOLS

	.bss : {			/* bss segment		*/
         RTIC_BSS
	}
}
}


/*
/*
+0 −2
Original line number Original line Diff line number Diff line
@@ -322,8 +322,6 @@ void __init parse_early_options(char *cmdline);
/* Data marked not to be saved by software suspend */
/* Data marked not to be saved by software suspend */
#define __nosavedata __section(.data..nosave)
#define __nosavedata __section(.data..nosave)


#define __rticdata  __attribute__((section(".bss.rtic")))

#ifdef MODULE
#ifdef MODULE
#define __exit_p(x) x
#define __exit_p(x) x
#else
#else
+1 −1
Original line number Original line Diff line number Diff line
@@ -100,7 +100,7 @@
#include "audit.h"
#include "audit.h"
#include "avc_ss.h"
#include "avc_ss.h"


struct selinux_state selinux_state __rticdata;
struct selinux_state selinux_state;


/* SECMARK reference count */
/* SECMARK reference count */
static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);