All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: gregkh@linuxfoundation.org,hughd@google.com,llvm@lists.linux.dev,nathan@kernel.org,sashal@kernel.org
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "mm: Fix '.data.once' orphan section warning" has been added to the 4.9-stable tree
Date: Sat, 03 Dec 2022 14:54:42 +0100	[thread overview]
Message-ID: <167007568219874@kroah.com> (raw)
In-Reply-To: <20221128225345.9383-1-nathan@kernel.org>


This is a note to let you know that I've just added the patch titled

    mm: Fix '.data.once' orphan section warning

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-fix-.data.once-orphan-section-warning.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From nathan@kernel.org  Sat Dec  3 14:33:17 2022
From: Nathan Chancellor <nathan@kernel.org>
Date: Mon, 28 Nov 2022 15:53:46 -0700
Subject: mm: Fix '.data.once' orphan section warning
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
Cc: Hugh Dickins <hughd@google.com>, llvm@lists.linux.dev, stable@vger.kernel.org, Nathan Chancellor <nathan@kernel.org>
Message-ID: <20221128225345.9383-1-nathan@kernel.org>

From: Nathan Chancellor <nathan@kernel.org>

Portions of upstream commit a4055888629b ("mm/memcg: warning on !memcg
after readahead page charged") were backported as commit cfe575954ddd
("mm: add VM_WARN_ON_ONCE_PAGE() macro"). Unfortunately, the backport
did not account for the lack of commit 33def8498fdd ("treewide: Convert
macro and uses of __section(foo) to __section("foo")") in kernels prior
to 5.10, resulting in the following orphan section warnings on PowerPC
clang builds with CONFIG_DEBUG_VM=y:

  powerpc64le-linux-gnu-ld: warning: orphan section `".data.once"' from `mm/huge_memory.o' being placed in section `".data.once"'
  powerpc64le-linux-gnu-ld: warning: orphan section `".data.once"' from `mm/huge_memory.o' being placed in section `".data.once"'
  powerpc64le-linux-gnu-ld: warning: orphan section `".data.once"' from `mm/huge_memory.o' being placed in section `".data.once"'

This is a difference between how clang and gcc handle macro
stringification, which was resolved for the kernel by not stringifying
the argument to the __section() macro. Since that change was deemed not
suitable for the stable kernels by commit 59f89518f510 ("once: fix
section mismatch on clang builds"), do that same thing as that change
and remove the quotes from the argument to __section().

Fixes: cfe575954ddd ("mm: add VM_WARN_ON_ONCE_PAGE() macro")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/mmdebug.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -37,7 +37,7 @@ void dump_mm(const struct mm_struct *mm)
 		}							\
 	} while (0)
 #define VM_WARN_ON_ONCE_PAGE(cond, page)	({			\
-	static bool __section(".data.once") __warned;			\
+	static bool __section(.data.once) __warned;			\
 	int __ret_warn_once = !!(cond);					\
 									\
 	if (unlikely(__ret_warn_once && !__warned)) {			\


Patches currently in stable-queue which might be from nathan@kernel.org are

queue-4.9/mm-fix-.data.once-orphan-section-warning.patch

  parent reply	other threads:[~2022-12-03 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 22:53 [PATCH 5.4 and earlier only] mm: Fix '.data.once' orphan section warning Nathan Chancellor
2022-11-30  6:28 ` Hugh Dickins
2022-11-30 16:20   ` Nathan Chancellor
2022-12-03 13:34 ` Greg Kroah-Hartman
2022-12-03 17:41   ` Hugh Dickins
2022-12-04 15:38     ` Greg Kroah-Hartman
2022-12-04 15:55       ` Hugh Dickins
2022-12-03 13:54 ` gregkh [this message]
2022-12-03 13:54 ` Patch "mm: Fix '.data.once' orphan section warning" has been added to the 4.14-stable tree gregkh
2022-12-03 13:55 ` Patch "mm: Fix '.data.once' orphan section warning" has been added to the 4.19-stable tree gregkh
2022-12-03 13:55 ` Patch "mm: Fix '.data.once' orphan section warning" has been added to the 5.4-stable tree gregkh

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=167007568219874@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.