Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1509614rwl; Fri, 31 Mar 2023 12:15:00 -0700 (PDT) X-Google-Smtp-Source: AKy350YbbP0pwhta6NU7nh/IAelSlTVIRoEmcSkIOgJbrF53FGnC86vzAty+sOHorZXJqfERklmZ X-Received: by 2002:a17:903:41c6:b0:1a1:faf4:4165 with SMTP id u6-20020a17090341c600b001a1faf44165mr7418122ple.3.1680290100646; Fri, 31 Mar 2023 12:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680290100; cv=none; d=google.com; s=arc-20160816; b=05ecu2iiXUKV0RAtyLqXrwKHq72g1uUON1FnPioD69XTSaT7XThTsgpnDvJ/HLFYjQ yvgHfdhkgmdzB9PTDyRPNA7aZKrAh0D2TfD1ofjiyMcr8oPynbnU+9BCia+HW5WcCetb E6NFpCTZTVRMwVAS8O2FNVvwI7eEWQImRZlOIwNOFZsiBLCaeskP68JuTHK16Xf5Kw9n ZZtAvQlOeEBSqLM2/Oc0PtdXvWdE6vz3UHgPYw1PQwnReb5xchknU6jRuqIIKHYfxzPO RWaZ79SbCiIhPnCusdFCeMDzCazesT+sd4Yf5zUb3weEDchz9VCL6y4O6H5Xge1QsYJQ 7oUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aIr2vtxWZXcVvuolWsECaIGNyyoIH0TKmMFQt2ZHtZ4=; b=amxIcMGhBSoHHpVeQ+VZpXDIHur2SHkz642ua78BghDcj+BQ2+J4jEpkdGcBfbv3b0 Lo4YGElrzzCxIeRj4lCVpu2GVH9v1iDiNdupMMHKdv9iazeVPfvXS2V+Wy2fuE2Lf5n9 Sv8KTWGJQJTP2qrJs897S3gGdVpMrNBcA59S+FhAJL01F5JJOnK1m/7O7K6vgBWb4xex CiEU+lVKsAuPgfNcMc6vxTu8YDBsn6D4LYqDPOmufT0tg/sRwlPAm7cxZ7tO7d0Crw/w kfEJr4ZUUFuULHM3k8k/9ouUJjWvc+P9TcByLefCIuvNYefX0x0RHsVfBnZNPfyuuutA UXoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=HNVQNzem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gc20-20020a17090b311400b00233df8f755esi7372950pjb.142.2023.03.31.12.14.48; Fri, 31 Mar 2023 12:15:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=HNVQNzem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbjCaTMV (ORCPT + 99 others); Fri, 31 Mar 2023 15:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbjCaTMU (ORCPT ); Fri, 31 Mar 2023 15:12:20 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB9E1D937; Fri, 31 Mar 2023 12:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=aIr2vtxWZXcVvuolWsECaIGNyyoIH0TKmMFQt2ZHtZ4=; b=HNVQNzemSOiE9ckS8FRhSJdp0B 8uSSZZmucZQ0WC2FbkL2MzlHIdavSFgKfeyYJY/ccrIo6hwn6pCXD6GGV/fWZ7Jq9de78TOqC+BoV RShWmVWiP90j1Focjbn9XB9eI6Zr8/LwPab2DoUO7X15vAznOgu92JqwtENFhevTaCY4Lf71LxMW8 mjwZ4JfvO6WRUSX/07K96KYoJEW13NBtC2sDMTHmk0pUrukfBPH0gEO8Q94QQeiIg1cP/jS5Pf3Br r0pe6yUJcX2SZLdnclvrCSofF+2TV8s2gB3++lQz2kq8xCybGzHB47tdnuyXXetZ42JXdqUV2JXZs BPYuTC3w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1piKAa-008aZa-27; Fri, 31 Mar 2023 19:12:16 +0000 Date: Fri, 31 Mar 2023 12:12:16 -0700 From: Luis Chamberlain To: jim.cromie@gmail.com Cc: linux-modules@vger.kernel.org, song@kernel.org, LKML , Jason Baron , Greg KH Subject: Re: kmemleaks on ac3b43283923 ("module: replace module_layout with module_memory") Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 31, 2023 at 11:08:23AM -0600, jim.cromie@gmail.com wrote: > :#> uptime > 09:45:32 up 1 day, 23:07, 0 users, load average: 0.07, 0.04, 0.01 > :#> uname -a > Linux (none) 6.3.0-rc1-f2-00001-gac3b43283923 #359 SMP PREEMPT_DYNAMIC > Wed Mar 29 09:33:11 MDT 2023 x86_64 x86_64 x86_64 GNU/Linux > > the leaks I sent previously might be from/on a different commit, > heres the relevant one > > fwiw, the config is unremarkable. it started with > CONFIG_BUILD_SALT="5.16.8-200.fc35.x86_64" > then `make localmodconfig` to drop anything I dont have hw for > then `virtme-configkernel --update` to pick up the 9p,etc config options > And some extra DEBUG_* options > If you'd like to see runs with others, or see the config itself, please ask. If you wanna see things explode echo 0 > /proc/sys/vm/oom_dump_tasks ./stress-ng --module 20 --module-name xfs This assumes xfs is not already loaded, and has all dependencies already loaded. What would test the load_module() path. If you wanna see if the test is earlier, you can try a module which is already loaded on your system. > :#> uname -a > Linux (none) 6.3.0-rc1-f2-00001-gac3b43283923 #359 SMP PREEMPT_DYNAMIC > Wed Mar 29 09:33:11 MDT 2023 x86_64 x86_64 x86_64 GNU/Linux > :#> ./grok_kmemleak -n > not: bless( { > 'backtraces' => { > '[<0000000058fb276d>] __kmalloc_node_track_caller+0x4a/0x140 > [<00000000a2f80203>] memdup_user+0x26/0x90 > [<00000000f7cd3624>] strndup_user+0x3f/0x60 > [<0000000098fd26c5>] load_module+0x188b/0x20e0 Can you do: gdb vmlinux l *(load_module+0x188b) And provide the output? > }, 'LeakSet' ) > mods: bless( { > 'backtraces' => { > '[<0000000058fb276d>] __kmalloc_node_track_caller+0x4a/0x140 > [<00000000ab7b01fd>] kstrdup+0x32/0x60 > [<000000005ed25b98>] kobject_set_name_vargs+0x1c/0x90 > [<0000000090fe19ca>] kobject_init_and_add+0x4d/0x90 > [<0000000045666935>] mod_sysfs_setup+0xa9/0x6e0 Ok that is a specific enough hint. I'll take a review of this sysfs path see what changed that could break. > [<00000000d6f7187b>] load_module+0x1de3/0x20e0 > [<0000000074361279>] __do_sys_finit_module+0x93/0xf0 > [<000000004caeb948>] do_syscall_64+0x34/0x80 > [<000000009f5d036c>] entry_SYSCALL_64_after_hwframe+0x46/0xb0' => 16 > }, Luis