From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796122976; b=buw/zQ9U/L06pWn3WZ4eatpRcYGZXna/1jI+KFl220xGa8WakpTPMYFyzMzORDwpDoi9 ZKQMTEiSV9mDpTBEsAnOl7R6KURuCWHo+k8r0m5bsMQp694VqLuMXtJ1nCDV9jJmq3Mgw p/OQhUzbeQ6oFAJTBV79jwm8mNiK0dmxpA4NlPmRlh1XSw6H7eGgHFGgEER8xKMVVXgxy yQekvCUtV33D0jY60HgqalocJ05a6HC5cVZUWxsnl+d/t0FMAflZOTC5JVO83CuXUWmfL KLns3OyImSMhMs5j1eVl/wIcfnBuSHDWWx9qTvMIE7PEVypW7rBdKYN1R5QrDCi9OdQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122976; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=7qgofMVw15w+VeyRdfaFCF0d1AnMm5/9YHHNT2VbnWI=; b=oyQaNB33heHAcWqehzJxOSNLREBLXBb2xZDomTPPruXfVHvVPpbv10WJHUUKG3ONnZAt 3GG8+la53BWxGiVyEFa1HbEBAYuh0wLBw0IHyhPW4nG7gzBOrIhduayAuPXRL3ZoUDxJd 7cQu5SpnW6f9DVOS12S4e5GkAGuJypJEEW+jP/XkZ0nIObZVW8eudiQOiPLz2g+WuayFX QAl7HWwdnkH6yZM7Z6DtRcvezCl0kJRwGhQAFx0m/opmmrQu8cVdI2a3HnLXGNE5w6J46 fIP/gKr43qawqJrLr4aQ9ZtSXf8eaWHFWbhwnsUaR96lyorYSCqbcbmsYucK9p24DVA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nBQO8LTD; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D050E606A31A; Tue, 1 Dec 2026 11:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nBQO8LTD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DC051F000C1; Tue, 1 Dec 2026 11:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796122976; bh=7qgofMVw15w+VeyRdfaFCF0d1AnMm5/9YHHNT2VbnWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nBQO8LTDaFTPPjMwrd2SVNwVl5iX5WR4BlShwGkXt8XRFeasl+jQBlU7eFmZc6WKL 7HQVhyoMwIHnzklewHdsUPR13nYeKFYcXKuCjpf0kk35LTl8C1eJ2eTczW5NbkqZO/ Ii8wcuf7LqCDHO4YXtJlMNz6uB1gZ0RjbJ+r9RtyfU/Yrt21PjwyTuZ76/Cpsw9KhT 5TRErNDCYvUgsAdnF7GSo4/qBDxH5aSyk+t++38GLQX8dLAUDLy+lFaBhbrvNXs6nx Zf7n2GXPvWHoUcOsqEYZD9tZfZgD/ExADbXJ6Rh4S+gMFpy0PPyIDzR0KWX2tkkoaX B99AYxbXjEGqA== Date: Tue, 1 Dec 2026 13:02:50 +0200 From: Mike Rapoport To: Heiko Carstens Cc: Alexander Gordeev , Sven Schnelle , Vasily Gorbik , Christian Borntraeger , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH] s390/mm: Skip holes in identity mapping in set_memory() Message-ID: References: <20261129165327.1188117-1-hca@linux.ibm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261129165327.1188117-1-hca@linux.ibm.com> On Sun, Nov 29, 2026 at 05:53:27PM +0100, Heiko Carstens wrote: > With debug_pagealloc=on, vmem_map_init() panics with "Failed to set > kernel mapping permissions" if the identity mapping contains holes, e.g. > standby memory. __set_memory_4k() is called for [0, ident_map_size), > which may include holes, and change_page_attr() returns -EINVAL for the > first empty page table entry, which was silently ignored before [1]. > > Fix this by skipping empty entries if the range is within the identity > mapping, similar to x86. > Note: the fixes tag points to the commit which reveals this bug, but it > exists since much longer. Nobody noticed so far, since hardly anybody > uses debug_pagealloc, and also hardly anybody has configurations with > holes within the identity mapping. > > Fixes: 4634f260683b ("s390/mm: Add error handling to vmem_map_init()") [1] > Signed-off-by: Heiko Carstens Acked-by: Mike Rapoport (Microsoft) > --- > arch/s390/mm/pageattr.c | 53 +++++++++++++++++++++++++++++++---------- > 1 file changed, 41 insertions(+), 12 deletions(-) -- Sincerely yours, Mike.