Commit Graph

14 Commits

Author SHA1 Message Date
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos
36534cb271 move USE_SSP=no one level up. 2006-11-11 22:38:38 +00:00
christos
2bea415e72 remove gcc4 stuff since it is done in bsd.kmod.mk 2006-05-21 05:43:49 +00:00
christos
3c22b94a4a fix typo 2006-05-21 04:45:35 +00:00
christos
c9904084fe add -fno-strict-aliasing for gcc4 2006-05-21 04:43:58 +00:00
christos
589a4be805 Add -Wno-pointer-sign for gcc4 2006-05-20 22:22:04 +00:00
christos
d8d35ea484 Fix the build after old property header removal (Hi Jason) 2006-05-07 20:15:14 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos
12184b6c26 Revert inappropriate -D additions. 2005-09-06 23:25:54 +00:00
christos
50f8955b6e 64 bit inode changes. 2005-08-19 02:04:03 +00:00
lukem
b574ee0f82 define NOMAN= once, at the real top level of lkm 2001-12-12 12:06:45 +00:00
simonb
4fd796d7d7 Add prototypes for the xxx_lkmentry() functions, and enable WARNS=1. 2000-03-21 11:45:56 +00:00
chs
f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
thorpej
3ef999a19b Make sure all LKMs get built with -DUVM and -DPMAP_NEW if so configured
in mk.conf.
1998-03-28 23:58:44 +00:00