diff mbox series

kernel: Disable CONFIG_COMPAT_32BIT_TIME by default

Message ID 20210414132311.2390414-1-linus.walleij@linaro.org
State Changes Requested
Delegated to: Petr Štetiar
Headers show
Series kernel: Disable CONFIG_COMPAT_32BIT_TIME by default | expand

Commit Message

Linus Walleij April 14, 2021, 1:23 p.m. UTC
OpenWRT rebuilds the whole userspace from scratch and uses
recent versions of tools and libraries, thus it should not
be necessary in general to support CONFIG_COMPAT_32BIT_TIME,
not even for purely 32bit systems: their updated userspace
components should be fine with only 64bit time_t.

As OpenWRT is used as a base for embedded products for the
future market it is the right default to set.

Several targets enable this selectively, probably some of
them should consider disabling it and see what happens.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 target/linux/generic/config-5.10 | 1 +
 1 file changed, 1 insertion(+)

Comments

Rosen Penev April 14, 2021, 10:49 p.m. UTC | #1
On Wed, Apr 14, 2021 at 6:27 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> OpenWRT rebuilds the whole userspace from scratch and uses
> recent versions of tools and libraries, thus it should not
> be necessary in general to support CONFIG_COMPAT_32BIT_TIME,
> not even for purely 32bit systems: their updated userspace
> components should be fine with only 64bit time_t.
Funny.

time_t is still 32-bit for 32-bit targets. OpenWrt has not migrated to
musl 1.2.x.

https://github.com/openwrt/openwrt/pull/3004 is a pull request to do
so but it seems nobody has looked into merging it.
>
> As OpenWRT is used as a base for embedded products for the
> future market it is the right default to set.
I agree
>
> Several targets enable this selectively, probably some of
> them should consider disabling it and see what happens.
That's an upstream issue, no?
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  target/linux/generic/config-5.10 | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
> index 120d1d8c3f4a..024d65ba7c8d 100644
> --- a/target/linux/generic/config-5.10
> +++ b/target/linux/generic/config-5.10
> @@ -939,6 +939,7 @@ CONFIG_CMDLINE=""
>  CONFIG_COMPACTION=y
>  # CONFIG_COMPAL_LAPTOP is not set
>  # CONFIG_COMPAT is not set
> +# CONFIG_COMPAT_32BIT_TIME is not set
>  # CONFIG_COMPAT_BRK is not set
>  # CONFIG_COMPILE_TEST is not set
>  # CONFIG_CONFIGFS_FS is not set
> --
> 2.29.2
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Linus Walleij April 14, 2021, 11:47 p.m. UTC | #2
On Thu, Apr 15, 2021 at 12:49 AM Rosen Penev <rosenp@gmail.com> wrote:

> time_t is still 32-bit for 32-bit targets. OpenWrt has not migrated to
> musl 1.2.x.
>
> https://github.com/openwrt/openwrt/pull/3004 is a pull request to do
> so but it seems nobody has looked into merging it.

Oh that's a bummer. I was certain it was migrated...

Let's hold this off then.

Yours,
Linus Walleij
Rosen Penev April 14, 2021, 11:51 p.m. UTC | #3
On Wed, Apr 14, 2021 at 4:47 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Thu, Apr 15, 2021 at 12:49 AM Rosen Penev <rosenp@gmail.com> wrote:
>
> > time_t is still 32-bit for 32-bit targets. OpenWrt has not migrated to
> > musl 1.2.x.
> >
> > https://github.com/openwrt/openwrt/pull/3004 is a pull request to do
> > so but it seems nobody has looked into merging it.
>
> Oh that's a bummer. I was certain it was migrated...
The only 32-bit arch with a 64-bit time_t is ARC because of glibc. But
ARC equipment is practically nonexistent for the purposes of OpenWrt.
>
> Let's hold this off then.
>
> Yours,
> Linus Walleij
Petr Štetiar Feb. 19, 2022, 7:16 p.m. UTC | #4
Linus Walleij <linus.walleij@linaro.org> [2021-04-14 15:23:11]:

Hi,

> Several targets enable this selectively, probably some of
> them should consider disabling it and see what happens.

we're now using musl 1.2.2 so we should be good to go. So if you want to
proceed, can you please update this patch and make it default on all targets,
as we want to be consistent here, otherwise it might be a support nightmare,
thanks.

> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  target/linux/generic/config-5.10 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
> index 120d1d8c3f4a..024d65ba7c8d 100644
> --- a/target/linux/generic/config-5.10
> +++ b/target/linux/generic/config-5.10
> @@ -939,6 +939,7 @@ CONFIG_CMDLINE=""
>  CONFIG_COMPACTION=y
>  # CONFIG_COMPAL_LAPTOP is not set
>  # CONFIG_COMPAT is not set
> +# CONFIG_COMPAT_32BIT_TIME is not set
>  # CONFIG_COMPAT_BRK is not set
>  # CONFIG_COMPILE_TEST is not set
>  # CONFIG_CONFIGFS_FS is not set
Hauke Mehrtens Feb. 20, 2022, 3:37 p.m. UTC | #5
On 2/19/22 20:16, Petr Štetiar wrote:
> Linus Walleij <linus.walleij@linaro.org> [2021-04-14 15:23:11]:
> 
> Hi,
> 
>> Several targets enable this selectively, probably some of
>> them should consider disabling it and see what happens.
> 
> we're now using musl 1.2.2 so we should be good to go. So if you want to
> proceed, can you please update this patch and make it default on all targets,
> as we want to be consistent here, otherwise it might be a support nightmare,
> thanks.

OpenWrt also supports the option to be build with glibc and by default 
glibc still uses 32 bit time on most 32 bit targets, ARC being the only 
64 bit time glibc target.

There is an option in glibc to switch to 64 bit time on 32 bit targets, 
but we haven't activated it yet.

Hauke

>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>>   target/linux/generic/config-5.10 | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
>> index 120d1d8c3f4a..024d65ba7c8d 100644
>> --- a/target/linux/generic/config-5.10
>> +++ b/target/linux/generic/config-5.10
>> @@ -939,6 +939,7 @@ CONFIG_CMDLINE=""
>>   CONFIG_COMPACTION=y
>>   # CONFIG_COMPAL_LAPTOP is not set
>>   # CONFIG_COMPAT is not set
>> +# CONFIG_COMPAT_32BIT_TIME is not set
>>   # CONFIG_COMPAT_BRK is not set
>>   # CONFIG_COMPILE_TEST is not set
>>   # CONFIG_CONFIGFS_FS is not set
>
diff mbox series

Patch

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 120d1d8c3f4a..024d65ba7c8d 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -939,6 +939,7 @@  CONFIG_CMDLINE=""
 CONFIG_COMPACTION=y
 # CONFIG_COMPAL_LAPTOP is not set
 # CONFIG_COMPAT is not set
+# CONFIG_COMPAT_32BIT_TIME is not set
 # CONFIG_COMPAT_BRK is not set
 # CONFIG_COMPILE_TEST is not set
 # CONFIG_CONFIGFS_FS is not set