Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp540319pxj; Wed, 2 Jun 2021 05:40:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPqteS50wrzt5wxVmiFdwRM6AyG65Z5XUoKiDIM8Uo9c4rLwwI91K3mtKnOR6iO7fDUZ9e X-Received: by 2002:a05:6402:201:: with SMTP id t1mr33080769edv.149.1622637607874; Wed, 02 Jun 2021 05:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622637607; cv=none; d=google.com; s=arc-20160816; b=w7F3HltdyffWfMmCbFN/pIUvGZEWScEboRtVw6H9gehUaHpzDoOywKoqw8VDqE9qYk vJZ0mmj+2ivPwoXujv54Pbez4mly+c6PR60ISXpvWBizlu2932+40WC2UZ2I1HbYll9f 5zOaBTIjb2Qc9MiWqGypiBqF6av5cM8Nm5m9DxgjAmsBiXo6rsytF+TiNFTcBOanw6Eo g3tGJLswc3WSzpCuo816Qk/ZmDL+KSTzxOnDxvzr4pte+HOky3+JLSHhtQADEbWeioYO oEWnjc5dlhKraoy/B/7lQBPy3bFsruGo6p6syk76FXablQ4Es54LNw8+nfA8EGP9Za+T hmQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:date:message-id:from:references:cc:to :subject:dkim-signature; bh=6k50fOEFi7RXAL8U0g6F+fY7m6rM8rdiM5Z6yO1JrRM=; b=rjH5mt4kJux+r1RAuzLQ4nrBXLmPMY8Uxmmk23n8wwG7TGFUu7CtSSN+eDn2zORLyc EyVl2iCMDZ3cskvdlEsEMHhtZLPFgSGo3ynjSB7rGr1uGU471/heVvvOg4w0iP8zrgBX a03VUY4iZKK2TqljLL/2ffTDGv6UtiDQmF+X1fMbsnZzszimioz0ucMP+oqVejwyAKao D7iwJlxXLbef/PlKq9TdPU8sN/psgkJNtFMMQ9a7KB9JxO0rZXmUlfCaVb3t5X2QezeL R72Ll7GFTwWBrW/j3zrcE4vXNbGu7nJBnvlQlKyaXS6aASJ9evE01IJmUxvuCgcGui0X NCVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KXcEZVzM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca23si1858481edb.521.2021.06.02.05.39.45; Wed, 02 Jun 2021 05:40:07 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KXcEZVzM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbhFBMhW (ORCPT + 99 others); Wed, 2 Jun 2021 08:37:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:30036 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbhFBMhV (ORCPT ); Wed, 2 Jun 2021 08:37:21 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 152CYVHZ135012; Wed, 2 Jun 2021 08:35:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=6k50fOEFi7RXAL8U0g6F+fY7m6rM8rdiM5Z6yO1JrRM=; b=KXcEZVzMU8fH0Kj2vqtNHwQLOwfapZzme5cTmzXY3qAbgk7xeM6z0Hlwd/AGCmDr+SgO bBX0pZJxBsbdGMNbtUlmHuxBPRTfd3Tq505uiJkmdaqfEeXgs/xnl5+WzW47RJed/s65 bskrGH6Od4F0wTFWF1p8PkBwgtBzwIypSZEOiUe4eaiet/pkmshrgc4OuKOv1z8ca/B6 A9GM0fp3EtBz/v4ZNyenhD3xemom7QtYZ1LdZGzDXshsSFS8wQPElxBBK4RlIeF37bGx hkxpS94MV1gcuk6B4H6uE1uQvOzLWpRyE7BAafpVOJXt+3tTrgUoHMEkrNf+ErpCSPlF +Q== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 38x9hm16ku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Jun 2021 08:35:36 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 152CSsvd023646; Wed, 2 Jun 2021 12:35:33 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06fra.de.ibm.com with ESMTP id 38ucvh99t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Jun 2021 12:35:33 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 152CZV4Z23462178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Jun 2021 12:35:31 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67686AE053; Wed, 2 Jun 2021 12:35:31 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4726FAE05A; Wed, 2 Jun 2021 12:35:31 +0000 (GMT) Received: from [9.145.65.140] (unknown [9.145.65.140]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 2 Jun 2021 12:35:31 +0000 (GMT) Subject: Re: gcov: NULL pointer dereference with gcc 9.3.1 To: Luis Henriques Cc: linux-kernel@vger.kernel.org References: From: Peter Oberparleiter Message-ID: <0a013450-75eb-de2c-f90a-3df193800cea@linux.ibm.com> Date: Wed, 2 Jun 2021 14:35:31 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: j7QsMlzIdIj-iRysBRinfblzFRBMw2gJ X-Proofpoint-GUID: j7QsMlzIdIj-iRysBRinfblzFRBMw2gJ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-06-02_07:2021-06-02,2021-06-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106020080 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.06.2021 17:56, Luis Henriques wrote: > Hi! > > Maybe this is a known (gcc?) issue, but I'm seeing a NULL pointer splat if > I instrument my kernel (or a module, more specifically) using gcc 9.3.1. > > It looks like, during initialization in __gcov_init(), gcov_info struct is > invalid: the filename seems to be correct but ->function is NULL and > ->n_functions contains garbage. Thanks for reporting this issue. The symptoms you're seeing look similar to those that occur when the struct gcov_info layout emitted by GCC does not match the one used by the kernel. In particular a change in the GCOV_COUNTER value can cause this behavior. I've checked upstream GCC 9.3.1 and it seems to match what is used by the kernel for that GCC version. Could you provide the exact version of the compiler you are using? Both 'gcc --version' output and the GCC package version should help. Also what architecture are you seeing this on? Regards, Peter Oberparleiter -- Peter Oberparleiter Linux on Z Development - IBM Germany