Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3059401yba; Mon, 8 Apr 2019 10:12:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhaPNP1CZTdeXQgGmHb0wSsClphKqdaX8V2tp9FyCylMsq/9KJCUK1S0LRwBOfQMkyBOYn X-Received: by 2002:a62:6807:: with SMTP id d7mr30342239pfc.75.1554743520590; Mon, 08 Apr 2019 10:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554743520; cv=none; d=google.com; s=arc-20160816; b=WGwMq7NA4JQWJ5LGBABO+2TkrvKWXWPVxZIvBgRCYT8TG30UaGLWAyxivACz5f2BxL gltyp5jNIJQk/YWSYAqxnQqnHzKgzAXv6tvKMbcboJ9eyO156NsibfoOCsjyPbG4dV98 57VnQQ4ATF5eT706Fg9dR3YcR9nd84ejavxdoFQ3c13OdT20C+Ix0706U1DyOAE6bGnH pU3S6h7b05R4qSPKMYNeiP4LFJUsOXU4WlsT+9Q55NN7f/o8wgkTRs/+XsXjoCc3pDVa geWs3YuS9tQsEvw0WsYuBCT6Pzo97awxR2bs9xAU6p967aPVHAnHqAMga9DtYVEHtvPj Lmpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=GarUDqjEwq1UtCDDETgeFP4uPoIf8UwDFl9kMPlwY4I=; b=Wc+hvr7mzDZFu+TdGltjaFW+e/oSIPQYU0rpN1yR7ek0/cOXwt57lWJ2oUALMSRpga phOiCcCPC9pP60XjN19aNd/z/Rb5j6yV7Ttlu3Hoc/jcwqJjgPilZEPNt35CiC2ZYYLB D309upzbchGMWDh1NM0Qqyg9VPgswnzBv0eH/Jj0cbTG5aqRmA25WZ1YANqJOz6QYrN0 Z986AEKIarK7mVVIBgDyYQtllj8J0pYqZwGBrzZhmt70b96MheR06GD9nP30XPXCh2PU Mj1jm6vR2J4H8QySCX3e/h/l56a3JlF9DIJBz96Eljqz6IdIaXwSY2TMhQj3HCPUcbbv 3lHQ== 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 y1si27834879plb.276.2019.04.08.10.11.45; Mon, 08 Apr 2019 10:12:00 -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 S1729074AbfDHRKq (ORCPT + 99 others); Mon, 8 Apr 2019 13:10:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58132 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727367AbfDHRKq (ORCPT ); Mon, 8 Apr 2019 13:10:46 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x38H4HM3124977 for ; Mon, 8 Apr 2019 13:10:45 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rr7152hk9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 08 Apr 2019 13:10:44 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Apr 2019 18:10:42 +0100 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 8 Apr 2019 18:10:39 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x38HAcue26935518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Apr 2019 17:10:39 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B184AB2066; Mon, 8 Apr 2019 17:10:38 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84A20B2064; Mon, 8 Apr 2019 17:10:38 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.188]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 8 Apr 2019 17:10:38 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id B53BC16C349E; Mon, 8 Apr 2019 10:10:41 -0700 (PDT) Date: Mon, 8 Apr 2019 10:10:41 -0700 From: "Paul E. McKenney" To: Mathieu Desnoyers Cc: Rong Chen , linux-kernel , LKP , "Joel Fernandes, Google" Subject: Re: [srcu] a365bb5f6e: leaking_addresses.proc.___srcu_struct_ptrs. Reply-To: paulmck@linux.ibm.com References: <20190408135610.GN11264@shao2-debian> <20190408143037.GL14111@linux.ibm.com> <20190408145750.GO11264@shao2-debian> <20190408152112.GM14111@linux.ibm.com> <118257214.1376.1554743216233.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <118257214.1376.1554743216233.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19040817-0060-0000-0000-0000032A14BA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010890; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01186193; UDB=6.00621236; IPR=6.00966950; MB=3.00026346; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-08 17:10:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040817-0061-0000-0000-000048E0D440 Message-Id: <20190408171041.GQ14111@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-08_06:,, 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-1810050000 definitions=main-1904080138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 01:06:56PM -0400, Mathieu Desnoyers wrote: > ----- On Apr 8, 2019, at 11:21 AM, paulmck paulmck@linux.ibm.com wrote: > > > On Mon, Apr 08, 2019 at 10:57:50PM +0800, Rong Chen wrote: > >> On Mon, Apr 08, 2019 at 07:30:37AM -0700, Paul E. McKenney wrote: > >> > On Mon, Apr 08, 2019 at 09:56:10PM +0800, kernel test robot wrote: > >> > > FYI, we noticed the following commit (built with gcc-7): > >> > > > >> > > commit: a365bb5f6eafb220a1448674054b05c250829313 ("srcu: Allocate per-CPU data > >> > > for DEFINE_SRCU() in modules") > >> > > https://git.kernel.org/cgit/linux/kernel/git/paulmck/linux-rcu.git > >> > > tmp.2019.04.07a > >> > > > >> > > in testcase: leaking_addresses > >> > > with following parameters: > >> > > > >> > > > >> > > > >> > > > >> > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G > >> > > > >> > > caused below changes (please refer to attached dmesg/kmsg for entire > >> > > log/backtrace): > >> > > > >> > > > >> > > +-------------------------------------------------+------------+------------+ > >> > > | | a44a55abae | a365bb5f6e | > >> > > +-------------------------------------------------+------------+------------+ > >> > > | boot_successes | 0 | 3 | > >> > > | boot_failures | 4 | 6 | > >> > > | BUG:kernel_reboot-without-warning_in_test_stage | 4 | 6 | > >> > > | leaking_addresses.proc.___srcu_struct_ptrs. | 0 | 6 | > >> > > +-------------------------------------------------+------------+------------+ > >> > > >> > Please help me out here. Without this commit, the kernel never succeeds > >> > in booting, but with it the kernel sometimes succeeds in booting? Or am > >> > I misinterpreting the above table? > >> > > >> > Thanx, Paul > >> > >> Hi Paul, > >> > >> The message "kernel_reboot-without-warning_in_test_stage" is from 0day, > >> leaking addresses generated many dmesgs, so 0day thought some bootings may > >> failed. > > > [...] > >> > > >> > > [1 .rodata.cst16.POLY] 0xffffffffc0498360 > >> > > [1 .rodata.cst32.byteshift_table] 0xffffffffc03f50f0 > >> > > [19 __bug_table] 0xffffffffc02be184 > >> > > [2 __tracepoints_ptrs] 0xffffffffc02f1cd0 > >> > > [15 .smp_locks] 0xffffffffc042b2cc > >> > > [1 .rodata.cst16.enc] 0xffffffffc0498420 > >> > > [11 __ksymtab_gpl] 0xffffffffc042b028 > >> > > [8 __ex_table] 0xffffffffc04f13f4 > >> > > [1 .init.rodata] 0xffffffffc0316000 > >> > > [36 .note.gnu.build-id] 0xffffffffc03ed000 > >> > > [1 .rodata.cst16.dec] 0xffffffffc0498410 > >> > > [16 .parainstructions] 0xffffffffc03ed940 > >> > > [8 .text..refcount] 0xffffffffc04e2aaa > >> > > [36 .gnu.linkonce.this_module] 0xffffffffc03f12c0 > >> > > [2 __bpf_raw_tp_map] 0xffffffffc03054a0 > >> > > [30 .orc_unwind_ip] 0xffffffffc03ee9f9 > >> > > [8 .altinstr_replacement] 0xffffffffc0497372 > >> > > [26 .rodata.str1.8] 0xffffffffc03ed1f0 > >> > > [11 __verbose] 0xffffffffc05c9398 > >> > > [1 .rodata.cst16.TWOONE] 0xffffffffc0498380 > >> > > [1 uevent] KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe > >> > > [1 .rodata.cst16.ONE] 0xffffffffc04983e0 > >> > > [8 .altinstructions] 0xffffffffc0498430 > >> > > [36 modules] crct10dif_pclmul 16384 1 - Live 0xffffffffc03f4000 > >> > > [1 ___srcu_struct_ptrs] 0xffffffffc03840d0 > >> > > > > This list of "leaked" memory seems to include the __tracepoint_ptrs > as well. So at least you seem to have the same behavior as the tracepoint > code, which was your source of inspiration for this implementation, > which is a good start. > > So the remaining question is: is this memory allocated for module sections > really leaked for each module, or is it an issue with memory allocation > tracking ? Thank you, Mathieu! Also, is there some way to put this read-only (OK, relocated-only) memory in with the module .text segment? ;-) Thanx, Paul