From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE65BC4332F for ; Mon, 14 Nov 2022 08:59:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4DFC48E0001; Mon, 14 Nov 2022 03:59:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 48FE06B0073; Mon, 14 Nov 2022 03:59:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 357078E0001; Mon, 14 Nov 2022 03:59:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 228E06B0072 for ; Mon, 14 Nov 2022 03:59:15 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BE984A0E73 for ; Mon, 14 Nov 2022 08:59:14 +0000 (UTC) X-FDA: 80131448628.03.464370B Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf22.hostedemail.com (Postfix) with ESMTP id 6525CC000C for ; Mon, 14 Nov 2022 08:59:14 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id l2so9445951pld.13 for ; Mon, 14 Nov 2022 00:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CqCziBDyF1eskwQchllhGeXcXMIreg6dgBMSZX9rCUg=; b=K6bPwA26LU2IKEK9IwihTK0Qm/R0I1Ya4IO3H99L9uaNLG6ObQxW6iQ2zsyajXR/sC 6R64uHHJ2ztfJPobIkCg+pKwDFKkQRgzWCJ25PHwJ9EtLpFZTb5DX+lR79QRHtLZzavc qWRUN13ESED7KlVEgzzAQG4Hh4k5Ub67ZiNiXEQ6WvJxYs1gaCKIuhgR3gWQcHbzoMSl 6N+qbCeO1nRz238+V3/tliBZ+laCEa6QsAp5XwlWyN3/iOgCPvC+Qu54sWJzBW57Pny1 xYrB0+idhA0hiDGwPMMv7o0qrj8kVq4emEymjYKiikVjTIn6WTAFEYkxzWb4wMrRVaA6 pxOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CqCziBDyF1eskwQchllhGeXcXMIreg6dgBMSZX9rCUg=; b=eexz7Yt8J0lwkt0BIQ9MIDEVyw2R/WpxNgzGzYk4AseKkrggOamN5m8btGll+/GH9d Al0HEsp3GNr1ltn05MdzP4Ng7PSos9RxpdFLCnFulzka7WWxTSaq+WAdfihX1zIWw8TH XnlD3Zj62jKEq+4jxAvelKXueQ35zDEv9I+Zbn0DjY+E8WXynXqECZE2rsgUR8H4GjA+ zV6I2IOE72PCCo433WODfmAUVF+RBs+NK/QZGKv6bUMRafCU/85QbWLIk18WfQHGMYUl jls2G8doudl0wpzQZdcdJoCInq3MJ8oxEs1M13TesQuj/ZcwCPEqNUsOoUI7KEeA3iEm 6+Ww== X-Gm-Message-State: ANoB5pmkygbXmCnfd1KTm/iCwUrMa4zNKe3R6B4raCiePMePCSPk0xxe QI2aPhFTRuMxHAMJ9x8+mlY= X-Google-Smtp-Source: AA0mqf4oWVQDjwGR8UOJcIOjRgoDE9/Ne22MAGbMnh6UZ9wZYXU1gClzZWK+qIFC2kqXT/ZM6yKy6A== X-Received: by 2002:a17:902:8c8a:b0:188:ca57:8945 with SMTP id t10-20020a1709028c8a00b00188ca578945mr2223200plo.116.1668416353136; Mon, 14 Nov 2022 00:59:13 -0800 (PST) Received: from hyeyoo ([114.29.91.56]) by smtp.gmail.com with ESMTPSA id n7-20020a170902d2c700b00186c54188b4sm6841932plc.240.2022.11.14.00.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 00:59:12 -0800 (PST) Date: Mon, 14 Nov 2022 17:59:06 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Ian Cowan Cc: Randy Dunlap , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: include: linux: slab: kmalloc_trace undefined when compiling drivers Message-ID: References: <1df133ef-d5e9-f323-7c67-fc9ffed04274@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668416354; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CqCziBDyF1eskwQchllhGeXcXMIreg6dgBMSZX9rCUg=; b=qnAAMEhdfbWtLc6bZDDiZdoNovK6mBll7ZeZ+lZitVdcoIUlb9vY+KRlYj1y8RNmO0KRq4 8M3vFjFOt2yvgRZpqzUFCR115sMeMsjExD44q0k0gQZqL8cDIxWT1DtgQatIW2iL6rvp4c kxGWi4YmHTGJduJKOb/PtBtsjVwq9oo= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=K6bPwA26; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668416354; a=rsa-sha256; cv=none; b=ezJmlgAJX0yTXy44Xw2OPLz4Vsx1HkarbDu+g36RJUBwNbr3ACwRmzU/b9i8LYXVawQLay cKFAJvMLY3J8IR99jh63j9Hga0jpCmcLZHzpfxYVq7IV/2SPXytGFuJQJuNCCaXs5RfBZV n2H19qUdOMhmVIVbQZiTSjDRnWZNmo8= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6525CC000C X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=K6bPwA26; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Stat-Signature: srtdgjgqj45xxms96xdf7k48nqem4idi X-HE-Tag: 1668416354-124421 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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