• R
    make pthread stacks non-executable · 7e4d7946
    Rich Felker 提交于
    this change is necessary or pthread_create will always fail on
    security-hardened kernels. i considered first trying to make the stack
    executable and simply retrying without execute permissions when the
    first try fails, but (1) this would incur a serious performance
    penalty on hardened systems, and (2) having the stack be executable is
    just a bad idea from a security standpoint.
    
    if there is real-world "GNU C" code that uses nested functions with
    threads, and it can't be fixed, we'll have to consider other ways of
    solving the problem, but for now this seems like the best fix.
    7e4d7946
pthread_create.c 3.3 KB