From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796240925; b=0OZ4yfwx6jw2fb2CQWMNqTBXCvfyInB0KD02RrTEVDy8ry890HUu8TNsL18TMwaryaJS Q8cQr+K0ba0jNqk3A04PSPcdokOGVpguG+dbtkPatRaaxoI3YHPRT7PUEBX6/O3e1q7c9 N6DjoLY0HjuQO2OeSZY61QY1KGOLaPtKCnc2cLLKBXNOV9dEoXVLLMkWuWG1yPLhPiRbL uOlFF9tuhhT+HAcYS93jjWRQlFZGJd1LiThi8wrIaohOhVdzG//aepbL7/YEMdSqybeyw I6B/eZ9bEpj/T920RzKRcpX+R6JYXg1TH2xgEG05BAAh98AfVcHxNSzpAfPHRMesd4w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796240925; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:In-Reply-To:References:Organization:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=76h0XKxypxm3EKnSvrg6vIfd0lYVLzZ4oUu2ZbkvaPg=; b=21U9RtDcPCPTbw523VBhWhZmZl56oQzBfF3TA+jPwn8k/2yDeLT4joeT5BjQUS/TpaTl n70iXwf96LrohFfbfRPIfLkTQtExxwUibaJK8g9hTttTp9PknpOjSmfNhnY4molLdOcbQ 0jItSGPu8GUKWlqqD00t1ZWpXBoSBtdC+RIlhMnOQr6kWSvdCLNcA+baRGM/tgTYR+WWj y+NqyPuN0znbY3gTOeUXKyCuHtzeTUHOZg7LskdOV6eAFH/C4Eq8sAh70Ken3dxvPiwhE HIHMLR21A+nsXNRYd4gbuD0t9u/nuzH9bJZolr6TtBoQgQf7xjEc0st10uIhD3UFi2g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=jYYq1S3G; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=XFSsW65S; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60BA0606A32C for ; Wed, 2 Dec 2026 19:48:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 60BA0606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=jYYq1S3G; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=XFSsW65S Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B2Iu2Ue1910105 for ; Wed, 2 Dec 2026 19:48:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 76h0XKxypxm3EKnSvrg6vIfd0lYVLzZ4oUu2ZbkvaPg=; b=jYYq1S3GRZHefD5/ 9yzh2DXZhF2f76im/kCz98FBsJ3ARrjJmtNWZbKtsIwnTr7kA/ybgQI/sf4bk45I d9h9z55dVmvOD1mR7BJupEaRm8wnU4bUr0gYCYine3aFuqZDeI4Gq/sHtemRHodP FGD4WIkEeRAqhYqUBFRPpAuHngvBZsJzp7gcL4XlTlOL9Tyo+kgWoLmZmWFPqqEM aRuhbZvHAAJfM8bBObaEWUb9+mXLDt0VPp8eyyWksRHl4PKblUI/IeiaJ5DTXYnq 1ClPOZQDbkWaTX74W5F5/WmGq63KD6tvfYT+LvY5qXSj3odf56fOVIeaPHPAT0d7 +ZLVeQ== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jaj4323ca-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 19:48:43 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-33713e5e6daso19828493eec.0 for ; Wed, 02 Dec 2026 11:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796240923; x=1796845723; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=76h0XKxypxm3EKnSvrg6vIfd0lYVLzZ4oUu2ZbkvaPg=; b=XFSsW65Sc0eEAH2B2uSY46mjkBkGl7K5OzGyXLvRmCGUqHwXk6kwQuZIi5YsU20Hb/ Ur5E/TdG0jZLXuy/Ed9dcSrX2+UOdn3z49wPsnZpozIX4DQTM2fJGvKaC1oYkj2noZ39 crD1tfTxSCFV4Alk0GSFRAPS5/StmsoVipnpIS6/tAluDOH05sMvs8Wogs4gFRy2ncQX wnuBb8B3f6RWhtCrV27vKVdzg+DEQikiVuk54wfwKN0LqGgWi7d7DV8GnLG1hrcb82/S W58ql72YveCtJlgBGCCV8C2nwtDaJ71MFyaXhIIvDemEeqPzr/uFYocUpQItZmYpeGo6 B0rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796240923; x=1796845723; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=76h0XKxypxm3EKnSvrg6vIfd0lYVLzZ4oUu2ZbkvaPg=; b=yu4h7IYnRUjQdLFExnhVaf+EVGDoqLkbALwIuLPNOOuu1KN+TGndJj00MhxR/Wp0xw ZoBYzw58U4XN/HicfzFz8iMY2JAAdrWRU2PzXJz3tnjlZ7B49T8URGvVak+iaoA5se3Z vBG7fPEXW6UyyKYvmQo2gLuKGd66U3358FwYch2NflUBB2uismEwmnKNSl+NfJJ8kZy9 PDdP0PpG1LYV7a/Cqps/+u7Qf2Wu8Ct0rmlMDTM0pzOJVQqxR5ie+vsu2Z7j81/2OCvu n08398OjrLmpEczR8ckHdLNrmXXfctPNntqACsmglZfyidQ6cqaus2irQWFe0MVqwE9b 09Hw== X-Forwarded-Encrypted: i=1; AL+hErEZO8Lc0kv+S32Mq73HO29s8Ut4HZOv+jRD1h/p1axTahVPfHfoWaQtbXr+ccTM1oFjaPI4h+xAG9Y=@vger.kernel.org X-Gm-Message-State: APuU4Z8pHRAUGVSkozgSIklM+P++ZYdAnuZHggxU7gpYd9XGIGbUy6nb RXgC1NO70H5M05TyFlbaQA1/0Xc5EfeRnCLxZAmhSFxdpzAPFUQh5fZZ8/UPaAl1n/5ILKwBROw 0yj1akvmNRux2Ah6X+CBltq7udDwywmV6+CD+caaxAzwLISS9H2EZTpzCNwmR0MI= X-Gm-Gg: AZFdTZeQp1qafzuANSlabAvHBcWuD5uNBYewj3DEr84OMLlrHHKHKfu9nQF1W0NwM4a GGeqJzgGgiSFwOO0oWFggYeDJAGP8E2xMahDuZsgeSvHm2QLVWAInyksis/ac0EMo73576czSg1 K4wtP8RElR9jOTfIQaxF8VDgIOkP3hgusOY9f1FRGxkU2lVs01wb6ppVmynW+hf9ZxmlIl1I3fi ipN5FsHmFzUFbpbq5K71Uuao1EoDduD4mop2rTZGQARflEUkjuSKk64hl2v2XyhNzL3OE4QE4ib EBeq6kuwKnWpDVQ28ou/bIMyWda2qht6WyE4QFQu09ngzjOB37Ocat8KNy+5llIexEWb74rj/jF LZKTZKoiYTGufLju+R0JVCX47gUvhF27O722SPI5AGozmfOf406XXh1xEsnQNEFzp8j4QoXQpL/ AhFx2VuDuytBFTOV1fDn0V32aEGkc= X-Received: by 2002:a05:7300:bf11:b0:36a:15cb:30bf with SMTP id 5a478bee46e88-3856fe5971amr42823164eec.13.1796240922785; Wed, 02 Dec 2026 11:48:42 -0800 (PST) X-Received: by 2002:a05:7300:bf11:b0:36a:15cb:30bf with SMTP id 5a478bee46e88-3856fe5971amr42823124eec.13.1796240922096; Wed, 02 Dec 2026 11:48:42 -0800 (PST) Received: from localhost (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386c7c62a91sm83117845eec.17.2026.12.02.11.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 11:48:41 -0800 (PST) Date: Wed, 2 Dec 2026 11:48:37 -0800 From: Jonathan Cameron To: Jason Gunthorpe Cc: Alexandre Ghiti , Albert Ou , Ard Biesheuvel , Catalin Marinas , Jonathan Corbet , Ilias Apalodimas , Justin Stitt , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, Mark Rutland , Bill Wendling , Nathan Chancellor , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Shuah Khan , Will Deacon , linux-integrity@vger.kernel.org, patches@lists.linux.dev, Piotr =?ISO-8859-1?Q?Kr=F3l?= , Ross Philipson Subject: Re: [PATCH v3 03/11] efi/libstub: Have efi_kaslr_relocate_kernel() handle extra_size Message-ID: <20261202114837.00004961@oss.qualcomm.com> In-Reply-To: <3-v3-22d1a1eb7d2e+17de-arm64_drtm_jgg@nvidia.com> References: <0-v3-22d1a1eb7d2e+17de-arm64_drtm_jgg@nvidia.com> <3-v3-22d1a1eb7d2e+17de-arm64_drtm_jgg@nvidia.com> Organization: Qualcomm X-Mailer: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32) X-Mailing-List: linux-efi@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-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA3OCBTYWx0ZWRfXzHtUZGSCHbvH x2T7UrpXraIe6A+lKyQohdcI2ipen/424b3orOCqV9MVssW1cGrWm+stb/zKL2bf7wx8Yc/tzXS 9fPEvr09WPQBB/Wa9Hro/83NMdvOPVOY8AqTHGl2FKnIrxZ/4QGU/wC3zCyViTZM/kKIfKoGR0S DJDW2T+HsGEtVCJK9rYQ+MqS4zVb1b0wj8WZWQXwmb7BFB7MNOMpTjgBn7pBNiuSYVYptu+c7mM 2A+xf1njl6sNH0FSdxC/P7fybcIp5yOPf1ASBwl23jD9xa8Qg1JOcBM6ahY0+EhzzfGkCQUPbT4 lXzR+o9Pc50+vRdgEvQZ4hsyc1Pkbrw0D6vocSX3ff4SsXjALsoYiWWwELcn/6n1OrFScZK+kM6 omrIHmvx7vocEX52FFmB1rJZtoV7zRU0E2GI+4LoOuLTMUDhtK/q0y9rRGwIbFMuP4kqHIDlEHY b8ZeV9/HYkbsLlwOwxQ== X-Authority-Analysis: v=2.4 cv=X7nHu2Te c=1 sm=1 tr=0 ts=6b10761b cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=kj9zAlcOel0A:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=Ikd4Dj_1AAAA:8 a=EUspDBNiAAAA:8 a=Jw3Q2Ysju7ncA0wcSGUA:9 a=CjuIK1q_8ugA:10 a=ZXulRonScM0A:10 a=zZCYzV9kfG8A:10 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA3OCBTYWx0ZWRfX0H/vneU8KWin G5G2FxV8t7hMjCEFbRyjI6AuMrjONjr7Ll4gqV8Wu+ODfHGOzUxYt4B0C0REixBXnTjVp/WZfE9 nU5dJuG7kLSXQxo1jYSPo88UZ/NMnRE= X-Proofpoint-GUID: K58gCHFpRRomJvRBaM-bycNb4eIKpe6Q X-Proofpoint-ORIG-GUID: K58gCHFpRRomJvRBaM-bycNb4eIKpe6Q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_05,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 adultscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 spamscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020078 On Fri, 20 Nov 2026 13:51:56 -0400 Jason Gunthorpe wrote: > extra_size is additional memory required that must be immediately after > the image. > > There are three possibilities here, each a little different: > - relocating for kaslr, just request extra_size like the zboot flow does > when allocating the random placement from EFI > - in place, attempt to allocate from EFI precisely after Image to > confirm nothing weird is there, failing that > - like any other error with the in place EFI location allocate > non-randomly with extra_size included > > Adjust things to use a kernel_allocsize which is >= the memsize computed > from the image_info. > > Signed-off-by: Jason Gunthorpe Comment on patch 2 follows through. Assuming you'll either resolve that or convince me otherwise, Reviewed-by: Jonathan Cameron