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: <202209041442.NhBOSrZa-lkp@intel.com>
Date:   Sun, 4 Sep 2022 14:41:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     hezhongkun <hezhongkun.hzk@...edance.com>, hannes@...xchg.org,
        mhocko@...nel.org, roman.gushchin@...ux.dev
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        cgroups@...r.kernel.org, linux-mm@...ck.org,
        lizefan.x@...edance.com, wuyun.abel@...edance.com,
        Zhongkun He <hezhongkun.hzk@...edance.com>
Subject: Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type.

Hi hezhongkun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on c40e8341e3b3bb27e3a65b06b5b454626234c4f0]

url:    https://github.com/intel-lab-lkp/linux/commits/hezhongkun/cgroup-cpuset-Add-a-new-isolated-mems-policy-type/20220904-120436
base:   c40e8341e3b3bb27e3a65b06b5b454626234c4f0
config: s390-randconfig-r044-20220904
compiler: s390-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/aafa4e2c9e5c3cd4d02190ac2a7ed0654ed9cf47
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review hezhongkun/cgroup-cpuset-Add-a-new-isolated-mems-policy-type/20220904-120436
        git checkout aafa4e2c9e5c3cd4d02190ac2a7ed0654ed9cf47
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/mempolicy.c:2980:5: warning: no previous prototype for 'mpol_parse_str' [-Wmissing-prototypes]
    2980 | int mpol_parse_str(char *str, struct mempolicy **mpol)
         |     ^~~~~~~~~~~~~~


vim +/mpol_parse_str +2980 mm/mempolicy.c

1a75a6c825c172 Christoph Lameter      2006-01-08  2968  
aafa4e2c9e5c3c Zhongkun He            2022-09-04  2969  #if defined(CONFIG_TMPFS) || defined(CONFIG_NUMA)
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2970  /**
f2a07f40dbc603 Hugh Dickins           2013-01-02  2971   * mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option.
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2972   * @str:  string containing mempolicy to parse
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  2973   * @mpol:  pointer to struct mempolicy pointer, returned on success.
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2974   *
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2975   * Format of input:
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2976   *	<mode>[=<flags>][:<nodelist>]
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2977   *
dad5b023294981 Randy Dunlap           2022-01-14  2978   * Return: %0 on success, else %1
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2979   */
a7a88b23737095 Hugh Dickins           2013-01-02 @2980  int mpol_parse_str(char *str, struct mempolicy **mpol)
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2981  {
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  2982  	struct mempolicy *new = NULL;
f2a07f40dbc603 Hugh Dickins           2013-01-02  2983  	unsigned short mode_flags;
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  2984  	nodemask_t nodes;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2985  	char *nodelist = strchr(str, ':');
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2986  	char *flags = strchr(str, '=');
dedf2c73b80b45 zhong jiang            2018-10-26  2987  	int err = 1, mode;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2988  
c7a91bc7c2e17e Dan Carpenter          2020-01-30  2989  	if (flags)
c7a91bc7c2e17e Dan Carpenter          2020-01-30  2990  		*flags++ = '\0';	/* terminate mode string */
c7a91bc7c2e17e Dan Carpenter          2020-01-30  2991  
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2992  	if (nodelist) {
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2993  		/* NUL-terminate mode or flags string */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2994  		*nodelist++ = '\0';
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  2995  		if (nodelist_parse(nodelist, nodes))
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2996  			goto out;
01f13bd607346a Lai Jiangshan          2012-12-12  2997  		if (!nodes_subset(nodes, node_states[N_MEMORY]))
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  2998  			goto out;
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  2999  	} else
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3000  		nodes_clear(nodes);
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3001  
dedf2c73b80b45 zhong jiang            2018-10-26  3002  	mode = match_string(policy_modes, MPOL_MAX, str);
dedf2c73b80b45 zhong jiang            2018-10-26  3003  	if (mode < 0)
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3004  		goto out;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3005  
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3006  	switch (mode) {
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3007  	case MPOL_PREFERRED:
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3008  		/*
aa9f7d5172fac9 Randy Dunlap           2020-04-01  3009  		 * Insist on a nodelist of one node only, although later
aa9f7d5172fac9 Randy Dunlap           2020-04-01  3010  		 * we use first_node(nodes) to grab a single node, so here
aa9f7d5172fac9 Randy Dunlap           2020-04-01  3011  		 * nodelist (or nodes) cannot be empty.
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3012  		 */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3013  		if (nodelist) {
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3014  			char *rest = nodelist;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3015  			while (isdigit(*rest))
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3016  				rest++;
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3017  			if (*rest)
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3018  				goto out;
aa9f7d5172fac9 Randy Dunlap           2020-04-01  3019  			if (nodes_empty(nodes))
aa9f7d5172fac9 Randy Dunlap           2020-04-01  3020  				goto out;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3021  		}
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3022  		break;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3023  	case MPOL_INTERLEAVE:
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3024  		/*
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3025  		 * Default to online nodes with memory if no nodelist
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3026  		 */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3027  		if (!nodelist)
01f13bd607346a Lai Jiangshan          2012-12-12  3028  			nodes = node_states[N_MEMORY];
3f226aa1cbc006 Lee Schermerhorn       2008-04-28  3029  		break;
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3030  	case MPOL_LOCAL:
3f226aa1cbc006 Lee Schermerhorn       2008-04-28  3031  		/*
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3032  		 * Don't allow a nodelist;  mpol_new() checks flags
3f226aa1cbc006 Lee Schermerhorn       2008-04-28  3033  		 */
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3034  		if (nodelist)
3f226aa1cbc006 Lee Schermerhorn       2008-04-28  3035  			goto out;
3f226aa1cbc006 Lee Schermerhorn       2008-04-28  3036  		break;
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3037  	case MPOL_DEFAULT:
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3038  		/*
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3039  		 * Insist on a empty nodelist
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3040  		 */
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3041  		if (!nodelist)
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3042  			err = 0;
413b43deab8377 Ravikiran G Thirumalai 2010-03-23  3043  		goto out;
b27abaccf8e8b0 Dave Hansen            2021-09-02  3044  	case MPOL_PREFERRED_MANY:
d69b2e63e9172a KOSAKI Motohiro        2010-03-23  3045  	case MPOL_BIND:
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3046  		/*
d69b2e63e9172a KOSAKI Motohiro        2010-03-23  3047  		 * Insist on a nodelist
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3048  		 */
d69b2e63e9172a KOSAKI Motohiro        2010-03-23  3049  		if (!nodelist)
d69b2e63e9172a KOSAKI Motohiro        2010-03-23  3050  			goto out;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3051  	}
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3052  
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3053  	mode_flags = 0;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3054  	if (flags) {
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3055  		/*
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3056  		 * Currently, we only support two mutually exclusive
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3057  		 * mode flags.
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3058  		 */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3059  		if (!strcmp(flags, "static"))
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3060  			mode_flags |= MPOL_F_STATIC_NODES;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3061  		else if (!strcmp(flags, "relative"))
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3062  			mode_flags |= MPOL_F_RELATIVE_NODES;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3063  		else
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3064  			goto out;
aafa4e2c9e5c3c Zhongkun He            2022-09-04  3065  	} else {
aafa4e2c9e5c3c Zhongkun He            2022-09-04  3066  		/*use static mode_flags in default*/
aafa4e2c9e5c3c Zhongkun He            2022-09-04  3067  		mode_flags |= MPOL_F_STATIC_NODES;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3068  	}
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3069  
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3070  	new = mpol_new(mode, mode_flags, &nodes);
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3071  	if (IS_ERR(new))
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3072  		goto out;
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3073  
f2a07f40dbc603 Hugh Dickins           2013-01-02  3074  	/*
f2a07f40dbc603 Hugh Dickins           2013-01-02  3075  	 * Save nodes for mpol_to_str() to show the tmpfs mount options
f2a07f40dbc603 Hugh Dickins           2013-01-02  3076  	 * for /proc/mounts, /proc/pid/mounts and /proc/pid/mountinfo.
f2a07f40dbc603 Hugh Dickins           2013-01-02  3077  	 */
269fbe72cded0a Ben Widawsky           2021-06-30  3078  	if (mode != MPOL_PREFERRED) {
269fbe72cded0a Ben Widawsky           2021-06-30  3079  		new->nodes = nodes;
269fbe72cded0a Ben Widawsky           2021-06-30  3080  	} else if (nodelist) {
269fbe72cded0a Ben Widawsky           2021-06-30  3081  		nodes_clear(new->nodes);
269fbe72cded0a Ben Widawsky           2021-06-30  3082  		node_set(first_node(nodes), new->nodes);
269fbe72cded0a Ben Widawsky           2021-06-30  3083  	} else {
7858d7bca7fbbb Feng Tang              2021-06-30  3084  		new->mode = MPOL_LOCAL;
269fbe72cded0a Ben Widawsky           2021-06-30  3085  	}
f2a07f40dbc603 Hugh Dickins           2013-01-02  3086  
f2a07f40dbc603 Hugh Dickins           2013-01-02  3087  	/*
f2a07f40dbc603 Hugh Dickins           2013-01-02  3088  	 * Save nodes for contextualization: this will be used to "clone"
f2a07f40dbc603 Hugh Dickins           2013-01-02  3089  	 * the mempolicy in a specific context [cpuset] at a later time.
f2a07f40dbc603 Hugh Dickins           2013-01-02  3090  	 */
e17f74af351cce Lee Schermerhorn       2010-05-24  3091  	new->w.user_nodemask = nodes;
f2a07f40dbc603 Hugh Dickins           2013-01-02  3092  
926f2ae04f1830 KOSAKI Motohiro        2010-03-23  3093  	err = 0;
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3094  
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3095  out:
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3096  	/* Restore string for error message */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3097  	if (nodelist)
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3098  		*--nodelist = ':';
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3099  	if (flags)
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3100  		*--flags = '=';
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3101  	if (!err)
71fe804b6d56d6 Lee Schermerhorn       2008-04-28  3102  		*mpol = new;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3103  	return err;
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3104  }
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3105  #endif /* CONFIG_TMPFS */
095f1fc4ebf36c Lee Schermerhorn       2008-04-28  3106  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (72306 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ