christos
40f1ca5508
PR/57288: Mingye Wang: <ssp/ssp.h>: Use __builtin_dynamic_object_size
...
for LLVM > 9 and GCC > 12, introducing _SSP_FORTIFY_LEVEL == 3
2023-03-29 13:37:10 +00:00
mrg
032acb9ed8
make the 2nd argument to __memmove_chk() const
2020-09-05 13:37:59 +00:00
plunky
762a9b9c68
correct __ssp_overlap() to not trigger for adjacent areas
2015-09-03 20:43:47 +00:00
joerg
c7f24be614
Allow SSP enabled functions to conditionally skip the object size check.
...
Use this is fix the getcwd(NULL, lmit) case, which breaks in lang/parrot.
2015-06-25 18:41:03 +00:00
christos
adfc40c594
add a macro to check overlapping pointers
2015-05-09 15:41:47 +00:00
pooka
a238844191
Create the stpncpy() inline only when GCC>=4.8 || clang
...
Mirrors the stpncpy() wrapper macro and avoids the following:
warning: implicit declaration of function ‘__builtin___stpncpy_chk’
2014-11-29 13:23:48 +00:00
pooka
366b2dd23e
Apparently clang pretends to be gcc 4.2 but is secretly much awesomer
...
than gcc 4.2, so enable the stpncpy() wrapper also for clang.
2014-04-25 18:37:38 +00:00
pooka
232a041b7a
Wrap stpncpy() iff GNUC_PREREQ(4,8). Fixes USE_SSP=yes builds
...
with gcc 4.5.
2014-04-24 20:12:56 +00:00
christos
73447a65e4
add stpncpy()
2014-04-06 19:29:58 +00:00
christos
53e3f1af8a
gcc-4.8.1 is has a builtin stpncpy, but is missing the __builtin_ ssp
...
equivalent. go figure.
2013-11-07 02:00:54 +00:00
tron
fb23e6a8a9
Revert my last change. I'm not convinced it is correct and while it seems
...
to fix some build problems it might cause others.
2013-11-07 00:02:58 +00:00
tron
24f67c8710
Add missing declarations for SSP versions of stpcpy(3) and stpncpy(3).
2013-11-06 21:33:12 +00:00
christos
c15ffc1416
add stp{,n}cpy
2013-11-06 16:31:08 +00:00
joerg
5e0b44099f
SSP mostly works with Clang, even if optimisation is disabled.
...
Explicitly disable it for Lint though.
2012-08-08 20:23:32 +00:00
joerg
37a2d02f2e
Always provide *_chk prototypes. Fixes DBG=-g build of libc.
2012-07-22 21:05:26 +00:00
joerg
3eb244d801
Retire varargs.h support. Move machine/stdarg.h logic into MI
...
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
joerg
4bf46019d9
Redo the SSP wrappers to be transparent on the resulting object files.
...
This works by having the inline wrapper calling a second function which
uses renaming to output the correct function name.
2011-02-21 00:40:07 +00:00
christos
e6a9e964d2
provide a way to override the weak name.
2011-01-26 18:08:00 +00:00
christos
93fcf9c9a9
fix readlink prototype.
2011-01-26 18:07:44 +00:00
christos
3203d4e972
proved an __ssp_check macro.
2011-01-25 19:13:44 +00:00
christos
2d76e866a6
Use the _sys alias instead of the _ alias as the way to access the baseline
...
syscall.
2011-01-20 02:58:17 +00:00
christos
416c220c02
Re-do ssp hijacking by defining inline functions and using the weak libc
...
symbols to do the indirection for unistd.h instead of #define tricks.
Fixes compilation for things that define struct { ssize_t read(int fd, ...); }.
2011-01-19 19:21:29 +00:00
jruoho
c33b9df9f8
Use __dead instead of __attribute__((__noreturn__)) directly.
2010-12-22 19:43:33 +00:00
joerg
8a601553bc
Consistently use __printflike and __scanflike.
2010-02-25 18:37:12 +00:00
drochner
750e2babfe
add some prototypes for checked string functions
2009-11-17 20:47:59 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
christos
2b3b97e3ff
- Misc cleanups to make the code more readable.
...
- Detect if we are compiling in libc and provide the appropriate name.
2007-06-03 17:41:19 +00:00
tls
dc99372be9
Match usage of FORTIFY_SOURCE on other platforms by not requiring special
...
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).
Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
tls
2368dc663d
Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
...
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do. Goodbye, libssp
dependency in libraries and executables. Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00