From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id D88FA212B3 for ; Sun, 7 Apr 2024 19:37:18 +0200 (CEST) Received: (qmail 3118 invoked by uid 550); 7 Apr 2024 17:37:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 2047 invoked from network); 7 Apr 2024 17:37:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1712511424; x=1713116224; i=nullplan@gmx.net; bh=l9b2wX5L2JidwMaeKIHUvIJ2MRJrQ+Lag2FJ0Fk0mEs=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References: In-Reply-To; b=hTMd+T6IoczneWB+S91Q3wCmFNSjFILl1dEJRcPWxKjlJKI+t0DiVtWEWoAKn69N OkRizneMmEWKKakjQ7eGPNzCXfRHAcXVLC9W8kzUs9qeTIIez3VPWpto3cyKGne5o RPG8Q0GJaBCpZWsxajP2f88o3q78VXuguN7wXN36ns2h3QXZJj5oBwXrvNF13cNx7 2epjXZD14sxQp9sRCeNQVbo8GN25/8zNXhh3mt28GhJK/J4b1jLq7IwKUo23FOmwU zm6kHk6LtKCiimMHu6kraP/h27l6wAyqWAG300KEqL7OXK0yqRrvvSLcV/5xsa2Y8 jB9CPlawWx8+5pdnAg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Sun, 7 Apr 2024 19:37:03 +0200 From: Markus Wichmann To: musl@lists.openwall.com Cc: busybox@busybox.net, Waldemar Brodkorb Message-ID: References: <20240407191848.5c811765@windsurf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240407191848.5c811765@windsurf> X-Provags-ID: V03:K1:6POJoRJdO6jAR8vkbEpktlA6oUrPJ3Mp86CZBWhFHLZuExhmxmQ YUsuvNMW1pd1BhGP8J8O+sk5MUgvAmoQFaqxMRjronsdRID9Fg/Vs+mu8eAeVojrChGq/Xi FlTEUKUJ/AuN0rNuOFzaak3OsrdGM5apSAPl1XWXHWxD5sD1uviCe5LbZRUKgWV9P2Hr7NO 3A0pJrJXc4zjr7QpWLG4Q== UI-OutboundReport: notjunk:1;M01:P0:fhPj9Ojaiwk=;22vgYXwfP8nch77nU0LFDCG+JjB 8VOlVgOhW8DzjeztFE2QinE+fhQVuxOiECgbCDQDTD3RrySjawh7fEXaawzstrfjjCiUO6wIn xovDKtVVIrZWfFDYLAtVN5I63xYBLCZh4eG4L1ZES6kOZR/j4Q/5QM1Jp4jyqoUbFV5MWXUfm bgfvmckPo9REmW0LyRh89lgc4W7veI0AjpiT1eFB5R0gxQ4Md5ZPkHTiSPKZnqtxsultnH86F DMcajw+HoXIy2dQHkOHUyTJxiEDduSyr3eG2hhKqAnhFMmShg9LE77e8OvCxPs6xPacyHkShv cHfJ49LkaiTqSwZM4POiVBAyMMWNFUUF9kwBh+kBh2ELmcbl8ZKf6tqu6HjWta43C4lBVD6wb Vs0WWaEvhUyiKBeodg8kkQ6Tv0VRFN7SYEFKhjDOaWIPp+ZERTQ1u9VgTQdVvya3c3tgPG1az czKHMiHw55MnxF3MWD58SETim1EruEdh8vWkhsu6VfzU583b+YF0Ica3WQFo3nX2oU68PKKvg 6WeSxd1BTTggky0KnEMf4dHvMXPM0JSYURWxZzMjotwcm74mDhEKuXGIFuoSUYeXsC/mr2zbr YLUhRGZYT46rRK3uxROjMVvFs1s2e42OJOqGNriV0SgCcscluq7FgCo3Ed6EsxnYvLWZmdA0L Dc9XsPqalcxJhEEn+Qaz9nzoPlQYyhdbWcqTy+dFHCSMGQC6DDFdEm8z6icjh+cWbf/AjtP0+ ARgoo1RDSS+8wErObE2ZHg/kZuumJatBlZOOniYWwM6MzdJ4AnVrklOuDKV47fXekgHH+fvRU tLDnH7p8dqXDJ6/Ohn5ZZfPIqoKMhn9GCmqxMw8zsCL+4= Subject: Re: [musl] Busybox hwclock failing to build with musl RISC-V 32-bit: SYS_settimeofday undefined Hi, this is a very much a Busybox problem. musl does provide settimeofday(), but it doesn't send the time zone to the kernel. This is because the kernel time zone has some hardcoded unexpected uses, to be nice about it. The Busybox maintainers don't like that musl doesn't do this, and so call the syscall directly. And this fails for RISC-V, which doesn't have a SYS_settimeofday. I mean, it also fails for all the 32-bit architectures which do have a SYS_settimeofday but with a different timeval structure. But maybe the timezone structure is correct there. Busybox is trying to do the wrong thing here, simple as. The reasoning for not doing the right thing I have read is spurious at best. If the hwclock time is in local time, then /etc/localtime should be the correct time zone, and mktime() will provide the closest you are going to get to a "right" system time. Note that we recently had a thread about the perils of local time, and it is simply a mess, and sometimes libc has no good choices. Ciao, Markus