Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Luis Henriques <luis@igalia.com>
To: "Achill Gilgenast" <fossdd@pwned.life>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	 "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	 "Linus Torvalds" <torvalds@linux-foundation.org>,
	 "Shuah Khan" <skhan@linuxfoundation.org>,
	 <linux-kselftest@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,  <stable@vger.kernel.org>
Subject: Re: [RESEND PATCH v2] kallsyms: fix build without execinfo
Date: Tue, 01 Jul 2025 17:19:51 +0100	[thread overview]
Message-ID: <87ecuz51eg.fsf@igalia.com> (raw)
In-Reply-To: <DB0OSTC6N4TL.2NK75K2CWE9JV@pwned.life> (Achill Gilgenast's message of "Tue, 01 Jul 2025 13:37:37 +0200")

On Tue, Jul 01 2025, Achill Gilgenast wrote:

> On Mon Jun 23, 2025 at 1:53 PM CEST, Achill Gilgenast wrote:
>> On Sun Jun 22, 2025 at 8:36 PM CEST, Andrew Morton wrote:
>>> On Sun, 22 Jun 2025 03:45:49 +0200 Achill Gilgenast <fossdd@pwned.life> wrote:
>>>
>>>> Some libc's like musl libc don't provide execinfo.h since it's not part
>>>> of POSIX. In order to fix compilation on musl, only include execinfo.h
>>>> if available (HAVE_BACKTRACE_SUPPORT)
>>>> 
>>>> This was discovered with c104c16073b7 ("Kunit to check the longest symbol length")
>>>> which starts to include linux/kallsyms.h with Alpine Linux' configs.
>>>> 
>>>> ...
>>>>
>>>> --- a/tools/include/linux/kallsyms.h
>>>> +++ b/tools/include/linux/kallsyms.h
>>>> @@ -18,6 +18,7 @@ static inline const char *kallsyms_lookup(unsigned long addr,
>>>>  	return NULL;
>>>>  }
>>>>  
>>>> +#ifdef HAVE_BACKTRACE_SUPPORT
>>>>  #include <execinfo.h>
>>>>  #include <stdlib.h>
>>>>  static inline void print_ip_sym(const char *loglvl, unsigned long ip)
>>>
>>> I'm not seeing anything in there which needs execinfo.h.  Can we simply
>>> remove the inclusion?
>>
>> No, since backtrace_symbols is provided by execinfo.h.
>
> Is there some status on it? I saw you picked it in mm-hotfixes-unstable,
> but it got dropped out again.
>
> Is there something I can do to push it?

FWIW I can confirm this is indeed a regression.  And specially annoying
because it has been backported into stable kernels (even if having kunit
tests backported sounds odd to me).

It would be great to have this fixed, or reverted.

Cheers,
-- 
Luís

  reply	other threads:[~2025-07-01 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-22  1:45 [RESEND PATCH v2] kallsyms: fix build without execinfo Achill Gilgenast
2025-06-22 18:36 ` Andrew Morton
2025-06-23 11:53   ` Achill Gilgenast
2025-07-01 11:37     ` Achill Gilgenast
2025-07-01 16:19       ` Luis Henriques [this message]
2025-07-01 19:09         ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ecuz51eg.fsf@igalia.com \
    --to=luis@igalia.com \
    --cc=akpm@linux-foundation.org \
    --cc=fossdd@pwned.life \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox