mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
To: Tomas Glozar <tglozar@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg Ungerer <gerg@linux-m68k.org>
Subject: Re: [PATCH RFC 0/2] Add basic tracing support for m68k
Date: Mon, 2 Dec 2024 13:53:04 +0100	[thread overview]
Message-ID: <c2d5cfd5-8bdb-4060-a974-18f9c2b9a2d0@yoseli.org> (raw)
In-Reply-To: <CAP4=nvTjdZRfWtpvM+gThPv6SghW96i9YykA88vAFH5x39GZqw@mail.gmail.com>

Hi Tomas !

On 28/11/2024 16:25, Tomas Glozar wrote:
> po 18. 11. 2024 v 11:13 odesílatel Jean-Michel Hautbois
> <jeanmichel.hautbois@yoseli.org> napsal:
>>
>> I had to modify the source code a bit, as it does not compile with my
>> uclibc toolchain:
>> ...
> 
> glibc added a gettid() wrapper with version 2.30; earlier glibc and
> uclibc do not have it. That can be fixed by conditionally including
> the inline function if on glibc lower than 2.30 or another libc; for
> reference on how to detect that, see how kernel self tests do it [1].

Thanks, I will cook a patch !

> As of the FOPTS changes: are those necessary for rtla to build, or
> were you just using them for easier debugging? AFAIK rtla shouldn't
> depend on unwind tables or stack protection for functionality.

Well, my toolchain does not support it, so it fails at link time:
   LINK    /home/yocto/Projects/wabtec/linux/tools/tracing/rtla/rtla
/opt/m68k-buildroot-linux-uclibc_sdk-buildroot/bin/../lib/gcc/m68k-buildroot-linux-uclibc/13.3.0/../../../../m68k-buildroot-linux-uclibc/bin/ld: 
/tmp/ccih6k6Z.ltrans0.ltrans.o: in function `err_msg':
/home/yocto/Projects/wabtec/linux/tools/tracing/rtla/src/utils.c:30:(.text+0x1a0): 
undefined reference to `__stack_chk_guard'
/opt/m68k-buildroot-linux-uclibc_sdk-buildroot/bin/../lib/gcc/m68k-buildroot-linux-uclibc/13.3.0/../../../../m68k-buildroot-linux-uclibc/bin/ld: 
/home/yocto/Projects/wabtec/linux/tools/tracing/rtla/src/utils.c:39:(.text+0x1e0): 
undefined reference to `__stack_chk_guard'
  <snip>

That's why I removed this option.

>>
>> But it is not enough, as executing rtla fails with a segfault.
>> I can dump a core, but I could not manage to build gdb for my board so I
>> can't debug it (I don't know how to debug a coredump without gdb !).
>>
>> JM
>>
> 
> I have seen a similar libtraceevent-related rtla segfault recently on
> ARM64, which was fixed by updating libtraceevent to a version that
> includes the fix. Such issues are caused by the files for kernel
> tracepoint tracefs having different contents on different
> architectures, exposing bugs. I see Steven has already fixed one of
> the issues on m68k [2].

I will try to use the very last versions of both libtracefs and 
libtracevent and see if it is still happening !

Thanks !
JM

> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/nolibc/nolibc-test.c#n1008
> [2] https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/commit/?id=45a9b0647c904b7bf1240da5a11fe3a1ffd1006d
> 
> Tomas
> 


  reply	other threads:[~2024-12-02 12:53 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  9:44 Jean-Michel Hautbois
2024-10-21  9:44 ` [PATCH RFC 1/2] m68k: Add tracirqs Jean-Michel Hautbois
2024-10-22  5:28   ` Steven Rostedt
2024-10-22  5:42     ` Jean-Michel Hautbois
2024-10-22  8:30       ` Steven Rostedt
2024-10-22  9:21         ` Jean-Michel Hautbois
2024-10-23  8:47           ` Steven Rostedt
2024-10-23  9:07             ` Jean-Michel Hautbois
2024-10-23  9:13               ` Geert Uytterhoeven
2024-10-23  9:31                 ` Jean-Michel Hautbois
2024-10-23 10:30                   ` Jean-Michel Hautbois
2024-10-23  3:53   ` Michael Schmitz
2024-10-23  5:53     ` Jean-Michel Hautbois
2024-10-23  7:30       ` Michael Schmitz
2024-10-23  8:59         ` Jean-Michel Hautbois
2024-10-23  9:27           ` Steven Rostedt
2024-10-23  8:51       ` Eero Tamminen
2024-10-21  9:44 ` [PATCH RFC 2/2] arch: m68k: Add STACKTRACE support Jean-Michel Hautbois
2024-11-27 11:26   ` Jean-Michel Hautbois
2024-12-02 14:41     ` Greg Ungerer
2024-12-02 14:51       ` Jean-Michel Hautbois
2024-12-02 14:52       ` Jean-Michel Hautbois
2024-12-02 23:01         ` Greg Ungerer
2024-12-03  6:25           ` Jean-Michel Hautbois
2024-12-02 17:53       ` Jean-Michel Hautbois
2024-11-15  8:26 ` [PATCH RFC 0/2] Add basic tracing support for m68k Jean-Michel Hautbois
2024-11-15 15:25   ` Steven Rostedt
2024-11-15 15:33     ` Jean-Michel Hautbois
2024-11-15 19:55       ` Steven Rostedt
2024-11-18 10:11         ` Jean-Michel Hautbois
2024-11-18 20:20           ` Steven Rostedt
2024-11-19 14:24             ` Jean-Michel Hautbois
2024-11-19 15:26               ` Steven Rostedt
2024-11-19 16:28                 ` Steven Rostedt
2024-11-19 16:44                   ` Steven Rostedt
2024-11-19 18:06                   ` Jean-Michel Hautbois
2024-11-19 18:10                     ` Steven Rostedt
2024-11-20 11:47                       ` Jean-Michel Hautbois
2024-11-20 15:31                         ` Steven Rostedt
2024-11-20 15:59                           ` Jean-Michel Hautbois
2024-11-20 16:43                             ` Steven Rostedt
2024-11-20 16:51                               ` Jean-Michel Hautbois
2024-11-19 18:25                     ` Michael Schmitz
2024-11-28 15:25           ` Tomas Glozar
2024-12-02 12:53             ` Jean-Michel Hautbois [this message]
2024-12-02 14:45               ` Tomas Glozar

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=c2d5cfd5-8bdb-4060-a974-18f9c2b9a2d0@yoseli.org \
    --to=jeanmichel.hautbois@yoseli.org \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglozar@redhat.com \
    /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

all inboxes | Powered by JetHome®