From patchwork Wed Mar 22 01:36:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 73145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2108692wrt; Tue, 21 Mar 2023 18:43:33 -0700 (PDT) X-Google-Smtp-Source: AK7set/UKXtxVUlKYoSbVo+C1vJt7FhZJfC92QITld51T1RA5WE4D0MGLBr4i3y1Jy1gbM5tirC4 X-Received: by 2002:a17:902:c947:b0:1a1:a68b:7255 with SMTP id i7-20020a170902c94700b001a1a68b7255mr1162910pla.67.1679449413744; Tue, 21 Mar 2023 18:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679449413; cv=none; d=google.com; s=arc-20160816; b=XBh30Nay4HKUoTYC8OAL4zKXiHI1BQllJaTLo0q/EwbwgvEakUXJPxOHjqnk+txpR1 +iNAYn4GO8DawBhkwZShCeYBQyRliAfdhdBmtt7Rsc2UQ8Tu4j3iOKvqyEQK5ldxQyts xwDmXUbwjwzbwNQyH4nTZ4xJiVxXEPAj/4UrrVNPHIzzZRcWXmUsiFhxxzJmwwZcedMl E2KYErM3RSxRPxl4qfrmby1eTJilkU5k/zYTPiPCh1O0M/+i/6RFXl5mBPXc3faJnB11 +pHutmVl1FkTRS0+X9ICSg3GUMcVZXrQj/cIoNFQsM/UJefpn+teiZ8+Lth/rLq+uA0O U5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IAvSDTaQNCs+gy/ESSErpV55nInpY/nvxkb3Bc1Sf+Q=; b=qdelyXuyhcIJ32vLOCgUdz6+8rvnxOclO60oTN0NZSbN0oijB3gGwMO/KcI3wLByIf 4AlbWFQm1eK/zxYNlpe065R15x6wBu/N+BJh5RCxOaZcirv+N8Ai4rrJiIDkwdGwqLg9 N7KfG6mIfw5dJLX++b0qsw/P6SH2PTOgbyfo+iPRLa6zVkt+6QpKSvy4G7ANtwxNKzIz Tyv6CYY7Oao5Cyk98I8gII2NJtTcUeuXOjJ4Vs63ojcD/dyPhw9HbrggmuQT5T4/7QE9 pDYUA7ni5lBeoJPcPd7aQq96OGhOdWDTwVpwIhoHZD7ChZQK3hFGnbdlJ71LQ9pnpywD GdXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YtkuE4e6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a63004c000000b00502d85bfb5fsi15251373pga.451.2023.03.21.18.43.20; Tue, 21 Mar 2023 18:43:33 -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=@gmail.com header.s=20210112 header.b=YtkuE4e6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjCVBhK (ORCPT + 99 others); Tue, 21 Mar 2023 21:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjCVBg7 (ORCPT ); Tue, 21 Mar 2023 21:36:59 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F3745A92E; Tue, 21 Mar 2023 18:36:40 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id h2so4609429iow.0; Tue, 21 Mar 2023 18:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679448993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IAvSDTaQNCs+gy/ESSErpV55nInpY/nvxkb3Bc1Sf+Q=; b=YtkuE4e6GTaL+l4VQm0Go5MDVaO0GXT4CxCeRqw1liR/AdZVkzunI8FJAZEeFn4+t+ AOQwLIsaD1NVe3WUoyWnNaqdEPu5hj7Bvji8FtIar4uEdZJ+ypHNwQ9uBmcr8LRuQSqA b//GoOac8z8vWIoqxV7jAyVN5y3OHtjdMaLSyCBiGguQhGCNCQT8O2xG6Q8gk2TGcmWd M9i7REryIqfVB42yQR+OV1lGanWak9kHGk1e/cT6cHvTQp8kiEfF3WXBQAWv++GunfQO GFNhMluh2zYkNtUXkhp0pfdt9jqApl/C940xoSBtJOGr+m/Vhvbdj59WztmiD5os8mn9 o2uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679448993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IAvSDTaQNCs+gy/ESSErpV55nInpY/nvxkb3Bc1Sf+Q=; b=DO4gz2pLA9DndVgbAex5E88Rv1SG8q7Upy+bX426xZDxzOGlmRZSODbU8iPGGRIse7 ubjKCTwzgJ/KDgvwr1m1gL8E9xx6V3GlYFddu4mLJglpktSyATxeWM7rL4kOjZnzmaCQ EI+ZH8Tu8/LY2yp+jdvqhmqDSxuuzhyloXJcIZh6XBM/IBTHBUH2Z6Cxxg4hO5SYI1LM v2UNaCCVWyVK7WSQxYJuOgDbWWOSXoMjVt7vY3NfIup1XOcNYycY1uWIKT9pSoV73Y/M TSQMAYGTUtA8UJY6iXeoWjdYnwMfaJ5dX8Z8DvD4DFSPZIdRxPksYg8aJQK54pNqXXI7 +ZZg== X-Gm-Message-State: AO0yUKVNrKjAUS396DzuY9HmlnAEBESnqRnPX4XUSVEienjrUbAIro29 vD7BwCEewgNWcDBxybiSDrM= X-Received: by 2002:a6b:e704:0:b0:74c:b686:6227 with SMTP id b4-20020a6be704000000b0074cb6866227mr3355463ioh.14.1679448993133; Tue, 21 Mar 2023 18:36:33 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id a22-20020a6b6616000000b007530bbfa577sm3925058ioc.18.2023.03.21.18.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 18:36:32 -0700 (PDT) From: Jim Cromie To: mcgrof@kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [PATCH 1/4] module: in layout_sections, move_module: add the modname Date: Tue, 21 Mar 2023 19:36:20 -0600 Message-Id: <20230322013623.251401-2-jim.cromie@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322013623.251401-1-jim.cromie@gmail.com> References: <20230322013623.251401-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761030348747495649?= X-GMAIL-MSGID: =?utf-8?q?1761030348747495649?= layout_sections() and move_module() each issue ~50 messages for each module loaded. Add mod-name into their 2 header lines, to help the reader find his module. no functional changes. Signed-off-by: Jim Cromie --- kernel/module/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index b4759f1695b7..39f267c40286 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -1523,10 +1523,10 @@ static void layout_sections(struct module *mod, struct load_info *info) for (i = 0; i < info->hdr->e_shnum; i++) info->sechdrs[i].sh_entsize = ~0UL; - pr_debug("Core section allocation order:\n"); + pr_debug("Core section allocation order for %s:\n", mod->name); __layout_sections(mod, info, false); - pr_debug("Init section allocation order:\n"); + pr_debug("Init section allocation order for %s:\n", mod->name); __layout_sections(mod, info, true); } @@ -2162,7 +2162,7 @@ static int move_module(struct module *mod, struct load_info *info) } /* Transfer each section which specifies SHF_ALLOC */ - pr_debug("final section addresses:\n"); + pr_debug("Final section addresses for %s:\n", mod->name); for (i = 0; i < info->hdr->e_shnum; i++) { void *dest; Elf_Shdr *shdr = &info->sechdrs[i]; From patchwork Wed Mar 22 01:36:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 73143 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2107953wrt; Tue, 21 Mar 2023 18:40:52 -0700 (PDT) X-Google-Smtp-Source: AK7set+rs6M3yf3R8mrpFPFLFO6gXCUqLgSL+Jt0O2kphYjJGsv4RwOYqErKzrSNU4PAqsj5gaHE X-Received: by 2002:a17:906:79c5:b0:90b:208:6179 with SMTP id m5-20020a17090679c500b0090b02086179mr555444ejo.28.1679449252412; Tue, 21 Mar 2023 18:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679449252; cv=none; d=google.com; s=arc-20160816; b=ZuS8nRn0lGqPkZFCmQZ1F37y4EX7NQodRJzD+JKNugUqGrgg24BgP7sdwh1pHAr6+I jnljAikz/xfPKvgXcLdpk1RmHWYUq5f8506Tf9uYIjCqxR3ztiVlm8akoPEKZA3UEZv+ 7W9YTub6TNLwDWQjKpG4v+E1Tj7/vI58KH15HkoxjM9XI5wJ2NLZiVhmA4NJeD9bpuYK 8o0vfls1k+TqIn4lrxa2DJkERCKqqcHqhzZUw+NAyzxU1c2wH9vJwPWjmHaN+4fI/sZw AOhOknBwoky5N2Dz4VvC+y9QxX3T6dp+x9k4aF3uyHoRXvm4Oc8PzgmfrqAcFNomUAGK ZU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=geHKdXSrTd+j0bEZzl4suSAJY2V13AlXRMEuZwesJq4=; b=rygS3McEKK/tgcP2sphWHhz1EDA1m2KJXifrRvPDQteq8YsgUBkznD4Oy/PHnPyMpo 5FnsySBgVq7xC8llCsKhwp2FfGaTObsrqU6TcYW19Syp24bHhccLBMROlPGUt5dN3RuV QTB8MF1G1cdqpadK86EZ+jt9D3YYceUmW1VsS4SCzbmMX+PwdmYPlvue1FZKfss0Qifm fmqxAdHuIIYSJQWQEVwQUPYTkqwmkMpbpKFvtfHCdQWWBefC7+bb2I07kRpGSXmyHl0J OFb3Tr7Y0K3+Bu8kVXrA2J3qXHHIgoO1Avk8Olg741Zn2ZeNb3o3GxePvrO4XKkNS86v HhHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Exufr2+F; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg17-20020a170907205100b0092fd56751ffsi13498757ejb.420.2023.03.21.18.40.27; Tue, 21 Mar 2023 18:40:52 -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=@gmail.com header.s=20210112 header.b=Exufr2+F; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbjCVBhP (ORCPT + 99 others); Tue, 21 Mar 2023 21:37:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbjCVBg7 (ORCPT ); Tue, 21 Mar 2023 21:36:59 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DDFC5A1AF; Tue, 21 Mar 2023 18:36:40 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id d14so4945371ion.9; Tue, 21 Mar 2023 18:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679448994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=geHKdXSrTd+j0bEZzl4suSAJY2V13AlXRMEuZwesJq4=; b=Exufr2+FbVYVB3TWRJVhvwsg8XcRWMUuRQptkHRHLVySLmV1zl7ipHgwLV1WPnAtfz 9s9W0Bf6jpkzFDFwuH7+Gim+gQsiRVzNT9VxjoEDBZdhBqUTnrYaMd0C7EcM/DicNDBd emCvxY2pqCAD6dF4vX1zHdw9EBswdlp333p46frCDHCIYwYHjogNnFuBgCbqx61+JlY7 QF41Rvi1utPIA6WEHJnef5WG91skX+HUGllM4t4nlg2yrTqTfDl68D1LrtQFbT9GXaJB PHWknxafPLiGb1RL6keJqd1kxW/4PkPWLqSX8/TVnUWD4FbBplxsvrmAplcjip3eJtia BYaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679448994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=geHKdXSrTd+j0bEZzl4suSAJY2V13AlXRMEuZwesJq4=; b=tblbSf0QcTZsSfhuuOzWSGJzuEnko1YCSuelYXRz95lZQUy+IrnUY3TNNBDDx7TsyK d7qgtrBXHU0k/7tFOydhKcbdooSFRLdnickvE+7i4KG1U2NGkhDcgbZrekiUeCe+4ETD vGxZDuU2Jviev61oBz3gbeU1J3eY0XtEztpsXqFCeyluUR99PfS4aG2PqdIN/Lhy/aqy P2adBIkCPZqZllurKkSpR9VFRn71/LMPg5hlef8FcHfR4IqwRx/FHQZrXcdJWb6dCmvL UAZdcctTJDBNi9B4M5tUFgZsEECxth1zYRVT77C7Uu3RP8UEEIu66RvayNL/drPHUV3y kBuw== X-Gm-Message-State: AO0yUKVKWOqvqMjCMOtqcCPI2PFNrrbFgvr9Cvhi8Be8K6+PCoNxozsR D86jYLu68xbCfmFAHDHhcaI= X-Received: by 2002:a5e:d60f:0:b0:74c:bb78:25d7 with SMTP id w15-20020a5ed60f000000b0074cbb7825d7mr3149817iom.19.1679448994193; Tue, 21 Mar 2023 18:36:34 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id a22-20020a6b6616000000b007530bbfa577sm3925058ioc.18.2023.03.21.18.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 18:36:33 -0700 (PDT) From: Jim Cromie To: mcgrof@kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [PATCH 2/4] module: add symbol-name to pr_debug Absolute symbol Date: Tue, 21 Mar 2023 19:36:21 -0600 Message-Id: <20230322013623.251401-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322013623.251401-1-jim.cromie@gmail.com> References: <20230322013623.251401-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761030179731900856?= X-GMAIL-MSGID: =?utf-8?q?1761030179731900856?= The pr_debug("Absolute symbol" ..) reports value, (which is usually 0), but not the name, which is more informative. So add it. no functional changes Signed-off-by: Jim Cromie --- kernel/module/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 39f267c40286..e248a3697ffb 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -1350,8 +1350,8 @@ static int simplify_symbols(struct module *mod, const struct load_info *info) case SHN_ABS: /* Don't need to do anything */ - pr_debug("Absolute symbol: 0x%08lx\n", - (long)sym[i].st_value); + pr_debug("Absolute symbol: 0x%08lx %s\n", + (long)sym[i].st_value, name); break; case SHN_LIVEPATCH: From patchwork Wed Mar 22 01:36:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 73148 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2111111wrt; Tue, 21 Mar 2023 18:51:44 -0700 (PDT) X-Google-Smtp-Source: AK7set/wDaKctKGOfkh2NavDlF9pxZpUg8LlVwY6GWjvJ25a3c8NenAK5ya2YK8u6kLw6kOLDMsb X-Received: by 2002:a17:907:cbc9:b0:93b:5f2:36c with SMTP id vk9-20020a170907cbc900b0093b05f2036cmr1488968ejc.61.1679449903999; Tue, 21 Mar 2023 18:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679449903; cv=none; d=google.com; s=arc-20160816; b=iU1oksKZyWIHLOYVBUbZCJwN94Zg3Gf+0yBx+2mR45XcCkBwDCy7FKO65rbRkfr/Um AlKakvDQXwQhCbVtWHgSK9svnbFnsMTDIlzoxZ8NQ4gTWgDTx4D0s+UAxXzPXRFaJ0Ju WUM8HNXJnCAJ0SQrZYR/3Tbx0p3nYG3BYPgAn1KtBh9WgzSEN5ZT7lqsh0oEM5IkpEm2 5vWiCTBQvT4we7vNJuecXuc8y5D2NhjOxEG/93Xys18kzYwaHc6YH21Hjq1esDuXB8y+ IqoqNejPFAk5eUyy8qKkEgebtD9n/PGC0YiO/sq1SJVRfJMsFCMWxCeeNJs3srVLAeLM nfwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fnkm/lF+4QiievpuG5aB+/enRuP0EybYte+rz+ieDGI=; b=I29hfFejhjyTNnOJnE2f8yRR/YnolXlsZBE6R4u2UFTl45XH48ST+lCJdIBcChPIJD qLLQ2jDc/oE37cFZKfp8Y6Np0g4H75Leh5zYLYoB4EE+Rf3MxibvmgBSzwI8LOX9+pzr +dk9d5RGVf01tcVTrdNDm4CL6CGZnP1xLGvZGGmuGMgzuxwJT8Cq5rufpPfvVFgyurOa YxGYe4UhCWU7slcGHC+Sz0hOy/8sHG0SWjzT35jaCrZJEGU7sBgEoYvI/Wl4WdumXKN+ xUiHwVRFVuYakh/yFuqSKei5pKEEaaQ9sl6ujmq7Nphv/UAQPCom8P0jFjSW+e1TgmQI rnvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Rp5FDiWA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a170906328600b009241a3a03cbsi179162ejw.722.2023.03.21.18.51.20; Tue, 21 Mar 2023 18:51:43 -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=@gmail.com header.s=20210112 header.b=Rp5FDiWA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbjCVBhR (ORCPT + 99 others); Tue, 21 Mar 2023 21:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjCVBhA (ORCPT ); Tue, 21 Mar 2023 21:37:00 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F6B3570A8; Tue, 21 Mar 2023 18:36:42 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id bf15so7814788iob.7; Tue, 21 Mar 2023 18:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679448995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fnkm/lF+4QiievpuG5aB+/enRuP0EybYte+rz+ieDGI=; b=Rp5FDiWA5X39lZ0AaWfjiZv1khAeB+MoVUr7Ai8MiF8gVBMeD4aZh53+AskX75aflF hT/lK79E2mYKR+Qt3AOhPWnSLfMIowGZgi4OpOelnj01aJeg9UsN3cvwG5xVgIFbkJ/D rL+snB5ydTmd6BsGwav3dmoXKplnouRi/IpGImKwBiiesl1fa5b2uEZp24TqprO/xGvr w7XrAXvyQ13XQbD0Mbe1Pl84w4+F7su4LrAjPEKxGKJPrKGjtHENiv2z4bJKYZGsDKCb zTE7C+t+o9erPLtkZzwCBGD0/B+yQiUNviON3gfvZKHh/8RzQ6uTmd9mUZiHaU0z5cUu tSqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679448995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fnkm/lF+4QiievpuG5aB+/enRuP0EybYte+rz+ieDGI=; b=q5fciN01zgSaWZIzcL9NFDU28HNT72W1Lbc2UCRXhDU8Z2sn4vQf20m8q3miwwTUL1 8ge4R0X5+ullNPeF0JFX2HQK5mWd1on1MnxMb7HkEUK5POO1/s6/F2UYLa3FGl26ZxN/ dVbHg651j0QvLYMWTbrbQgJUG0k0z7obJngZ/UpY21NtX4GpS5tYygKPzGZNnMq7C31o 57KWCBdQFcRmSsZTe78s7pK3AfX+kMcf34ZlRNYFztoewZs7SZCUQGmgfKIG67VJBPoJ mS5SGceWRdIgNcedX5WKepbJiA+lUH0WAZfuOIt3iatpcbnaCrGtBg7dwwOhNTfeETNF Nu1w== X-Gm-Message-State: AO0yUKX1mBFHxq+G2+tw4QjVJUjlLw7T/U6BEe96r6P2N4NKyTkFOXHA /Q/vXBRjaRm3B7SdxGc57t2G26KvNnw= X-Received: by 2002:a5e:850c:0:b0:758:b06f:6ab2 with SMTP id i12-20020a5e850c000000b00758b06f6ab2mr17376ioj.2.1679448995117; Tue, 21 Mar 2023 18:36:35 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id a22-20020a6b6616000000b007530bbfa577sm3925058ioc.18.2023.03.21.18.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 18:36:34 -0700 (PDT) From: Jim Cromie To: mcgrof@kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [PATCH 3/4] module: add section-size to move_module pr_debug Date: Tue, 21 Mar 2023 19:36:22 -0600 Message-Id: <20230322013623.251401-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322013623.251401-1-jim.cromie@gmail.com> References: <20230322013623.251401-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761030862177390020?= X-GMAIL-MSGID: =?utf-8?q?1761030862177390020?= move_module() pr_debug's "Final section addresses for $modname". Add section addresses to the message, for anyone looking at these. no functional changes. Signed-off-by: Jim Cromie --- kernel/module/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index e248a3697ffb..a2a8ed8564ae 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2177,8 +2177,8 @@ static int move_module(struct module *mod, struct load_info *info) memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size); /* Update sh_addr to point to copy in image. */ shdr->sh_addr = (unsigned long)dest; - pr_debug("\t0x%lx %s\n", - (long)shdr->sh_addr, info->secstrings + shdr->sh_name); + pr_debug("\t0x%lx 0x%.8lx %s\n", (long)shdr->sh_addr, + (long)shdr->sh_size, info->secstrings + shdr->sh_name); } return 0; From patchwork Wed Mar 22 01:36:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 73149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2111345wrt; Tue, 21 Mar 2023 18:52:36 -0700 (PDT) X-Google-Smtp-Source: AK7set+mMrZueRdHwrE4AhtPeV31DDy3BTwtmsOiGk4/r2igHRie3gq49Igoi9YhWVK/n3/LH9Fe X-Received: by 2002:a17:907:101d:b0:924:d90a:6f97 with SMTP id ox29-20020a170907101d00b00924d90a6f97mr5237735ejb.13.1679449956561; Tue, 21 Mar 2023 18:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679449956; cv=none; d=google.com; s=arc-20160816; b=XQSbOSiLE5xXSDUH0svHVuBbK85TS+B6G60WqKV2yuLlPfu8Jpv3RKl/yo+YaInuHu Dh6V82x7hhSo5hXcUl7UH9OHLbe6vz9O/wHUCutyDr8Dwfw2p+lMZOQrEj3oLkGjIPF4 lwQRDrH0hIF2pNZCg/YGrR+enKKeZ6EAtnl8w1EEYGh7AqHXg/rnoLahzKAXdAJiqvli Aumc/TvxCyQKJiY72sVzxC1YXW8ixie15ONaCHEFjtTBu61V1Siqu/dnSxCLIo6erLJI xec7B+QxnvVHagAf5j6KlJkNgI+slDzTJwRwbcttC+dmDJ7KfcTQQmbzEKpfn7FPq1Gy Vz7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xnvFcWzQC9kp0s3Ad9+shbkiRajCq0VM9LtHb2VW5NE=; b=UGKLECelglG0LYqVsTkkEcqvU1SIk3FOtKH1PQ5jWaF2y93v06nlnKvwROsgGCRZfw wmeLS7Fj1FkXoow5cNu0NBcuaP+z6zhJwqS47dOwBNRATDOz7b10WsWoc0Ol/lnlkdoA 2WtXYGpjoJ68iqMlk0xMIbSSBUAHUFfLZoyeRQVwSn+TjUjajvISeugEW0YUAZs9pNKM aKToHeyRdiE9ayYdzL7oo9iuCYbTPE3XPM/3b0dO3NSs5YnCfyOVWjNVScWH71KZWu4g 0OVJkRUziR3KboGNm1y/oa0r+mCKjMSMKLgG54KMrXEyusz+K1Ux8gKurJxDqUKzEYf0 DfAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="iI/r7oZW"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne28-20020a1709077b9c00b009372a2a6e7fsi6702653ejc.563.2023.03.21.18.52.13; Tue, 21 Mar 2023 18:52:36 -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=@gmail.com header.s=20210112 header.b="iI/r7oZW"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230252AbjCVBhU (ORCPT + 99 others); Tue, 21 Mar 2023 21:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbjCVBhB (ORCPT ); Tue, 21 Mar 2023 21:37:01 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341EA574D5; Tue, 21 Mar 2023 18:36:44 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id o14so7832781ioa.3; Tue, 21 Mar 2023 18:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679448996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xnvFcWzQC9kp0s3Ad9+shbkiRajCq0VM9LtHb2VW5NE=; b=iI/r7oZWPjB8fVKJxHIwCq0lhJMf7Au1DLZTtsnTwKYYgnnl26/qY+0JMi+AuQbLlS qcNb1K+gXIf8FH/7nwdKnRRmsPAPankblFbcVUAo14uPI4ZI/CHZQTyIdsw2tdN0+qlG XqRVcGYkDodvwGOw3dzt2sjHy4IiAgBySyktkFKh6wTMUdKssTdgK1O3H9UP49jnlKTe cLqYrohnCTBpZgnr5QVp5eu0HpNvkbTz2ubxgL7j3nG6O6+mHkH1LDxhxFyylJnc1PEB LvrnXmkuZhSS3LYjX7lXv2zHs51kbyqtBnyr4qpkIS0yxDRBRl1ihzMatJE8ufMQs8uD d0KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679448996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xnvFcWzQC9kp0s3Ad9+shbkiRajCq0VM9LtHb2VW5NE=; b=Eh1UqV4AcqYp65AGflP/uA0rk0fYtq7JTK9AQjGePaqk3veTP9lgzm0HkT0w8tJjjY Wmq0I4FnAqOIo5TUjfYxfdpSCVsYb1sgZDZPrGeYNvDE0GRebslRsu4tX+H4jZMyzswf a5yP0r0dreA8nrtM6nSEkP6irUNMkB6lT7bnSONebpJ/G3u66VGUlHlUn4yorcPbzkPc 9aSHHPZnPRqH3OWAVUMZ9eMMeHy1oXNnIg5+Y7ZxKGw9272ghCQBRxWGwJB4PKR4ld68 ysESAxtAcDgaqIFsD9i+9XGmlsDGfe2FP+wMe42F3Kiv1pRWqCqXdFpP7jE48T8fSiMY kx9Q== X-Gm-Message-State: AO0yUKX46Porf3xf17OGXedi6P1iA+FRDgJXs1ctrJ+pYOUEkvpZe36z WdBKf6nX5Sc1khyWCL90liM= X-Received: by 2002:a5e:cb03:0:b0:74e:3d8e:8e1e with SMTP id p3-20020a5ecb03000000b0074e3d8e8e1emr3414250iom.15.1679448995992; Tue, 21 Mar 2023 18:36:35 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id a22-20020a6b6616000000b007530bbfa577sm3925058ioc.18.2023.03.21.18.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 18:36:35 -0700 (PDT) From: Jim Cromie To: mcgrof@kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [PATCH 4/4] module: already_uses() - reduce pr_debug output volume Date: Tue, 21 Mar 2023 19:36:23 -0600 Message-Id: <20230322013623.251401-5-jim.cromie@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322013623.251401-1-jim.cromie@gmail.com> References: <20230322013623.251401-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761030917904167488?= X-GMAIL-MSGID: =?utf-8?q?1761030917904167488?= already_uses() is unnecessarily chatty. `modprobe i915` yields 491 messages like: [ 64.108744] i915 uses drm! This is a normal situation, and isn't worth all the log entries. NOTE: I've preserved the "does not use %s" messages, which happens less often, but does happen. Its not clear to me what it tells a reader, or what info might improve the pr_debug's utility. [ 6847.584999] main:already_uses:569: amdgpu does not use ttm! [ 6847.585001] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585014] main:already_uses:569: amdgpu does not use drm! [ 6847.585016] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585024] main:already_uses:569: amdgpu does not use drm_display_helper! [ 6847.585025] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585084] main:already_uses:569: amdgpu does not use drm_kms_helper! [ 6847.585086] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585175] main:already_uses:569: amdgpu does not use drm_buddy! [ 6847.585176] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585202] main:already_uses:569: amdgpu does not use i2c_algo_bit! [ 6847.585204] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585249] main:already_uses:569: amdgpu does not use gpu_sched! [ 6847.585250] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585314] main:already_uses:569: amdgpu does not use video! [ 6847.585315] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585409] main:already_uses:569: amdgpu does not use iommu_v2! [ 6847.585410] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585816] main:already_uses:569: amdgpu does not use drm_ttm_helper! [ 6847.585818] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6848.762268] dyndbg: add-module: amdgpu.2533 sites no functional changes. Signed-off-by: Jim Cromie --- kernel/module/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index a2a8ed8564ae..0a5583686994 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -563,10 +563,8 @@ static int already_uses(struct module *a, struct module *b) struct module_use *use; list_for_each_entry(use, &b->source_list, source_list) { - if (use->source == a) { - pr_debug("%s uses %s!\n", a->name, b->name); + if (use->source == a) return 1; - } } pr_debug("%s does not use %s!\n", a->name, b->name); return 0;