Implement stack protection support
this adds kernel & libroot stack protector hooks. it uses /dev/random in userspace. A configure option --enable-stack-protector is added to activate -fstack-protector on selected system components (ATM apps, kits, servers). Change-Id: If3a2920ba9aa0a85eaff4ba6778947f8c76ade31 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3895 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright 2021, Jérôme Duval, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_STACK_PROTECTOR_H
|
||||
#define _KERNEL_STACK_PROTECTOR_H
|
||||
|
||||
|
||||
void stack_protector_init();
|
||||
|
||||
|
||||
#endif /* _KERNEL_STACK_PROTECTOR_H */
|
||||
@@ -55,6 +55,7 @@ void __reinit_pwd_backend_after_fork(void);
|
||||
int32 __arch_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
int32 skipFrames, addr_t stackBase, addr_t stackEnd);
|
||||
|
||||
void __init_stack_protector(void);
|
||||
void __set_stack_protection(void);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user