Skip to content

Commit

Permalink
Revert "selinux: Relocate ss_initialized and selinux_enforcing to sep…
Browse files Browse the repository at this point in the history
…arate 4k"

This reverts commit d4807bd.

That out of tree patch causes the resulting kernel image to be too
large, causing ld.lld to error; likely due to the additional section and
alignment requirements.  Android and floral don't host virtual targets
and thus do not run at EL2 on arm64.

Bug: 63740206
Change-Id: I357bf4d5c7e29230746eacd51fef413acec06067
Signed-off-by: Nick Desaulniers <[email protected]>
  • Loading branch information
nickdesaulniers authored and dereference23 committed Aug 19, 2021
1 parent b59cb9c commit 9a17925
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
10 changes: 0 additions & 10 deletions arch/arm64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ jiffies = jiffies_64;
#define TRAMP_TEXT
#endif

#define RTIC_BSS \
. = ALIGN(PAGE_SIZE); \
VMLINUX_SYMBOL(__bss_rtic_start) = .; \
KEEP(*(.bss.rtic)) \
. = ALIGN(PAGE_SIZE); \
VMLINUX_SYMBOL(__bss_rtic_end) = .;
/*
* 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
Expand Down Expand Up @@ -253,10 +247,6 @@ SECTIONS
STABS_DEBUG

HEAD_SYMBOLS

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

/*
Expand Down
2 changes: 0 additions & 2 deletions include/linux/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,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
Expand Down
2 changes: 1 addition & 1 deletion security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct selinux_state selinux_state;
static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);

#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
static int selinux_enforcing_boot __rticdata;
static int selinux_enforcing_boot;

static int __init enforcing_setup(char *str)
{
Expand Down

0 comments on commit 9a17925

Please sign in to comment.