Patch "bpf: Make bpf_session_cookie() kfunc return long *" has been added to the 6.10-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

    bpf: Make bpf_session_cookie() kfunc return long *

to the 6.10-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:
     bpf-make-bpf_session_cookie-kfunc-return-long.patch
and it can be found in the queue-6.10 subdirectory.

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



commit dc88c2abe6fd72c0e5ae96577f09f1710bab4fc9
Author: Daniel Xu <dxu@xxxxxxxxx>
Date:   Wed Jun 12 09:58:30 2024 -0600

    bpf: Make bpf_session_cookie() kfunc return long *
    
    [ Upstream commit 2b8dd87332cd2782b5b3f0c423bd6693e487ed30 ]
    
    We will soon be generating kfunc prototypes from BTF. As part of that,
    we need to align the manual signatures in bpf_kfuncs.h with the actual
    kfunc definitions. There is currently a conflicting signature for
    bpf_session_cookie() w.r.t. return type.
    
    The original intent was to return long * and not __u64 *. You can see
    evidence of that intent in a3a5113393cc ("selftests/bpf: Add kprobe
    session cookie test").
    
    Fix conflict by changing kfunc definition.
    
    Fixes: 5c919acef851 ("bpf: Add support for kprobe session cookie")
    Signed-off-by: Daniel Xu <dxu@xxxxxxxxx>
    Link: https://lore.kernel.org/r/7043e1c251ab33151d6e3830f8ea1902ed2604ac.1718207789.git.dxu@xxxxxxxxx
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index d1daeab1bbc14..bc16e21a2a443 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -3527,7 +3527,7 @@ __bpf_kfunc bool bpf_session_is_return(void)
 	return session_ctx->is_return;
 }
 
-__bpf_kfunc __u64 *bpf_session_cookie(void)
+__bpf_kfunc long *bpf_session_cookie(void)
 {
 	struct bpf_session_run_ctx *session_ctx;
 




[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