mirror of
git://git.musl-libc.org/musl
synced 2024-12-22 22:53:49 +00:00
b61df2294f
the restorer function pointer provided in the kernel sigaction structure is interpreted by the kernel as a raw code address, not a function descriptor. this commit moves the declarations of the __restore and __restore_rt symbols to ksigaction.h so that arch versions of the file can override them, and introduces a version for sh which declares them as objects rather than functions. an alternate solution would have been defining SA_RESTORER to 0 so that the functions are not used, but this both requires executable stack (since the sh kernel does not have a vdso page with permanent restorer functions) and crashes on qemu user-level emulation.
12 lines
331 B
C
12 lines
331 B
C
struct k_sigaction {
|
|
unsigned flags;
|
|
void (*handler)(int);
|
|
unsigned long mask[4];
|
|
/* The following field is past the end of the structure the
|
|
* kernel will read or write, and exists only to avoid having
|
|
* mips-specific preprocessor conditionals in sigaction.c. */
|
|
void (*restorer)();
|
|
};
|
|
|
|
void __restore(), __restore_rt();
|