All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] openposix: timer_*/speculative: Handle SIGSEGV on invalid timer ID
Date: Tue, 29 Sep 2026 14:00:46 +0200	[thread overview]
Message-ID: <aruobnaT_g0U7CDo@yuki.lan> (raw)
In-Reply-To: <20260929114945.GA2456273@pevik>

Hi!
> I'm not sure if the approach of creating bogus timer_t is a good idea anyway.
> Shouldn't be just some timer_t tid set to invalid value? That would IMHO be
> less awkward solution.

There is no documented invalid value. It's a opaque handle we get from
libc and different versions of libc interpret the value differently.
Sometimes it's a pointer, sometimes it is not and we have no idea what
it is until we try to pass it to the timer functions.

So choosing safe enough safe value and handling SIGSEGV is probably the
best we can do.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-09-29 12:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08 15:03 [LTP] [PATCH v2] openposix: timer_*/speculative: Handle SIGSEGV on invalid timer ID Avinesh Kumar via ltp
2026-08-08 15:31 ` [LTP] " linuxtestproject.agent
2026-09-29 11:49 ` [LTP] [PATCH v2] " Petr Vorel
2026-09-29 12:00   ` Cyril Hrubis [this message]
2026-09-29 12:16     ` Petr Vorel
2026-09-29 13:24     ` Petr Vorel

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=aruobnaT_g0U7CDo@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.