xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Florian Bezdeka <florian.bezdeka@siemens.com>
To: jan.kiszka@siemens.com, xenomai@lists.linux.dev
Cc: Florian Bezdeka <florian.bezdeka@siemens.com>
Subject: [PATCH 0/3] y2038: Part three - support for select()
Date: Wed, 17 May 2023 11:34:39 +0200	[thread overview]
Message-ID: <20230516-florian-y2038-part-three-v1-0-b140278b26c6@siemens.com> (raw)

Hi all,

I'm trying to bring the remaining patches from my y2038 queue into Xenomai 
next/master branches. The full queue [1] holds ~7 patches. I'm trying to 
split that up to keep reviewing efforts low.

This series brings y2038 support for select().

select() is somehow special. Linux does not support a y2038 safe
implementation for select() itself. If the application needs y2038
support the application has to use something like the pselect() service.

To make select() y2038 safe glibc wrapps select() and wires it to the 
pselect() Linux service.

Xenomai (cobalt) does not provide pselect() yet and it's not easy to 
implement that. The reasons:

  - The underlying xnsynch infrastructure is not prepared for waiting for a
    combination of file descriptors and signals. (Let me know if I
    overlooked something!)

  - Implementing pselect() would require up to 6 parameters that need to
    be forwarded to the kernel. Xenomais current limit is 5.

To get select() y2038 safe a "pselect64() like" service service is being
added. The signal part is skipped.

The wrapper for __select64() will be added later and will convert 
struct timeval to struct timespec64 in user space. This way select() 
provided by libcobalt gets y2038 support but pselect() is still not 
supported.

Best regards,
Florian

[1] https://gitlab.com/Xenomai/xenomai-hacker-space/-/tree/florian/y2038

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
Florian Bezdeka (3):
      y2038: cobalt/posix/select: Refactor __cobalt_select()
      y2038: cobalt/posix/select: Adding pselect64
      y2038: testsuite/smokey/y2038: Adding tests for pselect64

 include/cobalt/uapi/syscall.h                      |  1 +
 .../cobalt/include/asm-generic/xenomai/syscall.h   | 22 +++++
 kernel/cobalt/posix/clock.h                        |  6 +-
 kernel/cobalt/posix/io.c                           | 94 ++++++++++++++--------
 kernel/cobalt/posix/io.h                           |  8 +-
 kernel/cobalt/posix/syscall32.c                    | 24 +++++-
 kernel/cobalt/trace/cobalt-posix.h                 |  3 +-
 testsuite/smokey/y2038/syscall-tests.c             | 70 ++++++++++++++++
 8 files changed, 190 insertions(+), 38 deletions(-)
---
base-commit: a74abe52269f191654b449357bd9aaa57f2cd75c
change-id: 20230516-florian-y2038-part-three-3093da9fecf8

Best regards,
-- 
Florian Bezdeka <florian.bezdeka@siemens.com>


             reply	other threads:[~2023-05-17  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  9:34 Florian Bezdeka [this message]
2023-05-17  9:34 ` [PATCH 1/3] y2038: cobalt/posix/select: Refactor __cobalt_select() Florian Bezdeka
2023-05-17  9:34 ` [PATCH 2/3] y2038: cobalt/posix/select: Adding pselect64 Florian Bezdeka
2023-05-17  9:34 ` [PATCH 3/3] y2038: testsuite/smokey/y2038: Adding tests for pselect64 Florian Bezdeka
2023-05-17 11:01 ` [PATCH 0/3] y2038: Part three - support for select() Jan Kiszka
2023-05-21 10:07   ` Florian Bezdeka
2023-05-23  9:13     ` Jan Kiszka

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=20230516-florian-y2038-part-three-v1-0-b140278b26c6@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).