Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2868153lqp; Mon, 25 Mar 2024 11:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJW9gsLmi9tGndK5kdyV6m1yKy+zB2puASTBO3QcN0kWRdq+bJuQiEy7jooJtid23Eyr2xivRHzAu9UF1gx6ka1g8ndwyvQSLOrftEKA== X-Google-Smtp-Source: AGHT+IFeIYh53YbPPBAmzZq/+ghILj9VxygMk7Hbbad5iMhfuq0DkWZQUagG/J4bMgrOQqe9zjI2 X-Received: by 2002:a05:6122:46a8:b0:4d4:2fbc:e61f with SMTP id di40-20020a05612246a800b004d42fbce61fmr5563577vkb.14.1711391338066; Mon, 25 Mar 2024 11:28:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711391338; cv=pass; d=google.com; s=arc-20160816; b=w+LjDnCNNZK6md/nnUxtgaN+Vo/iE4OvCnk+ZGEgUNaypSOdV/Qv8MCXg4Fh9Rw4wG l/saHpT5kBROTA5n9T/m7o2UX3w/qsYvJIVt8/syq/5znTyQ3aqigYPS020KVieRT+zF iXfVCVwzkkJ68M2iCyOSrAUhPErUJvXwhTx819SeWCBzR7k6hmhf/ddYbWxHYv5koHXH gTpt9iD8uSGLtpUQqaSD7ekuEtLqsprrS1juuOOAHmw5bPYL2hftIz/BFsJIpoxSOghm 37uTgrU8ZbTr2ibbTLgO1wu2pcWO/NQ4Z0xfbM9caE2OXR/0KwPazpIG2RJoW5VFaBLa /Zjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=g1H2/sqpi/sh2ma0fgAVRjfY65QgsbrlBKsllNKG2ck=; fh=fKCBgmaWOuRNvzPhgEKTxH1yr3Fwn/pSq+a5jRt5Drk=; b=Rano9J+tlag65BNCdtODRpgVGaPyRTbnOW4aBUuZKoY7FuTk+GWhBMRtz8Z3KCDhJx 5nM+Y473+tjvQeg1YwjpwmOR/1YouFxAnvURgSZUWtl4P31+o8rW1jcOKC0FssdM66nU hSZbQ34WodarMbTNshIcgrmL0zufSsJj3yncwN3oCmUIsgJq5hSG2YANsH358fX7cdTC wOQ4P0X69+wQfUUAJHU4862lI/V68f/CC6Kjml6IvfS4Psw5u639aBNrQqCVPLiX5DwP xv3PTK1LD+k5geVmQJ0ZRcfMgdmMumv8yymNJw24t+GOgsntVhncA6OL6JTy1udG76Td WruQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2gl4CyQ+; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-117666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp33-20020a05622a1ba100b0042edcfb1f28si6134581qtb.92.2024.03.25.11.28.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 11:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2gl4CyQ+; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-117666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AB9641C3ADE0 for ; Mon, 25 Mar 2024 18:28:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF10884D22; Mon, 25 Mar 2024 17:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="2gl4CyQ+" Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1444082D78 for ; Mon, 25 Mar 2024 17:59:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711389556; cv=none; b=UzXr6Yc+jmBSxFxH+osqLHH2IlXhzvlH0SyZCQuf2bjjw87U8zm1y7FDZ+v+VBxQCoW8QOlt2/p2Pn60ec0YfE1LamzYZ1eKvPCLh/fyOPvQDmP/QkFnkPExL21Ro7C05XulgTB+lGXyiu3aWH2CdS2NHQqQhgIdXkrL7FvxXAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711389556; c=relaxed/simple; bh=YUkn5bDTJvtPOe4CbVEJJ+OysGCk8+HwOuI6bpiCxQQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=uN0rvRWGhrSB6NZiZ2LZ0tjChCVSZ0HNrSbCLadk+6N4pD7wIX/nhO63i7DwC7P14HS2bz9ySUD/dtBuZ+6a793CEpQiCGy/06LMhDgK0BOR5/f/XOSz/sJ3VKYRtYDUFKnyodZEos5Dw5gxdo2s6q+85U+z40k58PdllSMmADg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=2gl4CyQ+; arc=none smtp.client-ip=209.85.219.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dd10ebcd702so4730383276.2 for ; Mon, 25 Mar 2024 10:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711389553; x=1711994353; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g1H2/sqpi/sh2ma0fgAVRjfY65QgsbrlBKsllNKG2ck=; b=2gl4CyQ+Xvl6vMB2PNXMos2xXZYhPDH+8W1bFAYmkCRuJKlGz64+FLJnLY+nO7mmhv 4yXbp0XCZUoBDUViWSScVzKZwVJSPlUGmrz1GIYu6yiZOUXxz8R3vcj6t/hEXqf+Rzk5 ZwPOYWKGouwogs2vAb0YAbFQcXsI5JzizAjND9Xz5pYvi8KOYXq8jOjuVnXKrnBDEgmo /me7luk2ASZqf/JphUm/ZFaLeWQXmQUy1LpfzrrNvofTtwWDW8XZW5acdeIEcUNJj+F/ urtUStjDpqISLSdRprneRNZz0QACMZzMiXWm2WhDTqNECfwxky/+a/gpNSLrZZZM+OjN ArTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711389553; x=1711994353; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g1H2/sqpi/sh2ma0fgAVRjfY65QgsbrlBKsllNKG2ck=; b=w2g3GpRVC/v+LgaFG37idJTAkFxBf4YBoA4TF1p9kj8E4EObehPnEZ7OToNrfYkTBp PEYZSV1VHx/E3lXpOB3BIj6cQovDeM6SWVJzxqYpYxqCefNL/ufZH2seXhGQIOWerycm vMgVNLJdEhZ/dhNATFVQRDduIYm0SGU7RoKUvsblE1mgSc+I04LG7SJKmZbrE9/LxQkn XFPi91aQ9gSpZZbtwvJtipdAhzh8YfiBPVw8zzYhDFYcfe+zer3USVh3jdIkJosgiMFT U5yifzUfdTf4+w5xeEmE77/WlQ89a0OkB8kfY0dObzHJYS9n/BzXPcExQd9jiiHe6QNS CAIA== X-Forwarded-Encrypted: i=1; AJvYcCUHkTHJ5624L548XbSZ49IIKUM+XjBCbvWoUuoi3xIkfHCBqZm+iJxt97YQRXKBJl74NP9lpKzyaihEaTMyFRHZoK+jXto2xGl1yrP7 X-Gm-Message-State: AOJu0YxarYzw/w0rkB+0aGESZuEzFid8CuXqfXNa4oQQv6oKpbJ07zYG vuDWigz/Cp59pdZKPC2cD9vqN4nZP1cpD4/abgTwTgQrk0U8V/YZzqsG5cmqW4iwfr3Af1Dbzyj LrMKc1b4qKedy3T4kRBIw5u0+aL1L6TT2SYd0 X-Received: by 2002:a25:acd6:0:b0:dc7:4067:9f85 with SMTP id x22-20020a25acd6000000b00dc740679f85mr6265207ybd.58.1711389552854; Mon, 25 Mar 2024 10:59:12 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325174934.229745-1-sj@kernel.org> In-Reply-To: <20240325174934.229745-1-sj@kernel.org> From: Suren Baghdasaryan Date: Mon, 25 Mar 2024 10:59:01 -0700 Message-ID: Subject: Re: [PATCH v6 30/37] mm: vmalloc: Enable memory allocation profiling To: SeongJae Park Cc: mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 25, 2024 at 10:49=E2=80=AFAM SeongJae Park wrot= e: > > On Mon, 25 Mar 2024 14:56:01 +0000 Suren Baghdasaryan = wrote: > > > On Sat, Mar 23, 2024 at 6:05=E2=80=AFPM SeongJae Park w= rote: > > > > > > Hi Suren and Kent, > > > > > > On Thu, 21 Mar 2024 09:36:52 -0700 Suren Baghdasaryan wrote: > > > > > > > From: Kent Overstreet > > > > > > > > This wrapps all external vmalloc allocation functions with the > > > > alloc_hooks() wrapper, and switches internal allocations to _noprof > > > > variants where appropriate, for the new memory allocation profiling > > > > feature. > > > > > > I just noticed latest mm-unstable fails running kunit on my machine a= s below. > > > 'git-bisect' says this is the first commit of the failure. > > > > > > $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/ > > > [10:59:53] Configuring KUnit Kernel ... > > > [10:59:53] Building KUnit Kernel ... > > > Populating config with: > > > $ make ARCH=3Dum O=3D../kunit.out/ olddefconfig > > > Building with: > > > $ make ARCH=3Dum O=3D../kunit.out/ --jobs=3D36 > > > ERROR:root:/usr/bin/ld: arch/um/os-Linux/main.o: in function `__w= rap_malloc': > > > main.c:(.text+0x10b): undefined reference to `vmalloc' > > > collect2: error: ld returned 1 exit status > > > > > > Haven't looked into the code yet, but reporting first. May I ask you= r idea? > > > > Hi SeongJae, > > Looks like we missed adding "#include " inside > > arch/um/os-Linux/main.c in this patch: > > https://lore.kernel.org/all/20240321163705.3067592-2-surenb@google.com/= . > > I'll be posing fixes for all 0-day issues found over the weekend and > > will include a fix for this. In the meantime, to work around it you > > can add that include yourself. Please let me know if the issue still > > persists after doing that. > > Thank you, Suren. The change made the error message disappears. However= , it > introduced another one. Ok, let me investigate and I'll try to get a fix for it today evening. Thanks, Suren. > > $ git diff > diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c > index c8a42ecbd7a2..8fe274e9f3a4 100644 > --- a/arch/um/os-Linux/main.c > +++ b/arch/um/os-Linux/main.c > @@ -16,6 +16,7 @@ > #include > #include > #include > +#include > > #define PGD_BOUND (4 * 1024 * 1024) > #define STACKSIZE (8 * 1024 * 1024) > $ > $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/ > [10:43:13] Configuring KUnit Kernel ... > [10:43:13] Building KUnit Kernel ... > Populating config with: > $ make ARCH=3Dum O=3D../kunit.out/ olddefconfig > Building with: > $ make ARCH=3Dum O=3D../kunit.out/ --jobs=3D36 > ERROR:root:In file included from .../arch/um/kernel/asm-offsets.c:1: > .../arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previ= ous prototype for =E2=80=98foo=E2=80=99 [-Wmissing-prototypes] > 9 | void foo(void) > | ^~~ > In file included from .../include/linux/alloc_tag.h:8, > from .../include/linux/vmalloc.h:5, > from .../arch/um/os-Linux/main.c:19: > .../include/linux/bug.h:5:10: fatal error: asm/bug.h: No such file or= directory > 5 | #include > | ^~~~~~~~~~~ > compilation terminated. > > > Thanks, > SJ > > [...]