All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [daveh-devel:shstk-vmalloc 19/19] arch/x86/kernel/shstk_kunit.c:75:36: warning: cast from pointer to integer of different size
Date: Mon, 07 Sep 2026 20:38:51 +0800	[thread overview]
Message-ID: <202609072027.cydV3K5Z-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-09-07 12:39 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=202609072027.cydV3K5Z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dave.hansen@linux.intel.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.