
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBH1XN -------------------------------- After backport LTS commit c295ab7fc57e ("x86/ptrace: Cleanup the definition of the pt_regs structure"), the `cs` and `ss` fields were changed to the union, resulting in a kabi breakage. Fix this breakage by using KABI_REPLACE. Fixes: c295ab7fc57e ("x86/ptrace: Cleanup the definition of the pt_regs structure") Signed-off-by: Tengda Wu <wutengda2@huawei.com> --- arch/x86/include/asm/ptrace.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index 5a83fbd9bc0b..bd9fe8c9c200 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h @@ -5,6 +5,7 @@ #include <asm/segment.h> #include <asm/page_types.h> #include <uapi/asm/ptrace.h> +#include <linux/kabi.h> #ifndef __ASSEMBLY__ #ifdef __i386__ @@ -141,26 +142,26 @@ struct pt_regs { /* The IRETQ return frame starts here */ unsigned long ip; - union { + KABI_REPLACE(unsigned long cs, union { /* CS selector */ u16 cs; /* The extended 64-bit data slot containing CS */ u64 csx; /* The FRED CS extension */ struct fred_cs fred_cs; - }; + }) unsigned long flags; unsigned long sp; - union { + KABI_REPLACE(unsigned long ss, union { /* SS selector */ u16 ss; /* The extended 64-bit data slot containing SS */ u64 ssx; /* The FRED SS extension */ struct fred_ss fred_ss; - }; + }) /* * Top of stack on IDT systems, while FRED systems have extra fields -- 2.34.1