Project

General

Profile

Feature #5922

Want support for building with -fstack-protector

Added by Alex Wilson over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-05-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Stack smashing protection (in the form of gcc's -fstack-protector and family) is the default in the latest version of GCC, will soon be the default for the Linux kernel, and has been the default across most of the BSD family for years. We should support building with it.

This requires a small addition to the kernel and libc (the exception handler and an init function to generate a stack canary value). For starters we should make the kernel build work, since we have all the relevant code in one place and panic() exists to let us safely get out of a broken context.


Related issues

Related to illumos gate - Feature #5788: Want support for GCC's stack protector in libcNew2015-04-03

Actions

History

#1

Updated by Andrew Stormont over 5 years ago

  • Related to Feature #5788: Want support for GCC's stack protector in libc added
#2

Updated by Andrew Stormont about 5 years ago

Link to webrev that was posted to the mailing list: https://xylem.cooperi.net/~alex/webrev-5922/

#4

Updated by Andrew Stormont about 5 years ago

FWIW the changes look good to me. I might be able to help with testing if that's what's holding up the integration process.

#5

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed
  • % Done changed from 30 to 100

git commit 6a59053b922dcd35760db6b042abda7cb6ef1c80

commit  6a59053b922dcd35760db6b042abda7cb6ef1c80
Author: Alex Wilson <alex@uq.edu.au>
Date:   2015-08-10T22:47:52.000Z

    5922 Want support for building with -fstack-protector
    Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Robert Mustacchi <rm@joyent.com>

#6

Updated by Andrew Stormont about 5 years ago

Nice one! Now we just need to get these functions implemented in libc and we'll have full support.

Also available in: Atom PDF