From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build warning after merge of the kspp-gustavo tree
Date: Thu, 30 Sep 2021 09:53:00 +1000 [thread overview]
Message-ID: <20210930095300.73be1555@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 11037 bytes --]
Hi all,
After merging the kspp-gustavo tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
kernel/trace/ftrace.c: In function 'ftrace_ops_get_list_func':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:174:10: note: in expansion of macro 'ftrace_ops_list_func'
174 | return ftrace_ops_list_func;
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'update_ftrace_function':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:207:10: note: in expansion of macro 'ftrace_ops_list_func'
207 | func = ftrace_ops_list_func;
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:220:14: note: in expansion of macro 'ftrace_ops_list_func'
220 | if (func == ftrace_ops_list_func) {
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'ftrace_modify_all_code':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:2698:35: note: in expansion of macro 'ftrace_ops_list_func'
2698 | err = ftrace_update_ftrace_func(ftrace_ops_list_func);
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:2708:41: note: in expansion of macro 'ftrace_ops_list_func'
2708 | if (update && ftrace_trace_function != ftrace_ops_list_func) {
| ^~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/hashtab.c:8:
kernel/bpf/hashtab.c: In function 'htab_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
374 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:671:26: note: in expansion of macro 'BPF_CAST_CALL'
671 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_lru_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
374 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:712:26: note: in expansion of macro 'BPF_CAST_CALL'
712 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_of_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
374 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:2400:26: note: in expansion of macro 'BPF_CAST_CALL'
2400 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:9,
from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12472:16: note: in expansion of macro 'BPF_CAST_CALL'
12472 | insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
| ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'do_misc_fixups':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12953:17: note: in expansion of macro 'BPF_CAST_CALL'
12953 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12957:17: note: in expansion of macro 'BPF_CAST_CALL'
12957 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12961:17: note: in expansion of macro 'BPF_CAST_CALL'
12961 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12965:17: note: in expansion of macro 'BPF_CAST_CALL'
12965 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12969:17: note: in expansion of macro 'BPF_CAST_CALL'
12969 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12973:17: note: in expansion of macro 'BPF_CAST_CALL'
12973 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32, u64)' {aka 'int (* const)(struct bpf_map *, unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
366 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12977:17: note: in expansion of macro 'BPF_CAST_CALL'
12977 | insn->imm = BPF_CAST_CALL(ops->map_redirect) -
| ^~~~~~~~~~~~~
Introduced by commit
ffea83dd8823 ("Makefile: Enable -Wcast-function-type")
Please either fix all these or revert that commit for now.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2021-09-29 23:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 23:53 Stephen Rothwell [this message]
2021-09-30 0:05 ` linux-next: build warning after merge of the kspp-gustavo tree Gustavo A. R. Silva
-- strict thread matches above, loose matches on Subject: below --
2023-11-21 22:50 Stephen Rothwell
2023-11-21 23:19 ` Gustavo A. R. Silva
2023-11-21 22:47 Stephen Rothwell
2023-11-21 23:07 ` Gustavo A. R. Silva
2023-11-21 23:19 ` Stephen Rothwell
2023-11-21 23:23 ` Gustavo A. R. Silva
2021-07-13 0:22 Stephen Rothwell
2021-07-13 1:10 ` Gustavo A. R. Silva
2021-07-13 2:39 ` Gustavo A. R. Silva
2021-06-22 22:39 Stephen Rothwell
2021-06-22 22:46 ` Gustavo A. R. Silva
2021-06-22 23:01 ` Gustavo A. R. Silva
2021-06-23 3:03 ` Stephen Rothwell
2021-06-23 13:14 ` David Sterba
2021-06-23 18:39 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210930095300.73be1555@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).