Re: [PATCH 0/3] Relocate GOT before calling EFI stub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 07, 2020 at 06:59:57PM +0100, Ard Biesheuvel wrote:
> On Tue, 7 Jan 2020 at 18:58, Arvind Sankar <nivedita@xxxxxxxxxxxx> wrote:
> >
> > On Tue, Jan 07, 2020 at 03:28:31PM +0100, Ard Biesheuvel wrote:
> > >
> > > Unfortunately, the command line option implements a weaker form of
> > > visibility than the pragma, so it probably comes down to setting the
> > > pragma in a .h file that gets -include'd via the command line so it is
> > > guaranteed to be seen first.
> >
> > Tried hacking that in and it works, tested with gcc 4.6.4.
> 
> Excellent. But in my testing locally, I don't get any GOT entries in
> the first place, strangely enough. So what changes in the output for
> you with visibility hidden compared to before?

Works with 32-bit as well.

Are you checking libstub or boot/compressed? Below is with gcc 4.6 (but
latest binutils). With gcc 9, there's only one left -- trampoline_32bit_src
in pgtable_64.

acpi.o
000000000000025b R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
cmdline.o
00000000000001d3 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
00000000000001f3 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000000223 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
cpuflags.o
00000000000000a3 R_X86_64_REX_GOTPCRELX  cpu_vendor-0x0000000000000004
00000000000000c5 R_X86_64_REX_GOTPCRELX  cpu-0x0000000000000004
0000000000000127 R_X86_64_REX_GOTPCRELX  cpu-0x0000000000000004
0000000000000144 R_X86_64_REX_GOTPCRELX  cpu-0x0000000000000004
0000000000000153 R_X86_64_REX_GOTPCRELX  cpu-0x0000000000000004
000000000000017b R_X86_64_REX_GOTPCRELX  cpu-0x0000000000000004
early_serial_console.o
000000000000005a R_X86_64_REX_GOTPCRELX  early_serial_base-0x0000000000000004
0000000000000165 R_X86_64_REX_GOTPCRELX  early_serial_base-0x0000000000000004
eboot.o
efi_thunk_64.o
error.o
head_64.o
kaslr_64.o
00000000000001e7 R_X86_64_REX_GOTPCRELX  ptrs_per_p4d-0x0000000000000004
0000000000000372 R_X86_64_REX_GOTPCRELX  __default_kernel_pte_mask-0x0000000000000004
000000000000038b R_X86_64_REX_GOTPCRELX  pgdir_shift-0x0000000000000004
00000000000003ac R_X86_64_REX_GOTPCRELX  __pgtable_l5_enabled-0x0000000000000004
000000000000040a R_X86_64_REX_GOTPCRELX  __pgtable_l5_enabled-0x0000000000000004
00000000000004db R_X86_64_REX_GOTPCRELX  __force_order-0x0000000000000004
00000000000004f2 R_X86_64_REX_GOTPCRELX  __pgtable_l5_enabled-0x0000000000000004
0000000000000517 R_X86_64_REX_GOTPCRELX  _pgtable-0x0000000000000004
00000000000005f3 R_X86_64_REX_GOTPCRELX  __force_order-0x0000000000000004
kaslr.o
0000000000000281 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
00000000000003e3 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000000ba1 R_X86_64_REX_GOTPCRELX  __force_order-0x0000000000000004
0000000000000bb4 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000000cc8 R_X86_64_REX_GOTPCRELX  free_mem_ptr-0x0000000000000004
0000000000000cd2 R_X86_64_REX_GOTPCRELX  free_mem_end_ptr-0x0000000000000004
0000000000000d6e R_X86_64_REX_GOTPCRELX  free_mem_ptr-0x0000000000000004
0000000000000f63 R_X86_64_REX_GOTPCRELX  __pgtable_l5_enabled-0x0000000000000004
kernel_info.o
mem_encrypt.o
misc.o
0000000000000015 R_X86_64_REX_GOTPCRELX  free_mem_ptr-0x0000000000000004
000000000000001f R_X86_64_REX_GOTPCRELX  free_mem_end_ptr-0x0000000000000004
0000000000002965 R_X86_64_REX_GOTPCRELX  early_serial_base-0x0000000000000004
0000000000002a43 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000002b8e R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000002bec R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000002c10 R_X86_64_REX_GOTPCRELX  free_mem_end_ptr-0x0000000000000004
0000000000002c17 R_X86_64_REX_GOTPCRELX  free_mem_ptr-0x0000000000000004
0000000000002d16 R_X86_64_REX_GOTPCRELX  trampoline_32bit-0x0000000000000004
0000000000002f97 R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
0000000000002fea R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
pgtable_64.o
000000000000000d R_X86_64_REX_GOTPCRELX  boot_params-0x0000000000000004
000000000000010a R_X86_64_REX_GOTPCRELX  trampoline_32bit_src-0x0000000000000004
0000000000000191 R_X86_64_REX_GOTPCRELX  __force_order-0x0000000000000004
0000000000000376 R_X86_64_REX_GOTPCRELX  __force_order-0x0000000000000004
piggy.o
string.o



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux