1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00
freebsd/etc
Kyle Evans 020d003c86 libc: tests: add testing infrastructure for _FORTIFY_SOURCE
The _FORTIFY_SOURCE tests will be generated by a lua script to avoid a
lot of redundancy in writing these tests.  For each function that we're
fortifying, the plan is to test at least the following three scenarios:

 - Writing up to one byte before the end of the buffer,
 - Writing up to the end of the buffer,
 - Writing one byte past the end of the buffer

The buffer is shoved into a struct on the stack to guarantee a stack
layout in which we have a valid byte after the buffer so that level 2
fortification will trip and we can have confidence that it wasn't some
other stack/memory protection instead.

The generated tests are divided roughly into which header we're
attributing them to so that we can parallelize the build -- the full set
is a bit over 9000 lines of C and takes 11s to build on the hardware
that I'm testing on if it's a single monolothic file.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45678
2024-07-13 00:16:23 -05:00
..
gss Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mail misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
mtree libc: tests: add testing infrastructure for _FORTIFY_SOURCE 2024-07-13 00:16:23 -05:00
root etc: remove leftover leading empty comments, blank lines 2023-08-22 13:03:28 -05:00
sendmail pkgbase: make sendmail config files as config 2024-03-20 16:44:35 +01:00
termcap termcap.small: Include xterm-256color 2023-12-02 00:55:56 -05:00
group etc: remove leftover leading empty comments, blank lines 2023-08-22 13:03:28 -05:00
Makefile Don't package /var/db/locate.database 2024-05-28 11:20:07 +01:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
master.passwd etc: remove leftover leading empty comments, blank lines 2023-08-22 13:03:28 -05:00
shells etc: remove leftover leading empty comments, blank lines 2023-08-22 13:03:28 -05:00