From patchwork Wed Dec 18 01:32:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eslam Elnikety X-Patchwork-Id: 11299287 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59343109A for ; Wed, 18 Dec 2019 01:34:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3205921582 for ; Wed, 18 Dec 2019 01:34:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="Xbbw6MYI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3205921582 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihODy-00061n-Ag; Wed, 18 Dec 2019 01:34:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihODx-00061M-13 for xen-devel@lists.xenproject.org; Wed, 18 Dec 2019 01:34:01 +0000 X-Inumbo-ID: 726e30c4-2136-11ea-b6f1-bc764e2007e4 Received: from smtp-fw-33001.amazon.com (unknown [207.171.190.10]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 726e30c4-2136-11ea-b6f1-bc764e2007e4; Wed, 18 Dec 2019 01:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1576632833; x=1608168833; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=wFPcKATxYt8ii+z7WoVMDj3MEqdBz73OudrsmUok3lw=; b=Xbbw6MYIo30eQJ9xtvengxtNGBAm8pOHoDy+mMgwR5aonDVFBC9+rsam kpQIQ4/khA/IlXedOZvNS32pr5eT6GHgAAUEkKrHOxkNFJSgHyGUKZBVj Yp09gPmrevUjnb5CnPhSano/xS6nr3nVx9glD25P3p86VkNI7fxdBITW9 Y=; IronPort-SDR: RuYN8gQ0d0tJ2TdaItZcvEuBkJb9HdfJz0WkorcmT5Kd8/qbGdZAS6Lv18RGUaNxJ6zmoxiZQJ ELtg+N5galBw== X-IronPort-AV: E=Sophos;i="5.69,327,1571702400"; d="scan'208";a="15519648" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-f14f4a47.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 18 Dec 2019 01:33:50 +0000 Received: from EX13MTAUEE002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-f14f4a47.us-west-2.amazon.com (Postfix) with ESMTPS id A44A6A2A15; Wed, 18 Dec 2019 01:33:49 +0000 (UTC) Received: from EX13D08UEE002.ant.amazon.com (10.43.62.92) by EX13MTAUEE002.ant.amazon.com (10.43.62.24) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 18 Dec 2019 01:33:37 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D08UEE002.ant.amazon.com (10.43.62.92) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 18 Dec 2019 01:33:37 +0000 Received: from dev-dsk-elnikety-1b-cd63f796.eu-west-1.amazon.com (10.15.63.96) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 18 Dec 2019 01:33:36 +0000 Received: by dev-dsk-elnikety-1b-cd63f796.eu-west-1.amazon.com (Postfix, from userid 6438462) id 53C8EA0141; Wed, 18 Dec 2019 01:33:36 +0000 (UTC) From: Eslam Elnikety To: Date: Wed, 18 Dec 2019 01:32:58 +0000 Message-ID: <3c4b61a2888f01b9344fd302603c56a8739a1c71.1576630344.git.elnikety@amazon.com> X-Mailer: git-send-email 2.16.5 In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v2 3/4] x86/microcode: use const qualifier for microcode buffer X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Eslam Elnikety , Paul Durrant , Jan Beulich , David Woodhouse Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The buffer holding the microcode bits should be marked as const. Signed-off-by: Eslam Elnikety Acked-by: Jan Beulich --- xen/arch/x86/microcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/microcode.c b/xen/arch/x86/microcode.c index c878fc71ff..4616fa9d2e 100644 --- a/xen/arch/x86/microcode.c +++ b/xen/arch/x86/microcode.c @@ -86,7 +86,7 @@ static enum { * memory. */ struct ucode_mod_blob { - void *data; + const void *data; size_t size; }; @@ -744,7 +744,7 @@ int microcode_update_one(bool start_update) int __init early_microcode_update_cpu(void) { int rc = 0; - void *data = NULL; + const void *data = NULL; size_t len; struct microcode_patch *patch;