From patchwork Wed Oct 25 18:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1855180 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SFy8c1PMFz202k for ; Thu, 26 Oct 2023 05:27:44 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qvibL-0004Kv-O1; Wed, 25 Oct 2023 18:27:32 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qviam-0003wY-S1 for kernel-team@lists.ubuntu.com; Wed, 25 Oct 2023 18:26:58 +0000 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 3481A413B6 for ; Wed, 25 Oct 2023 18:26:56 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-778b5354c7bso10865785a.1 for ; Wed, 25 Oct 2023 11:26:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698258415; x=1698863215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zg1rKxYksQBzgJtXp5o5TrB7O4Est+Aoi/97a2uD1K4=; b=DrWLW1GRhOO9JMOHULjjK0t3/4MDCjgmIWs7pRNOm0GNb93M/b4yoJilRcUwVcDoGF eVKpRcRAzvrUerdo1z9lvpZqg0kOgGtCs7ONDPXSPjF4Y3eBNQ4bWdzAzTIAlJ9L/mqw ly4GFzzHN0zjE1KLgr2qstQY0NlN0xugZbmGWg/PV5N5vQEzzRP7nK18KJx7f1qmStq4 aY+BQ+VAUyGFGmw/ox2LJXMkUaW2Hjbknjn2guRNOQB4FWaIxqZzSjAyQJmQiXhYDhTE 31a3iMgzTszBaiSBMDDABEjfEwj8/RWyLT4SGfAWVSzKdwd67hFNuzStGu4oPT4h2tma cuFA== X-Gm-Message-State: AOJu0YwmdS3yaRGh9Uv6a/WbIEqFv2DZzcJ1uKgjUZg0TR9pC3nGX2rn BreHYIbv/q27VgMRVQHHIXvj1PPgYbrCKVYC6FEJajYi6AW7Deh+Vvz2Z8XUnonGi4gzoeLdT4G tveRYKhUoOK06FiWFgInbUUUwklDjK4ZOwbstajV4lahOU0kpww== X-Received: by 2002:a05:620a:1aaa:b0:774:389f:8358 with SMTP id bl42-20020a05620a1aaa00b00774389f8358mr18634167qkb.52.1698258415278; Wed, 25 Oct 2023 11:26:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5GB/5XUSBWOS/+nV7IFxXS0ucSYFrjRr7Vf3BdCKWhyKNYjYh94RKIN3iny/6s7I8NyEW6w== X-Received: by 2002:a05:620a:1aaa:b0:774:389f:8358 with SMTP id bl42-20020a05620a1aaa00b00774389f8358mr18634149qkb.52.1698258415009; Wed, 25 Oct 2023 11:26:55 -0700 (PDT) Received: from smtp.gmail.com (h69-130-246-116.mdtnwi.broadband.dynamic.tds.net. [69.130.246.116]) by smtp.gmail.com with ESMTPSA id z13-20020ae9e60d000000b00774652483b7sm4366666qkf.33.2023.10.25.11.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 11:26:54 -0700 (PDT) From: John Cabaj To: kernel-team@lists.ubuntu.com Subject: [SRU][focal-gcp][PATCH v2 1/1] UBUNTU: SAUCE: (no-up) x86/mm: Fixing notify_range_enc_status_changed incorrect argument Date: Wed, 25 Oct 2023 13:26:52 -0500 Message-Id: <20231025182652.143307-2-john.cabaj@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025182652.143307-1-john.cabaj@canonical.com> References: <20231025182652.143307-1-john.cabaj@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2040337 ac3f9c9f1b37 introduced change to notify_range_enc_status_changed() to accept page size instead of number of pages, but function was not updated. Signed-off-by: John Cabaj --- arch/x86/mm/mem_encrypt.c | 2 +- arch/x86/mm/pageattr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c index aa912f6e525b..2bab25cdd026 100644 --- a/arch/x86/mm/mem_encrypt.c +++ b/arch/x86/mm/mem_encrypt.c @@ -391,7 +391,7 @@ static int __init early_set_memory_enc_dec(unsigned long vaddr, ret = 0; - notify_range_enc_status_changed(start, PAGE_ALIGN(size) >> PAGE_SHIFT, enc); + notify_range_enc_status_changed(start, size, enc); out: __flush_tlb_all(); return ret; diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 2468ef8c983e..5631fe734d8a 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -1984,7 +1984,7 @@ static int __set_memory_enc_dec(unsigned long addr, int numpages, bool enc) * Notify hypervisor that a given memory range is mapped encrypted * or decrypted. */ - notify_range_enc_status_changed(addr, numpages, enc); + notify_range_enc_status_changed(addr, numpages << PAGE_SHIFT, enc); return ret; }