Patch "bpf: annotate BTF show functions with __printf" has been added to the 6.1-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: annotate BTF show functions with __printf

to the 6.1-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-annotate-btf-show-functions-with-__printf.patch
and it can be found in the queue-6.1 subdirectory.

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



commit afb3e0e823a90711c02d55af6e8449127a72d80f
Author: Alan Maguire <alan.maguire@xxxxxxxxxx>
Date:   Thu Jul 11 19:23:21 2024 +0100

    bpf: annotate BTF show functions with __printf
    
    [ Upstream commit b3470da314fd8018ee237e382000c4154a942420 ]
    
    -Werror=suggest-attribute=format warns about two functions
    in kernel/bpf/btf.c [1]; add __printf() annotations to silence
    these warnings since for CONFIG_WERROR=y they will trigger
    build failures.
    
    [1] https://lore.kernel.org/bpf/a8b20c72-6631-4404-9e1f-0410642d7d20@xxxxxxxxx/
    
    Fixes: 31d0bc81637d ("bpf: Move to generic BTF show support, apply it to seq files/strings")
    Reported-by: Mirsad Todorovac <mtodorovac69@xxxxxxxxx>
    Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
    Tested-by: Mirsad Todorovac <mtodorovac69@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240711182321.963667-1-alan.maguire@xxxxxxxxxx
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 7582ec4fd4131..9d6524caf8ea9 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -6792,8 +6792,8 @@ static void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
 	btf_type_ops(t)->show(btf, t, type_id, obj, 0, show);
 }
 
-static void btf_seq_show(struct btf_show *show, const char *fmt,
-			 va_list args)
+__printf(2, 0) static void btf_seq_show(struct btf_show *show, const char *fmt,
+					va_list args)
 {
 	seq_vprintf((struct seq_file *)show->target, fmt, args);
 }
@@ -6826,8 +6826,8 @@ struct btf_show_snprintf {
 	int len;		/* length we would have written */
 };
 
-static void btf_snprintf_show(struct btf_show *show, const char *fmt,
-			      va_list args)
+__printf(2, 0) static void btf_snprintf_show(struct btf_show *show, const char *fmt,
+					     va_list args)
 {
 	struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show;
 	int len;




[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