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: <SJ0PR11MB5678054C737A0588AD87106AC98E2@SJ0PR11MB5678.namprd11.prod.outlook.com>
Date: Wed, 21 Aug 2024 19:16:09 +0000
From: "Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>
To: Michal Hocko <mhocko@...e.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, "hannes@...xchg.org"
	<hannes@...xchg.org>, "yosryahmed@...gle.com" <yosryahmed@...gle.com>,
	"nphamcs@...il.com" <nphamcs@...il.com>, "ryan.roberts@....com"
	<ryan.roberts@....com>, "Huang, Ying" <ying.huang@...el.com>,
	"21cnbao@...il.com" <21cnbao@...il.com>, "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>, "Zou, Nanhai" <nanhai.zou@...el.com>, "Feghali,
 Wajdi K" <wajdi.k.feghali@...el.com>, "Gopal, Vinodh"
	<vinodh.gopal@...el.com>, "Sridhar, Kanchana P"
	<kanchana.p.sridhar@...el.com>
Subject: RE: [PATCH v1] mm: Defines obj_cgroup_get() if CONFIG_MEMCG is not
 defined.

Hi Michal,

> -----Original Message-----
> From: Michal Hocko <mhocko@...e.com>
> Sent: Wednesday, August 21, 2024 8:11 AM
> To: Sridhar, Kanchana P <kanchana.p.sridhar@...el.com>
> Cc: linux-kernel@...r.kernel.org; linux-mm@...ck.org;
> hannes@...xchg.org; yosryahmed@...gle.com; nphamcs@...il.com;
> ryan.roberts@....com; Huang, Ying <ying.huang@...el.com>;
> 21cnbao@...il.com; akpm@...ux-foundation.org; Zou, Nanhai
> <nanhai.zou@...el.com>; Feghali, Wajdi K <wajdi.k.feghali@...el.com>;
> Gopal, Vinodh <vinodh.gopal@...el.com>
> Subject: Re: [PATCH v1] mm: Defines obj_cgroup_get() if CONFIG_MEMCG is
> not defined.
> 
> On Tue 20-08-24 12:50:05, Kanchana P Sridhar wrote:
> > This resolves an issue with obj_cgroup_get() not being defined
> > if CONFIG_MEMCG is not defined.
> 
> Could you paste the compilation error and which tree this is based on?

Sure, this link contains the compilation error reported by the kernel test robot:

https://lore.kernel.org/oe-kbuild-all/202408202320.trSaY2o4-lkp@intel.com/

Error:
kernel test robot noticed the following build errors:

[auto build test ERROR on 8c0b4f7b65fd1ca7af01267f491e815a40d77444]

url:    https://github.com/intel-lab-lkp/linux/commits/Kanchana-P-Sridhar/mm-zswap-zswap_is_folio_same_filled-takes-an-index-in-the-folio/20240819-101738
base:   8c0b4f7b65fd1ca7af01267f491e815a40d77444
patch link:    https://lore.kernel.org/r/20240819021621.29125-3-kanchana.p.sridhar%40intel.com
patch subject: [PATCH v4 2/4] mm: zswap: zswap_store() extended to handle mTHP folios.
config: sparc-randconfig-002-20240820 (https://download.01.org/0day-ci/archive/20240820/202408202320.trSaY2o4-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240820/202408202320.trSaY2o4-lkp@intel.com/reproduce)

All errors (new ones prefixed by >>):

   mm/zswap.c: In function 'zswap_store_page':
>> mm/zswap.c:1534:17: error: implicit declaration of function 'obj_cgroup_get'; did you mean 'obj_cgroup_put'? [-Wimplicit-function-declaration]
    1534 |                 obj_cgroup_get(objcg);
         |                 ^~~~~~~~~~~~~~
         |                 obj_cgroup_put

My patch fixing the error is based on the mm-unstable branch in this git tree:

https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/

Please let me know if you need any other info.

Thanks,
Kanchana

> 
> > This causes build errors if
> > obj_cgroup_get() is called from code that is agnostic of CONFIG_MEMCG.
> >
> > The patch resolves this.
> >
> > Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@...el.com>
> > ---
> >  include/linux/memcontrol.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> > index fe05fdb92779..f693d254ab2a 100644
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> > @@ -1281,6 +1281,10 @@ struct mem_cgroup
> *mem_cgroup_from_css(struct cgroup_subsys_state *css)
> >  	return NULL;
> >  }
> >
> > +static inline void obj_cgroup_get(struct obj_cgroup *objcg)
> > +{
> > +}
> > +
> >  static inline void obj_cgroup_put(struct obj_cgroup *objcg)
> >  {
> >  }
> >
> > base-commit: 7d0b0d4b77b368b2111fc8b4449e33dfb3c34087
> > --
> > 2.27.0
> >
> 
> --
> Michal Hocko
> SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ