From patchwork Wed Jan 22 22:30:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eslam Elnikety X-Patchwork-Id: 11346475 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 BC9DE1580 for ; Wed, 22 Jan 2020 22:32:35 +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 993082465A for ; Wed, 22 Jan 2020 22:32:35 +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="txEajif6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 993082465A 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 1iuOXI-0001Oq-Mf; Wed, 22 Jan 2020 22:31:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iuOXH-0001Nz-Cb for xen-devel@lists.xenproject.org; Wed, 22 Jan 2020 22:31:43 +0000 X-Inumbo-ID: f6d3de30-3d66-11ea-9fd7-bc764e2007e4 Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f6d3de30-3d66-11ea-9fd7-bc764e2007e4; Wed, 22 Jan 2020 22:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1579732303; x=1611268303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=RXakqAv07gSm+Bln1odnWQRor3fccRpXMFbY/j5+SBw=; b=txEajif6CQjSSYdZvstUVes6JQJU9vwRZNjDSr7XdhlGR80X1MStj/xK NUhrLjqgDF3+9reUxi34wkF/7GH527RSSSUAgX9+EaTVvv2Q1IFZN8cMy hI/OA/ZRrMwkmGuuBHiIyN6jSE9aQljpanB8rr64Uw+5/S2dLbvw4cqdg Y=; IronPort-SDR: efg0gYaZ8OlIjBJ/8AewE/qThhw//qZO+pqJiTRKCvqOm3udt/Zm0f2L7MOwArpGLDwpYicBDd 9EWVODbL0zpw== X-IronPort-AV: E=Sophos;i="5.70,351,1574121600"; d="scan'208";a="20473235" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-d0be17ee.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 22 Jan 2020 22:31:23 +0000 Received: from EX13MTAUEB002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-d0be17ee.us-west-2.amazon.com (Postfix) with ESMTPS id AC1AAA248F; Wed, 22 Jan 2020 22:31:22 +0000 (UTC) Received: from EX13D08UEB003.ant.amazon.com (10.43.60.11) by EX13MTAUEB002.ant.amazon.com (10.43.60.12) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 22 Jan 2020 22:31:22 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D08UEB003.ant.amazon.com (10.43.60.11) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 22 Jan 2020 22:31:21 +0000 Received: from dev-dsk-elnikety-1b-cd63f796.eu-west-1.amazon.com (10.15.63.96) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 22 Jan 2020 22:31:21 +0000 Received: by dev-dsk-elnikety-1b-cd63f796.eu-west-1.amazon.com (Postfix, from userid 6438462) id AA3E1A013F; Wed, 22 Jan 2020 22:31:20 +0000 (UTC) From: Eslam Elnikety To: Date: Wed, 22 Jan 2020 22:30:46 +0000 Message-ID: <934b1959c740f9ee401f2740478d61cdaa138c72.1579727989.git.elnikety@amazon.com> X-Mailer: git-send-email 2.16.6 In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v1 4/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: Wei Liu , Konrad Rzeszutek Wilk , Andrew Cooper , Eslam Elnikety , Paul Durrant , David Woodhouse , =?utf-8?q?Roger_Pau_Monn=C3=A9?= 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 a662a7f438..0639551173 100644 --- a/xen/arch/x86/microcode.c +++ b/xen/arch/x86/microcode.c @@ -88,7 +88,7 @@ static enum { * memory. */ struct ucode_mod_blob { - void *data; + const void *data; size_t size; }; @@ -753,7 +753,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;