From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BCB6C3601E for ; Thu, 10 Apr 2025 08:56:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.945024.1343294 (Exim 4.92) (envelope-from ) id 1u2nhS-0005on-MT; Thu, 10 Apr 2025 08:55:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 945024.1343294; Thu, 10 Apr 2025 08:55:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u2nhS-0005og-JA; Thu, 10 Apr 2025 08:55:54 +0000 Received: by outflank-mailman (input) for mailman id 945024; Thu, 10 Apr 2025 08:55:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u2nhR-0005oa-Ga for xen-devel@lists.xenproject.org; Thu, 10 Apr 2025 08:55:53 +0000 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [2a00:1450:4864:20::42d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9afa6ef7-15e9-11f0-9eac-5ba50f476ded; Thu, 10 Apr 2025 10:55:52 +0200 (CEST) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-39c0e0bc733so429419f8f.1 for ; Thu, 10 Apr 2025 01:55:52 -0700 (PDT) Received: from localhost ([84.78.159.3]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-43f235a5d31sm43637115e9.35.2025.04.10.01.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 01:55:51 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9afa6ef7-15e9-11f0-9eac-5ba50f476ded DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1744275351; x=1744880151; darn=lists.xenproject.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=kwDEF5MhYDu7HWPnI5/tLs937tzbYElVH+AbgRc+mm0=; b=uOcSHkM1oXN42fG/ya9dy0GBQCJ7q4FdcNF8sW4K2qjvn5IMVcBPwE5BewDIsjyUeA Dy89UrgFPshjqLhj5/SgbFAIb/S/+aArz46M1do9C3YxSfuvzbk8viTQ5C/W1FfT4ohT lkMgGJfMis1/Ve6A6AtX9kwEDVzXe+9c5w7Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744275351; x=1744880151; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kwDEF5MhYDu7HWPnI5/tLs937tzbYElVH+AbgRc+mm0=; b=Ugkcef+kK4KcGHdlV0p14XsSKpEa1hXhsFdOH86v9Tbu3Z8+BbMaAkQcv1CiHa6E7M YzbL3gwSWxNk/xNa+yVUPz+zlwB8xFf3X6li7bHVJrKFCrS7/PE6NCb/beU3GpP7b5vg T3f5MZtWYwnS9+ZaoBXsfGXwPcHcM20pNyjueQPURaAxA7zeG7cXkhm2MVV4mw/Zh/zd oVD5fZFWdGrVqAF2hL9xqE/4Fcro7OWPqJSTqHOi8pe0kUDu0YM7fTmi44mM/wqda98r 6rUjHEsxyr2kxDlTiVKe2gOxpwyo46aA0kEtm1GwMYzqd1cnbz46Qlabo6/t97MBw8bW s7Hg== X-Gm-Message-State: AOJu0YwqKLavRzVQCPZHk5l+DIf6g+zqCeOiITJgz7dEhXf/vOn47CKU cKspTO1nQy+ANGTkJMIwEqdhqfUa2DpPsfctdsliF/JrDWwoJrkvRv2w8UjnvRc= X-Gm-Gg: ASbGncsTjEFUwkvnqwOdiWhsjMWS/xf/o6IanMmS5FZyiHBcionVaz7E3y95eL4Rfjf 3AnQhsUhfECW9z53V5juVsm5ZdorV69Oh6Xo4PZIwPEJ0ni4v6j03nk4gg3jHKf0czJKTaIpjE3 JyjQcgs+lJtpicP3O5g2DsTuwSElMCAEJuevQbNbN/ALgvTC8rMej+YgjYLE603G89MXG+DT9z3 1uoUiXzwHkm43yFAseEzwE9Q3GH9yoHMwD3USMM+BuqOryQuDAz0FoDeotmMMTunKCGmdvHKKJQ 5Jnkb2pGJyhJoawXtXDhF5kIXOulCR0vcMyNPRnyETSXUA== X-Google-Smtp-Source: AGHT+IGxkizmzjEt3l53HtPdEtEgsA5Jb788Bs8YEvPUo2NuXsMc7D9XRkIuFF1RrDWnSXvO3gYFaw== X-Received: by 2002:a05:6000:1866:b0:391:a43:8bbd with SMTP id ffacd0b85a97d-39d8f4695bamr1518765f8f.21.1744275351568; Thu, 10 Apr 2025 01:55:51 -0700 (PDT) Date: Thu, 10 Apr 2025 10:55:50 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jan Beulich Cc: "xen-devel@lists.xenproject.org" , Marek Marczykowski , Daniel Smith Subject: Re: [PATCH RESEND] x86/EFI: correct mkreloc header (field) reading Message-ID: References: <49b9d483-824d-4247-a642-f19f5c16fd5d@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49b9d483-824d-4247-a642-f19f5c16fd5d@suse.com> On Thu, Apr 10, 2025 at 09:45:15AM +0200, Jan Beulich wrote: > With us now reading the full combined optional and NT headers, the > subsequent reading of (and seeking to) NT header fields is wrong. Since > PE32 and PE32+ NT headers are different anyway (beyond the image base > oddity extending across both headers), switch to using a union. This > allows to fetch the image base more directly then. > > Additionally add checking to map_section(), which would have caught at > least the wrong (zero) image size that we previously used. > > Fixes: f7f42accbbbb ("x86/efi: Use generic PE/COFF structures") > Reported-by: Roger Pau Monné > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Thanks, Roger.