From: kernel test robot <lkp@intel.com>
To: Christian Ehrhardt <christian.ehrhardt@codasip.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [scosu-sched:topic/mmap-cap-prot-wip/v6.18 462/1130] net/bpf/bpf_dummy_struct_ops.c:43:18: warning: cast to pointer from integer of different size
Date: Thu, 21 May 2026 18:10:05 +0800 [thread overview]
Message-ID: <202605211729.sQVBdZ76-lkp@intel.com> (raw)
tree: https://github.com/scosu/linux-sched topic/mmap-cap-prot-wip/v6.18
head: f69a5a9d9fee15edde28429e23a4c749a59937bd
commit: e2a0a8156299c5b87411fce4727f2871edaccf23 [462/1130] [CHERRY-PICK] bpf: use user pointer types in uAPI structs
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20260521/202605211729.sQVBdZ76-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260521/202605211729.sQVBdZ76-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605211729.sQVBdZ76-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/bpfptr.h:6,
from include/linux/bpf.h:28,
from include/linux/bpf_verifier.h:7,
from net/bpf/bpf_dummy_struct_ops.c:6:
include/linux/compat.h:1119:9: warning: 'is_compat32_task' redefined
1119 | #define is_compat32_task() (0)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/compat.h:22:
arch/mips/include/asm/compat.h:157:9: note: this is the location of the previous definition
157 | #define is_compat32_task is_compat_task
| ^~~~~~~~~~~~~~~~
net/bpf/bpf_dummy_struct_ops.c: In function 'dummy_ops_init_args':
>> net/bpf/bpf_dummy_struct_ops.c:43:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
43 | ctx_in = (void __user *)kattr->test.ctx_in;
| ^
net/bpf/bpf_dummy_struct_ops.c:48:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
48 | u_state = (void __user *)args->args[0];
| ^
net/bpf/bpf_dummy_struct_ops.c: In function 'dummy_ops_copy_args':
net/bpf/bpf_dummy_struct_ops.c:63:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
63 | u_state = (void __user *)args->args[0];
| ^
--
In file included from include/linux/bpfptr.h:6,
from include/linux/bpf.h:28,
from drivers/media/rc/bpf-lirc.c:6:
include/linux/compat.h:1119:9: warning: 'is_compat32_task' redefined
1119 | #define is_compat32_task() (0)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/compat.h:22:
arch/mips/include/asm/compat.h:157:9: note: this is the location of the previous definition
157 | #define is_compat32_task is_compat_task
| ^~~~~~~~~~~~~~~~
drivers/media/rc/bpf-lirc.c: In function 'lirc_prog_query':
>> drivers/media/rc/bpf-lirc.c:297:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
297 | __u32 __user *prog_ids = (__u32 __user *)attr->query.prog_ids;
| ^
vim +43 net/bpf/bpf_dummy_struct_ops.c
26
27 static struct bpf_dummy_ops_test_args *
28 dummy_ops_init_args(const union bpf_attr *kattr, unsigned int nr)
29 {
30 __u32 size_in;
31 struct bpf_dummy_ops_test_args *args;
32 void __user *ctx_in;
33 void __user *u_state;
34
35 size_in = kattr->test.ctx_size_in;
36 if (size_in != sizeof(u64) * nr)
37 return ERR_PTR(-EINVAL);
38
39 args = kzalloc(sizeof(*args), GFP_KERNEL);
40 if (!args)
41 return ERR_PTR(-ENOMEM);
42
> 43 ctx_in = (void __user *)kattr->test.ctx_in;
44 if (copy_from_user(args->args, ctx_in, size_in))
45 goto out;
46
47 /* args[0] is 0 means state argument of test_N will be NULL */
48 u_state = (void __user *)args->args[0];
49 if (u_state && copy_from_user(&args->state, u_state,
50 sizeof(args->state)))
51 goto out;
52
53 return args;
54 out:
55 kfree(args);
56 return ERR_PTR(-EFAULT);
57 }
58
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-21 10:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202605211729.sQVBdZ76-lkp@intel.com \
--to=lkp@intel.com \
--cc=christian.ehrhardt@codasip.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.