From patchwork Mon Oct 28 14:18:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13853576 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 E3B43D3398B for ; Mon, 28 Oct 2024 14:18:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 339676B009D; Mon, 28 Oct 2024 10:18:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29A686B009E; Mon, 28 Oct 2024 10:18:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13B526B009F; Mon, 28 Oct 2024 10:18:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E8BDD6B009D for ; Mon, 28 Oct 2024 10:18:26 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A7F8DAB2FD for ; Mon, 28 Oct 2024 14:18:26 +0000 (UTC) X-FDA: 82723215540.30.4B7CD4E Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf15.hostedemail.com (Postfix) with ESMTP id 3D570A0038 for ; Mon, 28 Oct 2024 14:18:01 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TX5VTTHr; spf=pass (imf15.hostedemail.com: domain of arnd@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730124946; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=eQK0Cu+Q9jV0r93ZodcZ/7Mjz50BFIpMvu6S8NGIvLY=; b=fqggwk7eDw8zDJcWyNYXYXrpE8ru/ikB6NfS+HEg2cXmLwVqbjAkouIEwtFoQy8eDd0XYf yCvU7WJ8BOVphenYHc0x3naY00TmqHkjrnhWIsVTGnq2gBKHty7ZWVreMub/99DCHLjn3k Fp0X0I9VccuBIxQ4nZbFfF4ztbf/DnU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730124946; a=rsa-sha256; cv=none; b=fXWuc8lkNbP4oWgXAqmdZXde5oRDs+KOCG486FuWTlXmnvKylV8OPiry+HsfZncEd0/oWT N3w6w+udhReL/IlvL3UyV7FrSm5kGgeOVsd1wLY5Hn/pkqWU0d/EaHg81EJKXRRMKs1XwZ 9kv6NzHSYiQUwpis12Huc9yYgEIUldQ= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TX5VTTHr; spf=pass (imf15.hostedemail.com: domain of arnd@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E3D81A42591; Mon, 28 Oct 2024 14:16:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 350D2C4CECD; Mon, 28 Oct 2024 14:18:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730125103; bh=mBpXWXxLTTeSoq4/zHpXkTzNWRmP/T91PZm9hTMvR5Y=; h=From:To:Cc:Subject:Date:From; b=TX5VTTHrj/S3bZq59zkXs5KsRejQfiRD+lUTwopzolVO+Jb8R21LmVsbCw02m1DT0 ScBOY/323X9N++YYfw4catzZ+yrFixcORLTlBL+2RmQ5xvKX/h2te3Pe/hzrM1qmbG ST8CqcN1ZAlcWVKNQ3H8VXi8bCFg2zRbLBvm45QzYXNQX3OrCOJfqS9a7aes5WazML jckrgpNpv0GgYRro7mpbbBw07uMDmess/tGs72UVxw+4RG96pesXHbtIgi8bUnygdi VNOpX/vPBmsBZ30pSCQkosfOdCi6N9DvN5agai8CXHWHdLtDYPGGuyyIus23/m75Ln Tx8YnK/yHIZlg== From: Arnd Bergmann To: Andrew Morton , Suren Baghdasaryan , Pasha Tatashin Cc: Arnd Bergmann , "Mike Rapoport (Microsoft)" , Luis Chamberlain , Song Liu , "Masami Hiramatsu (Google)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] alloc_tag: hide execmem_vmap() on !MMU Date: Mon, 28 Oct 2024 14:18:09 +0000 Message-Id: <20241028141818.622917-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Stat-Signature: 7d671gc631jshdyg33wxakz71qbpyztm X-Rspamd-Queue-Id: 3D570A0038 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1730125081-776727 X-HE-Meta: U2FsdGVkX1+xWcjAYELaSJUEfjv6M2dST7bClSRqoc8dzlEzi4bhGUMYQR9svRC+QeOn5mUcjfi+QD8Gl4sbDcrTn85NPL2gU2CE3KJ5bhoLSicZu5I2f6Sp4Y2yaO06FzSyWj/eq9UHJeariB2Dy1qJTGsN2ClOiXvZTSjXf5BF2FwT7XCLj4EYdOu7mIB6Ac0vCAy7h1izs7mq3L2Q8WCu1AZdYa5BzMIPd0acm/+0McrY5CIl73BmV7gtbc5pxagG7Bk8PhhxphuU9p/i98gMuYTlMGPfFKBpSxI/MYkJBL3EeDuVUFajVimgujWIQVtXzuaCdpweW5fi9JcZV+zCgIqQfyBYQK4Mz953hf5/uiDXNzP6jk3BuHdcUN90O4Xx+MegkpsUM+cIBPT/jcwE7KjcNMZgwzFJCF0TPzuX+f5cNdBv8UmCikZ+5J//vBzpdXMZUjOM81ej7S0e8DfPbiACDmXQVvv4xnLThiWpLzPm5IHJDig+8eWs9OjnLiDcdUSz1EnnAo7aVFXmDMP3QVv7thiJ8EVvVnNhPUdcgy26my6VA43TZgxrcl4yLrYJAi4JgP9FsNd6j1ELR428AMCk5CDUCyT4bAT60YSIu1eMFTsDVF6BxrbqRjgkSSuTDH+zAGcRFbA211j/kRpmOuFD3dXfJDMl11F9ZhuXvKDaMXWCEpcB1LOkzp2YXwRcS1z2l+TOdoR/sbPxUWoDFeyDbv28dX+6cNuJGy8njaRlQjoksd3yTXk6NqUzEQ6iE9YoS8XH4cFxHR8ns7QIHOqo7L00aph1lO7rr22fw9yJPF8ysEJLQWgJDLlrcsrVzk6zTdksGjWcP4xcjP01wx8s2TOcqJcY6OBDUI1H1nzBv+59+c8FqXQI22f+wPOEUBzlONpUaOsx0+Mc5uEXTmkcXM0RvqDhKhmQbjy0q6kWOZf9NERE2eafIF5bBJryR+Z7muAlISLPgPX /vekz10a LwOpSJe3bgMRvwu0PGvuLBQKRqL1u6dREPLLPE4Is8hZx4WGGrDQxQU0UiS2h9J9ZNMv4WhHhSdEgZEXjyu67+pOr2gjWnkBQlMiNsIDY4mjHPi9el6TD1X/KVpatNMDZXu6i7cvhdlfMoxMwaOD7txXrCSeIQ4peMwM8fq4e0HX4QpW2cOVwj92LMuGoJqTicRjAfEZivbspFP4EazCePF2Bek00u+piwB4rHqJIOxA9x9s3UAloWnr0YdLKIJ5jShS57K+p8EXLAEML1OK/KQOljJxy4tAFnaw8TxZ95mU/0d8= 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: List-Subscribe: List-Unsubscribe: From: Arnd Bergmann The newly added function fails to link on nommu kernels, but is also not needed there: ld.lld-20: error: undefined symbol: __get_vm_area_node >>> referenced by execmem.c >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a >>> referenced by execmem.c >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a Fixes: 57bc3834fb6f ("alloc_tag: populate memory for module tags as needed") Signed-off-by: Arnd Bergmann Acked-by: Mike Rapoport (Microsoft) --- mm/execmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/execmem.c b/mm/execmem.c index 5c0f9f2d6f83..b04cfece7356 100644 --- a/mm/execmem.c +++ b/mm/execmem.c @@ -368,6 +368,7 @@ void execmem_free(void *ptr) vfree(ptr); } +#ifdef CONFIG_MMU struct vm_struct *execmem_vmap(size_t size) { struct execmem_range *range = &execmem_info->ranges[EXECMEM_MODULE_DATA]; @@ -383,6 +384,7 @@ struct vm_struct *execmem_vmap(size_t size) return area; } +#endif void *execmem_update_copy(void *dst, const void *src, size_t size) {