Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp914642ybx; Thu, 31 Oct 2019 02:57:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK02wyhNJleVHJ/4LfnKtqa0WC7AFcu0jTLgfTOv6psg3QIV7AxFGFn+MIa+GVmNh4E1KK X-Received: by 2002:a17:906:7f82:: with SMTP id f2mr2837787ejr.313.1572515876931; Thu, 31 Oct 2019 02:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572515876; cv=none; d=google.com; s=arc-20160816; b=ITh+WPZydmpxPcfAbm2sFzawxy4pDhxMyt9xodKCZ3hZDcQWs8+npeITmPgjAQk1Fl exDtfWQKZ1rlhqoJbEt4hXGcdKR3pg7n3i3+iY3crxzP1KnxPhHA8hRTsZpn4Fm3jzYg t6XtIk69oW8+5D8WTU8Lqkre3YC/nkkQ+N59xIgKdexr3d7un5kqM8pIs7bsYe4uEOOb Qz0He7DD/VLgpCI8/NZInrVCIv8R1/0sApxIJlNwQS+Ms72ZroVuEyRAmOtjxjGOd882 LlhRI8dz7ooANdAcWmZ3I1b8yk8U48iLvXUiUybP8Gf7WcwRBCIPOdL3p+B8Bm5C2aug 56+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:to:references :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=FJUj5PV2ZITMJAUDkGT5rW5Avl23lvULFiuspwpjCgg=; b=0RkklqoG4F+UDLWAYUbQv/Owk61FZCEC4syOyPKPtRuEAJUlRYd5NJZzP3ZfH43K4d uAw2DvLFkOCYtVMUHDXC9ufaUwJt0QgjLTFeMGFEECZJjIRTHAPa2g9SV4nxOmbrDReD QuPyItPdMH2DaLx1/DjSUSjfFCsu6x+7FdcQbq2+Jp+NrhlyXZMBjo6Oe7CVKRwtxh5D UovELl1lTjElMFJZcC+EnpGRWtNPXLCflqOlwL/t8vesuWn9nC6t92z3Rva5c3jXJReR SDHCmxo8P0sFfx6ODrXn2R/NUAWeGgLVITEXS+KCs8x40KRMDpcwll6azZtD38BLl0s3 MiPg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s35si3742116edd.261.2019.10.31.02.57.32; Thu, 31 Oct 2019 02:57:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbfJaJ4u (ORCPT + 99 others); Thu, 31 Oct 2019 05:56:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37968 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726864AbfJaJ4u (ORCPT ); Thu, 31 Oct 2019 05:56:50 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9V9o3AE101836 for ; Thu, 31 Oct 2019 05:56:49 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vyu6pw0bq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 31 Oct 2019 05:56:48 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 31 Oct 2019 09:56:47 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 31 Oct 2019 09:56:44 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9V9uhe541287908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Oct 2019 09:56:43 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 386DB11C05C; Thu, 31 Oct 2019 09:56:43 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EDB9711C050; Thu, 31 Oct 2019 09:56:42 +0000 (GMT) Received: from dyn-9-152-96-251.boeblingen.de.ibm.com (unknown [9.152.96.251]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 31 Oct 2019 09:56:42 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Subject: Re: [PATCH] scripts/gdb: fix debugging modules compiled with hot/cold partitioning From: Ilya Leoshkevich In-Reply-To: <130e31f0-ce38-77cb-58a9-cedf3b0f8113@siemens.com> Date: Thu, 31 Oct 2019 10:56:42 +0100 Cc: Kieran Bingham , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Andrew Morton , Heiko Carstens , Vasily Gorbik Content-Transfer-Encoding: 7bit References: <20191028152734.13065-1-iii@linux.ibm.com> <130e31f0-ce38-77cb-58a9-cedf3b0f8113@siemens.com> To: Jan Kiszka X-Mailer: Apple Mail (2.3594.4.19) X-TM-AS-GCONF: 00 x-cbid: 19103109-0020-0000-0000-000003814697 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19103109-0021-0000-0000-000021D75B92 Message-Id: <565ED332-3D0E-4741-BB82-3E82371C7054@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-31_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910310098 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 30.10.2019 um 19:29 schrieb Jan Kiszka : > > On 28.10.19 16:27, Ilya Leoshkevich wrote: >> gcc's -freorder-blocks-and-partition option makes it group frequently >> and infrequently used code in .text.hot and .text.unlikely sections >> respectively. At least when building modules on s390, this option is >> used by default. >> >> gdb assumes that all code is located in .text section, and that .text >> section is located at module load address. With such modules this is no >> longer the case: there is code in .text.hot and .text.unlikely, and >> either of them might precede .text. >> >> Fix by explicitly telling gdb the addresses of code sections. >> >> It might be tempting to do this for all sections, not only the ones in >> the white list. Unfortunately, gdb appears to have an issue, when telling >> it about e.g. loadable .note.gnu.build-id section causes it to think that >> non-loadable .note.Linux section is loaded at address 0, which in turn >> causes NULL pointers to be resolved to bogus symbols. So keep using the >> white list approach for the time being. > > Did you report this to gdb? Yes: https://sourceware.org/bugzilla/show_bug.cgi?id=25152 Best regards, Ilya