aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/stack_protector.c
Commit message (Collapse)AuthorAgeFilesLines
* Move the stack protector to a new "secure" directoryPedro F. Giffuni2015-08-141-117/+0
| | | | | | | | | | | | | As part of the code refactoring to support FORTIFY_SOURCE we want a new subdirectory "secure" to keep the files related to security. Move the stack protector functions to this new directory. No functional change. Differential Review: https://reviews.freebsd.org/D3333 Notes: svn path=/head/; revision=286760
* NetBSD commit log:Jeremie Le Hen2015-06-141-8/+5
| | | | | | | | | | | | | | | | Use a constant array for the MIB. Newer LLVM decided that mib[] warranted stack protections, with the obvious crash after the setup was done. As a positive side effect, code size shrinks a bit. I'm not sure why this hasn't bitten us yes, but it is certainly possible and there are no real drawbacks to this change anyway. Submitted by: pfg Obtained from: NetBSD MFC after: 1 week Notes: svn path=/head/; revision=284377
* Revert r274772: it is not valid on MIPSEd Maste2014-11-251-1/+1
| | | | | | | Reported by: sbruno Notes: svn path=/head/; revision=275004
* Use canonical __PIC__ flagEd Maste2014-11-211-1/+1
| | | | | | | | | | | It is automatically set when -fPIC is passed to the compiler. Reviewed by: dim, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1179 Notes: svn path=/head/; revision=274772
* Clang related fixes:Rui Paulo2010-10-131-1/+1
| | | | | | | | | | * When calling syslog(), pass a format string. * Define YY_NO_INPUT on nslexer.l Submitted by: Norberto Lopes <nlopes.ml at gmail.com> Notes: svn path=/head/; revision=213785
* Remove extra FreeBSD tag.Konstantin Belousov2010-08-241-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=211750
* Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition intoKonstantin Belousov2010-08-241-3/+1
| | | | | | | | | | | | | | the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Putting the stack_protector_compat.c into the public domain acknowledged by kan. Reviewed by: kan MFC after: 2 weeks Notes: svn path=/head/; revision=211748
* Use aux vector to get values for SSP canary, pagesize, pagesizes array,Konstantin Belousov2010-08-171-0/+8
| | | | | | | | | | | | | | number of host CPUs and osreldate. This eliminates the last sysctl(2) calls from the dynamically linked image startup. No objections from: kan Tested by: marius (sparc64) MFC after: 1 month Notes: svn path=/head/; revision=211416
* Make libc.a provide __stack_chk_fail_local weak alias. This isAlexander Kabaev2009-09-171-0/+4
| | | | | | | | | needed to satisfy static libraries that are compiled with -fpic and linked into static binary afterwards. Several libraries in gcc are examples of such static libs. Notes: svn path=/head/; revision=197277
* Second attempt at eliminating .text relocations in shared librariesAlexander Kabaev2009-07-141-6/+1
| | | | | | | | | | | | | | | | | compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib) Notes: svn path=/head/; revision=195697
* Back out previous revision until better tested fix is ready.Alexander Kabaev2009-06-291-1/+6
| | | | | | | Approved by: re (impliciti, by approving previos check-in) Notes: svn path=/head/; revision=195152
* Eliminate .text relocations in shared libraries compiled with stack protector.Alexander Kabaev2009-06-281-6/+1
| | | | | | | | | | | | | | | Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work everys time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kensmith) Notes: svn path=/head/; revision=195151
* Expose __stack_chk_fail_local() so -fstack-protector-all works.Dag-Erling Smørgrav2007-06-051-3/+0
| | | | Notes: svn path=/head/; revision=170321
* Follow NetBSD, OpenBSD and DragonfyBSD project and add BSD-licensedAlexander Kabaev2007-05-191-0/+119
SSP functions into FreeBSD libc. Use the same file name and location for consistency with other projects. Notes: svn path=/head/; revision=169719