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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202110020437.tn6NOlcO-lkp@intel.com>
Date:   Sat, 2 Oct 2021 04:24:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     kbuild-all@...ts.01.org,
        Linux Memory Management List <linux-mm@...ck.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        syzbot <syzkaller@...glegroups.com>,
        "Huang, Ying" <ying.huang@...el.com>, Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH] mm/mempolicy: do not allow illegal MPOL_F_NUMA_BALANCING
 | MPOL_LOCAL in mbind()

Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on hnaz-mm/master]

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054
base:   https://github.com/hnaz/linux-mm master
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fe87354835a4bf5cad6d885f0ba558c767fee6f1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054
        git checkout fe87354835a4bf5cad6d885f0ba558c767fee6f1
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   mm/mempolicy.c: In function 'sanitize_mpol_flags':
>> mm/mempolicy.c:1452:26: warning: comparison between pointer and integer
    1452 |                 if (mode != MPOL_BIND)
         |                          ^~


vim +1452 mm/mempolicy.c

  1440	
  1441	/* Basic parameter sanity check used by both mbind() and set_mempolicy() */
  1442	static inline int sanitize_mpol_flags(int *mode, unsigned short *flags)
  1443	{
  1444		*flags = *mode & MPOL_MODE_FLAGS;
  1445		*mode &= ~MPOL_MODE_FLAGS;
  1446	
  1447		if ((unsigned int)(*mode) >=  MPOL_MAX)
  1448			return -EINVAL;
  1449		if ((*flags & MPOL_F_STATIC_NODES) && (*flags & MPOL_F_RELATIVE_NODES))
  1450			return -EINVAL;
  1451		if (*flags & MPOL_F_NUMA_BALANCING) {
> 1452			if (mode != MPOL_BIND)
  1453				return -EINVAL;
  1454			*flags |= (MPOL_F_MOF | MPOL_F_MORON);
  1455		}
  1456		return 0;
  1457	}
  1458	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (20055 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ