[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3IDWt9vINpCtXjP@hyeyoo>
Date: Mon, 14 Nov 2022 17:59:06 +0900
From: Hyeonggon Yoo <42.hyeyoo@...il.com>
To: Ian Cowan <ian@...ux.cowan.aero>
Cc: Randy Dunlap <rdunlap@...radead.org>, cl@...ux.com,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
roman.gushchin@...ux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: include: linux: slab: kmalloc_trace undefined when compiling
drivers
On Sat, Nov 12, 2022 at 08:21:14PM -0500, Ian Cowan wrote:
> On Sat, Nov 12, 2022 at 05:11:27PM -0800, Randy Dunlap wrote:
> >
> >
> > On 11/12/22 16:43, Ian Cowan wrote:
> > > On Sat, Nov 12, 2022 at 04:34:18PM -0800, Randy Dunlap wrote:
> > >>
> > >>
> > >> On 11/12/22 13:59, Ian Cowan wrote:
> > >>> On Sat, Nov 12, 2022 at 09:21:34AM -0800, Randy Dunlap wrote:
> > >>>> Hi--
> > >>>>
> > >>>> On 11/12/22 08:37, Ian Cowan wrote:
> > >>>>> When compiling drivers (speficially drivers/pci/hotplug), I am receiving
> > >>>>> the following modpost error for both `kmalloc_trace` and
> > >>>>> `kmalloc_node_trace` on the staging/staging-next branch:
> > >>>>>
> > >>
> > >> Ian, what do you mean by "on the staging/staging-next branch"?
> > >>
> > >> What kernel version are you trying to build?
> > >>
> > >> The .config that you sent is for v6.1.0-rc1.
> > >
> > > I am building from the staging repository (gregkh/staging) and my
> > > working branch when building is staging-next. So I am trying to build
> > > from staging and not a particular version. I have also run `make modules_prepare`
> > > and updated the .config per that script. However, when I do build
> > > v6.1.0-rc1 from the main repository (torvalds/linux), I run into the same problem.
> >
> > Have you built the entire kernel already and then you are trying to build
> > only drivers/pci/hotplug?
> Yes, I did build the entire kernel already and then I'm just trying to
> rebuild that module.
>
> In `include/linux/slab.h` if I remove the lines between `#ifdef
> CONFIG_TRACING` and `#else` (lines 473-480) and then the corresponding
> `#endif` and leave lines 481-499, I'm able to compile that module
> without issue.
I don't get what the problem is.
In case kmalloc[_node]_trace() is undefined, it's replaced with kmem_cache_alloc[_node].
Is the kernel built with same config on tree?
--
Thanks,
Hyeonggon
Powered by blists - more mailing lists