From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Andrey Skvortsov <andrej.skvortzov@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [PATCHv2] mm: do not export const kfree and kstrdup variants
Date: Tue, 24 Sep 2024 14:08:37 +0900 [thread overview]
Message-ID: <20240924050937.697118-1-senozhatsky@chromium.org> (raw)
Both kfree_const() and kstrdup_const() use __start_rodata
and __end_rodata, which do not work for modules. This is
especially important for kfree_const(). Stop exporting
these functions, as they cannot be used in the modules.
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
mm/util.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/util.c b/mm/util.c
index 4f1275023eb7..24dadbd5727a 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -42,7 +42,6 @@ void kfree_const(const void *x)
if (!is_kernel_rodata((unsigned long)x))
kfree(x);
}
-EXPORT_SYMBOL(kfree_const);
/**
* kstrdup - allocate space for and copy an existing string
@@ -86,7 +85,6 @@ const char *kstrdup_const(const char *s, gfp_t gfp)
return kstrdup(s, gfp);
}
-EXPORT_SYMBOL(kstrdup_const);
/**
* kstrndup - allocate space for and copy an existing string
--
2.46.0.792.g87dc391469-goog
next reply other threads:[~2024-09-24 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 5:08 Sergey Senozhatsky [this message]
2024-09-24 6:14 ` Sergey Senozhatsky
2024-09-24 6:43 ` Christoph Hellwig
2024-09-24 6:56 ` Sergey Senozhatsky
2024-09-24 7:02 ` Christoph Hellwig
2024-09-24 19:45 ` Christophe JAILLET
2024-09-24 17:41 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240924050937.697118-1-senozhatsky@chromium.org \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=andrej.skvortzov@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox