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]
Date:   Mon, 27 Aug 2018 20:47:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>
Cc:     kbuild-all@...org, Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Arend van Spriel <aspriel@...il.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        Robin Murphy <robin.murphy@....com>,
        Joe Perches <joe@...ches.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        Michal Hocko <mhocko@...e.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Jonathan Corbet <corbet@....net>, Roman Gushchin <guro@...com>,
        Huang Ying <ying.huang@...el.com>,
        Kees Cook <keescook@...omium.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH 1/2] devres: provide devm_kstrdup_const()

Hi Bartosz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on v4.19-rc1 next-20180827]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/devres-provide-devm_kstrdup_const/20180827-162336
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: powerpc-mpc836x_mds_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   mm/util.c: In function 'devm_kstrdup_const':
>> mm/util.c:110:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      return s;
             ^

vim +/const +110 mm/util.c

    94	
    95	/**
    96	 * devm_kstrdup_const - resource managed conditional string duplication
    97	 * @dev: device for which to duplicate the string
    98	 * @s: the string to duplicate
    99	 * @gfp: the GFP mask used in the kmalloc() call when allocating memory
   100	 *
   101	 * Function returns source string if it is in .rodata section otherwise it
   102	 * fallbacks to devm_kstrdup.
   103	 *
   104	 * Strings allocated by devm_kstrdup_const will be automatically freed when
   105	 * the associated device is detached.
   106	 */
   107	char *devm_kstrdup_const(struct device *dev, const char *s, gfp_t gfp)
   108	{
   109		if (is_kernel_rodata((unsigned long)s))
 > 110			return s;
   111	
   112		return devm_kstrdup(dev, s, gfp);
   113	}
   114	EXPORT_SYMBOL(devm_kstrdup_const);
   115	

---
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/gzip" (14798 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ