mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
x86 asm: align stack to 16-bits for abort() call
Fixes the failing tests that called abort(). For coincidence, only native tests were failing. Asked at: https://stackoverflow.com/questions/56324948/why-does-calling-the-c-abort-function-from-an-x86-64-assembly-function-lead-to
This commit is contained in:
@@ -11998,6 +11998,8 @@ Examples:
|
||||
|
||||
* link:lkmc/x86_64.h[] `ENTRY` and `EXIT`
|
||||
|
||||
One important catch is that the stack must always be aligned to 16-bits before making calls: https://stackoverflow.com/questions/56324948/why-does-calling-the-c-abort-function-from-an-x86-64-assembly-function-lead-to
|
||||
|
||||
Bibliography:
|
||||
|
||||
* https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI
|
||||
@@ -13434,7 +13436,7 @@ output:
|
||||
|
||||
....
|
||||
CPSR.M 0x3
|
||||
CPSR.M 0x3
|
||||
CPSR.M 0xA
|
||||
CPSR.M 0x3
|
||||
CurrentEL.EL 0x1
|
||||
CurrentEL.EL 0x2
|
||||
|
||||
Reference in New Issue
Block a user