Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5053503ybh; Tue, 6 Aug 2019 23:33:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuJCHHTl8xpMhzb8dDUl9R/IIRLt826nSXYNMxdzxmV2cc4Jw8xpi2yxIZ+7PACScFpvL1 X-Received: by 2002:a63:b919:: with SMTP id z25mr6280686pge.201.1565159616426; Tue, 06 Aug 2019 23:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565159616; cv=none; d=google.com; s=arc-20160816; b=p/WHWfo9pugYtuFJC+vHqozoYGkIGO584siJNvMC6XPvV1MGLXwQWMrHjbVaWeFiId kPORmb9Sf8NxYw1Pt4HkrukmAISvjTcOYzN5V4Ia/KMUmjchNZEaTDXLCBpcfrAwnMSG TNKycacTZpAx0oBXThRyFwaLukGJH59ZQvSwn33QFDQgaJQek6WX8RzPI4c4nPSZ45ST 1AEqdNrzWlqEUwdO0CWDL9GR+4TckInL7LH8qS5GRw5Jftdm/gocjL6Pa8FqmVmXBnjj Rb+gDGFMgZcQHFuoJLJ8EjgLT35wJRfJs+8P34Rf2Nvu3akci32GRvTdivdn1ykDQ3tb Y0dA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:from:subject:dkim-signature; bh=z8a+n4mRL103GwOLkv6UTaWbLAYpT2wk52qbgRYo5iY=; b=CLVHDqrDQ+tLv73bGKaw0LT7WaL8RrHgfG+FJfYjT73451/1iosIMwksiQPRDvNBB1 mCvNjsgYcWGNwXGPcQKvIvW/o01DJkApVlzdr4038hpgcb9qiIil7/BPS6LSX4XcPW5F NnrGh58qJ4pbF3QE4++Hn2YLZL7/1FxCYIv5b00PDqep3H/1S30MIlhGPFDuis5b6lm/ RR1bW5Wia69sxqSVtw5t+QaDML8ffhY7CImzIk2OjZeB2+OJkh1OqtWTlQnH/SWYizPj eFRaupV1N9KCYuKTZTrh/aorYG/hwxShuJG04cgIOMTcBLlIs09QHzDwm7rIz/gjDR1G kweQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=VjgOXv36; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si45221025plf.305.2019.08.06.23.33.20; Tue, 06 Aug 2019 23:33:36 -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=@googlemail.com header.s=20161025 header.b=VjgOXv36; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbfHGGbA (ORCPT + 99 others); Wed, 7 Aug 2019 02:31:00 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46063 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbfHGGa7 (ORCPT ); Wed, 7 Aug 2019 02:30:59 -0400 Received: by mail-wr1-f66.google.com with SMTP id n1so3826268wrw.12 for ; Tue, 06 Aug 2019 23:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=z8a+n4mRL103GwOLkv6UTaWbLAYpT2wk52qbgRYo5iY=; b=VjgOXv36egx/qZ+qiYY/PEzphP7jS9Jz+nlEykPJBrIht0TpdRjo0/KUuY04clAuBo zZ/9XoDrk3N2Kcq/nK5Aaee5AhdI8DEuO/3SSlDiviKXajIg+PTHQxgGzh9j1i6C5pVd xsM10Q6GT1rZLXtwmxAJ33ShiAOTrQF1jETiybPRn+sSONIdB0qo9vnxDQSJubHkVLOQ V5SJOPguV4IQ53Xg40lRHo6E6ZlHoiJ+oWzs2nO++pzKftJnET1YQ9Pp5bl218GOpB2J 6bAhWq/F2Ea/+ihw6XlQWxPlC89ucL8S/oHlwYSs09y+kqjSts8ImqeEVWlrargijz+m DDtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z8a+n4mRL103GwOLkv6UTaWbLAYpT2wk52qbgRYo5iY=; b=G95oodgzVQIa1d6qDBKF24RCDRYLHi+UpdN88mR3DpdO+pAujQfF2+5iD6APzUm2zP E+81xU2oEpPDXJbbqPPgKqNqExyffApmvG+L3hsnRh75GJ6T7hVZ/RjttnM+tkLpe8hh lXUcpkqNIpm5yM7/O/1vPkqrS3nlKBLiHlSYJFF9HxVu+wGojUnrM6I4BUrH9gD7HdZy f3aTu2QFlY2Qal43LqDYM74ZUqmmqkf7lePNtrVa5PMS3JfgL228TcazNbwn6OjwTE5Q qcMuIvyeVX9RkpcKdww8A6lnzxnK7tk0G2YrR4y6g0NVzI5rdJzIbI6i+fzcNXvKgK08 p3eQ== X-Gm-Message-State: APjAAAWTC/XUX1aYdEKagdCpNN00XMOLg6TJH76bzXuUHBsz2LaM15L8 EBl00hwba3XnOlXzKE2SmLg= X-Received: by 2002:adf:f68b:: with SMTP id v11mr8297288wrp.116.1565159457174; Tue, 06 Aug 2019 23:30:57 -0700 (PDT) Received: from [192.168.1.20] (host86-151-115-73.range86-151.btcentralplus.com. [86.151.115.73]) by smtp.googlemail.com with ESMTPSA id 4sm209150684wro.78.2019.08.06.23.30.56 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 23:30:56 -0700 (PDT) Subject: Re: Warnings whilst building 5.2.0+ From: Chris Clayton To: "Enrico Weigelt, metux IT consult" , LKML , tglx@linutronix.de, jhubbard@nvidia.com, hpa@zytor.com References: <5276d608-e781-6190-e7df-bc22152b71c1@googlemail.com> Message-ID: Date: Wed, 7 Aug 2019 07:30:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5276d608-e781-6190-e7df-bc22152b71c1@googlemail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2019 12:39, Chris Clayton wrote: > > > On 09/07/2019 11:37, Enrico Weigelt, metux IT consult wrote: >> On 09.07.19 08:06, Chris Clayton wrote: >> >> Hi, >> >>> I've pulled Linus' tree this morning and, after running 'make oldconfig', tried a build. During that build I got the >>> following warnings, which look to me like they should be fixed. 'git describe' shows v5.2-915-g5ad18b2e60b7 and my >>> compiler is the 20190706 snapshot of gcc 9. >> >> Thanks for the report. I'm rebuilding right know anyways, so I'll look >> out for it. > > Thanks for the reply. > >>> In file included from arch/x86/kernel/head64.c:35: >>> In function 'sanitize_boot_params', >>> inlined from 'copy_bootdata' at arch/x86/kernel/head64.c:391:2: >>> ./arch/x86/include/asm/bootparam_utils.h:40:3: warning: 'memset' offset [197, 448] from the object at 'boot_params' is >>> out of the bounds of referenced subobject 'ext_ramdisk_image' with type 'unsigned int' at offset 192 [-Warray-bounds] >>> 40 | memset(&boot_params->ext_ramdisk_image, 0, >>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> 41 | (char *)&boot_params->efi_info - >>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> 42 | (char *)&boot_params->ext_ramdisk_image); >>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./arch/x86/include/asm/bootparam_utils.h:43:3: warning: 'memset' offset [493, 497] from the object at 'boot_params' is >>> out of the bounds of referenced subobject 'kbd_status' with type 'unsigned char' at offset 491 [-Warray-bounds] >>> 43 | memset(&boot_params->kbd_status, 0, >>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> 44 | (char *)&boot_params->hdr - >>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> 45 | (char *)&boot_params->kbd_status); >>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Can you check older versions, too ? Maybe also trying older gcc ? >> > > I see the same warnings building linux-5.2.0 with gcc9. However, I don't see the warnings building linux-5.2.0 with the > the 20190705 of gcc8. So the warnings could result from an improvement (i.e. the problem was in the kernel, but > undiscovered by gcc8) or from a regression in gcc9. > From the discussion starting at https://marc.info/?l=linux-kernel&m=156401014023908, it would appear that the problem is undiscovered by gcc8. Building a fresh pull of Linus' tree this morning (v5.3-rc3-282-g33920f1ec5bf), I see that the warnings are still being emitted. Adding the participants in the other discussion to this one. >> >> --mtx >>