Received: by 10.192.165.156 with SMTP id m28csp712307imm; Mon, 16 Apr 2018 07:33:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/uIvhuIPY2avrBmC19jC8Qck8HVFtCu3jJFZHnfjRLLN7Msc7jCaTfBC1ydlj2olzLo4wi X-Received: by 10.167.128.207 with SMTP id a15mr21876750pfn.116.1523889190579; Mon, 16 Apr 2018 07:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523889190; cv=none; d=google.com; s=arc-20160816; b=m74CdcSO3Yxe6CeOtPLAgq/quuIqrkwxGrHCxRURHFNaT6FZ8T2YiGTv9b0qpaDhf0 kKM8t0GYuzKZBuJEY1YhtgWkx0kwX2HYHe1bQ1kyBlB3N9UGYGlCaIrkmLY/pT+ipAaq uvn8kg6a2Encl7ivl7V/w9xu8/4GN+Xcf6gB8lrVBqbNGBovwYBWbtAGMmOwTyhPEdQd 13e+35IijX3xuSSB4+CAnADEUT3SuVMGHqX99eVg5hY8RMrWb/eiQT3Am11D0lEKxyRi M/J5HV5bY/HlLUEDo0x6PSi86Lkm83wctKYm7rHy+eF1Sph4kd9oR1uX/C27PN31YtwR EDtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ooRyiWR+2szs2eON58ixNVHbIwUsRtfgmmNnTffBAro=; b=gCJ5FQ8/iBRT34FyqkleXrRK+b5wF61U+I+FquNGxiNelX71NpjyNuy2SQDDpkWZjy V6M3vbH7MMx4VrGpCLOUSHfxeZMDyIU+lGvGq4hwNufwH9/ZdSNCABSLxJX7CGJn/j0O ED7CR/8vXSr5MFdEB65BDY89IxO0VaSP+YuZdW4njN9Z3VUyJKjCXPJEhp5N31owPf9o Xw9Mv4xyveBmwUYHX6gPjXKnFgRnFBQxo1lRD1xNFvSSL+heOeDbJhNntt2HrKk5VzVE WzvaRbxO+XmtCYx5EVwG8jVLz0eCszit9ucSJbcjeY5K5InDoeVWXEjvDK0xVtBLqbNd NRfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=apf/zW8f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si11955628plk.388.2018.04.16.07.32.56; Mon, 16 Apr 2018 07:33:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=apf/zW8f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755017AbeDPL5T (ORCPT + 99 others); Mon, 16 Apr 2018 07:57:19 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34204 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754617AbeDPL5R (ORCPT ); Mon, 16 Apr 2018 07:57:17 -0400 Received: by mail-wr0-f194.google.com with SMTP id d19so25206214wre.1 for ; Mon, 16 Apr 2018 04:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ooRyiWR+2szs2eON58ixNVHbIwUsRtfgmmNnTffBAro=; b=apf/zW8fW8iVxeE0jBdGNNDizKTTkoGjYi8DTSvFg69YM2fzI4sCRz+7uBHYATGWOh LSnP56u2tmHT1WZ2VWoZygza2zkMHiEZ5pFufSSxp4gHH/I9fserv/1/FG9K0YigBePW omYVlUeHTf4eJhkyf0X9DvPStkBDukxtNpBZ5ORWBFP1um0efb2DIu4HHoDvKOUoavb5 A4FCVMx8Mi/yPc5c0bf4XKgWg8mSQTCFXyeuU1wOKjDgK3XHg9u1Pv3TvbKyE04ZG5e+ 0CB9EKb7xgxB1somq5f9821Gf+2G0Ifq3s+sGFcJSzo+cl9f/FcU/GxTXIPvZ3JI/n7V Dygg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ooRyiWR+2szs2eON58ixNVHbIwUsRtfgmmNnTffBAro=; b=a7pM5lI43V9mezn5aqF2A7iDb17Oy3bXN9s08La1UlTaga53t8lkDGJTT4MDTm4YUi lTLuJe1Qk+Hg8FLpHNCpGnDrRqdhzjQfECF+be//ZyGSGLUPGACBbv6SgnIpbBJeJoin szaWItVBy3WubC25ou0ao57ENTKUqE0CXAKcz2Iy3LCYTScmB4x4ZnV2EN0KLYhMynAa 5aqpiiqTqOGtDdhhXb4mrqTArqV9GospoyZ2qJ3CYdQ/82Jt0YU+x+OZDToZz4JCp4C0 03OVO/jjW8uplxKhE/kq2ZfZId7Rm4pdVJo70eWOd+ppkM4jTWLXy0RggCS41HOkEENM u3Qw== X-Gm-Message-State: ALQs6tD5ZWJfWg9JItU6z0EkiXmFXayY1FTQgLrboNyWIf60izlgqBzr 4cns7KfdYllHp0mN+CHAjQ4= X-Received: by 10.80.145.150 with SMTP id g22mr14345207eda.24.1523879836645; Mon, 16 Apr 2018 04:57:16 -0700 (PDT) Received: from ltop.local ([2a02:a03f:4028:3a00:64fc:ea13:f95b:61eb]) by smtp.gmail.com with ESMTPSA id n8sm4913012edb.5.2018.04.16.04.57.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 04:57:15 -0700 (PDT) Date: Mon, 16 Apr 2018 13:57:14 +0200 From: Luc Van Oostenryck To: Jiri Kosina Cc: "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] x86/mm: vmemmap and vmalloc base addressess are usngined longs Message-ID: <20180416115712.74pnfyr5hwfd4btd@ltop.local> References: <20180412142801.oi7bzju3frgkdskp@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 16, 2018 at 11:43:02AM +0200, Jiri Kosina wrote: > On Thu, 12 Apr 2018, Kirill A. Shutemov wrote: > > > > Commits 9b46a051e4 ("x86/mm: Initialize vmemmap_base at boot-time") and > > > a7412546d8 ("x86/mm: Adjust vmalloc base and size at boot-time") lost the > > > type information for __VMALLOC_BASE_L4, __VMALLOC_BASE_L5, > > > __VMEMMAP_BASE_L4 and __VMEMMAP_BASE_L5 constants. > > > > > > Let's declare them explicitly unsigned long again. > > > > It is just cosmetics, right? I mean these literals are 'unsigned long' > > anyway. > > Yeah, I can't imagine this particular case leading to any overflow > scenario, as the literal is big enough to be automatically treated as > unsigned long by the compiler, but it shuts up sparse which treats this as > a generic case (where the missing UL might be a problem), and totally > pollutes the build output. > > Either we put the 'UL' there, or teach sparse about figuring out the > 'closer bigger fitting type' for hexadecimal literals, which might be more > tricky. Hi, If you're talking about sparse's 'constant ... is so big it is ...', there is nothing to teach sparse about as it knows perfectly the (correct) type of the constant (which is printed at the end). The warning is there on purpose. Cheers, -- Luc Van Oostenryck