Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp666746ybg; Tue, 28 Jul 2020 15:59:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeUcRw3Km2PJ81UFVAEzhZBqP9NO7DCdycc3GUM20klqufC7fX2Y8IC5XL2aFmoit0n2q5 X-Received: by 2002:a17:906:b6d0:: with SMTP id ec16mr8028404ejb.94.1595977176480; Tue, 28 Jul 2020 15:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595977176; cv=none; d=google.com; s=arc-20160816; b=CMAP4441AJaPzsCepkESy2475ErZzQTdRMJ7VwSXdc39INoRlBiWJYuzP0B+UNRX8I vY+NdSTuxRrNY9teDACzUgvZI1yjjwrKx8XiVYVjttqJsFYKU1/9vyiI9BeknhtHXUB0 j+J4accO8pTBFB3O0xNo1wxNVoQ6qYwQlVFZy08uEG4PriaEq384YriX4IbGNZOlLEGQ LsbMZsg6hjkdC7oKIN9r1/3+IOdEH1BwOMrBLIgG0ea4PkzkuJ08T2OJvWn6l4u0pgjv 9UO/nkLPZdF6ovI3gh6DJHIthBMzSVIYR2RN7eImcvdNXxpeWGOHufaj/WwjYLYUrKcL feMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qgSJi4bkt+A/WrHOOKufXW7aJ0RRAww+tyiz0OA0xks=; b=pOulGQoYPGzBpT9HuSk0qr62LjYy80I/EoOgCLWCEVFlvltYiRpDdHaBGoDyboZPta zGbDhRZ6B7EH58kVj+rVjdfjl+C45oCgnKTcIQgPAmArf3kTJTESKVkkzJKVCldNiP/o DQ/AAWPDKul5F5AKQguxGUpIWi35yn52PG0yKDopQKe2d8G/7wfYI3xEYMg2S+IA7kAM v9YhuC32IqlRiOSBKH7zj2cLyC3DT4pZ1yrK1aNJMV39NvqGCj/tYakXKC4ciROHJAr+ Q3W5KMENRgHoYZm5hZTbShX4RsNMTOcFA4tGEEWzbVPec3tvyBfpR6Kk29nTtBpFvGWe faBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si8298392ejc.200.2020.07.28.15.59.14; Tue, 28 Jul 2020 15:59:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730262AbgG1W6M (ORCPT + 99 others); Tue, 28 Jul 2020 18:58:12 -0400 Received: from mail-qv1-f65.google.com ([209.85.219.65]:34563 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730071AbgG1W5k (ORCPT ); Tue, 28 Jul 2020 18:57:40 -0400 Received: by mail-qv1-f65.google.com with SMTP id t6so5058771qvw.1 for ; Tue, 28 Jul 2020 15:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qgSJi4bkt+A/WrHOOKufXW7aJ0RRAww+tyiz0OA0xks=; b=WXGDA1ECpE32hmiTV5H4qmb7ar0C1FIbst8sX5FHSCtmnDHxY1pPXE4ALkWnZ2l9MG wosDUqUBPhhXRphRlRWxOaMZZmbxYM7bZYhfAmQe+vx3iF5ENI9WXt469u3IjPutMZyH E8oYURAdIHZ6pFFXhO3xH3iFjJnGcUOyXQTBfppba26/Ii2sRniA4pX/wzLHGjdhrXxp OydSla/GyP/Zm6VwhgC1IhMKhK6ETRO/uHj1t87Ai4AR0FQPObm8jL5ioM3VqI37hBB5 AVQ+LgsnSmVIgBF2AGoI9qBL/q+8CrcfS8DPM7NyVB2ukMca3rxL8rrN/CnJxfjOYYgx 1yew== X-Gm-Message-State: AOAM532HC3/+V33Wo6BW+QBxXjmn6jYTb8HoZw9sKmrQPaRv3cAUQVqd Ii9qmDSom1iwIMU62oIV2jHQic+t X-Received: by 2002:a0c:9b94:: with SMTP id o20mr30579998qve.177.1595977059545; Tue, 28 Jul 2020 15:57:39 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id o187sm88118qkd.112.2020.07.28.15.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 15:57:38 -0700 (PDT) From: Arvind Sankar To: Kees Cook , x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 19/21] x86/kaslr: Replace unsigned long long with u64 Date: Tue, 28 Jul 2020 18:57:20 -0400 Message-Id: <20200728225722.67457-20-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727230801.3468620-1-nivedita@alum.mit.edu> References: <20200727230801.3468620-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No functional change. Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/kaslr.c | 13 ++++++------- arch/x86/boot/compressed/misc.h | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index b6ef77b644bd..c49d479245d0 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -98,7 +98,7 @@ static bool memmap_too_large; * Store memory limit: MAXMEM on 64-bit and KERNEL_IMAGE_SIZE on 32-bit. * It may be reduced by "mem=nn[KMG]" or "memmap=nn[KMG]" command line options. */ -static unsigned long long mem_limit; +static u64 mem_limit; /* Number of immovable memory regions */ static int num_immovable_mem; @@ -141,8 +141,7 @@ enum parse_mode { }; static int -parse_memmap(char *p, unsigned long long *start, unsigned long long *size, - enum parse_mode mode) +parse_memmap(char *p, u64 *start, u64 *size, enum parse_mode mode) { char *oldp; @@ -172,7 +171,7 @@ parse_memmap(char *p, unsigned long long *start, unsigned long long *size, */ *size = 0; } else { - unsigned long long flags; + u64 flags; /* * efi_fake_mem=nn@ss:attr the attr specifies @@ -211,7 +210,7 @@ static void mem_avoid_memmap(enum parse_mode mode, char *str) while (str && (i < MAX_MEMMAP_REGIONS)) { int rc; - unsigned long long start, size; + u64 start, size; char *k = strchr(str, ','); if (k) @@ -611,7 +610,7 @@ static void __process_mem_region(struct mem_vector *entry, unsigned long region_end; /* Enforce minimum and memory limit. */ - region.start = max_t(unsigned long long, entry->start, minimum); + region.start = max_t(u64, entry->start, minimum); region_end = min(entry->start + entry->size, mem_limit); /* Give up if slot area array is full. */ @@ -672,7 +671,7 @@ static bool process_mem_region(struct mem_vector *region, * immovable memory and @region. */ for (i = 0; i < num_immovable_mem; i++) { - unsigned long long start, end, entry_end, region_end; + u64 start, end, entry_end, region_end; struct mem_vector entry; if (!mem_overlaps(region, &immovable_mem[i])) diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 726e264410ff..3efce27ba35c 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -70,8 +70,8 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize); int cmdline_find_option_bool(const char *option); struct mem_vector { - unsigned long long start; - unsigned long long size; + u64 start; + u64 size; }; #if CONFIG_RANDOMIZE_BASE -- 2.26.2