From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B2C083887008 for ; Thu, 20 Jun 2024 01:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2C083887008 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B2C083887008 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718847485; cv=none; b=DI3qbx41JxWW8no8RgynH185frPIXyfIUR2X7m+xAVggdwKin87DRa+uthEsqcP75BBv1juB1cksfBXvufb6ziN73WM5tYQTZ/KR72HGv6BudIoDKk4Zsev6JLExKZImvueTfpZMTM+5x0Etynr6OakH9iViZH5NtloO4TszbNo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718847485; c=relaxed/simple; bh=JmjBDbSwgtyn12b1E/AJxNx0NQ0EpClH1B8ws8Om53I=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=G7TMS4/FeKbG5OA6enaj+Zo6JL8zJ4es40AR7ZeCKWvea7w/3M+jAq4IR8d8JvhY4ro99o+hwfJr9m1rhBYPAxNQM3rMfEuZNFhT6jgyv8Gu7QZ0QPqw8qAY6ehImv7qc6MQV3aSNjDt/cOv7/n31/M4YpsX32sJ5PzI1W7z7ew= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718847483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3oC5iiyLfZoxdaEW+LSrehXG8apBuR7lGHiH6aT8OGQ=; b=LN9KKSHZyR1wIXjwmmt53VzePECBdB/v2j/cZDpRaoe0QRad9YDHgCdIO26PVTJ/xkgN6l SR2e6SyiVl+MBk0barVLWji9JTvyZ3VrZR/OSw71+Q05mSj1TWERvbilWdPbivyj9RAiBY QMba9Fk+jxXW9PWo8wbp9c1QjY01Uoo= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-73-mnL4xtF7N-6yH4EuEH7Xow-1; Wed, 19 Jun 2024 21:38:01 -0400 X-MC-Unique: mnL4xtF7N-6yH4EuEH7Xow-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E04A81956083; Thu, 20 Jun 2024 01:38:00 +0000 (UTC) Received: from [10.22.8.53] (unknown [10.22.8.53]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7C8423000601; Thu, 20 Jun 2024 01:37:59 +0000 (UTC) Message-ID: Date: Wed, 19 Jun 2024 21:37:58 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: wcohen@redhat.com, mcermak@redhat.com Subject: Re: [PATCH] sym.c: fix module_kallsyms_on_each_symbol not exported To: tonyj@suse.de, systemtap@sourceware.org References: From: William Cohen In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, I plan on taking a look at this patch Thursday. Do you have a pointer to the environment (distribution, specific kernel) where systemtap failed WITHOUT this patch? Thanks, -Will On 6/18/24 12:52, tonyj@suse.de wrote: > module_kallsyms_on_each_symbol has never been exported (as noted by > 33fae2d0107f ("This one seems simply like a non-export"). > > If kallsyms_on_each_symbol is exported (a revert of upstream in our > SLES case) then '!defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED)' > is false and the local definition of module_kallsyms_on_each_symbol is > skipped. > > This results in: > ERROR: modpost: "module_kallsyms_on_each_symbol" undefined! > > Fixes: 33fae2d0107fb6166b4eac3fdffd277829849ab0 > Signed-off-by: Tony Jones > > diff --git a/runtime/sym.c b/runtime/sym.c > index 23dd3be30..102257965 100644 > --- a/runtime/sym.c > +++ b/runtime/sym.c > @@ -1180,7 +1180,8 @@ unsigned long kallsyms_lookup_name (const char *name) > } > #endif > > -#if defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL) && !defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED) > +#if defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL) > +#if !defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED) > #ifndef KALLSYMS_H_INCLUDED > #include > #endif > @@ -1209,11 +1210,12 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *, > _stp_error("BUG: attempting to use unavailable kallsyms_on_each_symbol!!\n"); > return 0; > } > +#endif // !defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED) > > +// XXX module_kallsyms_on_each_symbol has never been exported > #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0) > typedef typeof(&module_kallsyms_on_each_symbol) module_kallsyms_on_each_symbol_fn; > > -// XXX Will be linked in place of the kernel's module_kallsyms_on_each_symbol: > #if defined(STAPCONF_KALLSYMS_6_4) > int module_kallsyms_on_each_symbol(const char *modname, > int (*fn)(void *, const char *, >