Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3153752yba; Mon, 8 Apr 2019 12:20:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLHaqYbBYttjVGWQRuwdgow8HWOKsTcGeCoTnCZmaw5Kpr0QDJSGBrkVkbH7yZsGru713h X-Received: by 2002:a63:3d85:: with SMTP id k127mr30162854pga.152.1554751210824; Mon, 08 Apr 2019 12:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554751210; cv=none; d=google.com; s=arc-20160816; b=phN92DJO9QdWyCBuZQdcx8PMNlrmh5FHWq1hLkXhVxs6RqbyXxqKXct4X2ZUMf/czO fhZ1u3Hqla6/kg7aJZLJkgq9bILQn1KV1GMI+NCVTDC1WHRjEAfsBNtUYfLay1UdJotJ bcYCTSefVRXsd5Bqn3DHNBgdawzMMrm1oAbRehNnfbiQmVyogccA5uqUf6nOP/OPNaRG 1e/ZNY8C4bmIHn4hDwbUWkFsEqxlFJB4ySgQuHR6qyqX+5/ylZrsSGAwtJSFjtWLAifi ooyydqcZSJ+vVPY4Ty2aJe7Ovl3MUWl4TKgD9SucoAWyk6cMbgnTp/bmYPQi6nNc6FT8 Hhdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=l5HpI5zsrdJ+zT8Qe+qc4dzBnIdMp5RBzEz96NeNGkw=; b=Mx7f5Mqo1mN4PQDv2FKiP3TEBvcrLdZRrugeK1UvabODlehXue7ks2thmybM3c0giG PYp5n/huAzs/miG+oiubBJB7dF1Uu411WgO7MKz3X9jx5kbxi5fJ9pmXLll/YwNsnLfJ b6TbcHu0Qsuyo28aM5X/vFs9rMvG2Ii4Js1dDC4j144KkseKsI5L4RO4L8rv7TL87+6l f+1VdTXMyfx7HEocQ+qgKv12mOWLYjtttrENJbOZ+IAPlD3Q5491h6knjQoHGE8W3aER 4Yps2ctpHzQ9iCGB5LPbChYJR3wAGukGnUfHSlZ4V1nhdSom2ZD6bhhpsaKpgDC7y11+ 7Nbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ScqoEwoB; 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=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a73si11755434pge.358.2019.04.08.12.19.54; Mon, 08 Apr 2019 12:20: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=@efficios.com header.s=default header.b=ScqoEwoB; 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=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729125AbfDHRG7 (ORCPT + 99 others); Mon, 8 Apr 2019 13:06:59 -0400 Received: from mail.efficios.com ([167.114.142.138]:48890 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727190AbfDHRG6 (ORCPT ); Mon, 8 Apr 2019 13:06:58 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 5AF9E1D3607; Mon, 8 Apr 2019 13:06:57 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id Ys74DFmM8U1Z; Mon, 8 Apr 2019 13:06:56 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id A2E771D3601; Mon, 8 Apr 2019 13:06:56 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com A2E771D3601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1554743216; bh=l5HpI5zsrdJ+zT8Qe+qc4dzBnIdMp5RBzEz96NeNGkw=; h=Date:From:To:Message-ID:MIME-Version; b=ScqoEwoBENFlZ1EzgkYqDRySrRGsgPZmuE69XaycaOmcK3cWwa9yu/LqPjGDIqLl8 zCnPzk0Cs89fEmf+SL+Olp4XHAcxWO14rQXtELtkhdo1cKLq8T4Tc9iICyktbGJCL3 qNfEulxOC1NQojwkC0crWb2jz6etC4W1S9bUL7T03zDFQmq6AlA1X3YnBTLZhtt2ec 5MAfGTnz/2rVzFjQndBUS8Ly1PL8uQ/BlpoLrUV+voIWEt3XrHyuoRCAhVj31JZPub WEjgTfIAn4h9bL+SRbHIwZYGAXdcTygs59hArIdX8+XTYzX+sNCWVnZlJPIutVVwQJ UmjoyltVyTNwA== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id d6gh7LuEONte; Mon, 8 Apr 2019 13:06:56 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 843691D35FA; Mon, 8 Apr 2019 13:06:56 -0400 (EDT) Date: Mon, 8 Apr 2019 13:06:56 -0400 (EDT) From: Mathieu Desnoyers To: paulmck Cc: Rong Chen , linux-kernel , LKP , "Joel Fernandes, Google" Message-ID: <118257214.1376.1554743216233.JavaMail.zimbra@efficios.com> In-Reply-To: <20190408152112.GM14111@linux.ibm.com> References: <20190408135610.GN11264@shao2-debian> <20190408143037.GL14111@linux.ibm.com> <20190408145750.GO11264@shao2-debian> <20190408152112.GM14111@linux.ibm.com> Subject: Re: [srcu] a365bb5f6e: leaking_addresses.proc.___srcu_struct_ptrs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.12_GA_3794 (ZimbraWebClient - FF66 (Linux)/8.8.12_GA_3794) Thread-Topic: a365bb5f6e: leaking_addresses.proc.___srcu_struct_ptrs. Thread-Index: vId/4PeL+B5wBwXNI5Zlh9FxzlN7uA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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 ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com