All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arnaud Panaïotis" <arnaud.panaiotis@gmx.fr>
To: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: with daemon.c after y2038 on 32-bits Kernel
Date: Mon, 30 May 2022 09:03:28 +0200	[thread overview]
Message-ID: <dcff1b34-8cd0-9369-69a2-13fedd7e96fc@gmx.fr> (raw)
In-Reply-To: <trinity-3d43505a-735f-402f-8b14-90a32b289a0c-1652773898430@3c-app-mailcom-bs07>

Hello,

I send a mail for this two weeks ago but didn't get any answer, I'm not
sure you received it or if a ticket has been open.

Could you provide me a feedback?

Let me know if you need more information.

Regards,

On 17/05/2022 09:51, Arnaud Panaïotis wrote:
> Hello,
>
> I'm working for a client to generate embedded 32-bits Linux Kernel working after y2038 issue.
>
> I generated a 5.15 Kernel thought Buildroot with Coreutils 9.0, GCC 11.2.0, Binutils 2.37, Glibc 2.34-9 and CFLAGS  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -D_TIME_BITS=64.
>
> I encounter an issue while working with OpenSSH (I initially contacted them before).
>
> After 2038, /usr/sbin/sshd does not create an error but it child does generate this one:
> daemon() failed: Value too large for defined data type
>
> This happend here in sshd.c:
>
> 2019         /*
> 2020          * If not in debugging mode, not started from inetd and not already
> 2021          * daemonized (eg re-exec via SIGHUP), disconnect from the controlling
> 2022          * terminal, and fork.  The original process exits.
> 2023          */
> 2024         already_daemon = daemonized();
> 2025         if (!(debug_flag || inetd_flag || no_daemon_flag || already_daemon)) {
> 2026
> 2027                 if (daemon(0, 0) == -1)
> 2028                         fatal("daemon() failed: %.200s", strerror(errno));
>
> To reproduce:
>
> # date -s "2040-05-12"
> # hwclock --systohc
> # reboot
> # /usr/sbin/sshd
>
> Note this error occurs only after the reboot, and setting a date before 2038 also require a reboot to remove the error.
>
> strace and gdb trace linked.
>
> Let me know if you need additional information.
>
> Best regards,
>
> PS: I had a similar issue with binutils cp
> Discussion : debbugs.gnu.org/cgi/bugreport.cgi?bug=55023
> Fix : sourceware.org/bugzilla/show_bug.cgi?id=29097
>
> --
> Arnaud PANAÏOTIS | Lead Developer Freelance
> +33 6 34 82 12 62 | arnaud.panaiotis@gmx.fr
>
> 18 place Jean Moulin - 38000 Grenoble
> APsudo - www.panaiotis.fr
--

*Arnaud PANAÏOTIS* | Lead Developer Freelance
+33 6 34 82 12 62 | arnaud.panaiotis@gmx.fr <mailto:Arnaud Panaïotis
<arnaud.panaiotis@gmx.fr>>

18 place Jean Moulin - 38000 Grenoble
APsudo - www.panaiotis.fr <https://www.panaiotis.fr>

--
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


  reply	other threads:[~2022-05-30  7:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  7:51 PROBLEM: with daemon.c after y2038 on 32-bits Kernel Arnaud Panaïotis
2022-05-30  7:03 ` Arnaud Panaïotis [this message]
2022-05-31  8:24 Arnd Bergmann
2022-05-31  8:33 ` Arnd Bergmann
2022-05-31 10:54   ` Adhemerval Zanella
2022-05-31 12:16     ` Arnaud Panaïotis
2022-05-31 13:02       ` Szabolcs Nagy
2022-05-31 13:24         ` Arnaud Panaïotis

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=dcff1b34-8cd0-9369-69a2-13fedd7e96fc@gmx.fr \
    --to=arnaud.panaiotis@gmx.fr \
    --cc=linux-kernel@vger.kernel.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 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.