From nobody Thu Nov 21 20:04:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1723538195; cv=none; d=zohomail.com; s=zohoarc; b=bGmm2jqEC7QgWYAf28SmLkEcIiBHkGIAG6+lmqaH20qjiqZgEI8vRiDH8a+Vk2HhExen+bKrr1+a+LFmzFuz05t1nMylpKiYLDLfNKGl2ukaY1qG5WI71vqkPLU8E/ANbXqO5hmHA9x+Diw7z2WKdHTaz1FuLzv3DhSEwQMkXfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723538195; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sVjJTxOBX7geMbT7t4pB/xLxxc6TKA81wDXedEbM3k0=; b=b04pcCtOi5wPH81wLLAN2xX4w8rjBG9Au2/g8CcFRjpch6TFd9IHOY6WGuQmGHa6LUZA2b7ucfC4IFbEg4KiXJLhOQ42HwJXNyOPwGjOlxDIJSvwWhj5ed67UFObssJxYxO2jVuL0lO45jXPk6xxhtf1/2zYsGnCS0tZmO+Ox+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1723538195601220.54021307621076; Tue, 13 Aug 2024 01:36:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.776053.1186202 (Exim 4.92) (envelope-from ) id 1sdn0q-00059Z-2j; Tue, 13 Aug 2024 08:36:16 +0000 Received: by outflank-mailman (output) from mailman id 776053.1186202; Tue, 13 Aug 2024 08:36:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sdn0p-00059S-W2; Tue, 13 Aug 2024 08:36:15 +0000 Received: by outflank-mailman (input) for mailman id 776053; Tue, 13 Aug 2024 08:36:14 +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 1sdn0o-00059M-PE for xen-devel@lists.xenproject.org; Tue, 13 Aug 2024 08:36:14 +0000 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [2a00:1450:4864:20::62c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 19642e71-594f-11ef-a505-bb4a2ccca743; Tue, 13 Aug 2024 10:36:13 +0200 (CEST) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a7a9a369055so404898866b.3 for ; Tue, 13 Aug 2024 01:36:13 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a80f414bef2sm49913966b.143.2024.08.13.01.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 01:36:12 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 19642e71-594f-11ef-a505-bb4a2ccca743 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723538173; x=1724142973; darn=lists.xenproject.org; h=content-transfer-encoding:autocrypt:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=sVjJTxOBX7geMbT7t4pB/xLxxc6TKA81wDXedEbM3k0=; b=UbHKGWLmZbKOL5AeuJjL4cUw5bj0FW7nCI0PeVaXVGNyqdFpkY0dn9MGhXmoYlmNBC jn3PPHkE2GD/64mP3fK+DE48Bq4sdkQdtXClLva4g8uxu4Oh4MdCGOkEbswPM8ty5ejh zskqTIXVykL5i7EqyszHBwErUvxhy4RLYDFSMYWD9f5Q7XRz1Or2kFxHT5KpsJP92vmw w/1dXy2Jb7gqPvusn5UVBGbQwqiWKQAqyo09QFs8anjiIfpa9R5k8KH74wgNw5XIFoyA IMTf7al04mxj0pGYjTIDQKXI35d1lErjDhaXuT/GjUfG9BzrsH/51UFtV03tyQw47sy9 F1uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723538173; x=1724142973; h=content-transfer-encoding:autocrypt:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sVjJTxOBX7geMbT7t4pB/xLxxc6TKA81wDXedEbM3k0=; b=cJE+0WobZPc4ni4IFPBY4EOCiOqsA65G9LD0rhlDT9VMmfJBHOSlNa3SXIWePuJrxP EfPejYnE+CNIYB0GQuyddTiBZmQ6crIt0rYuCTaYEg1JKAhfP0/Te/lSkFkFF30QxObP dtOeauKVF8bjZ5yokxubRIUXuma4CrYn9FfRAR8Ahc2qFyZ54s5pNqnhM8o7fk1xH1qw mwY/aykyOZxnGbfmTBnejQNhyrYX4EW/2nZfL+JBHMHN2HEraqabgBu2sqNSpIPspT3z Vws1aexFTjkNPThm1E5ohs4KSFFOPXK1VUlwmY+K4YuqwV8ppHm8taP+E5wBrvoKokfp AinA== X-Gm-Message-State: AOJu0Yw/w2vlg2IRpYIi3lrtImUikW8HH3EtcN+RFCHpFkSn1irKXS8i oz3aGaUWn34VxHKjlRnnkRj2lnal3Gq8P7iUJogc+kbtcw0uy4WQj7FmYULFinqKI7mJVSYlP5c = X-Google-Smtp-Source: AGHT+IGtdeZoEoyFVwnqMHDkn0kH4ag7oua/d0DTtb5BFPdtt8jnPjRdq3orm6hh3N/IlZ1XIhPrPg== X-Received: by 2002:a17:907:1c85:b0:a7a:9f0f:ab14 with SMTP id a640c23a62f3a-a80ed25893fmr182542066b.33.1723538173009; Tue, 13 Aug 2024 01:36:13 -0700 (PDT) Message-ID: Date: Tue, 13 Aug 2024 10:36:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko From: Jan Beulich Subject: [PATCH] Arm: correct FIX_LAST Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAg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eQwSHEeAWPgskBQL Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1723538196165116600 Content-Type: text/plain; charset="utf-8" While reviewing a RISC-V patch cloning the Arm code, I noticed an off-by-1 here: FIX_PMAP_{BEGIN,END} being an inclusive range, FIX_LAST cannot be the same as FIX_PMAP_END, or else the BUG_ON() in virt_to_fix() would trigger if FIX_PMAP_END ended up being used. Fixes: 4f17357b52f6 ("xen/arm: add Persistent Map (PMAP) infrastructure") Signed-off-by: Jan Beulich --- Alternatively the definition of FIXADDR_TOP could be changed, if "last" should retain its strict meaning. Possibly a guard page also wants having at the end of the fixmap range, which could be effected by changing both #define-s at the same time. --- a/xen/arch/arm/include/asm/fixmap.h +++ b/xen/arch/arm/include/asm/fixmap.h @@ -15,7 +15,7 @@ #define FIX_PMAP_BEGIN (FIX_ACPI_END + 1) /* Start of PMAP */ #define FIX_PMAP_END (FIX_PMAP_BEGIN + NUM_FIX_PMAP - 1) /* End of PMAP */ =20 -#define FIX_LAST FIX_PMAP_END +#define FIX_LAST (FIX_PMAP_END + 1) =20 #define FIXADDR_START FIXMAP_ADDR(0) #define FIXADDR_TOP FIXMAP_ADDR(FIX_LAST)