From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1287B377AA2 for ; Tue, 18 Aug 2026 07:31:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787038314; cv=none; b=YP4rnkYGpcGIgRhV/HeL8Rg72roHD3ITKOO5ulJaC8PtzdhYZ3hZc2TINyoy2LLlXXQU8NRTeZt9KIqjhCnZEkWpl/hqUioJJnMkV2RTflNEidlYysdvsiQrBpxM+7oUCXNOYB5LzQPtDQr1m/TpDyy0QcbMYuC3H1UTsRqcPVI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787038314; c=relaxed/simple; bh=4MZqKvq+YW4Si8bWFyEHAq1GoadWxExliN3DGa7vQP8=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=sROOv/TVYpi9eom60HleT+5Hepd31tUG0bwwv4ztUUHCgCwfD3UtHt1IXM+SP9AUgdVw279XqUh+7iEoctwrisVMTHBQQx0NRiHeT3vvf/7jhcDf+uH7HhhcuR6AOqRmvrIM3QRfjnBiVz26h6JDJGjf3Co91CooK67sEbI7iSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=KXcvRNQw; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=lx06Z0xp; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="KXcvRNQw"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="lx06Z0xp" Received: from ams-compute-02.internal (ams-compute-02.internal [10.64.2.62]) by mailfhigh.phl.internal (Postfix) with ESMTP id 62AB4140003A; Tue, 18 Aug 2026 03:31:50 -0400 (EDT) Received: from ams-imap-03 ([10.64.2.23]) by ams-compute-02.internal (MEProxy); Tue, 18 Aug 2026 03:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1787038309; x=1787124709; bh=VofBgp1UVVxJjLuvlPPP1hBPGKApSo0zeOOZRAsVsno=; b= KXcvRNQwkIfLqneA738JVqiNrfy8aEu9CBhIQuR3/OlQQE12In3AZbg9fdvxorTj oqJlmqS7QLfiei4lbOK+cxvF8OAcIFp8M2JJsYIE/IcWHMVRh/e3C37Amk5EJ8cy +Uo6/oX3NUeZ2ky9PvhC2YfLm2z0ocYOd9f00N4bwuQYBjgJnbBBMJ6+RQBKCER7 dPLohkGaKJ7HY85rEJw+QbCD36JFfqQr2ZIiLdl2WpaBSIjRj+tOurMKm6wBPUlJ RHULgBL1Ntk1wZcHvAmCiPu36O/Gi7cdGKpwk9kkHPkmeITo35x1U31d7F7reNtu OVzNdz0ni9FuRUSxJaaOJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1787038309; x= 1787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wEo2u1XYVhkSdYYSVGAoXmQ9c+HYc4VCQM2CZs+Av6t3xg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id 2ACF432A0071; Tue, 18 Aug 2026 03:31:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: Aqm_jcT6PvEF Date: Tue, 18 Aug 2026 09:31:14 +0200 From: "Arnd Bergmann" To: "Karl Mehltretter" Cc: "Catalin Marinas" , "Will Deacon" , "Mark Rutland" , "Ard Biesheuvel" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: References: <20260817000231.21311-1-kmehltretter@gmail.com> Subject: Re: [PATCH] arm64: compat: Keep alignment address arithmetic 32-bit Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, Aug 18, 2026, at 05:22, Karl Mehltretter wrote: > On Mon, Aug 17, 2026 at 11:15:33AM +0100, Arnd Bergmann wrote: < > The 4 GiB wraparound case is possible with a rather unusual arm64 > kernel configuration, and correctly handling an individual word > crossing the boundary would require byte accesses. That seems too > contrived to justify the extra complexity here. I don't understand, what is special about the configuration? Isn't this exactly the case you were trying to address with the compat_ptr() hack? > Just to be sure by "both instances" do you mean the nr_regs > declarations in both arch/arm64/kernel/compat_alignment.c and > arch/arm/mm/alignment.c? Yes > Changing nr_regs in arm32 alignment.c would not change the generated > code and I guess probably not be backported, so that would create a > divergence with stable kernels. > > Would you prefer changing both files, or only the arm64 implementation? I would suggest doing only a small change to arm64. Arnd