NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/50312: current kernel compile failure if PAX_ASLR is not defined
>Number: 50312
>Category: kern
>Synopsis: current kernel compile failure if PAX_ASLR is not defined
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 08 01:25:00 +0000 2015
>Originator: Robert Elz
>Release: NetBSD 7.99.21 (current as of 2015-10-08)
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD andromeda.noi.kre.to 7.0_RC2 NetBSD 7.0_RC2 (VBOX64-1.1-20150727) #12: Mon Jul 27 11:21:03 ICT 2015 kre%onyx.coe.psu.ac.th@localhost:/usr/obj/7/kernels/amd64/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
If a kernel configuration file does not have the PAX_ASLR option
in it at all, the resulting kernel fails to compile.
The problem is in kern_pax.c ...
/release/current/src/sys/kern/kern_pax.c: In function 'pax_setup_elf_flags':
/release/current/src/sys/kern/kern_pax.c:308:5: error: dereferencing pointer to
incomplete type
epp->ep_pax_flags = flags;
^
To make it easier to find, the line in question is the last
meaningful line in pax_setup_elf_flags()
epp is a struct exec_package *
struct exec_package is defined in sys/exec.h
kern_pax.c includes sys/exec.h only if PAX_ASLR is defined.
Line 308 of kern_pax.c is compiled, regardless of whether
PAX_ASLR is defined or not. If not there's no definition
visible of struct exec_package (there are declarations,
just not the definition) so ...
>How-To-Repeat:
(Attempt to) Build a current kernel that does not PAX_ASLR
in its config file.
>Fix:
Not sure .. either unconditionally include sys/exec.h
or #ifdef the line in question, or maybe something different.
Home |
Main Index |
Thread Index |
Old Index