Message ID | 20240924050351.675925-1-senozhatsky@chromium.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 B728DCF9C6B for <linux-mm@archiver.kernel.org>; Tue, 24 Sep 2024 05:04:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B8A06B0085; Tue, 24 Sep 2024 01:04:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 341706B0088; Tue, 24 Sep 2024 01:04:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E22C6B0089; Tue, 24 Sep 2024 01:04:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id F2EBD6B0085 for <linux-mm@kvack.org>; Tue, 24 Sep 2024 01:04:08 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A0D1A417A5 for <linux-mm@kvack.org>; Tue, 24 Sep 2024 05:04:08 +0000 (UTC) X-FDA: 82598440176.27.5D7230C Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by imf27.hostedemail.com (Postfix) with ESMTP id D6AEF4000F for <linux-mm@kvack.org>; Tue, 24 Sep 2024 05:04:06 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=gc4T9SfS; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf27.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.179 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727154115; 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=rLJ5WI969Bj6yA6sCRRbXyrdJGNqv2GF6Kj0cnNoy4A=; b=N9BK3rqb5vdhaVBpxedj0RlbgMUxJ6wijVZ/Ly7NYCNMo8DRJo1iWuiuP+ME7CnYOyUCbQ flmDzeRgVdq2YV+mLbGIXCrwpKy6wMenXUdKk0NdDFvgt3cogugR5EKkv8xCAyrLcn6Gf8 IQcO7bG3KSv7CsLLb0QluVeTIE61jmg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727154115; a=rsa-sha256; cv=none; b=wxBlgRL4mTV01E5zK1+/QOFGW/PHiII6ZLAHBBlL50Y0oPZ/n51ELAbieaYz6NRMR9htmB vLxSQNDDeN7q7kHnBHUC6/abJ3H3L9x9rA6LTKeGuLhrkR0CdGGHQtN3I8iIl293+JWtMo hghcyLcZADoN76e3RtHVb/Cs/kZRtnU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=gc4T9SfS; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf27.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.179 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2054e22ce3fso50364575ad.2 for <linux-mm@kvack.org>; Mon, 23 Sep 2024 22:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727154245; x=1727759045; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rLJ5WI969Bj6yA6sCRRbXyrdJGNqv2GF6Kj0cnNoy4A=; b=gc4T9SfSVzN8pP4Bq5bdQyeG+vSGSIlJ8DeKaeSZOk6LHmQv5D/OJk+lT0ZI6GqgvN wAxrn3FAfaSPCpnUsLZC4oC+bgXkWeqvykZZqt0vREP4cJTh36nnMst3JbG0KXgkJyFM KK4akS1oaFyT9FWXlUALj1foVTHiZt/8WwldE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727154245; x=1727759045; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rLJ5WI969Bj6yA6sCRRbXyrdJGNqv2GF6Kj0cnNoy4A=; b=FHtU5GcPXRmV4WVbraT8vKFFB+OyFBj+L7s09Bqp1sSIvj2+Q8iBP4yMvNY8N8O4FL YcW48h5pV3KDhFwS5vvH2k3+Cly5PG4lqqsrKLF42Ifa2xFH2eLBTQDVT22KOpLNMdwb l95eDUDJqFq1/MVywbchu2IRzwUaNenzc8KJw6csMkQ/lcsK3D3LMPewxZCIUxrGN+mP cBpgZAA58+akYXI0sgm+SDP8a87G42loJWRhn2iA1pK82R0bjzZpDJJgk9ZeAyH+2ktq PJse/hILLckfA4zFUufmQGeUJUew9xbxVXFQAAX8hn3suPzcdEfWs9v0XL6AVwFDbnhL CJ3Q== X-Forwarded-Encrypted: i=1; AJvYcCVBeYyYLcYCZKLfbDiVyB36STnFsStYxX7V/MoNS2FJ+djCu5TzJJYdRR1udkWSHs5Jz4v09bS73Q==@kvack.org X-Gm-Message-State: AOJu0YyDU+y/JMp0ojtjWMhNgAWEeN4kny31in6yMxxcrmF/UeuFIbSJ RKxIaStxvMP/f6Wcw2wFYLvk06S5GUf9MF7N21N3SFtcRpDYwnodVGOp225dUw== X-Google-Smtp-Source: AGHT+IEmqF59X1U6RjeV0z7JoukgmX889Wfbwd82PVcwrsFHNG4CW+23hMpir0OupyftkvM1cYIyQg== X-Received: by 2002:a17:90a:ac02:b0:2c9:a3d4:f044 with SMTP id 98e67ed59e1d1-2dd7f3e13b5mr18529586a91.11.1727154245492; Mon, 23 Sep 2024 22:04:05 -0700 (PDT) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:93d1:1107:fd24:adf0]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e058f0a295sm518053a91.13.2024.09.23.22.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 22:04:04 -0700 (PDT) From: Sergey Senozhatsky <senozhatsky@chromium.org> To: Andrew Morton <akpm@linux-foundation.org>, Andrzej Hajda <a.hajda@samsung.com> 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: [PATCH] mm: do not export const kfree and kstrdup variants Date: Tue, 24 Sep 2024 14:03:42 +0900 Message-ID: <20240924050351.675925-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D6AEF4000F X-Stat-Signature: 9881xrw948kyb89co5b5bdq1i5zixjwc X-Rspam-User: X-HE-Tag: 1727154246-703765 X-HE-Meta: U2FsdGVkX19dTiEnQYBarR1aB6CuvMi6O5rYjOjUuhehZpGg8OxdvvHts3JcCQecQegMEyb1ho19SqgN9BQjwtVJ/iHGgdSXR0aOmMWRNaysxtt7pj0VoEpGK1t9E4OfHyL5SHSFI4He9F/djwSvRHmUg1cwu6HTmscW5rD7qgh1DJmTy1mkCU4GdcZENSWGg+dzTJBAy4qyiZMsx9S3h8fbo4S+cx6fiA2OHx9pGNnlWW7Ipg/gGos21hoIC5SGKNU4SW7hQV7GxEz3ueOSsnn2KDdRM7hcTW0pWF0/2XkqNp5MH5oQMkxYPvHmPY1p/4O2haqXil/zjWktUR824ZuZrwAQWDt+Aq8mGSJ7ZLFrEaa5ry2+cPMIq3/9MEW34iHzD/UGq1ZETls1BbFGW2y6ALKDvfkAgWs0BfPX79ntl8SThDuMhjElCL904JGeKWFILgye7gNEzvh7GIGFuLzWdWrfxyq9fQ04w4S6L7UvpXz6TLwvHK7ApUeGDC8lfosE0yUGbjh/4Ze2Xh9JPUD13/iGceKULGgTHbTbjb8hvZYcHBPMfd87dH8Ex0mI12hSeiX0GJ5kcH8X5ZBq+J6Tzx2Iq4MDtcxO8A8KRQ4Fnu8BmtsAZjDnZPfLU/U+1+D+XXZuDy84gOOrN2K1O+bwx+qnC21kpfs50YuodbSlrTq9wKevl0rDuYyZhKVnBWYUTXieNFGPtFBLzZJq+rOlG5nKdkg5e++uRWAb6KcKdh5B7OcwYOgNTXEiEhzWO1W8X48d49WzOSnw4SYHhNu82/fxxg1U9uK6xJ+o+xwWCmLNt1xYYCLrB22mc7tnF/2LMRjh/VctPXKrnTQX1BASwanWdasUbXW09SofyrP9mO+FR35Spklfef2SJxE7clk5bhAsSBI6wxUojSdDDJIZfhFnvk18DUD+bsN2rruGmVUYQ8oxPYfcOclBkOpcdhURj/thXuQ+EO9cdhH JFldVDEM uP6KOQwwjSJnpKVnB/Nxgdts/pyJHCRg8UVG1plQTAbfwtNVdgnWSAUpvqIxDP6RskIU2auUVQ+JqL6G2ajhxh4vyXOHyhtiZ0yY80VkJCZbg8MwXizDScQAD72Yu5rVeveDOZBIRlfDsMBeqp0GCqUdq/P0h+ldmAGCfHLkFpUUrw5lEJ/nGbvQR9RanHzNcidBWhHYvbecN1T71Z3tJDHjR4uGx5q/PzCa01zdj0p25mCqxa+8jyU2CojPuAN4IxGAX3rDXLV40EhmD+SeJeL5vTfpaQq1Dll5dSj4vjZFaIH/uEtPiZKr8PuYfOfuPJB+xf01HEsPyvzxpnGmpCLavLgMZGJsltAOv7OB/btmn7XeHgSke3obrhA== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: do not export const kfree and kstrdup variants
|
expand
|
On (24/09/24 14:03), Sergey Senozhatsky wrote: > 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. ... and of course I forgot to commit the kstrdup_const() part. Let me resend.
diff --git a/mm/util.c b/mm/util.c index 4f1275023eb7..aecdc04652c5 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
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 | 1 - 1 file changed, 1 deletion(-)