Patch "libbpf: Fix riscv register names" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    libbpf: Fix riscv register names

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     libbpf-fix-riscv-register-names.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d24ca0409d6e0a3ff414a862063ac7c6dad4b542
Author: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
Date:   Wed Feb 9 03:17:40 2022 +0100

    libbpf: Fix riscv register names
    
    [ Upstream commit 5c101153bfd67387ba159b7864176217a40757da ]
    
    riscv registers are accessed via struct user_regs_struct, not struct
    pt_regs. The program counter member in this struct is called pc, not
    epc. The frame pointer is called s0, not fp.
    
    Fixes: 3cc31d794097 ("libbpf: Normalize PT_REGS_xxx() macro definitions")
    Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20220209021745.2215452-6-iii@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index 90f56b0f585f..e1b505606882 100644
--- a/tools/lib/bpf/bpf_tracing.h
+++ b/tools/lib/bpf/bpf_tracing.h
@@ -206,10 +206,10 @@
 #define __PT_PARM4_REG a3
 #define __PT_PARM5_REG a4
 #define __PT_RET_REG ra
-#define __PT_FP_REG fp
+#define __PT_FP_REG s0
 #define __PT_RC_REG a5
 #define __PT_SP_REG sp
-#define __PT_IP_REG epc
+#define __PT_IP_REG pc
 
 #endif
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux