public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Sasha Levin <sashal@kernel.org>,
	gor@linux.ibm.com, jpoimboe@kernel.org, masahiroy@kernel.org,
	linux-s390@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 09/24] s390: expicitly align _edata and _end symbols on page boundary
Date: Mon, 16 Jan 2023 09:03:44 -0500	[thread overview]
Message-ID: <20230116140359.115716-9-sashal@kernel.org> (raw)
In-Reply-To: <20230116140359.115716-1-sashal@kernel.org>

From: Alexander Gordeev <agordeev@linux.ibm.com>

[ Upstream commit 45d619bdaf799196d702a9ae464b07066d6db2f9 ]

Symbols _edata and _end in the linker script are the
only unaligned expicitly on page boundary. Although
_end is aligned implicitly by BSS_SECTION macro that
is still inconsistent and could lead to a bug if a tool
or function would assume that _edata is as aligned as
others.

For example, vmem_map_init() function does not align
symbols _etext, _einittext etc. Should these symbols
be unaligned as well, the size of ranges to update
were short on one page.

Instead of fixing every occurrence of this kind in the
code and external tools just force the alignment on
these two symbols.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/s390/kernel/vmlinux.lds.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index b508ccad4856..8ce1615c1046 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -80,6 +80,7 @@ SECTIONS
 		_end_amode31_refs = .;
 	}
 
+	. = ALIGN(PAGE_SIZE);
 	_edata = .;		/* End of data section */
 
 	/* will be freed after init */
@@ -194,6 +195,7 @@ SECTIONS
 
 	BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
 
+	. = ALIGN(PAGE_SIZE);
 	_end = . ;
 
 	/*
-- 
2.35.1


  parent reply	other threads:[~2023-01-16 14:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 14:03 [PATCH AUTOSEL 5.15 01/24] scsi: iscsi: Fix multiple iSCSI session unbind events sent to userspace Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 02/24] cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 03/24] kcsan: test: don't put the expect array on the stack Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 04/24] cpufreq: Add SM6375 to cpufreq-dt-platdev blocklist Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 05/24] ASoC: fsl_micfil: Correct the number of steps on SX controls Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 06/24] net: usb: cdc_ether: add support for Thales Cinterion PLS62-W modem Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 07/24] drm: Add orientation quirk for Lenovo ideapad D330-10IGL Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 08/24] s390/debug: add _ASM_S390_ prefix to header guard Sasha Levin
2023-01-16 14:03 ` Sasha Levin [this message]
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 10/24] perf/x86/msr: Add Emerald Rapids Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 11/24] perf/x86/intel/uncore: " Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 12/24] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 13/24] cpufreq: armada-37xx: stop using 0 as NULL pointer Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 14/24] ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 15/24] ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 16/24] spi: spidev: fix a race condition when accessing spidev->spi Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 17/24] spi: spidev: remove debug messages that access spidev->spi without locking Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 18/24] KVM: s390: interrupt: use READ_ONCE() before cmpxchg() Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 19/24] scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 20/24] r8152: add vendor/device ID pair for Microsoft Devkit Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 21/24] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 22/24] platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 23/24] lockref: stop doing cpu_relax in the cmpxchg loop Sasha Levin
2023-01-16 14:03 ` [PATCH AUTOSEL 5.15 24/24] firmware: coreboot: Check size of table entry and use flex-array Sasha Levin

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=20230116140359.115716-9-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox