* [jpoimboe:sframe-2.2 5/9] kernel/unwind/user.c:191:32: warning: left shift count >= width of type
@ 2024-10-21 9:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-21 9:18 UTC (permalink / raw)
To: Josh Poimboeuf; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git sframe-2.2
head: 757574ba1822accfdae6ec405421f5e2df48fe52
commit: d76cec29ef1d2284f0024c60d736b5ed01f89792 [5/9] unwind: Add deferred userspace unwinding API
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20241021/202410211754.AngdyyY3-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241021/202410211754.AngdyyY3-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/202410211754.AngdyyY3-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/unwind/user.c: In function 'unwind_user_deferred':
>> kernel/unwind/user.c:191:32: warning: left shift count >= width of type [-Wshift-count-overflow]
191 | cookie &= (1UL << 48) - 1;
| ^~
vim +191 kernel/unwind/user.c
173
174 int unwind_user_deferred(struct unwind_callback *callback, u64 *ctx_cookie, void *data)
175 {
176 u64 cookie = current->unwind_ctx_cookie;
177
178 if (WARN_ON_ONCE(in_nmi() || !irqs_disabled()))
179 return -EINVAL;
180
181 if (WARN_ON_ONCE(!callback->func || callback->idx < 0))
182 return -EINVAL;
183
184 if (!cookie) {
185 u64 cpu = smp_processor_id();
186
187 BUILD_BUG_ON(NR_CPUS > 65535);
188
189 cookie = __this_cpu_read(ctx_ctr);
190 cookie++;
> 191 cookie &= (1UL << 48) - 1;
192 cookie |= cpu << 48;
193 __this_cpu_write(ctx_ctr, cookie);
194
195 current->unwind_ctx_cookie = cookie;
196 task_work_add(current, ¤t->unwind_work, TWA_RESUME);
197 }
198
199 if (ctx_cookie)
200 *ctx_cookie = cookie;
201
202 current->unwind_pending |= (1 << callback->idx);
203 current->unwind_privs[callback->idx] = data;
204
205 return 0;
206 }
207
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-21 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 9:18 [jpoimboe:sframe-2.2 5/9] kernel/unwind/user.c:191:32: warning: left shift count >= width of type kernel test robot
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.