lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201601241230.92gIML1v%fengguang.wu@intel.com>
Date:	Sun, 24 Jan 2016 12:33:34 +0800
From:	kbuild test robot <fengguang.wu@...el.com>
To:	Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc:	kbuild-all@...org, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>
Subject: include/linux/sched.h:2157:56: warning: 'noio_flag' may be used
 uninitialized in this function

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   048ccca8c1c8f583deec3367d7df521bb1f542ae
commit: c6d308534aef6c99904bf5862066360ae067abc4 UBSAN: run-time undefined behavior sanity checker
date:   3 days ago
config: i386-randconfig-s0-01241136 (attached as .config)
reproduce:
        git checkout c6d308534aef6c99904bf5862066360ae067abc4
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/xor_32.h:544:0,
                    from arch/x86/include/asm/xor.h:491,
                    from crypto/xor.c:25:
   include/asm-generic/xor.h: In function 'xor_32regs_p_5':
>> include/asm-generic/xor.h:678:1: warning: the frame size of 1604 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
   include/asm-generic/xor.h: In function 'xor_32regs_p_4':
   include/asm-generic/xor.h:599:1: warning: the frame size of 1340 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
   include/asm-generic/xor.h: In function 'xor_32regs_p_3':
   include/asm-generic/xor.h:531:1: warning: the frame size of 1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
   include/asm-generic/xor.h: In function 'xor_8regs_p_5':
   include/asm-generic/xor.h:429:1: warning: the frame size of 1604 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
   include/asm-generic/xor.h: In function 'xor_8regs_p_4':
   include/asm-generic/xor.h:392:1: warning: the frame size of 1340 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
   include/asm-generic/xor.h: In function 'xor_8regs_p_3':
   include/asm-generic/xor.h:358:1: warning: the frame size of 1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
--
   In file included from include/linux/blkdev.h:4:0,
                    from drivers/md/dm-bufio.h:12,
                    from drivers/md/dm-bufio.c:9:
   drivers/md/dm-bufio.c: In function 'alloc_buffer':
>> include/linux/sched.h:2157:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
     current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
                                                           ^
   drivers/md/dm-bufio.c:389:11: note: 'noio_flag' was declared here
     unsigned noio_flag;
              ^

vim +/noio_flag +2157 include/linux/sched.h

21caf2fc Ming Lei   2013-02-22  2141  static inline gfp_t memalloc_noio_flags(gfp_t flags)
21caf2fc Ming Lei   2013-02-22  2142  {
21caf2fc Ming Lei   2013-02-22  2143  	if (unlikely(current->flags & PF_MEMALLOC_NOIO))
934f3072 Junxiao Bi 2014-10-09  2144  		flags &= ~(__GFP_IO | __GFP_FS);
21caf2fc Ming Lei   2013-02-22  2145  	return flags;
21caf2fc Ming Lei   2013-02-22  2146  }
21caf2fc Ming Lei   2013-02-22  2147  
21caf2fc Ming Lei   2013-02-22  2148  static inline unsigned int memalloc_noio_save(void)
21caf2fc Ming Lei   2013-02-22  2149  {
21caf2fc Ming Lei   2013-02-22  2150  	unsigned int flags = current->flags & PF_MEMALLOC_NOIO;
21caf2fc Ming Lei   2013-02-22  2151  	current->flags |= PF_MEMALLOC_NOIO;
21caf2fc Ming Lei   2013-02-22  2152  	return flags;
21caf2fc Ming Lei   2013-02-22  2153  }
21caf2fc Ming Lei   2013-02-22  2154  
21caf2fc Ming Lei   2013-02-22  2155  static inline void memalloc_noio_restore(unsigned int flags)
21caf2fc Ming Lei   2013-02-22  2156  {
21caf2fc Ming Lei   2013-02-22 @2157  	current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
21caf2fc Ming Lei   2013-02-22  2158  }
21caf2fc Ming Lei   2013-02-22  2159  
1d4457f9 Kees Cook  2014-05-21  2160  /* Per-process atomic flags. */
a2b86f77 Zefan Li   2014-09-25  2161  #define PFA_NO_NEW_PRIVS 0	/* May not gain new privileges. */
2ad654bc Zefan Li   2014-09-25  2162  #define PFA_SPREAD_PAGE  1      /* Spread page cache over cpuset */
2ad654bc Zefan Li   2014-09-25  2163  #define PFA_SPREAD_SLAB  2      /* Spread some slab caches over cpuset */
2ad654bc Zefan Li   2014-09-25  2164  
1d4457f9 Kees Cook  2014-05-21  2165  

:::::: The code at line 2157 was first introduced by commit
:::::: 21caf2fc1931b485483ddd254b634fa8f0099963 mm: teach mm by current context info to not do I/O during memory allocation

:::::: TO: Ming Lei <ming.lei@...onical.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/octet-stream" (20865 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ