[PATCH] powerpc: signals: Discard transaction state from signal frames

kbuild test robot lkp at intel.com
Mon Aug 22 18:15:16 AEST 2016


Hi Cyril,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.8-rc3 next-20160819]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Cyril-Bur/powerpc-signals-Discard-transaction-state-from-signal-frames/20160822-131843
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-c2k_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All error/warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/processor.h:13:0,
                    from arch/powerpc/include/asm/thread_info.h:33,
                    from include/linux/thread_info.h:54,
                    from include/asm-generic/preempt.h:4,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/uapi/linux/timex.h:56,
                    from include/linux/timex.h:56,
                    from include/linux/sched.h:19,
                    from arch/powerpc/kernel/signal_32.c:20:
   arch/powerpc/kernel/signal_32.c: In function 'sys_rt_sigreturn':
>> arch/powerpc/include/asm/reg.h:64:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
    #define __MASK(X) (1UL<<(X))
                          ^
   arch/powerpc/include/asm/reg.h:116:18: note: in expansion of macro '__MASK'
    #define MSR_TS_T __MASK(MSR_TS_T_LG) /*  Transaction Transactional */
                     ^
   arch/powerpc/include/asm/reg.h:117:22: note: in expansion of macro 'MSR_TS_T'
    #define MSR_TS_MASK (MSR_TS_T | MSR_TS_S)   /* Transaction State bits */
                         ^
   arch/powerpc/include/asm/reg.h:118:34: note: in expansion of macro 'MSR_TS_MASK'
    #define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */
                                     ^
>> arch/powerpc/kernel/signal_32.c:1232:6: note: in expansion of macro 'MSR_TM_ACTIVE'
     if (MSR_TM_ACTIVE(mfmsr()))
         ^
>> arch/powerpc/include/asm/reg.h:64:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
    #define __MASK(X) (1UL<<(X))
                          ^
   arch/powerpc/include/asm/reg.h:115:18: note: in expansion of macro '__MASK'
    #define MSR_TS_S __MASK(MSR_TS_S_LG) /*  Transaction Suspended */
                     ^
   arch/powerpc/include/asm/reg.h:117:33: note: in expansion of macro 'MSR_TS_S'
    #define MSR_TS_MASK (MSR_TS_T | MSR_TS_S)   /* Transaction State bits */
                                    ^
   arch/powerpc/include/asm/reg.h:118:34: note: in expansion of macro 'MSR_TS_MASK'
    #define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */
                                     ^
>> arch/powerpc/kernel/signal_32.c:1232:6: note: in expansion of macro 'MSR_TM_ACTIVE'
     if (MSR_TM_ACTIVE(mfmsr()))
         ^
   cc1: all warnings being treated as errors

vim +/MSR_TM_ACTIVE +1232 arch/powerpc/kernel/signal_32.c

  1216	#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
  1217		struct ucontext __user *uc_transact;
  1218		unsigned long msr_hi;
  1219		unsigned long tmp;
  1220		int tm_restore = 0;
  1221	#endif
  1222	
  1223		/*
  1224		 * We always send the user to their signal handler non
  1225		 * transactionally. If there is a transactional/suspended state
  1226		 * then throw it away. The purpose of a sigreturn is to destroy
  1227		 * all traces of the signal frame, this includes any transactional
  1228		 * state created within in.
  1229		 * The cause is not important as there will never be a
  1230		 * recheckpoint so it's not user visible.
  1231		 */
> 1232		if (MSR_TM_ACTIVE(mfmsr()))
  1233			tm_reclaim_current(0);
  1234	
  1235		/* Always make any pending restarted system calls return -EINTR */
  1236		current->restart_block.fn = do_no_restart_syscall;
  1237	
  1238		rt_sf = (struct rt_sigframe __user *)
  1239			(regs->gpr[1] + __SIGNAL_FRAMESIZE + 16);
  1240		if (!access_ok(VERIFY_READ, rt_sf, sizeof(*rt_sf)))

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 18571 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20160822/d1760207/attachment-0001.obj>


More information about the Linuxppc-dev mailing list