* [daveh-devel:shstk-vmalloc 19/19] arch/x86/kernel/shstk_kunit.c:75:36: warning: cast from pointer to integer of different size
@ 2026-09-07 12:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-07 12:38 UTC (permalink / raw)
To: Dave Hansen; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git shstk-vmalloc
head: a820a994160883fea70750876fe26073766d831f
commit: a820a994160883fea70750876fe26073766d831f [19/19] kshstk-onoff-test
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20260907/202609072027.cydV3K5Z-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260907/202609072027.cydV3K5Z-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/202609072027.cydV3K5Z-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kernel/shstk_kunit.c: In function 'enable_kernel_shstk_and_load_ssp':
>> arch/x86/kernel/shstk_kunit.c:75:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
75 | __wrmsrq(MSR_IA32_PL0_SSP, (u64)token_addr);
| ^
arch/x86/kernel/shstk_kunit.c: Assembler messages:
arch/x86/kernel/shstk_kunit.c:47: Error: `rdsspq' is only supported in 64-bit mode
vim +75 arch/x86/kernel/shstk_kunit.c
61
62 static noinline notrace void enable_kernel_shstk_and_load_ssp(unsigned long *token_addr)
63 {
64 unsigned long flags;
65 u64 old_msr;
66 /*
67 * 2. Format 64-bit Restore Token:
68 * Token must match linear address of token itself with Bit 0 set (64-bit mode)
69 * and Bit 1 clear (not busy).
70 */
71 unsigned long restore_token = (unsigned long)token_addr | 0x1ULL;
72 printk("CET Test: Prepared restore token 0x%lx at %p\n", restore_token, token_addr);
73
74 local_irq_save(flags);
> 75 __wrmsrq(MSR_IA32_PL0_SSP, (u64)token_addr);
76 old_msr = __rdmsr(MSR_IA32_S_CET);
77
78 /* Must be atomic, nothing can go in between these two: */
79 __wrmsrq(MSR_IA32_S_CET, old_msr | CET_SHSTK_EN | CET_WRSS_EN);
80 asm volatile ( "setssbsy" ::: "memory" );
81 //wrssq(restore_token, token_addr);
82 /* End atomic bit */
83
84
85 local_irq_restore(flags);
86 }
87
--
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:[~2026-09-07 12:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 12:38 [daveh-devel:shstk-vmalloc 19/19] arch/x86/kernel/shstk_kunit.c:75:36: warning: cast from pointer to integer of different size 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.