unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/5] login: Consolidate utmp and utmpx headers
@ 2020-07-29 20:51 Adhemerval Zanella via Libc-alpha
  2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-29 20:51 UTC (permalink / raw)
  To: libc-alpha; +Cc: Alistair Francis

It moves the 'struct lastlog', 'struct utmp', and 'struct utmpx' to
specific files and consolidates the s390-32 utmp.h and utmpx.h headers.

Checked on x86_64-linux-gnu and i686-linux-gnu.  I also checked with
a build for s390-linux-gnu.
---
 bits/struct_lastlog.h                         |  34 +++++
 bits/struct_utmp.h                            |  55 ++++++++
 bits/utmp.h                                   |  48 +------
 login/Makefile                                |   3 +-
 sysdeps/gnu/bits/struct_utmpx.h               |  55 ++++++++
 sysdeps/gnu/bits/utmpx.h                      |  34 +----
 .../sysv/linux/s390/bits/struct_lastlog.h     |  35 +++++
 .../unix/sysv/linux/s390/bits/struct_utmp.h   |  51 +++++++
 .../s390/bits/{utmpx.h => struct_utmpx.h}     |  57 +-------
 sysdeps/unix/sysv/linux/s390/bits/utmp.h      | 127 ------------------
 10 files changed, 238 insertions(+), 261 deletions(-)
 create mode 100644 bits/struct_lastlog.h
 create mode 100644 bits/struct_utmp.h
 create mode 100644 sysdeps/gnu/bits/struct_utmpx.h
 create mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
 create mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
 rename sysdeps/unix/sysv/linux/s390/bits/{utmpx.h => struct_utmpx.h} (56%)
 delete mode 100644 sysdeps/unix/sysv/linux/s390/bits/utmp.h

diff --git a/bits/struct_lastlog.h b/bits/struct_lastlog.h
new file mode 100644
index 0000000000..122a44abd0
--- /dev/null
+++ b/bits/struct_lastlog.h
@@ -0,0 +1,34 @@
+/* The 'struct lastlog' type.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _UTMP_H
+# error "Never include <bits/struct_lastlog.h> directly; use <utmp.h> instead."
+#endif
+
+/* The structure describing an entry in the database of
+   previous logins.  */
+struct lastlog
+  {
+#if __WORDSIZE_TIME64_COMPAT32
+    int32_t ll_time;
+#else
+    __time_t ll_time;
+#endif
+    char ll_line[UT_LINESIZE];
+    char ll_host[UT_HOSTSIZE];
+  };
diff --git a/bits/struct_utmp.h b/bits/struct_utmp.h
new file mode 100644
index 0000000000..4b05c91515
--- /dev/null
+++ b/bits/struct_utmp.h
@@ -0,0 +1,55 @@
+/* The 'struct utmp' type, describing entries in the utmp file.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _UTMP_H
+# error "Never include <bits/struct_utmp.h> directly; use <utmp.h> instead."
+#endif
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmp
+{
+  short int ut_type;		/* Type of login.  */
+  pid_t ut_pid;			/* Process ID of login process.  */
+  char ut_line[UT_LINESIZE]
+    __attribute_nonstring__;	/* Devicename.  */
+  char ut_id[4]
+    __attribute_nonstring__;	/* Inittab ID.  */
+  char ut_user[UT_NAMESIZE]
+    __attribute_nonstring__;	/* Username.  */
+  char ut_host[UT_HOSTSIZE]
+    __attribute_nonstring__;	/* Hostname for remote login.  */
+  struct exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+/* The ut_session and ut_tv fields must be the same size when compiled
+   32- and 64-bit.  This allows data files and shared memory to be
+   shared between 32- and 64-bit applications.  */
+#if __WORDSIZE_TIME64_COMPAT32
+  int32_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    int32_t tv_sec;		/* Seconds.  */
+    int32_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+#else
+  long int ut_session;		/* Session ID, used for windowing.  */
+  struct timeval ut_tv;		/* Time entry was made.  */
+#endif
+
+  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __glibc_reserved[20];		/* Reserved for future use.  */
+};
diff --git a/bits/utmp.h b/bits/utmp.h
index b82d14536f..1647d0c67b 100644
--- a/bits/utmp.h
+++ b/bits/utmp.h
@@ -31,18 +31,7 @@
 #define UT_HOSTSIZE	256
 
 
-/* The structure describing an entry in the database of
-   previous logins.  */
-struct lastlog
-  {
-#if __WORDSIZE_TIME64_COMPAT32
-    int32_t ll_time;
-#else
-    __time_t ll_time;
-#endif
-    char ll_line[UT_LINESIZE];
-    char ll_host[UT_HOSTSIZE];
-  };
+#include <bits/struct_lastlog.h>
 
 
 /* The structure describing the status of a terminated process.  This
@@ -53,40 +42,7 @@ struct exit_status
     short int e_exit;		/* Process exit status.  */
   };
 
-
-/* The structure describing an entry in the user accounting database.  */
-struct utmp
-{
-  short int ut_type;		/* Type of login.  */
-  pid_t ut_pid;			/* Process ID of login process.  */
-  char ut_line[UT_LINESIZE]
-    __attribute_nonstring__;	/* Devicename.  */
-  char ut_id[4]
-    __attribute_nonstring__;	/* Inittab ID.  */
-  char ut_user[UT_NAMESIZE]
-    __attribute_nonstring__;	/* Username.  */
-  char ut_host[UT_HOSTSIZE]
-    __attribute_nonstring__;	/* Hostname for remote login.  */
-  struct exit_status ut_exit;	/* Exit status of a process marked
-				   as DEAD_PROCESS.  */
-/* The ut_session and ut_tv fields must be the same size when compiled
-   32- and 64-bit.  This allows data files and shared memory to be
-   shared between 32- and 64-bit applications.  */
-#if __WORDSIZE_TIME64_COMPAT32
-  int32_t ut_session;		/* Session ID, used for windowing.  */
-  struct
-  {
-    int32_t tv_sec;		/* Seconds.  */
-    int32_t tv_usec;		/* Microseconds.  */
-  } ut_tv;			/* Time entry was made.  */
-#else
-  long int ut_session;		/* Session ID, used for windowing.  */
-  struct timeval ut_tv;		/* Time entry was made.  */
-#endif
-
-  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
-  char __glibc_reserved[20];		/* Reserved for future use.  */
-};
+#include <bits/struct_utmp.h>
 
 /* Backwards compatibility hacks.  */
 #define ut_name		ut_user
diff --git a/login/Makefile b/login/Makefile
index d897057bbd..58d5d4d64a 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -23,7 +23,8 @@ subdir	:= login
 
 include ../Makeconfig
 
-headers	:= utmp.h bits/utmp.h lastlog.h pty.h
+headers	:= utmp.h bits/utmp.h lastlog.h pty.h bits/struct_lastlog.h \
+	   bits/struct_utmp.h bits/struct_utmpx.h
 
 routines := getlogin getlogin_r setlogin getlogin_r_chk \
 	    getutent getutent_r getutid getutline getutid_r getutline_r \
diff --git a/sysdeps/gnu/bits/struct_utmpx.h b/sysdeps/gnu/bits/struct_utmpx.h
new file mode 100644
index 0000000000..8bfc786cd8
--- /dev/null
+++ b/sysdeps/gnu/bits/struct_utmpx.h
@@ -0,0 +1,55 @@
+/* The 'struct utmpx' type.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _UTMPX_H
+# error "Never include <bits/struct_utmpx.h> directly; use <utmpx.h> instead."
+#endif
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmpx
+{
+  short int ut_type;		/* Type of login.  */
+  __pid_t ut_pid;		/* Process ID of login process.  */
+  char ut_line[__UT_LINESIZE]
+    __attribute_nonstring__;	/* Devicename.  */
+  char ut_id[4]
+    __attribute_nonstring__;	/* Inittab ID.  */
+  char ut_user[__UT_NAMESIZE]
+    __attribute_nonstring__;	/* Username.  */
+  char ut_host[__UT_HOSTSIZE]
+    __attribute_nonstring__;	/* Hostname for remote login.  */
+  struct __exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+
+/* The fields ut_session and ut_tv must be the same size when compiled
+   32- and 64-bit.  This allows files and shared memory to be shared
+   between 32- and 64-bit applications.  */
+#if __WORDSIZE_TIME64_COMPAT32
+  __int32_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    __int32_t tv_sec;		/* Seconds.  */
+    __int32_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+#else
+  long int ut_session;		/* Session ID, used for windowing.  */
+  struct timeval ut_tv;		/* Time entry was made.  */
+#endif
+  __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __glibc_reserved[20];		/* Reserved for future use.  */
+};
diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h
index dfd55bfcc3..12ee26871e 100644
--- a/sysdeps/gnu/bits/utmpx.h
+++ b/sysdeps/gnu/bits/utmpx.h
@@ -51,39 +51,7 @@ struct __exit_status
   };
 
 
-/* The structure describing an entry in the user accounting database.  */
-struct utmpx
-{
-  short int ut_type;		/* Type of login.  */
-  __pid_t ut_pid;		/* Process ID of login process.  */
-  char ut_line[__UT_LINESIZE]
-    __attribute_nonstring__;	/* Devicename.  */
-  char ut_id[4]
-    __attribute_nonstring__;	/* Inittab ID.  */
-  char ut_user[__UT_NAMESIZE]
-    __attribute_nonstring__;	/* Username.  */
-  char ut_host[__UT_HOSTSIZE]
-    __attribute_nonstring__;	/* Hostname for remote login.  */
-  struct __exit_status ut_exit;	/* Exit status of a process marked
-				   as DEAD_PROCESS.  */
-
-/* The fields ut_session and ut_tv must be the same size when compiled
-   32- and 64-bit.  This allows files and shared memory to be shared
-   between 32- and 64-bit applications.  */
-#if __WORDSIZE_TIME64_COMPAT32
-  __int32_t ut_session;		/* Session ID, used for windowing.  */
-  struct
-  {
-    __int32_t tv_sec;		/* Seconds.  */
-    __int32_t tv_usec;		/* Microseconds.  */
-  } ut_tv;			/* Time entry was made.  */
-#else
-  long int ut_session;		/* Session ID, used for windowing.  */
-  struct timeval ut_tv;		/* Time entry was made.  */
-#endif
-  __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
-  char __glibc_reserved[20];		/* Reserved for future use.  */
-};
+#include <bits/struct_utmpx.h>
 
 
 /* Values for the `ut_type' field of a `struct utmpx'.  */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
new file mode 100644
index 0000000000..2fa409aeec
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
@@ -0,0 +1,35 @@
+/* The 'struct lastlog' type.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _UTMP_H
+# error "Never include <bits/struct_lastlog.h> directly; use <utmp.h> instead."
+#endif
+
+/* The structure describing an entry in the database of
+   previous logins.  */
+struct lastlog
+  {
+#if __WORDSIZE == 32
+    int64_t ll_time;
+#else
+    __time_t ll_time;
+#endif
+    char ll_line[UT_LINESIZE];
+    char ll_host[UT_HOSTSIZE];
+  };
+
diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h b/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
new file mode 100644
index 0000000000..748240e528
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
@@ -0,0 +1,51 @@
+/* The 'struct utmp' type, describing entries in the utmp file.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmp
+{
+  short int ut_type;		/* Type of login.  */
+  pid_t ut_pid;			/* Process ID of login process.  */
+  char ut_line[UT_LINESIZE]
+     __attribute_nonstring__;	/* Devicename.  */
+  char ut_id[4]
+    __attribute_nonstring__;	/* Inittab ID.  */
+  char ut_user[UT_NAMESIZE]
+     __attribute_nonstring__;	/* Username.  */
+  char ut_host[UT_HOSTSIZE]
+     __attribute_nonstring__;	/* Hostname for remote login.  */
+  struct exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+/* The ut_session and ut_tv fields must be the same size when compiled
+   32- and 64-bit.  This allows data files and shared memory to be
+   shared between 32- and 64-bit applications.  */
+#if __WORDSIZE == 32
+  int64_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    int64_t tv_sec;		/* Seconds.  */
+    int64_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+#else
+  long int ut_session;		/* Session ID, used for windowing.  */
+  struct timeval ut_tv;		/* Time entry was made.  */
+#endif
+
+  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __glibc_reserved[20];		/* Reserved for future use.  */
+};
diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h b/sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h
similarity index 56%
rename from sysdeps/unix/sysv/linux/s390/bits/utmpx.h
rename to sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h
index d68df97bef..67fd7be51c 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h
@@ -1,5 +1,5 @@
-/* Structures and definitions for the user accounting database.  GNU version.
-   Copyright (C) 1997-2020 Free Software Foundation, Inc.
+/* The 'struct utmpx' type.
+   Copyright (C) 2020 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -17,40 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #ifndef _UTMPX_H
-# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
+# error "Never include <bits/struct_utmpx.h> directly; use <utmpx.h> instead."
 #endif
 
-#include <bits/types.h>
-#include <sys/time.h>
-#include <bits/wordsize.h>
-
-
-#ifdef __USE_GNU
-# include <paths.h>
-# define _PATH_UTMPX	_PATH_UTMP
-# define _PATH_WTMPX	_PATH_WTMP
-#endif
-
-
-#define __UT_LINESIZE	32
-#define __UT_NAMESIZE	32
-#define __UT_HOSTSIZE	256
-
-
-/* The structure describing the status of a terminated process.  This
-   type is used in `struct utmpx' below.  */
-struct __exit_status
-  {
-#ifdef __USE_GNU
-    short int e_termination;	/* Process termination status.  */
-    short int e_exit;		/* Process exit status.  */
-#else
-    short int __e_termination;	/* Process termination status.  */
-    short int __e_exit;		/* Process exit status.  */
-#endif
-  };
-
-
 /* The structure describing an entry in the user accounting database.  */
 struct utmpx
 {
@@ -84,23 +53,3 @@ struct utmpx
   __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
   char __glibc_reserved[20];		/* Reserved for future use.  */
 };
-
-
-/* Values for the `ut_type' field of a `struct utmpx'.  */
-#define EMPTY		0	/* No valid user accounting information.  */
-
-#ifdef __USE_GNU
-# define RUN_LVL	1	/* The system's runlevel.  */
-#endif
-#define BOOT_TIME	2	/* Time of system boot.  */
-#define NEW_TIME	3	/* Time after system clock changed.  */
-#define OLD_TIME	4	/* Time when system clock changed.  */
-
-#define INIT_PROCESS	5	/* Process spawned by the init process.  */
-#define LOGIN_PROCESS	6	/* Session leader of a logged in user.  */
-#define USER_PROCESS	7	/* Normal process.  */
-#define DEAD_PROCESS	8	/* Terminated process.  */
-
-#ifdef __USE_GNU
-# define ACCOUNTING	9	/* System accounting.  */
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmp.h b/sysdeps/unix/sysv/linux/s390/bits/utmp.h
deleted file mode 100644
index ec0ee02303..0000000000
--- a/sysdeps/unix/sysv/linux/s390/bits/utmp.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-   Copyright (C) 1993-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _UTMP_H
-# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
-#endif
-
-#include <paths.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <bits/wordsize.h>
-
-
-#define UT_LINESIZE	32
-#define UT_NAMESIZE	32
-#define UT_HOSTSIZE	256
-
-
-/* The structure describing an entry in the database of
-   previous logins.  */
-struct lastlog
-  {
-#if __WORDSIZE == 32
-    int64_t ll_time;
-#else
-    __time_t ll_time;
-#endif
-    char ll_line[UT_LINESIZE];
-    char ll_host[UT_HOSTSIZE];
-  };
-
-
-/* The structure describing the status of a terminated process.  This
-   type is used in `struct utmp' below.  */
-struct exit_status
-  {
-    short int e_termination;	/* Process termination status.  */
-    short int e_exit;		/* Process exit status.  */
-  };
-
-
-/* The structure describing an entry in the user accounting database.  */
-struct utmp
-{
-  short int ut_type;		/* Type of login.  */
-  pid_t ut_pid;			/* Process ID of login process.  */
-  char ut_line[UT_LINESIZE]
-     __attribute_nonstring__;	/* Devicename.  */
-  char ut_id[4]
-    __attribute_nonstring__;	/* Inittab ID.  */
-  char ut_user[UT_NAMESIZE]
-     __attribute_nonstring__;	/* Username.  */
-  char ut_host[UT_HOSTSIZE]
-     __attribute_nonstring__;	/* Hostname for remote login.  */
-  struct exit_status ut_exit;	/* Exit status of a process marked
-				   as DEAD_PROCESS.  */
-/* The ut_session and ut_tv fields must be the same size when compiled
-   32- and 64-bit.  This allows data files and shared memory to be
-   shared between 32- and 64-bit applications.  */
-#if __WORDSIZE == 32
-  int64_t ut_session;		/* Session ID, used for windowing.  */
-  struct
-  {
-    int64_t tv_sec;		/* Seconds.  */
-    int64_t tv_usec;		/* Microseconds.  */
-  } ut_tv;			/* Time entry was made.  */
-#else
-  long int ut_session;		/* Session ID, used for windowing.  */
-  struct timeval ut_tv;		/* Time entry was made.  */
-#endif
-
-  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
-  char __glibc_reserved[20];		/* Reserved for future use.  */
-};
-
-/* Backwards compatibility hacks.  */
-#define ut_name		ut_user
-#ifndef _NO_UT_TIME
-/* We have a problem here: `ut_time' is also used otherwise.  Define
-   _NO_UT_TIME if the compiler complains.  */
-# define ut_time	ut_tv.tv_sec
-#endif
-#define ut_xtime	ut_tv.tv_sec
-#define ut_addr		ut_addr_v6[0]
-
-
-/* Values for the `ut_type' field of a `struct utmp'.  */
-#define EMPTY		0	/* No valid user accounting information.  */
-
-#define RUN_LVL		1	/* The system's runlevel.  */
-#define BOOT_TIME	2	/* Time of system boot.  */
-#define NEW_TIME	3	/* Time after system clock changed.  */
-#define OLD_TIME	4	/* Time when system clock changed.  */
-
-#define INIT_PROCESS	5	/* Process spawned by the init process.  */
-#define LOGIN_PROCESS	6	/* Session leader of a logged in user.  */
-#define USER_PROCESS	7	/* Normal process.  */
-#define DEAD_PROCESS	8	/* Terminated process.  */
-
-#define ACCOUNTING	9
-
-/* Old Linux name for the EMPTY type.  */
-#define UT_UNKNOWN	EMPTY
-
-
-/* Tell the user that we have a modern system with UT_HOST, UT_PID,
-   UT_TYPE, UT_ID and UT_TV fields.  */
-#define _HAVE_UT_TYPE	1
-#define _HAVE_UT_PID	1
-#define _HAVE_UT_ID	1
-#define _HAVE_UT_TV	1
-#define _HAVE_UT_HOST	1
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 2/5] login: Move gnu utmpx to default implementaion
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
@ 2020-07-29 20:51 ` Adhemerval Zanella via Libc-alpha
  2020-10-22  8:15   ` Lukasz Majewski
  2020-10-22  9:16   ` Andreas Schwab
  2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-29 20:51 UTC (permalink / raw)
  To: libc-alpha; +Cc: Alistair Francis

It removes one indirection where generic implementation assumes that
utmp and utmpx might differ and allows the optimize the symbol alias
where getutmp is the same as getumpx.

Checked on all afftected ABIs.
---
 {sysdeps/gnu/bits => bits}/struct_utmpx.h     |  0
 {sysdeps/gnu/bits => bits}/utmpx.h            |  0
 include/utmpx.h                               |  1 +
 login/getutmp.c                               | 34 ++++++++++++++++--
 login/getutmpx.c                              | 35 +------------------
 login/updwtmp.c                               | 11 +++++-
 {sysdeps/gnu => login}/utmpx.h                |  0
 sysdeps/gnu/getutmp.c                         | 34 ------------------
 sysdeps/gnu/getutmpx.c                        |  1 -
 sysdeps/gnu/updwtmp.c                         | 31 ----------------
 .../unix/sysv/linux/s390/s390-32/getutmp.c    | 21 ++++-------
 .../unix/sysv/linux/s390/s390-32/updwtmp.c    |  2 +-
 12 files changed, 52 insertions(+), 118 deletions(-)
 rename {sysdeps/gnu/bits => bits}/struct_utmpx.h (100%)
 rename {sysdeps/gnu/bits => bits}/utmpx.h (100%)
 create mode 100644 include/utmpx.h
 rename {sysdeps/gnu => login}/utmpx.h (100%)
 delete mode 100644 sysdeps/gnu/getutmp.c
 delete mode 100644 sysdeps/gnu/getutmpx.c
 delete mode 100644 sysdeps/gnu/updwtmp.c

diff --git a/sysdeps/gnu/bits/struct_utmpx.h b/bits/struct_utmpx.h
similarity index 100%
rename from sysdeps/gnu/bits/struct_utmpx.h
rename to bits/struct_utmpx.h
diff --git a/sysdeps/gnu/bits/utmpx.h b/bits/utmpx.h
similarity index 100%
rename from sysdeps/gnu/bits/utmpx.h
rename to bits/utmpx.h
diff --git a/include/utmpx.h b/include/utmpx.h
new file mode 100644
index 0000000000..cfe9b7c054
--- /dev/null
+++ b/include/utmpx.h
@@ -0,0 +1 @@
+#include <login/utmpx.h>
diff --git a/login/getutmp.c b/login/getutmp.c
index e9a5fe69a5..3058a93d1b 100644
--- a/login/getutmp.c
+++ b/login/getutmp.c
@@ -17,17 +17,47 @@
 
 #include <string.h>
 #include <utmp.h>
+#include <stddef.h>
+#define getutmpx __redirect_getutmpx
 #include <utmpx.h>
+#undef getutmpx
+
+#define CHECK_SIZE_AND_OFFSET(field) \
+  _Static_assert (sizeof ((struct utmp){0}.field)		\
+		  == sizeof ((struct utmpx){0}.field),		\
+		  "sizeof ((struct utmp){0}." #field " != "	\
+		  "sizeof ((struct utmpx){0}" #field);	\
+  _Static_assert (offsetof (struct utmp, field)			\
+		  == offsetof (struct utmpx, field),		\
+		  "offsetof (struct utmp, " #field ") != "	\
+		  "offsetof (struct utmpx, " #field ")");
+
+/* This ensure the getutmp to getutmpx alias is valid.  */
+_Static_assert (sizeof (struct utmp) == sizeof (struct utmpx),
+		"sizeof (struct utmp) != sizeof (struct utmpx)");
+CHECK_SIZE_AND_OFFSET (ut_type)
+CHECK_SIZE_AND_OFFSET (ut_pid)
+CHECK_SIZE_AND_OFFSET (ut_line)
+CHECK_SIZE_AND_OFFSET (ut_user)
+CHECK_SIZE_AND_OFFSET (ut_id)
+CHECK_SIZE_AND_OFFSET (ut_host)
+CHECK_SIZE_AND_OFFSET (ut_tv)
+
 
 /* Copy the information in UTMPX to UTMP. */
 void
-getutmp (const struct utmpx *utmpx, struct utmp *utmp)
+__getutmp (const struct utmpx *utmpx, struct utmp *utmp)
 {
+  memset (utmp, 0, sizeof (struct utmpx));
   utmp->ut_type = utmpx->ut_type;
   utmp->ut_pid = utmpx->ut_pid;
   memcpy (utmp->ut_line, utmpx->ut_line, sizeof (utmp->ut_line));
   memcpy (utmp->ut_user, utmpx->ut_user, sizeof (utmp->ut_user));
   memcpy (utmp->ut_id, utmpx->ut_id, sizeof (utmp->ut_id));
   memcpy (utmp->ut_host, utmpx->ut_host, sizeof (utmp->ut_host));
-  utmp->ut_tv = utmpx->ut_tv;
+  utmp->ut_tv.tv_sec = utmpx->ut_tv.tv_sec;
+  utmp->ut_tv.tv_usec = utmpx->ut_tv.tv_usec;
 }
+
+weak_alias (__getutmp, getutmp)
+strong_alias (__getutmp, getutmpx)
diff --git a/login/getutmpx.c b/login/getutmpx.c
index 250a355235..839eb6826e 100644
--- a/login/getutmpx.c
+++ b/login/getutmpx.c
@@ -1,34 +1 @@
-/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-#include <utmp.h>
-#include <utmpx.h>
-
-/* Copy the information in UTMP to UTMPX. */
-void
-getutmpx (const struct utmp *utmp, struct utmpx *utmpx)
-{
-  memset (utmpx, 0, sizeof (struct utmpx));
-  utmpx->ut_type = utmp->ut_type;
-  utmpx->ut_pid = utmp->ut_pid;
-  memcpy (utmpx->ut_line, utmp->ut_line, sizeof (utmp->ut_line));
-  memcpy (utmpx->ut_user, utmp->ut_user, sizeof (utmp->ut_user));
-  memcpy (utmpx->ut_id, utmp->ut_id, sizeof (utmp->ut_id));
-  memcpy (utmpx->ut_host, utmp->ut_host, sizeof (utmp->ut_host));
-  utmpx->ut_tv = utmp->ut_tv;
-}
+/* Implemented by getutmp.c. */
diff --git a/login/updwtmp.c b/login/updwtmp.c
index f6cd515ac4..489c28b553 100644
--- a/login/updwtmp.c
+++ b/login/updwtmp.c
@@ -17,11 +17,20 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <utmp.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "utmp-private.h"
 
 #ifndef TRANSFORM_UTMP_FILE_NAME
-# define TRANSFORM_UTMP_FILE_NAME(file_name) (file_name)
+# define TRANSFORM_UTMP_FILE_NAME(file_name)	\
+  ((strcmp (file_name, _PATH_UTMP "x") == 0	\
+    && __access (_PATH_UTMP "x", F_OK) != 0)	\
+   ? _PATH_UTMP					\
+   : ((strcmp (file_name, _PATH_WTMP "x") == 0	\
+       && __access (_PATH_WTMP "x", F_OK) != 0)	\
+      ? _PATH_WTMP				\
+      : file_name))
 #endif
 
 void
diff --git a/sysdeps/gnu/utmpx.h b/login/utmpx.h
similarity index 100%
rename from sysdeps/gnu/utmpx.h
rename to login/utmpx.h
diff --git a/sysdeps/gnu/getutmp.c b/sysdeps/gnu/getutmp.c
deleted file mode 100644
index 95a9a4b354..0000000000
--- a/sysdeps/gnu/getutmp.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <assert.h>
-#include <string.h>
-#include <utmp.h>
-#ifndef _UTMPX_H
-/* This is an ugly hack but we must not see the getutmpx declaration.  */
-# define getutmpx XXXgetutmpx
-# include <utmpx.h>
-# undef getutmpx
-#endif
-
-void
-getutmp (const struct utmpx *utmpx, struct utmp *utmp)
-{
-  assert (sizeof (struct utmp) == sizeof (struct utmpx));
-  memcpy (utmp, utmpx, sizeof (struct utmp));
-}
-strong_alias (getutmp, getutmpx)
diff --git a/sysdeps/gnu/getutmpx.c b/sysdeps/gnu/getutmpx.c
deleted file mode 100644
index f393734a63..0000000000
--- a/sysdeps/gnu/getutmpx.c
+++ /dev/null
@@ -1 +0,0 @@
-/* We don't need a separate version.  it is the same as getutmp().  */
diff --git a/sysdeps/gnu/updwtmp.c b/sysdeps/gnu/updwtmp.c
deleted file mode 100644
index 044091b77c..0000000000
--- a/sysdeps/gnu/updwtmp.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-#include <unistd.h>
-
-#define TRANSFORM_UTMP_FILE_NAME(file_name)	\
-  ((strcmp (file_name, _PATH_UTMP "x") == 0	\
-    && __access (_PATH_UTMP "x", F_OK) != 0)	\
-   ? _PATH_UTMP					\
-   : ((strcmp (file_name, _PATH_WTMP "x") == 0	\
-       && __access (_PATH_WTMP "x", F_OK) != 0)	\
-      ? _PATH_WTMP				\
-      : file_name))
-
-#include <login/updwtmp.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
index 6380ae2a82..50ce8c4f5c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
@@ -16,22 +16,15 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <string.h>
-#include <utmp.h>
-/* This is an ugly hack but we must not see the getutmpx declaration.  */
-#define getutmpx XXXgetutmpx
-#include <utmpx.h>
-#undef getutmpx
+#undef weak_alias
+#define weak_alias(a, b)
+#undef strong_alias
+#define strong_alias(a, b)
 
-#include "utmp-compat.h"
+#include <login/getutmp.c>
 
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutmp __getutmp
-#define getutmpx __getutmpx
-#include "sysdeps/gnu/getutmp.c"
-#undef getutmp
-#undef getutmpx
+#include "utmp-compat.h"
 
 default_symbol_version (__getutmp, getutmp, UTMP_COMPAT_BASE);
+_strong_alias (__getutmp, __getutmpx)
 default_symbol_version (__getutmpx, getutmpx, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
index dcd334e5a9..2079571cc1 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
@@ -25,7 +25,7 @@
 # undef weak_alias
 # define weak_alias(n,a)
 #endif
-#include "sysdeps/gnu/updwtmp.c"
+#include <login/updwtmp.c>
 
 #if defined SHARED
 default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 3/5] login: Add 64-bit time support
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
  2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
@ 2020-07-29 20:51 ` Adhemerval Zanella via Libc-alpha
  2020-07-29 21:17   ` Joseph Myers
  2020-10-22  9:16   ` Lukasz Majewski
  2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-29 20:51 UTC (permalink / raw)
  To: libc-alpha; +Cc: Alistair Francis

It uses the s390-32 version and consolidates all the implementations.
The result 'struct utmp' and 'struct utmpx' the same size of the
old 32-bit time version (the __glibc_reserved in used adjusted).

New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
pututline, pututxline, updwtmp, updwtmpx, and login are added to
all architecture but s390-32 (which already added 64-bit time support
on 32-bit ABI on glibc 2.9).

Checked on i686-linux-gnu and x86_64-linux-gnu.  I also did a make
check on all affected ABIs.
---
 bits/struct_utmp.h                            | 12 +++---
 bits/struct_utmpx.h                           | 11 +++---
 include/utmp.h                                |  3 ++
 login/Makefile                                |  4 +-
 login/Versions                                |  3 ++
 login/getutent.c                              |  7 +++-
 login/getutent_r.c                            | 11 +++++-
 login/getutid.c                               |  7 +++-
 login/getutid_r.c                             |  7 +++-
 login/getutline.c                             |  7 +++-
 login/getutline_r.c                           |  7 +++-
 login/getutmp.c                               | 10 ++++-
 login/getutxent.c                             |  9 ++++-
 login/getutxid.c                              |  9 ++++-
 login/getutxline.c                            |  9 ++++-
 login/login.c                                 | 10 ++++-
 .../linux/s390/s390-32 => login}/login32.c    | 14 ++++---
 login/pututxline.c                            |  9 ++++-
 login/updwtmp.c                               |  7 +++-
 login/updwtmpx.c                              |  9 ++++-
 .../s390/s390-32 => login}/utmp-convert.h     |  0
 .../linux/s390/s390-32 => login}/utmp32.c     | 32 +++++++++-------
 .../linux/s390/s390-32 => login}/utmp32.h     |  0
 .../s390/s390-32 => login}/utmpx-convert.h    |  0
 .../linux/s390/s390-32 => login}/utmpx32.c    | 29 +++++++++-----
 .../linux/s390/s390-32 => login}/utmpx32.h    |  0
 sysdeps/generic/utmp-compat.h                 |  3 ++
 sysdeps/mach/hurd/i386/libc.abilist           | 15 ++++++++
 sysdeps/mach/hurd/i386/libutil.abilist        |  1 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  | 15 ++++++++
 .../unix/sysv/linux/aarch64/libutil.abilist   |  1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    | 15 ++++++++
 sysdeps/unix/sysv/linux/alpha/libutil.abilist |  1 +
 sysdeps/unix/sysv/linux/arc/libc.abilist      | 15 ++++++++
 sysdeps/unix/sysv/linux/arc/libutil.abilist   |  1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   | 15 ++++++++
 .../unix/sysv/linux/arm/le/libutil.abilist    |  1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     | 15 ++++++++
 sysdeps/unix/sysv/linux/csky/libutil.abilist  |  1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     | 15 ++++++++
 sysdeps/unix/sysv/linux/hppa/libutil.abilist  |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     | 15 ++++++++
 sysdeps/unix/sysv/linux/i386/libutil.abilist  |  1 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     | 15 ++++++++
 sysdeps/unix/sysv/linux/ia64/libutil.abilist  |  1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  | 15 ++++++++
 .../sysv/linux/m68k/m680x0/libutil.abilist    |  1 +
 .../sysv/linux/microblaze/be/libc.abilist     | 15 ++++++++
 .../sysv/linux/microblaze/be/libutil.abilist  |  1 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   | 15 ++++++++
 .../sysv/linux/mips/mips32/libutil.abilist    |  1 +
 .../sysv/linux/mips/mips64/libutil.abilist    |  1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   | 15 ++++++++
 .../sysv/linux/mips/mips64/n64/libc.abilist   | 15 ++++++++
 sysdeps/unix/sysv/linux/nios2/libc.abilist    | 15 ++++++++
 sysdeps/unix/sysv/linux/nios2/libutil.abilist |  1 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  | 15 ++++++++
 .../linux/powerpc/powerpc32/libutil.abilist   |  1 +
 .../linux/powerpc/powerpc64/be/libc.abilist   | 15 ++++++++
 .../powerpc/powerpc64/be/libutil.abilist      |  1 +
 .../linux/powerpc/powerpc64/le/libc.abilist   | 15 ++++++++
 .../powerpc/powerpc64/le/libutil.abilist      |  1 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   | 15 ++++++++
 .../sysv/linux/riscv/rv64/libutil.abilist     |  1 +
 .../unix/sysv/linux/s390/s390-32/getutent.c   | 32 ----------------
 .../unix/sysv/linux/s390/s390-32/getutent_r.c | 38 -------------------
 .../unix/sysv/linux/s390/s390-32/getutid.c    | 32 ----------------
 .../unix/sysv/linux/s390/s390-32/getutid_r.c  | 35 -----------------
 .../unix/sysv/linux/s390/s390-32/getutline.c  | 32 ----------------
 .../sysv/linux/s390/s390-32/getutline_r.c     | 34 -----------------
 .../unix/sysv/linux/s390/s390-32/getutmp.c    | 30 ---------------
 .../unix/sysv/linux/s390/s390-32/getutxent.c  | 30 ---------------
 .../unix/sysv/linux/s390/s390-32/getutxid.c   | 30 ---------------
 .../unix/sysv/linux/s390/s390-32/getutxline.c | 30 ---------------
 sysdeps/unix/sysv/linux/s390/s390-32/login.c  | 35 -----------------
 .../unix/sysv/linux/s390/s390-32/pututxline.c | 30 ---------------
 .../unix/sysv/linux/s390/s390-32/updwtmp.c    | 32 ----------------
 .../unix/sysv/linux/s390/s390-32/updwtmpx.c   | 30 ---------------
 .../sysv/linux/s390/s390-32/utmp-compat.h     |  2 +-
 .../unix/sysv/linux/s390/s390-64/libc.abilist | 15 ++++++++
 .../sysv/linux/s390/s390-64/libutil.abilist   |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    | 15 ++++++++
 sysdeps/unix/sysv/linux/sh/le/libutil.abilist |  1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     | 15 ++++++++
 .../sysv/linux/sparc/sparc32/libutil.abilist  |  1 +
 .../sysv/linux/sparc/sparc64/libc.abilist     | 15 ++++++++
 .../sysv/linux/sparc/sparc64/libutil.abilist  |  1 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    | 15 ++++++++
 .../unix/sysv/linux/x86_64/64/libutil.abilist |  1 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   | 15 ++++++++
 .../sysv/linux/x86_64/x32/libutil.abilist     |  1 +
 91 files changed, 572 insertions(+), 508 deletions(-)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/login32.c (75%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmp-convert.h (100%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmp32.c (83%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmp32.h (100%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmpx-convert.h (100%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmpx32.c (81%)
 rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmpx32.h (100%)
 create mode 100644 sysdeps/generic/utmp-compat.h
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/login.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c

diff --git a/bits/struct_utmp.h b/bits/struct_utmp.h
index 4b05c91515..84d4df2590 100644
--- a/bits/struct_utmp.h
+++ b/bits/struct_utmp.h
@@ -38,18 +38,16 @@ struct utmp
 /* The ut_session and ut_tv fields must be the same size when compiled
    32- and 64-bit.  This allows data files and shared memory to be
    shared between 32- and 64-bit applications.  */
-#if __WORDSIZE_TIME64_COMPAT32
-  int32_t ut_session;		/* Session ID, used for windowing.  */
+  int64_t ut_session;		/* Session ID, used for windowing.  */
+#if __TIMESIZE == 64
   struct
   {
-    int32_t tv_sec;		/* Seconds.  */
-    int32_t tv_usec;		/* Microseconds.  */
+    int64_t tv_sec;		/* Seconds.  */
+    int64_t tv_usec;		/* Microseconds.  */
   } ut_tv;			/* Time entry was made.  */
 #else
-  long int ut_session;		/* Session ID, used for windowing.  */
   struct timeval ut_tv;		/* Time entry was made.  */
 #endif
-
   int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
-  char __glibc_reserved[20];		/* Reserved for future use.  */
+  char __glibc_reserved[8];		/* Reserved for future use.  */
 };
diff --git a/bits/struct_utmpx.h b/bits/struct_utmpx.h
index 8bfc786cd8..b5bf539a57 100644
--- a/bits/struct_utmpx.h
+++ b/bits/struct_utmpx.h
@@ -39,17 +39,16 @@ struct utmpx
 /* The fields ut_session and ut_tv must be the same size when compiled
    32- and 64-bit.  This allows files and shared memory to be shared
    between 32- and 64-bit applications.  */
-#if __WORDSIZE_TIME64_COMPAT32
-  __int32_t ut_session;		/* Session ID, used for windowing.  */
+  __int64_t ut_session;		/* Session ID, used for windowing.  */
+#if __TIMESIZE == 64
   struct
   {
-    __int32_t tv_sec;		/* Seconds.  */
-    __int32_t tv_usec;		/* Microseconds.  */
+    __int64_t tv_sec;		/* Seconds.  */
+    __int64_t tv_usec;		/* Microseconds.  */
   } ut_tv;			/* Time entry was made.  */
 #else
-  long int ut_session;		/* Session ID, used for windowing.  */
   struct timeval ut_tv;		/* Time entry was made.  */
 #endif
   __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
-  char __glibc_reserved[20];		/* Reserved for future use.  */
+  char __glibc_reserved[8];		/* Reserved for future use.  */
 };
diff --git a/include/utmp.h b/include/utmp.h
index 374184e9b2..350b9aab81 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -26,6 +26,9 @@ extern int __getutline_r (const struct utmp *__line,
 			  struct utmp *__buffer, struct utmp **__result);
 libc_hidden_proto (__getutline_r)
 
+extern void __login (const struct utmp *ut);
+hidden_proto (__login)
+
 libutil_hidden_proto (login_tty)
 
 # endif /* !_ISOMAC */
diff --git a/login/Makefile b/login/Makefile
index 58d5d4d64a..9f37a18101 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -29,7 +29,7 @@ headers	:= utmp.h bits/utmp.h lastlog.h pty.h bits/struct_lastlog.h \
 routines := getlogin getlogin_r setlogin getlogin_r_chk \
 	    getutent getutent_r getutid getutline getutid_r getutline_r \
 	    utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
-	    ptsname_r_chk
+	    ptsname_r_chk utmp32 utmpx32
 
 CFLAGS-grantpt.c += -DLIBEXECDIR='"$(libexecdir)"'
 
@@ -51,7 +51,7 @@ tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \
 extra-libs      := libutil
 extra-libs-others := $(extra-libs)
 
-libutil-routines:= login login_tty logout logwtmp openpty forkpty
+libutil-routines:= login login_tty logout logwtmp openpty forkpty login32
 
 include ../Rules
 
diff --git a/login/Versions b/login/Versions
index 475fcf063f..86b56bb92e 100644
--- a/login/Versions
+++ b/login/Versions
@@ -51,4 +51,7 @@ libutil {
   GLIBC_2.0 {
     forkpty; login; login_tty; logout; logwtmp; openpty;
   }
+  GLIBC_2.33 {
+    login;
+  }
 }
diff --git a/login/getutent.c b/login/getutent.c
index 3a8b78c9be..16ca2622d1 100644
--- a/login/getutent.c
+++ b/login/getutent.c
@@ -18,7 +18,8 @@
 
 #include <stdlib.h>
 #include <utmp.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -42,4 +43,8 @@ __getutent (void)
   return result;
 }
 libc_hidden_def (__getutent)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutent, getutent, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutent, getutent)
+#endif
diff --git a/login/getutent_r.c b/login/getutent_r.c
index 7bf5fe136a..5c82e85c09 100644
--- a/login/getutent_r.c
+++ b/login/getutent_r.c
@@ -20,7 +20,8 @@
 #include <libc-lock.h>
 #include <stdlib.h>
 #include <utmp.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 #include "utmp-private.h"
 
 /* We need to protect the opening of the file.  */
@@ -53,7 +54,11 @@ __getutent_r (struct utmp *buffer, struct utmp **result)
   return retval;
 }
 libc_hidden_def (__getutent_r)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutent_r, getutent_r, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutent_r, getutent_r)
+#endif
 
 
 struct utmp *
@@ -70,7 +75,11 @@ __pututline (const struct utmp *data)
   return buffer;
 }
 libc_hidden_def (__pututline)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __pututline, pututline, UTMP_COMPAT_BASE);
+#else
 weak_alias (__pututline, pututline)
+#endif
 
 
 void
diff --git a/login/getutid.c b/login/getutid.c
index 0c5c106b59..b96ccb2381 100644
--- a/login/getutid.c
+++ b/login/getutid.c
@@ -18,7 +18,8 @@
 
 #include <stdlib.h>
 #include <utmp.h>
-
+#include <shlib-compat.h>
+#include <utmp-compat.h>
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -40,4 +41,8 @@ __getutid (const struct utmp *id)
   return result;
 }
 libc_hidden_def (__getutid)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutid, getutid, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutid, getutid)
+#endif
diff --git a/login/getutid_r.c b/login/getutid_r.c
index c655c4f56b..06907a4c92 100644
--- a/login/getutid_r.c
+++ b/login/getutid_r.c
@@ -21,7 +21,8 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <utmp.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 #include "utmp-private.h"
 
 
@@ -55,4 +56,8 @@ __getutid_r (const struct utmp *id, struct utmp *buffer, struct utmp **result)
   return retval;
 }
 libc_hidden_def (__getutid_r)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutid_r, getutid_r, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutid_r, getutid_r)
+#endif
diff --git a/login/getutline.c b/login/getutline.c
index 34ea8611e2..dea5edffd8 100644
--- a/login/getutline.c
+++ b/login/getutline.c
@@ -18,7 +18,8 @@
 
 #include <stdlib.h>
 #include <utmp.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -41,4 +42,8 @@ __getutline (const struct utmp *line)
   return result;
 }
 libc_hidden_def (__getutline)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutline, getutline, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutline, getutline)
+#endif
diff --git a/login/getutline_r.c b/login/getutline_r.c
index 41ad9ff12b..5caab54620 100644
--- a/login/getutline_r.c
+++ b/login/getutline_r.c
@@ -20,7 +20,8 @@
 #include <errno.h>
 #include <libc-lock.h>
 #include <utmp.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 #include "utmp-private.h"
 
 
@@ -43,4 +44,8 @@ __getutline_r (const struct utmp *line, struct utmp *buffer,
   return retval;
 }
 libc_hidden_def (__getutline_r)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutline_r, getutline_r, UTMP_COMPAT_BASE);
+#else
 weak_alias (__getutline_r, getutline_r)
+#endif
diff --git a/login/getutmp.c b/login/getutmp.c
index 3058a93d1b..d521e5e51e 100644
--- a/login/getutmp.c
+++ b/login/getutmp.c
@@ -21,6 +21,8 @@
 #define getutmpx __redirect_getutmpx
 #include <utmpx.h>
 #undef getutmpx
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 #define CHECK_SIZE_AND_OFFSET(field) \
   _Static_assert (sizeof ((struct utmp){0}.field)		\
@@ -59,5 +61,11 @@ __getutmp (const struct utmpx *utmpx, struct utmp *utmp)
   utmp->ut_tv.tv_usec = utmpx->ut_tv.tv_usec;
 }
 
-weak_alias (__getutmp, getutmp)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutmp, getutmp, UTMP_COMPAT_BASE);
+strong_alias (__getutmp, __getutmpx)
+versioned_symbol (libc, __getutmpx, getutmpx, UTMP_COMPAT_BASE);
+#else
+strong_alias (__getutmp, getutmp)
 strong_alias (__getutmp, getutmpx)
+#endif
diff --git a/login/getutxent.c b/login/getutxent.c
index ca90a13d4b..505b2b6441 100644
--- a/login/getutxent.c
+++ b/login/getutxent.c
@@ -18,9 +18,16 @@
 
 #include <utmp.h>
 #include <utmpx.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 struct utmpx *
-getutxent (void)
+__getutxent (void)
 {
   return (struct utmpx *) __getutent ();
 }
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutxent, getutxent, UTMP_COMPAT_BASE);
+#else
+weak_alias (__getutxent, getutxent)
+#endif
diff --git a/login/getutxid.c b/login/getutxid.c
index d53993f5e9..871aef11d8 100644
--- a/login/getutxid.c
+++ b/login/getutxid.c
@@ -18,9 +18,16 @@
 
 #include <utmp.h>
 #include <utmpx.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 struct utmpx *
-getutxid (const struct utmpx *id)
+__getutxid (const struct utmpx *id)
 {
   return (struct utmpx *) __getutid ((const struct utmp *) id);
 }
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutxid, getutxid, UTMP_COMPAT_BASE);
+#else
+weak_alias (__getutxid, getutxid)
+#endif
diff --git a/login/getutxline.c b/login/getutxline.c
index f1d28211b0..d212217285 100644
--- a/login/getutxline.c
+++ b/login/getutxline.c
@@ -18,9 +18,16 @@
 
 #include <utmp.h>
 #include <utmpx.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 struct utmpx *
-getutxline (const struct utmpx *line)
+__getutxline (const struct utmpx *line)
 {
   return (struct utmpx *) __getutline ((const struct utmp *) line);
 }
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __getutxline, getutxline, UTMP_COMPAT_BASE);
+#else
+weak_alias (__getutxline, getutxline)
+#endif
diff --git a/login/login.c b/login/login.c
index cc26d2982b..ca2a99210f 100644
--- a/login/login.c
+++ b/login/login.c
@@ -23,6 +23,8 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <utmp.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 
 /* Return the result of ttyname in the buffer pointed to by TTY, which should
@@ -78,7 +80,7 @@ tty_name (int fd, char **tty, size_t buf_len)
 }
 \f
 void
-login (const struct utmp *ut)
+__login (const struct utmp *ut)
 {
 #ifdef PATH_MAX
   char _tty[PATH_MAX + UT_LINESIZE];
@@ -137,3 +139,9 @@ login (const struct utmp *ut)
   /* Update the WTMP file.  Here we have to add a new entry.  */
   updwtmp (_PATH_WTMP, &copy);
 }
+hidden_def (__login)
+#if SHLIB_COMPAT(libutil, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libutil, __login, login, UTMP_COMPAT_BASE);
+#else
+weak_alias (__login, login)
+#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c b/login/login32.c
similarity index 75%
rename from sysdeps/unix/sysv/linux/s390/s390-32/login32.c
rename to login/login32.c
index 22f908df88..6e451eb745 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c
+++ b/login/login32.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
+/* Write utmp and wtmp entries, 32-bit time compat version.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,14 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <sys/types.h>
 #include <utmp.h>
-#include <libc-symbols.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 #include "utmp32.h"
 #include "utmp-convert.h"
 
+#if SHLIB_COMPAT(libutil, GLIBC_2_0, UTMP_COMPAT_BASE)
 /* Write the given entry into utmp and wtmp.  */
 void
 login32 (const struct utmp32 *entry)
@@ -30,7 +31,8 @@ login32 (const struct utmp32 *entry)
   struct utmp in64;
 
   utmp_convert32to64 (entry, &in64);
-  login (&in64);
+  __login (&in64);
 }
 
-symbol_version (login32, login, GLIBC_2.0);
+compat_symbol (libutil, login32, login, GLIBC_2_0);
+#endif
diff --git a/login/pututxline.c b/login/pututxline.c
index eec8851d45..ddd6330811 100644
--- a/login/pututxline.c
+++ b/login/pututxline.c
@@ -18,9 +18,16 @@
 
 #include <utmp.h>
 #include <utmpx.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 struct utmpx *
-pututxline (const struct utmpx *utmpx)
+__pututxline (const struct utmpx *utmpx)
 {
   return (struct utmpx *) __pututline ((const struct utmp *) utmpx);
 }
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __pututxline, pututxline, UTMP_COMPAT_BASE);
+#else
+weak_alias (__pututxline, pututxline)
+#endif
diff --git a/login/updwtmp.c b/login/updwtmp.c
index 489c28b553..715ef747d7 100644
--- a/login/updwtmp.c
+++ b/login/updwtmp.c
@@ -19,7 +19,8 @@
 #include <utmp.h>
 #include <string.h>
 #include <unistd.h>
-
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 #include "utmp-private.h"
 
 #ifndef TRANSFORM_UTMP_FILE_NAME
@@ -41,4 +42,8 @@ __updwtmp (const char *wtmp_file, const struct utmp *utmp)
   __libc_updwtmp (file_name, utmp);
 }
 libc_hidden_def (__updwtmp)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __updwtmp, updwtmp, UTMP_COMPAT_BASE);
+#else
 weak_alias (__updwtmp, updwtmp)
+#endif
diff --git a/login/updwtmpx.c b/login/updwtmpx.c
index f95306b621..3f1dbb363b 100644
--- a/login/updwtmpx.c
+++ b/login/updwtmpx.c
@@ -18,9 +18,16 @@
 
 #include <utmp.h>
 #include <utmpx.h>
+#include <utmp-compat.h>
+#include <shlib-compat.h>
 
 void
-updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
+__updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
 {
   __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
 }
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+versioned_symbol (libc, __updwtmpx, updwtmpx, UTMP_COMPAT_BASE);
+#else
+weak_alias (__updwtmpx, updwtmpx)
+#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h b/login/utmp-convert.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
rename to login/utmp-convert.h
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c b/login/utmp32.c
similarity index 83%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
rename to login/utmp32.c
index e4b82512f6..7fecb3bdca 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
+++ b/login/utmp32.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
+/* Compability symbols for utmp with 32-bit entry times.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,11 @@
 #include "utmp32.h"
 #include "utmp-convert.h"
 
+#include <utmp-compat.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
+
 /* Allocate a static buffer to be returned to the caller.  As well as
    with the existing version of these functions the caller has to be
    aware that the contents of this buffer will change with subsequent
@@ -63,7 +68,7 @@ getutid32 (const struct utmp32 *id)
 {
   ACCESS_UTMP_ENTRY (__getutid, id)
 }
-symbol_version (getutid32, getutid, GLIBC_2.0);
+compat_symbol (libc, getutid32, getutid, GLIBC_2_0);
 
 /* Search forward from the current point in the utmp file until the
    next entry with a ut_line matching LINE->ut_line.  */
@@ -72,7 +77,7 @@ getutline32 (const struct utmp32 *line)
 {
   ACCESS_UTMP_ENTRY (__getutline, line)
 }
-symbol_version (getutline32, getutline, GLIBC_2.0);
+compat_symbol (libc, getutline32, getutline, GLIBC_2_0);
 
 /* Write out entry pointed to by UTMP_PTR into the utmp file.  */
 struct utmp32 *
@@ -80,7 +85,7 @@ pututline32 (const struct utmp32 *utmp_ptr)
 {
   ACCESS_UTMP_ENTRY (__pututline, utmp_ptr)
 }
-symbol_version (pututline32, pututline, GLIBC_2.0);
+compat_symbol (libc, pututline32, pututline, GLIBC_2_0);
 
 /* Read next entry from a utmp-like file.  */
 struct utmp32 *
@@ -96,10 +101,9 @@ getutent32 (void)
   utmp_convert64to32 (out64, out32);
   return out32;
 }
-symbol_version (getutent32, getutent, GLIBC_2.0);
+compat_symbol (libc, getutent32, getutent, GLIBC_2_0);
 
 /* Reentrant versions of the file for handling utmp files.  */
-
 int
 getutent32_r (struct utmp32 *buffer, struct utmp32 **result)
 {
@@ -119,11 +123,11 @@ getutent32_r (struct utmp32 *buffer, struct utmp32 **result)
 
   return 0;
 }
-symbol_version (getutent32_r, getutent_r, GLIBC_2.0);
+compat_symbol (libc, getutent32_r, getutent_r, GLIBC_2_0);
 
 int
 getutid32_r (const struct utmp32 *id, struct utmp32 *buffer,
-	       struct utmp32 **result)
+	     struct utmp32 **result)
 {
   struct utmp in64;
   struct utmp out64;
@@ -144,11 +148,11 @@ getutid32_r (const struct utmp32 *id, struct utmp32 *buffer,
 
   return 0;
 }
-symbol_version (getutid32_r, getutid_r, GLIBC_2.0);
+compat_symbol (libc, getutid32_r, getutid_r, GLIBC_2_0);
 
 int
 getutline32_r (const struct utmp32 *line,
-		 struct utmp32 *buffer, struct utmp32 **result)
+	       struct utmp32 *buffer, struct utmp32 **result)
 {
   struct utmp in64;
   struct utmp out64;
@@ -170,7 +174,7 @@ getutline32_r (const struct utmp32 *line,
   return 0;
 
 }
-symbol_version (getutline32_r, getutline_r, GLIBC_2.0);
+compat_symbol (libc, getutline32_r, getutline_r, GLIBC_2_0);
 
 /* Append entry UTMP to the wtmp-like file WTMP_FILE.  */
 void
@@ -181,4 +185,6 @@ updwtmp32 (const char *wtmp_file, const struct utmp32 *utmp)
   utmp_convert32to64 (utmp, &in32);
   __updwtmp (wtmp_file, &in32);
 }
-symbol_version (updwtmp32, updwtmp, GLIBC_2.0);
+compat_symbol (libc, updwtmp32, updwtmp, GLIBC_2_0);
+
+#endif /* SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)   */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h b/login/utmp32.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h
rename to login/utmp32.h
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h b/login/utmpx-convert.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h
rename to login/utmpx-convert.h
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c b/login/utmpx32.c
similarity index 81%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
rename to login/utmpx32.c
index 3f78fa62db..3ecd5b65f5 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
+++ b/login/utmpx32.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
+/* Compability symbols for utmpx with 32-bit entry times.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,11 @@
 #include "utmpx32.h"
 #include "utmpx-convert.h"
 
+#include <utmp-compat.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, UTMP_COMPAT_BASE)
+
 /* Allocate a static buffer to be returned to the caller.  As well as
    with the existing version of these functions the caller has to be
    aware that the contents of this buffer will change with subsequent
@@ -75,7 +80,7 @@ getutxent32 (void)
   return out32;
 
 }
-symbol_version (getutxent32, getutxent, GLIBC_2.1);
+compat_symbol (libc, getutxent32, getutxent, GLIBC_2_1);
 
 /* Get the user accounting database entry corresponding to ID.  */
 struct utmpx32 *
@@ -83,7 +88,7 @@ getutxid32 (const struct utmpx32 *id)
 {
   ACCESS_UTMPX_ENTRY (__getutxid, id);
 }
-symbol_version (getutxid32, getutxid, GLIBC_2.1);
+compat_symbol (libc, getutxid32, getutxid, GLIBC_2_1);
 
 /* Get the user accounting database entry corresponding to LINE.  */
 struct utmpx32 *
@@ -91,7 +96,7 @@ getutxline32 (const struct utmpx32 *line)
 {
   ACCESS_UTMPX_ENTRY (__getutxline, line);
 }
-symbol_version (getutxline32, getutxline, GLIBC_2.1);
+compat_symbol (libc, getutxline32, getutxline, GLIBC_2_1);
 
 /* Write the entry UTMPX into the user accounting database.  */
 struct utmpx32 *
@@ -99,7 +104,7 @@ pututxline32 (const struct utmpx32 *utmpx)
 {
   ACCESS_UTMPX_ENTRY (__pututxline, utmpx);
 }
-symbol_version (pututxline32, pututxline, GLIBC_2.1);
+compat_symbol (libc, pututxline32, pututxline, GLIBC_2_1);
 
 /* Append entry UTMP to the wtmpx-like file WTMPX_FILE.  */
 void
@@ -110,7 +115,11 @@ updwtmpx32 (const char *wtmpx_file, const struct utmpx32 *utmpx)
   utmpx_convert32to64 (utmpx, &in64);
   __updwtmpx (wtmpx_file, &in64);
 }
-symbol_version (updwtmpx32, updwtmpx, GLIBC_2.1);
+compat_symbol (libc, updwtmpx32, updwtmpx, GLIBC_2_1);
+
+#endif /* SHLIB_COMPAT(libc, GLIBC_2_1_1, UTMP_COMPAT_BASE)   */
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1_1, UTMP_COMPAT_BASE)
 
 /* Copy the information in UTMPX to UTMP.  */
 void
@@ -123,7 +132,7 @@ getutmp32 (const struct utmpx32 *utmpx, struct utmp32 *utmp)
   __getutmp (&in64, &out64);
   utmp_convert64to32 (&out64, utmp);
 }
-symbol_version (getutmp32, getutmp, GLIBC_2.1.1);
+compat_symbol (libc, getutmp32, getutmp, GLIBC_2_1_1);
 
 /* Copy the information in UTMP to UTMPX.  */
 void
@@ -136,4 +145,6 @@ getutmpx32 (const struct utmp32 *utmp, struct utmpx32 *utmpx)
   __getutmpx (&in64, &out64);
   utmpx_convert64to32 (&out64, utmpx);
 }
-symbol_version (getutmpx32, getutmpx, GLIBC_2.1.1);
+compat_symbol (libc, getutmpx32, getutmpx, GLIBC_2_1_1);
+
+#endif /* SHLIB_COMPAT(libc, GLIBC_2_1, UTMP_COMPAT_BASE)   */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h b/login/utmpx32.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
rename to login/utmpx32.h
diff --git a/sysdeps/generic/utmp-compat.h b/sysdeps/generic/utmp-compat.h
new file mode 100644
index 0000000000..122fd8905d
--- /dev/null
+++ b/sysdeps/generic/utmp-compat.h
@@ -0,0 +1,3 @@
+/* This macro defines the glibc version tag at which the 64 bit struct
+   utmp functions have been added to the 32 bit glibc.  */
+#define UTMP_COMPAT_BASE GLIBC_2_33
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index b4e39285d0..a9bbb5028d 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2196,12 +2196,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/mach/hurd/i386/libutil.abilist b/sysdeps/mach/hurd/i386/libutil.abilist
index 1dd59e0afb..6d97d3cd5e 100644
--- a/sysdeps/mach/hurd/i386/libutil.abilist
+++ b/sysdeps/mach/hurd/i386/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.2.6 login_tty F
 GLIBC_2.2.6 logout F
 GLIBC_2.2.6 logwtmp F
 GLIBC_2.2.6 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 54b707b9cc..9172a3347e 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2164,9 +2164,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libutil.abilist b/sysdeps/unix/sysv/linux/aarch64/libutil.abilist
index 99889de22e..3c2d9a1c14 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.17 login_tty F
 GLIBC_2.17 logout F
 GLIBC_2.17 logwtmp F
 GLIBC_2.17 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 9b429fd28f..bd217cb2c2 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2246,12 +2246,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/alpha/libutil.abilist b/sysdeps/unix/sysv/linux/alpha/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/alpha/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 7ed5340364..898fd755ea 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -1924,9 +1924,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/libutil.abilist
index 61f73bc34e..ea3c23b433 100644
--- a/sysdeps/unix/sysv/linux/arc/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.32 login_tty F
 GLIBC_2.32 logout F
 GLIBC_2.32 logwtmp F
 GLIBC_2.32 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 3ec1cbdfbc..dd52296951 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -145,12 +145,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libutil.abilist b/sysdeps/unix/sysv/linux/arm/le/libutil.abilist
index cc1420e68c..ea54d58739 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libutil.abilist
@@ -1,3 +1,4 @@
+GLIBC_2.33 login F
 GLIBC_2.4 forkpty F
 GLIBC_2.4 login F
 GLIBC_2.4 login_tty F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 301fd728d7..02636a8fa2 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2108,9 +2108,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/csky/libutil.abilist b/sysdeps/unix/sysv/linux/csky/libutil.abilist
index cbd11999a4..165b86bcf8 100644
--- a/sysdeps/unix/sysv/linux/csky/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.29 login_tty F
 GLIBC_2.29 logout F
 GLIBC_2.29 logwtmp F
 GLIBC_2.29 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 84834052e1..21912899a1 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2067,12 +2067,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/hppa/libutil.abilist b/sysdeps/unix/sysv/linux/hppa/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/hppa/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index b82debaba4..77b0d47f2a 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2233,12 +2233,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libutil.abilist b/sysdeps/unix/sysv/linux/i386/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/i386/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 475b7af1a5..7c84d98fcb 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2099,12 +2099,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libutil.abilist b/sysdeps/unix/sysv/linux/ia64/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/ia64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 29127e1341..421a82107f 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2179,12 +2179,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index e5b4cecacd..6ae7a8f5ba 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2159,9 +2159,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist
index 0da0a40c22..2f16f5498a 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.18 login_tty F
 GLIBC_2.18 logout F
 GLIBC_2.18 logwtmp F
 GLIBC_2.18 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index b9f56007a2..817b22b428 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2150,12 +2150,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index c161ef11b5..22772a572a 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2156,12 +2156,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index d4b1528e7a..310db16538 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2150,12 +2150,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 68fca4e650..ba11176736 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2197,9 +2197,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/nios2/libutil.abilist b/sysdeps/unix/sysv/linux/nios2/libutil.abilist
index 19608bd74d..348b707eee 100644
--- a/sysdeps/unix/sysv/linux/nios2/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.21 login_tty F
 GLIBC_2.21 logout F
 GLIBC_2.21 logwtmp F
 GLIBC_2.21 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index bec34b2128..c599b985d1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2206,12 +2206,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 35bd161c79..3362f3f6bb 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2069,12 +2069,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist
index 9cf1da7aa4..41e5bf4a1f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.3 login_tty F
 GLIBC_2.3 logout F
 GLIBC_2.3 logwtmp F
 GLIBC_2.3 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index f1c8ad9cc5..aca57d0f38 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2359,9 +2359,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist
index 99889de22e..3c2d9a1c14 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.17 login_tty F
 GLIBC_2.17 logout F
 GLIBC_2.17 logwtmp F
 GLIBC_2.17 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index fdfc373871..d4e6f75078 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2126,9 +2126,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist
index cbfec8d46e..d9752a1da2 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.27 login_tty F
 GLIBC_2.27 logout F
 GLIBC_2.27 logwtmp F
 GLIBC_2.27 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
deleted file mode 100644
index 615312ed39..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutent.c"
-
-#if defined SHARED
-default_symbol_version (__getutent, getutent, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
deleted file mode 100644
index 29d8c6a6f9..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <libc-lock.h>
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-#include "utmp-private.h"
-
-#if defined SHARED
-weak_alias (__setutent, setutent)
-weak_alias (__endutent, endutent)
-
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutent_r.c"
-
-#if defined SHARED
-default_symbol_version (__getutent_r, getutent_r, UTMP_COMPAT_BASE);
-default_symbol_version (__pututline, pututline, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
deleted file mode 100644
index d3c63664df..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutid.c"
-
-#if defined SHARED
-default_symbol_version (__getutid, getutid, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
deleted file mode 100644
index e5511d406a..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <libc-lock.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-#include "utmp-private.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutid_r.c"
-
-#if defined SHARED
-default_symbol_version (__getutid_r, getutid_r, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
deleted file mode 100644
index 1c98cc5bba..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutline.c"
-
-#if defined SHARED
-default_symbol_version (__getutline, getutline, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
deleted file mode 100644
index f8b63342b4..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <libc-lock.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-#include "utmp-private.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include "login/getutline_r.c"
-
-#if defined SHARED
-default_symbol_version (__getutline_r, getutline_r, UTMP_COMPAT_BASE);;
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
deleted file mode 100644
index 50ce8c4f5c..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#undef weak_alias
-#define weak_alias(a, b)
-#undef strong_alias
-#define strong_alias(a, b)
-
-#include <login/getutmp.c>
-
-#include "utmp-compat.h"
-
-default_symbol_version (__getutmp, getutmp, UTMP_COMPAT_BASE);
-_strong_alias (__getutmp, __getutmpx)
-default_symbol_version (__getutmpx, getutmpx, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
deleted file mode 100644
index be887a672b..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxent __getutxent
-#include "login/getutxent.c"
-#undef getutxent
-
-default_symbol_version (__getutxent, getutxent, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
deleted file mode 100644
index 85febe277b..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxid __getutxid
-#include "login/getutxid.c"
-#undef getutxid
-
-default_symbol_version (__getutxid, getutxid, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
deleted file mode 100644
index a69740a712..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxline __getutxline
-#include "login/getutxline.c"
-#undef getutxline
-
-default_symbol_version (__getutxline, getutxline, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login.c b/sysdeps/unix/sysv/linux/s390/s390-32/login.c
deleted file mode 100644
index 25ee4a8b16..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/login.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <assert.h>
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <utmp.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define login __login
-#include "login/login.c"
-#undef login
-
-default_symbol_version (__login, login, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
deleted file mode 100644
index c8f773d9dc..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define pututxline __pututxline
-#include "login/pututxline.c"
-#undef pututxline
-
-default_symbol_version (__pututxline, pututxline, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
deleted file mode 100644
index 2079571cc1..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-
-#include "utmp-compat.h"
-#include "utmp-private.h"
-
-#if defined SHARED
-# undef weak_alias
-# define weak_alias(n,a)
-#endif
-#include <login/updwtmp.c>
-
-#if defined SHARED
-default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);
-#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
deleted file mode 100644
index ce94139c3c..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define updwtmpx __updwtmpx
-#include "login/updwtmpx.c"
-#undef updwtmpx
-
-default_symbol_version (__updwtmpx, updwtmpx, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h
index 4e5972b65d..ef8115370c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h
@@ -18,4 +18,4 @@
 
 /* This macro defines the glibc version tag at which the 64 bit struct
    utmp functions have been added to the 32 bit glibc.  */
-#define UTMP_COMPAT_BASE GLIBC_2.9
+#define UTMP_COMPAT_BASE GLIBC_2_9
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index bd96aeaff7..0df18459dc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2105,12 +2105,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist
index 14bd135ea8..3f66f39bac 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.2 login_tty F
 GLIBC_2.2 logout F
 GLIBC_2.2 logwtmp F
 GLIBC_2.2 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index b4cebb11dd..ea78226332 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2071,12 +2071,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libutil.abilist b/sysdeps/unix/sysv/linux/sh/le/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index f208405859..6f3a2df230 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2195,12 +2195,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 44e68aded2..b4e75bb47e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2122,12 +2122,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist
index aa2d35b323..1bd22adb45 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.0 login_tty F
 GLIBC_2.0 logout F
 GLIBC_2.0 logwtmp F
 GLIBC_2.0 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 51e76861f6..74c0c26ba5 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2080,12 +2080,27 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist
index 1356ed4115..7df76778a4 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.2.5 login_tty F
 GLIBC_2.2.5 logout F
 GLIBC_2.2.5 logwtmp F
 GLIBC_2.2.5 openpty F
+GLIBC_2.33 login F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index f83473c11f..3597a3ff88 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2177,9 +2177,24 @@ GLIBC_2.33 fstat F
 GLIBC_2.33 fstat64 F
 GLIBC_2.33 fstatat F
 GLIBC_2.33 fstatat64 F
+GLIBC_2.33 getutent F
+GLIBC_2.33 getutent_r F
+GLIBC_2.33 getutid F
+GLIBC_2.33 getutid_r F
+GLIBC_2.33 getutline F
+GLIBC_2.33 getutline_r F
+GLIBC_2.33 getutmp F
+GLIBC_2.33 getutmpx F
+GLIBC_2.33 getutxent F
+GLIBC_2.33 getutxid F
+GLIBC_2.33 getutxline F
 GLIBC_2.33 lstat F
 GLIBC_2.33 lstat64 F
 GLIBC_2.33 mknod F
 GLIBC_2.33 mknodat F
+GLIBC_2.33 pututline F
+GLIBC_2.33 pututxline F
 GLIBC_2.33 stat F
 GLIBC_2.33 stat64 F
+GLIBC_2.33 updwtmp F
+GLIBC_2.33 updwtmpx F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist
index cff23106f5..9431f297d8 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist
@@ -4,3 +4,4 @@ GLIBC_2.16 login_tty F
 GLIBC_2.16 logout F
 GLIBC_2.16 logwtmp F
 GLIBC_2.16 openpty F
+GLIBC_2.33 login F
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
  2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
  2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
@ 2020-07-29 20:51 ` Adhemerval Zanella via Libc-alpha
  2020-07-29 21:04   ` Andreas Schwab
                     ` (2 more replies)
  2020-07-29 20:51 ` [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32 Adhemerval Zanella via Libc-alpha
                   ` (2 subsequent siblings)
  5 siblings, 3 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-29 20:51 UTC (permalink / raw)
  To: libc-alpha; +Cc: Alistair Francis

It is not used directly on any symbol, so there is no need to add
compat ones.
---
 bits/struct_lastlog.h                         |  4 +--
 .../sysv/linux/s390/bits/struct_lastlog.h     | 35 -------------------
 2 files changed, 2 insertions(+), 37 deletions(-)
 delete mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h

diff --git a/bits/struct_lastlog.h b/bits/struct_lastlog.h
index 122a44abd0..6882015d7c 100644
--- a/bits/struct_lastlog.h
+++ b/bits/struct_lastlog.h
@@ -24,8 +24,8 @@
    previous logins.  */
 struct lastlog
   {
-#if __WORDSIZE_TIME64_COMPAT32
-    int32_t ll_time;
+#if __TIMESIZE != 64
+    int64_t ll_time;
 #else
     __time_t ll_time;
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
deleted file mode 100644
index 2fa409aeec..0000000000
--- a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* The 'struct lastlog' type.
-   Copyright (C) 2020 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _UTMP_H
-# error "Never include <bits/struct_lastlog.h> directly; use <utmp.h> instead."
-#endif
-
-/* The structure describing an entry in the database of
-   previous logins.  */
-struct lastlog
-  {
-#if __WORDSIZE == 32
-    int64_t ll_time;
-#else
-    __time_t ll_time;
-#endif
-    char ll_line[UT_LINESIZE];
-    char ll_host[UT_HOSTSIZE];
-  };
-
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
                   ` (2 preceding siblings ...)
  2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
@ 2020-07-29 20:51 ` Adhemerval Zanella via Libc-alpha
  2020-10-22  9:31   ` Lukasz Majewski
  2020-07-29 21:08 ` [PATCH 1/5] login: Consolidate utmp and utmpx headers Joseph Myers
  2020-10-22  8:06 ` Lukasz Majewski
  5 siblings, 1 reply; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-29 20:51 UTC (permalink / raw)
  To: libc-alpha; +Cc: Alistair Francis

With 'struct utmpx', 'struct utmp', and 'struct lastlog' using
64-bit time unconditionally this macro is not used anymore.
---
 bits/wordsize.h                                 | 6 ------
 sysdeps/aarch64/bits/wordsize.h                 | 2 --
 sysdeps/mips/bits/wordsize.h                    | 6 ------
 sysdeps/powerpc/powerpc32/bits/wordsize.h       | 2 --
 sysdeps/powerpc/powerpc64/bits/wordsize.h       | 2 --
 sysdeps/riscv/bits/wordsize.h                   | 6 ------
 sysdeps/s390/s390-32/bits/wordsize.h            | 2 --
 sysdeps/s390/s390-64/bits/wordsize.h            | 2 --
 sysdeps/sparc/sparc32/bits/wordsize.h           | 2 --
 sysdeps/sparc/sparc64/bits/wordsize.h           | 2 --
 sysdeps/unix/sysv/linux/alpha/bits/wordsize.h   | 1 -
 sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h | 2 --
 sysdeps/unix/sysv/linux/sparc/bits/wordsize.h   | 2 --
 sysdeps/wordsize-32/bits/wordsize.h             | 1 -
 sysdeps/wordsize-64/bits/wordsize.h             | 1 -
 sysdeps/x86/bits/wordsize.h                     | 3 ---
 16 files changed, 42 deletions(-)

diff --git a/bits/wordsize.h b/bits/wordsize.h
index 14edae3a11..e20fd2e4c2 100644
--- a/bits/wordsize.h
+++ b/bits/wordsize.h
@@ -19,9 +19,3 @@
    __WORDSIZE is 32 and ptrdiff_t is type 'int' and leave undefined if
    __WORDSIZE is 64.  */
 #define __WORDSIZE32_PTRDIFF_LONG
-
-/* Set to 1 in order to force time types to be 32 bits instead of 64 bits in
-   struct lastlog and struct utmp{,x} on 64-bit ports.  This may be done in
-   order to make 64-bit ports compatible with 32-bit ports.  Set to 0 for
-   64-bit ports where the time types are 64-bits or for any 32-bit ports.  */
-#define __WORDSIZE_TIME64_COMPAT32
diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
index ee01841773..adc083d662 100644
--- a/sysdeps/aarch64/bits/wordsize.h
+++ b/sysdeps/aarch64/bits/wordsize.h
@@ -24,5 +24,3 @@
 # define __WORDSIZE32_SIZE_ULONG	1
 # define __WORDSIZE32_PTRDIFF_LONG	1
 #endif
-
-#define __WORDSIZE_TIME64_COMPAT32	0
diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h
index d14f497895..3af04daea6 100644
--- a/sysdeps/mips/bits/wordsize.h
+++ b/sysdeps/mips/bits/wordsize.h
@@ -19,12 +19,6 @@
 
 #define __WORDSIZE			_MIPS_SZPTR
 
-#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32	1
-#else
-# define __WORDSIZE_TIME64_COMPAT32	0
-#endif
-
 #if __WORDSIZE == 32
 #define __WORDSIZE32_SIZE_ULONG		0
 #define __WORDSIZE32_PTRDIFF_LONG	0
diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h
index 04ca9debf0..df1aa27244 100644
--- a/sysdeps/powerpc/powerpc32/bits/wordsize.h
+++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __powerpc64__
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
diff --git a/sysdeps/powerpc/powerpc64/bits/wordsize.h b/sysdeps/powerpc/powerpc64/bits/wordsize.h
index 04ca9debf0..df1aa27244 100644
--- a/sysdeps/powerpc/powerpc64/bits/wordsize.h
+++ b/sysdeps/powerpc/powerpc64/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __powerpc64__
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
diff --git a/sysdeps/riscv/bits/wordsize.h b/sysdeps/riscv/bits/wordsize.h
index faccc71828..182e3d33a6 100644
--- a/sysdeps/riscv/bits/wordsize.h
+++ b/sysdeps/riscv/bits/wordsize.h
@@ -21,9 +21,3 @@
 #else
 # error unsupported ABI
 #endif
-
-#if __riscv_xlen == 64
-# define __WORDSIZE_TIME64_COMPAT32 1
-#else
-# error "rv32i-based targets are not supported"
-#endif
diff --git a/sysdeps/s390/s390-32/bits/wordsize.h b/sysdeps/s390/s390-32/bits/wordsize.h
index 129e47182b..755050861e 100644
--- a/sysdeps/s390/s390-32/bits/wordsize.h
+++ b/sysdeps/s390/s390-32/bits/wordsize.h
@@ -7,5 +7,3 @@
 # define __WORDSIZE32_SIZE_ULONG       1
 # define __WORDSIZE32_PTRDIFF_LONG      0
 #endif
-
-#define __WORDSIZE_TIME64_COMPAT32     0
diff --git a/sysdeps/s390/s390-64/bits/wordsize.h b/sysdeps/s390/s390-64/bits/wordsize.h
index 00e88b0628..01245a5b71 100644
--- a/sysdeps/s390/s390-64/bits/wordsize.h
+++ b/sysdeps/s390/s390-64/bits/wordsize.h
@@ -7,5 +7,3 @@
 # define __WORDSIZE32_SIZE_ULONG       1
 # define __WORDSIZE32_PTRDIFF_LONG     0
 #endif
-
-#define __WORDSIZE_TIME64_COMPAT32     0
diff --git a/sysdeps/sparc/sparc32/bits/wordsize.h b/sysdeps/sparc/sparc32/bits/wordsize.h
index 2f66f10d72..10b73267f0 100644
--- a/sysdeps/sparc/sparc32/bits/wordsize.h
+++ b/sysdeps/sparc/sparc32/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __arch64__ || defined __sparcv9
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h b/sysdeps/sparc/sparc64/bits/wordsize.h
index 2f66f10d72..10b73267f0 100644
--- a/sysdeps/sparc/sparc64/bits/wordsize.h
+++ b/sysdeps/sparc/sparc64/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __arch64__ || defined __sparcv9
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
index 74289c244a..6d955a9f27 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
@@ -16,4 +16,3 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define __WORDSIZE	64
-#define __WORDSIZE_TIME64_COMPAT32	0
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
index 04ca9debf0..df1aa27244 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __powerpc64__
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
index 7562875ee2..10b73267f0 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
@@ -2,10 +2,8 @@
 
 #if defined __arch64__ || defined __sparcv9
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
-# define __WORDSIZE_TIME64_COMPAT32	0
 #endif
diff --git a/sysdeps/wordsize-32/bits/wordsize.h b/sysdeps/wordsize-32/bits/wordsize.h
index 759906a08d..869a7ab2aa 100644
--- a/sysdeps/wordsize-32/bits/wordsize.h
+++ b/sysdeps/wordsize-32/bits/wordsize.h
@@ -16,6 +16,5 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define __WORDSIZE			32
-#define __WORDSIZE_TIME64_COMPAT32	0
 #define __WORDSIZE32_SIZE_ULONG		0
 #define __WORDSIZE32_PTRDIFF_LONG	0
diff --git a/sysdeps/wordsize-64/bits/wordsize.h b/sysdeps/wordsize-64/bits/wordsize.h
index 44b9725814..8613a6cb3c 100644
--- a/sysdeps/wordsize-64/bits/wordsize.h
+++ b/sysdeps/wordsize-64/bits/wordsize.h
@@ -16,4 +16,3 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define __WORDSIZE			64
-#define __WORDSIZE_TIME64_COMPAT32	0
diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h
index 70f652bca1..cf250cc6df 100644
--- a/sysdeps/x86/bits/wordsize.h
+++ b/sysdeps/x86/bits/wordsize.h
@@ -9,9 +9,6 @@
 #endif
 
 #ifdef __x86_64__
-# define __WORDSIZE_TIME64_COMPAT32	1
 /* Both x86-64 and x32 use the 64-bit system call interface.  */
 # define __SYSCALL_WORDSIZE		64
-#else
-# define __WORDSIZE_TIME64_COMPAT32	0
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
@ 2020-07-29 21:04   ` Andreas Schwab
  2020-07-29 21:14   ` Andreas Schwab
  2020-10-22  9:25   ` Lukasz Majewski
  2 siblings, 0 replies; 25+ messages in thread
From: Andreas Schwab @ 2020-07-29 21:04 UTC (permalink / raw)
  To: Adhemerval Zanella via Libc-alpha; +Cc: Alistair Francis

s/User/Use/

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/5] login: Consolidate utmp and utmpx headers
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
                   ` (3 preceding siblings ...)
  2020-07-29 20:51 ` [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32 Adhemerval Zanella via Libc-alpha
@ 2020-07-29 21:08 ` Joseph Myers
  2020-07-30 12:36   ` Adhemerval Zanella via Libc-alpha
  2020-10-22  8:06 ` Lukasz Majewski
  5 siblings, 1 reply; 25+ messages in thread
From: Joseph Myers @ 2020-07-29 21:08 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

On Wed, 29 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:

> It moves the 'struct lastlog', 'struct utmp', and 'struct utmpx' to
> specific files and consolidates the s390-32 utmp.h and utmpx.h headers.
> 
> Checked on x86_64-linux-gnu and i686-linux-gnu.  I also checked with
> a build for s390-linux-gnu.
> ---
>  bits/struct_lastlog.h                         |  34 +++++
>  bits/struct_utmp.h                            |  55 ++++++++

An installed header just defining a single type should be 
bits/types/<type>.h, not bits/<type>.h.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
  2020-07-29 21:04   ` Andreas Schwab
@ 2020-07-29 21:14   ` Andreas Schwab
  2020-07-30 12:39     ` Adhemerval Zanella via Libc-alpha
  2020-10-22  9:25   ` Lukasz Majewski
  2 siblings, 1 reply; 25+ messages in thread
From: Andreas Schwab @ 2020-07-29 21:14 UTC (permalink / raw)
  To: Adhemerval Zanella via Libc-alpha; +Cc: Alistair Francis

On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:

> It is not used directly on any symbol, so there is no need to add
> compat ones.

struct lastlog is an external type, describing the format of
/var/log/lastlog.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/5] login: Add 64-bit time support
  2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
@ 2020-07-29 21:17   ` Joseph Myers
  2020-07-30 12:34     ` Adhemerval Zanella via Libc-alpha
  2020-10-22  9:16   ` Lukasz Majewski
  1 sibling, 1 reply; 25+ messages in thread
From: Joseph Myers @ 2020-07-29 21:17 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

On Wed, 29 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:

> New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
> pututline, pututxline, updwtmp, updwtmpx, and login are added to
> all architecture but s390-32 (which already added 64-bit time support
> on 32-bit ABI on glibc 2.9).

I thought those structures appeared in external files (/var/run/utmp, 
/var/log/wtmp, /var/log/lastlog), which means changing them is problematic 
even with symbol versioning.  Do the files keep their existing formats 
with the new versions of the functions translating to and from the 64-bit 
format when reading / writing those files?  Do they get new formats with 
the old versions of the functions instead being the ones that translate 
(if so, what is the process distributions are expected to use to convert 
existing files on upgrade / enable old wtmp files in the old format to 
continue to be read by new code)?  I think a detailed description of the 
overall strategy for maintaining compatibility with existing data in files 
is needed, both in the patch / patch series description and in the NEWS 
file describing anything required to be done on upgrade to avoid losing or 
corrupting data.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/5] login: Add 64-bit time support
  2020-07-29 21:17   ` Joseph Myers
@ 2020-07-30 12:34     ` Adhemerval Zanella via Libc-alpha
  2020-08-02 19:02       ` Maciej W. Rozycki via Libc-alpha
  0 siblings, 1 reply; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-30 12:34 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Alistair Francis, libc-alpha



On 29/07/2020 18:17, Joseph Myers wrote:
> On Wed, 29 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:
> 
>> New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
>> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
>> pututline, pututxline, updwtmp, updwtmpx, and login are added to
>> all architecture but s390-32 (which already added 64-bit time support
>> on 32-bit ABI on glibc 2.9).
> 
> I thought those structures appeared in external files (/var/run/utmp, 
> /var/log/wtmp, /var/log/lastlog), which means changing them is problematic 
> even with symbol versioning.  Do the files keep their existing formats 
> with the new versions of the functions translating to and from the 64-bit 
> format when reading / writing those files?  Do they get new formats with 
> the old versions of the functions instead being the ones that translate 
> (if so, what is the process distributions are expected to use to convert 
> existing files on upgrade / enable old wtmp files in the old format to 
> continue to be read by new code)?  I think a detailed description of the 
> overall strategy for maintaining compatibility with existing data in files 
> is needed, both in the patch / patch series description and in the NEWS 
> file describing anything required to be done on upgrade to avoid losing or 
> corrupting data.
> 

The strategy I used was the same done by s390-32 some time ago, where
the var/run/utmp, /var/log/wtmp, /var/log/lastlog would use the new
64-bit time regardless and the 32-bit compat symbols convert the 32-bit
entries to the internal 64-bit ones.  Afaik there is not conversion tool 
to handle that, so the system administration was supposed to reset such 
files in a glibc upgrade.

I thought about the underlying issuesand another strategy I considered
was to use new register types for 64-bit time symbols (by mapping the 
RUN_LVL, etc. to internal types). The 32-bit time compat symbols would then
write the entries as-is.  

There are some issues with this approach: how compat symbols would handle 
64-bit time entries? Would them be just ignored (as the current semantic 
for other 64-bit symbols which return EOVERFLOW) or the entry would be 
converted and the time clamped (and thus returning potentially 
invalid/misleading time results)?

Another issue is extra code complexity, it requires routines to convert
to 64-bit entries from 32-bit entries and the 32-bit compat symbols won't
be based on exported ABI (which requires to add extra testing to handle
the iteration between 64-bit and 32-bit entries).

I am not sure if this extra complexity to handle multiple registers
types does days off (and I don't know how was s390-32 transition), but
if this is indeed a desirable feature I think I can spend some time to
sort this out.  


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/5] login: Consolidate utmp and utmpx headers
  2020-07-29 21:08 ` [PATCH 1/5] login: Consolidate utmp and utmpx headers Joseph Myers
@ 2020-07-30 12:36   ` Adhemerval Zanella via Libc-alpha
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-30 12:36 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Alistair Francis, libc-alpha



On 29/07/2020 18:08, Joseph Myers wrote:
> On Wed, 29 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:
> 
>> It moves the 'struct lastlog', 'struct utmp', and 'struct utmpx' to
>> specific files and consolidates the s390-32 utmp.h and utmpx.h headers.
>>
>> Checked on x86_64-linux-gnu and i686-linux-gnu.  I also checked with
>> a build for s390-linux-gnu.
>> ---
>>  bits/struct_lastlog.h                         |  34 +++++
>>  bits/struct_utmp.h                            |  55 ++++++++
> 
> An installed header just defining a single type should be 
> bits/types/<type>.h, not bits/<type>.h.
> 

Ack, I fixed it on the 'login: Move gnu utmpx to default implementation'
patch as well for utmpx.h header.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-29 21:14   ` Andreas Schwab
@ 2020-07-30 12:39     ` Adhemerval Zanella via Libc-alpha
  2020-07-30 16:19       ` Florian Weimer via Libc-alpha
  0 siblings, 1 reply; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-30 12:39 UTC (permalink / raw)
  To: Andreas Schwab, Adhemerval Zanella via Libc-alpha; +Cc: Alistair Francis



On 29/07/2020 18:14, Andreas Schwab wrote:
> On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:
> 
>> It is not used directly on any symbol, so there is no need to add
>> compat ones.
> 
> struct lastlog is an external type, describing the format of
> /var/log/lastlog.
>

Right, so which would be best way to handle this transition?  My idea
would to be approach to consumers, shadow-utils developers for instance,
and state the desirable to make glibc y2038 proof and why this interfaces
need to be changed.


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-30 12:39     ` Adhemerval Zanella via Libc-alpha
@ 2020-07-30 16:19       ` Florian Weimer via Libc-alpha
  2020-07-30 18:54         ` Joseph Myers
  2020-07-30 21:46         ` Adhemerval Zanella via Libc-alpha
  0 siblings, 2 replies; 25+ messages in thread
From: Florian Weimer via Libc-alpha @ 2020-07-30 16:19 UTC (permalink / raw)
  To: Adhemerval Zanella via Libc-alpha; +Cc: Alistair Francis, Andreas Schwab

* Adhemerval Zanella via Libc-alpha:

> On 29/07/2020 18:14, Andreas Schwab wrote:
>> On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:
>> 
>>> It is not used directly on any symbol, so there is no need to add
>>> compat ones.
>> 
>> struct lastlog is an external type, describing the format of
>> /var/log/lastlog.
>>
>
> Right, so which would be best way to handle this transition?  My idea
> would to be approach to consumers, shadow-utils developers for instance,
> and state the desirable to make glibc y2038 proof and why this interfaces
> need to be changed.

Sounds reasonable.  We also have a security bug that is related to
direct access to these files:

  <https://sourceware.org/bugzilla/show_bug.cgi?id=24492>

If we need to mediate access for format translation, maybe this can be
addressed at the same time?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-30 16:19       ` Florian Weimer via Libc-alpha
@ 2020-07-30 18:54         ` Joseph Myers
  2020-07-30 21:53           ` Adhemerval Zanella via Libc-alpha
  2020-07-30 21:46         ` Adhemerval Zanella via Libc-alpha
  1 sibling, 1 reply; 25+ messages in thread
From: Joseph Myers @ 2020-07-30 18:54 UTC (permalink / raw)
  To: Florian Weimer
  Cc: Alistair Francis, Andreas Schwab,
	Adhemerval Zanella via Libc-alpha

On Thu, 30 Jul 2020, Florian Weimer via Libc-alpha wrote:

> Sounds reasonable.  We also have a security bug that is related to
> direct access to these files:
> 
>   <https://sourceware.org/bugzilla/show_bug.cgi?id=24492>
> 
> If we need to mediate access for format translation, maybe this can be
> addressed at the same time?

Having different filenames for the new format might be safest, which would 
naturally go along with having some form of mediation for access to utmp / 
wtmp / lastlog.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-30 16:19       ` Florian Weimer via Libc-alpha
  2020-07-30 18:54         ` Joseph Myers
@ 2020-07-30 21:46         ` Adhemerval Zanella via Libc-alpha
  1 sibling, 0 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-30 21:46 UTC (permalink / raw)
  To: Florian Weimer, Adhemerval Zanella via Libc-alpha
  Cc: Alistair Francis, Andreas Schwab



On 30/07/2020 13:19, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> On 29/07/2020 18:14, Andreas Schwab wrote:
>>> On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:
>>>
>>>> It is not used directly on any symbol, so there is no need to add
>>>> compat ones.
>>>
>>> struct lastlog is an external type, describing the format of
>>> /var/log/lastlog.
>>>
>>
>> Right, so which would be best way to handle this transition?  My idea
>> would to be approach to consumers, shadow-utils developers for instance,
>> and state the desirable to make glibc y2038 proof and why this interfaces
>> need to be changed.
> 
> Sounds reasonable.  We also have a security bug that is related to
> direct access to these files:
> 
>   <https://sourceware.org/bugzilla/show_bug.cgi?id=24492>
> 
> If we need to mediate access for format translation, maybe this can be
> addressed at the same time?

I think BZ#24492 is another issue and one that is not easily fixed
without some changes on the utmp-file.c internals.  The utmp/utmpx files 
are read by the ut{x} functions and used on programs such as 'who', and
to fully avoid possible F_SETLKW deadlocks the write must synchronize
using a file not accessible by normal users.

The alarm trick mitigates the deadlock issue, but it does not help
with the fact the log entry is not generated.  The bug report suggestion
of using a extra file to act as the lock for write synchronization might
be a better option.  Another possibility is to move to use a daemon broker 
to actually operate on utmp/utmpx, but I also think it is out of the scope.

I am inclined of using the extra lock file, thoughts?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-30 18:54         ` Joseph Myers
@ 2020-07-30 21:53           ` Adhemerval Zanella via Libc-alpha
  2020-07-31  0:31             ` Joseph Myers
  0 siblings, 1 reply; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-07-30 21:53 UTC (permalink / raw)
  To: libc-alpha



On 30/07/2020 15:54, Joseph Myers wrote:
> On Thu, 30 Jul 2020, Florian Weimer via Libc-alpha wrote:
> 
>> Sounds reasonable.  We also have a security bug that is related to
>> direct access to these files:
>>
>>   <https://sourceware.org/bugzilla/show_bug.cgi?id=24492>
>>
>> If we need to mediate access for format translation, maybe this can be
>> addressed at the same time?
> 
> Having different filenames for the new format might be safest, which would 
> naturally go along with having some form of mediation for access to utmp / 
> wtmp / lastlog.
> 

The different filename sound slike a strategy and I understand that the idea
would also to use new versions for the utmp/utmpx symbols. What about the 
compatibility symbols, should them be built on top of the new ABI and access
the newer files or use the old format and access the old filenames?

As for lastlog, I think it would be feasible to provide a API to mediate
the file access as a GNU extension.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-30 21:53           ` Adhemerval Zanella via Libc-alpha
@ 2020-07-31  0:31             ` Joseph Myers
  0 siblings, 0 replies; 25+ messages in thread
From: Joseph Myers @ 2020-07-31  0:31 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

On Thu, 30 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:

> The different filename sound slike a strategy and I understand that the idea
> would also to use new versions for the utmp/utmpx symbols. What about the 
> compatibility symbols, should them be built on top of the new ABI and access
> the newer files or use the old format and access the old filenames?

I suppose that gets into questions about programs explicitly using 
utmpname.  If a program using the old symbol versions called utmpname 
explicitly with some filename, that's probably the name of a file in the 
old format.  But if it doesn't call utmpname, either you can access the 
old files in the old format and not get current data, or the new files in 
the new format and convert.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/5] login: Add 64-bit time support
  2020-07-30 12:34     ` Adhemerval Zanella via Libc-alpha
@ 2020-08-02 19:02       ` Maciej W. Rozycki via Libc-alpha
  2020-08-02 22:05         ` Adhemerval Zanella via Libc-alpha
  0 siblings, 1 reply; 25+ messages in thread
From: Maciej W. Rozycki via Libc-alpha @ 2020-08-02 19:02 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha, Alistair Francis, Joseph Myers

On Thu, 30 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:

> >> New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
> >> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
> >> pututline, pututxline, updwtmp, updwtmpx, and login are added to
> >> all architecture but s390-32 (which already added 64-bit time support
> >> on 32-bit ABI on glibc 2.9).
> > 
> > I thought those structures appeared in external files (/var/run/utmp, 
> > /var/log/wtmp, /var/log/lastlog), which means changing them is problematic 
> > even with symbol versioning.  Do the files keep their existing formats 
> > with the new versions of the functions translating to and from the 64-bit 
> > format when reading / writing those files?  Do they get new formats with 
> > the old versions of the functions instead being the ones that translate 
> > (if so, what is the process distributions are expected to use to convert 
> > existing files on upgrade / enable old wtmp files in the old format to 
> > continue to be read by new code)?  I think a detailed description of the 
> > overall strategy for maintaining compatibility with existing data in files 
> > is needed, both in the patch / patch series description and in the NEWS 
> > file describing anything required to be done on upgrade to avoid losing or 
> > corrupting data.
> > 
> 
> The strategy I used was the same done by s390-32 some time ago, where
> the var/run/utmp, /var/log/wtmp, /var/log/lastlog would use the new
> 64-bit time regardless and the 32-bit compat symbols convert the 32-bit
> entries to the internal 64-bit ones.  Afaik there is not conversion tool 
> to handle that, so the system administration was supposed to reset such 
> files in a glibc upgrade.

 Hmm, there could be many copies of glibc used at once on a single system 
(e.g. for different ABIs) all accessing the same login records on behalf 
of different programs, and the intended process has been agreed upon it 
would seem so that administrators could make the switch as they would see 
fit rather than being forced to do so at the time of a glibc upgrade: 
<https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#utmp_types_and_APIs>.

  Maciej


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/5] login: Add 64-bit time support
  2020-08-02 19:02       ` Maciej W. Rozycki via Libc-alpha
@ 2020-08-02 22:05         ` Adhemerval Zanella via Libc-alpha
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-08-02 22:05 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: libc-alpha, Alistair Francis, Joseph Myers



On 02/08/2020 16:02, Maciej W. Rozycki wrote:
> On Thu, 30 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:
> 
>>>> New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
>>>> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
>>>> pututline, pututxline, updwtmp, updwtmpx, and login are added to
>>>> all architecture but s390-32 (which already added 64-bit time support
>>>> on 32-bit ABI on glibc 2.9).
>>>
>>> I thought those structures appeared in external files (/var/run/utmp, 
>>> /var/log/wtmp, /var/log/lastlog), which means changing them is problematic 
>>> even with symbol versioning.  Do the files keep their existing formats 
>>> with the new versions of the functions translating to and from the 64-bit 
>>> format when reading / writing those files?  Do they get new formats with 
>>> the old versions of the functions instead being the ones that translate 
>>> (if so, what is the process distributions are expected to use to convert 
>>> existing files on upgrade / enable old wtmp files in the old format to 
>>> continue to be read by new code)?  I think a detailed description of the 
>>> overall strategy for maintaining compatibility with existing data in files 
>>> is needed, both in the patch / patch series description and in the NEWS 
>>> file describing anything required to be done on upgrade to avoid losing or 
>>> corrupting data.
>>>
>>
>> The strategy I used was the same done by s390-32 some time ago, where
>> the var/run/utmp, /var/log/wtmp, /var/log/lastlog would use the new
>> 64-bit time regardless and the 32-bit compat symbols convert the 32-bit
>> entries to the internal 64-bit ones.  Afaik there is not conversion tool 
>> to handle that, so the system administration was supposed to reset such 
>> files in a glibc upgrade.
> 
>  Hmm, there could be many copies of glibc used at once on a single system 
> (e.g. for different ABIs) all accessing the same login records on behalf 
> of different programs, and the intended process has been agreed upon it 
> would seem so that administrators could make the switch as they would see 
> fit rather than being forced to do so at the time of a glibc upgrade: 
> <https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#utmp_types_and_APIs>.

I think the strategy of using new filenames for UTMP_FILE as proposed by Joseph
tends to be a slight better one than keeping multiple databases and add the
extra complexity of syncing entries in multiples files.

On the patches I am working, the default new utmp/utmpx symbols only reads/writes
64-bit time entries. The compat symbols, in the other hand, have a more complex 
logic: if the utmp/utmpx file is the default one (UTMP_FILE exported by newer glibc)
the entries are read as 64-bit and converted to 32-bits; otherwise the register are
read as 32-bit time_t (although it seems unlikely that application using compat
symbols would set the database for the new UTMP_FILE).

The new symbols do not have a logic on how to read old 32-bit database formats.
It should be doable by either setting the file format base on utmp file name 
(through utmpname) or maybe by a GNU extension where the database type is
advertise explicit.  The usefulness of the ABI would be mainly to create some
utmp/wtmp conversion tool, so I am not sure if it is really worth to implement
it.

But the main focus here is to *not* maintain multiple utmp databases, but rather
to move new application to use y2038 ones due the inherent issue of 32-bit time
database (which affects 64-bit architecture as well, modulo s390).  The old 
utmp database should be use only by on compat applications that does not have 
64-bit time support and this is another reason I think the 'utmp.trans' strategy
is not the best one.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/5] login: Consolidate utmp and utmpx headers
  2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
                   ` (4 preceding siblings ...)
  2020-07-29 21:08 ` [PATCH 1/5] login: Consolidate utmp and utmpx headers Joseph Myers
@ 2020-10-22  8:06 ` Lukasz Majewski
  5 siblings, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2020-10-22  8:06 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 24964 bytes --]

Hi Adhemerval,

> It moves the 'struct lastlog', 'struct utmp', and 'struct utmpx' to
> specific files and consolidates the s390-32 utmp.h and utmpx.h
> headers.
> 
> Checked on x86_64-linux-gnu and i686-linux-gnu.  I also checked with
> a build for s390-linux-gnu.
> ---
>  bits/struct_lastlog.h                         |  34 +++++
>  bits/struct_utmp.h                            |  55 ++++++++
>  bits/utmp.h                                   |  48 +------
>  login/Makefile                                |   3 +-
>  sysdeps/gnu/bits/struct_utmpx.h               |  55 ++++++++
>  sysdeps/gnu/bits/utmpx.h                      |  34 +----
>  .../sysv/linux/s390/bits/struct_lastlog.h     |  35 +++++
>  .../unix/sysv/linux/s390/bits/struct_utmp.h   |  51 +++++++
>  .../s390/bits/{utmpx.h => struct_utmpx.h}     |  57 +-------
>  sysdeps/unix/sysv/linux/s390/bits/utmp.h      | 127
> ------------------ 10 files changed, 238 insertions(+), 261
> deletions(-) create mode 100644 bits/struct_lastlog.h
>  create mode 100644 bits/struct_utmp.h
>  create mode 100644 sysdeps/gnu/bits/struct_utmpx.h
>  create mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
>  create mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
>  rename sysdeps/unix/sysv/linux/s390/bits/{utmpx.h => struct_utmpx.h}
> (56%) delete mode 100644 sysdeps/unix/sysv/linux/s390/bits/utmp.h
> 

Thanks for refactoring and consolidating the code.

Reviewed-by: Lukasz Majewski <lukma@denx.de>

> diff --git a/bits/struct_lastlog.h b/bits/struct_lastlog.h
> new file mode 100644
> index 0000000000..122a44abd0
> --- /dev/null
> +++ b/bits/struct_lastlog.h
> @@ -0,0 +1,34 @@
> +/* The 'struct lastlog' type.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be
> useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _UTMP_H
> +# error "Never include <bits/struct_lastlog.h> directly; use
> <utmp.h> instead." +#endif
> +
> +/* The structure describing an entry in the database of
> +   previous logins.  */
> +struct lastlog
> +  {
> +#if __WORDSIZE_TIME64_COMPAT32
> +    int32_t ll_time;
> +#else
> +    __time_t ll_time;
> +#endif
> +    char ll_line[UT_LINESIZE];
> +    char ll_host[UT_HOSTSIZE];
> +  };
> diff --git a/bits/struct_utmp.h b/bits/struct_utmp.h
> new file mode 100644
> index 0000000000..4b05c91515
> --- /dev/null
> +++ b/bits/struct_utmp.h
> @@ -0,0 +1,55 @@
> +/* The 'struct utmp' type, describing entries in the utmp file.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be
> useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _UTMP_H
> +# error "Never include <bits/struct_utmp.h> directly; use <utmp.h>
> instead." +#endif
> +
> +/* The structure describing an entry in the user accounting
> database.  */ +struct utmp
> +{
> +  short int ut_type;		/* Type of login.  */
> +  pid_t ut_pid;			/* Process ID of login
> process.  */
> +  char ut_line[UT_LINESIZE]
> +    __attribute_nonstring__;	/* Devicename.  */
> +  char ut_id[4]
> +    __attribute_nonstring__;	/* Inittab ID.  */
> +  char ut_user[UT_NAMESIZE]
> +    __attribute_nonstring__;	/* Username.  */
> +  char ut_host[UT_HOSTSIZE]
> +    __attribute_nonstring__;	/* Hostname for remote login.  */
> +  struct exit_status ut_exit;	/* Exit status of a process
> marked
> +				   as DEAD_PROCESS.  */
> +/* The ut_session and ut_tv fields must be the same size when
> compiled
> +   32- and 64-bit.  This allows data files and shared memory to be
> +   shared between 32- and 64-bit applications.  */
> +#if __WORDSIZE_TIME64_COMPAT32
> +  int32_t ut_session;		/* Session ID, used for
> windowing.  */
> +  struct
> +  {
> +    int32_t tv_sec;		/* Seconds.  */
> +    int32_t tv_usec;		/* Microseconds.  */
> +  } ut_tv;			/* Time entry was made.  */
> +#else
> +  long int ut_session;		/* Session ID, used for
> windowing.  */
> +  struct timeval ut_tv;		/* Time entry was made.  */
> +#endif
> +
> +  int32_t ut_addr_v6[4];	/* Internet address of remote host.
> */
> +  char __glibc_reserved[20];		/* Reserved for future
> use.  */ +};
> diff --git a/bits/utmp.h b/bits/utmp.h
> index b82d14536f..1647d0c67b 100644
> --- a/bits/utmp.h
> +++ b/bits/utmp.h
> @@ -31,18 +31,7 @@
>  #define UT_HOSTSIZE	256
>  
>  
> -/* The structure describing an entry in the database of
> -   previous logins.  */
> -struct lastlog
> -  {
> -#if __WORDSIZE_TIME64_COMPAT32
> -    int32_t ll_time;
> -#else
> -    __time_t ll_time;
> -#endif
> -    char ll_line[UT_LINESIZE];
> -    char ll_host[UT_HOSTSIZE];
> -  };
> +#include <bits/struct_lastlog.h>
>  
>  
>  /* The structure describing the status of a terminated process.  This
> @@ -53,40 +42,7 @@ struct exit_status
>      short int e_exit;		/* Process exit status.  */
>    };
>  
> -
> -/* The structure describing an entry in the user accounting
> database.  */ -struct utmp
> -{
> -  short int ut_type;		/* Type of login.  */
> -  pid_t ut_pid;			/* Process ID of login
> process.  */
> -  char ut_line[UT_LINESIZE]
> -    __attribute_nonstring__;	/* Devicename.  */
> -  char ut_id[4]
> -    __attribute_nonstring__;	/* Inittab ID.  */
> -  char ut_user[UT_NAMESIZE]
> -    __attribute_nonstring__;	/* Username.  */
> -  char ut_host[UT_HOSTSIZE]
> -    __attribute_nonstring__;	/* Hostname for remote login.  */
> -  struct exit_status ut_exit;	/* Exit status of a process
> marked
> -				   as DEAD_PROCESS.  */
> -/* The ut_session and ut_tv fields must be the same size when
> compiled
> -   32- and 64-bit.  This allows data files and shared memory to be
> -   shared between 32- and 64-bit applications.  */
> -#if __WORDSIZE_TIME64_COMPAT32
> -  int32_t ut_session;		/* Session ID, used for
> windowing.  */
> -  struct
> -  {
> -    int32_t tv_sec;		/* Seconds.  */
> -    int32_t tv_usec;		/* Microseconds.  */
> -  } ut_tv;			/* Time entry was made.  */
> -#else
> -  long int ut_session;		/* Session ID, used for
> windowing.  */
> -  struct timeval ut_tv;		/* Time entry was made.  */
> -#endif
> -
> -  int32_t ut_addr_v6[4];	/* Internet address of remote host.
> */
> -  char __glibc_reserved[20];		/* Reserved for future
> use.  */ -};
> +#include <bits/struct_utmp.h>
>  
>  /* Backwards compatibility hacks.  */
>  #define ut_name		ut_user
> diff --git a/login/Makefile b/login/Makefile
> index d897057bbd..58d5d4d64a 100644
> --- a/login/Makefile
> +++ b/login/Makefile
> @@ -23,7 +23,8 @@ subdir	:= login
>  
>  include ../Makeconfig
>  
> -headers	:= utmp.h bits/utmp.h lastlog.h pty.h
> +headers	:= utmp.h bits/utmp.h lastlog.h pty.h
> bits/struct_lastlog.h \
> +	   bits/struct_utmp.h bits/struct_utmpx.h
>  
>  routines := getlogin getlogin_r setlogin getlogin_r_chk \
>  	    getutent getutent_r getutid getutline getutid_r
> getutline_r \ diff --git a/sysdeps/gnu/bits/struct_utmpx.h
> b/sysdeps/gnu/bits/struct_utmpx.h new file mode 100644
> index 0000000000..8bfc786cd8
> --- /dev/null
> +++ b/sysdeps/gnu/bits/struct_utmpx.h
> @@ -0,0 +1,55 @@
> +/* The 'struct utmpx' type.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be
> useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _UTMPX_H
> +# error "Never include <bits/struct_utmpx.h> directly; use <utmpx.h>
> instead." +#endif
> +
> +/* The structure describing an entry in the user accounting
> database.  */ +struct utmpx
> +{
> +  short int ut_type;		/* Type of login.  */
> +  __pid_t ut_pid;		/* Process ID of login process.  */
> +  char ut_line[__UT_LINESIZE]
> +    __attribute_nonstring__;	/* Devicename.  */
> +  char ut_id[4]
> +    __attribute_nonstring__;	/* Inittab ID.  */
> +  char ut_user[__UT_NAMESIZE]
> +    __attribute_nonstring__;	/* Username.  */
> +  char ut_host[__UT_HOSTSIZE]
> +    __attribute_nonstring__;	/* Hostname for remote login.  */
> +  struct __exit_status ut_exit;	/* Exit status of a process
> marked
> +				   as DEAD_PROCESS.  */
> +
> +/* The fields ut_session and ut_tv must be the same size when
> compiled
> +   32- and 64-bit.  This allows files and shared memory to be shared
> +   between 32- and 64-bit applications.  */
> +#if __WORDSIZE_TIME64_COMPAT32
> +  __int32_t ut_session;		/* Session ID, used for
> windowing.  */
> +  struct
> +  {
> +    __int32_t tv_sec;		/* Seconds.  */
> +    __int32_t tv_usec;		/* Microseconds.  */
> +  } ut_tv;			/* Time entry was made.  */
> +#else
> +  long int ut_session;		/* Session ID, used for
> windowing.  */
> +  struct timeval ut_tv;		/* Time entry was made.  */
> +#endif
> +  __int32_t ut_addr_v6[4];	/* Internet address of remote
> host.  */
> +  char __glibc_reserved[20];		/* Reserved for future
> use.  */ +};
> diff --git a/sysdeps/gnu/bits/utmpx.h b/sysdeps/gnu/bits/utmpx.h
> index dfd55bfcc3..12ee26871e 100644
> --- a/sysdeps/gnu/bits/utmpx.h
> +++ b/sysdeps/gnu/bits/utmpx.h
> @@ -51,39 +51,7 @@ struct __exit_status
>    };
>  
>  
> -/* The structure describing an entry in the user accounting
> database.  */ -struct utmpx
> -{
> -  short int ut_type;		/* Type of login.  */
> -  __pid_t ut_pid;		/* Process ID of login process.  */
> -  char ut_line[__UT_LINESIZE]
> -    __attribute_nonstring__;	/* Devicename.  */
> -  char ut_id[4]
> -    __attribute_nonstring__;	/* Inittab ID.  */
> -  char ut_user[__UT_NAMESIZE]
> -    __attribute_nonstring__;	/* Username.  */
> -  char ut_host[__UT_HOSTSIZE]
> -    __attribute_nonstring__;	/* Hostname for remote login.  */
> -  struct __exit_status ut_exit;	/* Exit status of a process
> marked
> -				   as DEAD_PROCESS.  */
> -
> -/* The fields ut_session and ut_tv must be the same size when
> compiled
> -   32- and 64-bit.  This allows files and shared memory to be shared
> -   between 32- and 64-bit applications.  */
> -#if __WORDSIZE_TIME64_COMPAT32
> -  __int32_t ut_session;		/* Session ID, used for
> windowing.  */
> -  struct
> -  {
> -    __int32_t tv_sec;		/* Seconds.  */
> -    __int32_t tv_usec;		/* Microseconds.  */
> -  } ut_tv;			/* Time entry was made.  */
> -#else
> -  long int ut_session;		/* Session ID, used for
> windowing.  */
> -  struct timeval ut_tv;		/* Time entry was made.  */
> -#endif
> -  __int32_t ut_addr_v6[4];	/* Internet address of remote
> host.  */
> -  char __glibc_reserved[20];		/* Reserved for future
> use.  */ -};
> +#include <bits/struct_utmpx.h>
>  
>  
>  /* Values for the `ut_type' field of a `struct utmpx'.  */
> diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
> b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h new file mode
> 100644 index 0000000000..2fa409aeec
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
> @@ -0,0 +1,35 @@
> +/* The 'struct lastlog' type.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be
> useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#ifndef _UTMP_H
> +# error "Never include <bits/struct_lastlog.h> directly; use
> <utmp.h> instead." +#endif
> +
> +/* The structure describing an entry in the database of
> +   previous logins.  */
> +struct lastlog
> +  {
> +#if __WORDSIZE == 32
> +    int64_t ll_time;
> +#else
> +    __time_t ll_time;
> +#endif
> +    char ll_line[UT_LINESIZE];
> +    char ll_host[UT_HOSTSIZE];
> +  };
> +
> diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
> b/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h new file mode 100644
> index 0000000000..748240e528
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/s390/bits/struct_utmp.h
> @@ -0,0 +1,51 @@
> +/* The 'struct utmp' type, describing entries in the utmp file.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be
> useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +/* The structure describing an entry in the user accounting
> database.  */ +struct utmp
> +{
> +  short int ut_type;		/* Type of login.  */
> +  pid_t ut_pid;			/* Process ID of login
> process.  */
> +  char ut_line[UT_LINESIZE]
> +     __attribute_nonstring__;	/* Devicename.  */
> +  char ut_id[4]
> +    __attribute_nonstring__;	/* Inittab ID.  */
> +  char ut_user[UT_NAMESIZE]
> +     __attribute_nonstring__;	/* Username.  */
> +  char ut_host[UT_HOSTSIZE]
> +     __attribute_nonstring__;	/* Hostname for remote login.
> */
> +  struct exit_status ut_exit;	/* Exit status of a process
> marked
> +				   as DEAD_PROCESS.  */
> +/* The ut_session and ut_tv fields must be the same size when
> compiled
> +   32- and 64-bit.  This allows data files and shared memory to be
> +   shared between 32- and 64-bit applications.  */
> +#if __WORDSIZE == 32
> +  int64_t ut_session;		/* Session ID, used for
> windowing.  */
> +  struct
> +  {
> +    int64_t tv_sec;		/* Seconds.  */
> +    int64_t tv_usec;		/* Microseconds.  */
> +  } ut_tv;			/* Time entry was made.  */
> +#else
> +  long int ut_session;		/* Session ID, used for
> windowing.  */
> +  struct timeval ut_tv;		/* Time entry was made.  */
> +#endif
> +
> +  int32_t ut_addr_v6[4];	/* Internet address of remote host.
> */
> +  char __glibc_reserved[20];		/* Reserved for future
> use.  */ +};
> diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
> b/sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h similarity index
> 56% rename from sysdeps/unix/sysv/linux/s390/bits/utmpx.h
> rename to sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h
> index d68df97bef..67fd7be51c 100644
> --- a/sysdeps/unix/sysv/linux/s390/bits/utmpx.h
> +++ b/sysdeps/unix/sysv/linux/s390/bits/struct_utmpx.h
> @@ -1,5 +1,5 @@
> -/* Structures and definitions for the user accounting database.  GNU
> version.
> -   Copyright (C) 1997-2020 Free Software Foundation, Inc.
> +/* The 'struct utmpx' type.
> +   Copyright (C) 2020 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -17,40 +17,9 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #ifndef _UTMPX_H
> -# error "Never include <bits/utmpx.h> directly; use <utmpx.h>
> instead." +# error "Never include <bits/struct_utmpx.h> directly; use
> <utmpx.h> instead." #endif
>  
> -#include <bits/types.h>
> -#include <sys/time.h>
> -#include <bits/wordsize.h>
> -
> -
> -#ifdef __USE_GNU
> -# include <paths.h>
> -# define _PATH_UTMPX	_PATH_UTMP
> -# define _PATH_WTMPX	_PATH_WTMP
> -#endif
> -
> -
> -#define __UT_LINESIZE	32
> -#define __UT_NAMESIZE	32
> -#define __UT_HOSTSIZE	256
> -
> -
> -/* The structure describing the status of a terminated process.  This
> -   type is used in `struct utmpx' below.  */
> -struct __exit_status
> -  {
> -#ifdef __USE_GNU
> -    short int e_termination;	/* Process termination status.
> */
> -    short int e_exit;		/* Process exit status.  */
> -#else
> -    short int __e_termination;	/* Process termination status.
>  */
> -    short int __e_exit;		/* Process exit status.  */
> -#endif
> -  };
> -
> -
>  /* The structure describing an entry in the user accounting
> database.  */ struct utmpx
>  {
> @@ -84,23 +53,3 @@ struct utmpx
>    __int32_t ut_addr_v6[4];	/* Internet address of remote
> host.  */ char __glibc_reserved[20];		/* Reserved for
> future use.  */ };
> -
> -
> -/* Values for the `ut_type' field of a `struct utmpx'.  */
> -#define EMPTY		0	/* No valid user accounting
> information.  */ -
> -#ifdef __USE_GNU
> -# define RUN_LVL	1	/* The system's runlevel.  */
> -#endif
> -#define BOOT_TIME	2	/* Time of system boot.  */
> -#define NEW_TIME	3	/* Time after system clock changed.
>  */ -#define OLD_TIME	4	/* Time when system clock
> changed.  */ -
> -#define INIT_PROCESS	5	/* Process spawned by the init
> process.  */ -#define LOGIN_PROCESS	6	/* Session leader
> of a logged in user.  */ -#define USER_PROCESS	7	/*
> Normal process.  */ -#define DEAD_PROCESS	8	/*
> Terminated process.  */ -
> -#ifdef __USE_GNU
> -# define ACCOUNTING	9	/* System accounting.  */
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/bits/utmp.h
> b/sysdeps/unix/sysv/linux/s390/bits/utmp.h deleted file mode 100644
> index ec0ee02303..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/bits/utmp.h
> +++ /dev/null
> @@ -1,127 +0,0 @@
> -/* The `struct utmp' type, describing entries in the utmp file.  GNU
> version.
> -   Copyright (C) 1993-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#ifndef _UTMP_H
> -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
> -#endif
> -
> -#include <paths.h>
> -#include <sys/time.h>
> -#include <sys/types.h>
> -#include <bits/wordsize.h>
> -
> -
> -#define UT_LINESIZE	32
> -#define UT_NAMESIZE	32
> -#define UT_HOSTSIZE	256
> -
> -
> -/* The structure describing an entry in the database of
> -   previous logins.  */
> -struct lastlog
> -  {
> -#if __WORDSIZE == 32
> -    int64_t ll_time;
> -#else
> -    __time_t ll_time;
> -#endif
> -    char ll_line[UT_LINESIZE];
> -    char ll_host[UT_HOSTSIZE];
> -  };
> -
> -
> -/* The structure describing the status of a terminated process.  This
> -   type is used in `struct utmp' below.  */
> -struct exit_status
> -  {
> -    short int e_termination;	/* Process termination status.
> */
> -    short int e_exit;		/* Process exit status.  */
> -  };
> -
> -
> -/* The structure describing an entry in the user accounting
> database.  */ -struct utmp
> -{
> -  short int ut_type;		/* Type of login.  */
> -  pid_t ut_pid;			/* Process ID of login
> process.  */
> -  char ut_line[UT_LINESIZE]
> -     __attribute_nonstring__;	/* Devicename.  */
> -  char ut_id[4]
> -    __attribute_nonstring__;	/* Inittab ID.  */
> -  char ut_user[UT_NAMESIZE]
> -     __attribute_nonstring__;	/* Username.  */
> -  char ut_host[UT_HOSTSIZE]
> -     __attribute_nonstring__;	/* Hostname for remote login.
> */
> -  struct exit_status ut_exit;	/* Exit status of a process
> marked
> -				   as DEAD_PROCESS.  */
> -/* The ut_session and ut_tv fields must be the same size when
> compiled
> -   32- and 64-bit.  This allows data files and shared memory to be
> -   shared between 32- and 64-bit applications.  */
> -#if __WORDSIZE == 32
> -  int64_t ut_session;		/* Session ID, used for
> windowing.  */
> -  struct
> -  {
> -    int64_t tv_sec;		/* Seconds.  */
> -    int64_t tv_usec;		/* Microseconds.  */
> -  } ut_tv;			/* Time entry was made.  */
> -#else
> -  long int ut_session;		/* Session ID, used for
> windowing.  */
> -  struct timeval ut_tv;		/* Time entry was made.  */
> -#endif
> -
> -  int32_t ut_addr_v6[4];	/* Internet address of remote host.
> */
> -  char __glibc_reserved[20];		/* Reserved for future
> use.  */ -};
> -
> -/* Backwards compatibility hacks.  */
> -#define ut_name		ut_user
> -#ifndef _NO_UT_TIME
> -/* We have a problem here: `ut_time' is also used otherwise.  Define
> -   _NO_UT_TIME if the compiler complains.  */
> -# define ut_time	ut_tv.tv_sec
> -#endif
> -#define ut_xtime	ut_tv.tv_sec
> -#define ut_addr		ut_addr_v6[0]
> -
> -
> -/* Values for the `ut_type' field of a `struct utmp'.  */
> -#define EMPTY		0	/* No valid user accounting
> information.  */ -
> -#define RUN_LVL		1	/* The system's runlevel.  */
> -#define BOOT_TIME	2	/* Time of system boot.  */
> -#define NEW_TIME	3	/* Time after system clock changed.
>  */ -#define OLD_TIME	4	/* Time when system clock
> changed.  */ -
> -#define INIT_PROCESS	5	/* Process spawned by the init
> process.  */ -#define LOGIN_PROCESS	6	/* Session leader
> of a logged in user.  */ -#define USER_PROCESS	7	/*
> Normal process.  */ -#define DEAD_PROCESS	8	/*
> Terminated process.  */ -
> -#define ACCOUNTING	9
> -
> -/* Old Linux name for the EMPTY type.  */
> -#define UT_UNKNOWN	EMPTY
> -
> -
> -/* Tell the user that we have a modern system with UT_HOST, UT_PID,
> -   UT_TYPE, UT_ID and UT_TV fields.  */
> -#define _HAVE_UT_TYPE	1
> -#define _HAVE_UT_PID	1
> -#define _HAVE_UT_ID	1
> -#define _HAVE_UT_TV	1
> -#define _HAVE_UT_HOST	1




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/5] login: Move gnu utmpx to default implementaion
  2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
@ 2020-10-22  8:15   ` Lukasz Majewski
  2020-10-22  9:16   ` Andreas Schwab
  1 sibling, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2020-10-22  8:15 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 11956 bytes --]

Hi Adhemerval,

> It removes one indirection where generic implementation assumes that
> utmp and utmpx might differ and allows the optimize the symbol alias
> where getutmp is the same as getumpx.
> 
> Checked on all afftected ABIs.
> ---
>  {sysdeps/gnu/bits => bits}/struct_utmpx.h     |  0
>  {sysdeps/gnu/bits => bits}/utmpx.h            |  0
>  include/utmpx.h                               |  1 +
>  login/getutmp.c                               | 34 ++++++++++++++++--
>  login/getutmpx.c                              | 35
> +------------------ login/updwtmp.c                               |
> 11 +++++- {sysdeps/gnu => login}/utmpx.h                |  0
>  sysdeps/gnu/getutmp.c                         | 34 ------------------
>  sysdeps/gnu/getutmpx.c                        |  1 -
>  sysdeps/gnu/updwtmp.c                         | 31 ----------------
>  .../unix/sysv/linux/s390/s390-32/getutmp.c    | 21 ++++-------
>  .../unix/sysv/linux/s390/s390-32/updwtmp.c    |  2 +-
>  12 files changed, 52 insertions(+), 118 deletions(-)
>  rename {sysdeps/gnu/bits => bits}/struct_utmpx.h (100%)
>  rename {sysdeps/gnu/bits => bits}/utmpx.h (100%)
>  create mode 100644 include/utmpx.h
>  rename {sysdeps/gnu => login}/utmpx.h (100%)
>  delete mode 100644 sysdeps/gnu/getutmp.c
>  delete mode 100644 sysdeps/gnu/getutmpx.c
>  delete mode 100644 sysdeps/gnu/updwtmp.c

Nice that we would have the getutmp.c in one place.

Reviewed-by: Lukasz Majewski <lukma@denx.de>

> 
> diff --git a/sysdeps/gnu/bits/struct_utmpx.h b/bits/struct_utmpx.h
> similarity index 100%
> rename from sysdeps/gnu/bits/struct_utmpx.h
> rename to bits/struct_utmpx.h
> diff --git a/sysdeps/gnu/bits/utmpx.h b/bits/utmpx.h
> similarity index 100%
> rename from sysdeps/gnu/bits/utmpx.h
> rename to bits/utmpx.h
> diff --git a/include/utmpx.h b/include/utmpx.h
> new file mode 100644
> index 0000000000..cfe9b7c054
> --- /dev/null
> +++ b/include/utmpx.h
> @@ -0,0 +1 @@
> +#include <login/utmpx.h>
> diff --git a/login/getutmp.c b/login/getutmp.c
> index e9a5fe69a5..3058a93d1b 100644
> --- a/login/getutmp.c
> +++ b/login/getutmp.c
> @@ -17,17 +17,47 @@
>  
>  #include <string.h>
>  #include <utmp.h>
> +#include <stddef.h>
> +#define getutmpx __redirect_getutmpx
>  #include <utmpx.h>
> +#undef getutmpx
> +
> +#define CHECK_SIZE_AND_OFFSET(field) \
> +  _Static_assert (sizeof ((struct utmp){0}.field)		\
> +		  == sizeof ((struct utmpx){0}.field),
> 	\
> +		  "sizeof ((struct utmp){0}." #field " != "	\
> +		  "sizeof ((struct utmpx){0}" #field);	\
> +  _Static_assert (offsetof (struct utmp, field)
> 	\
> +		  == offsetof (struct utmpx, field),		\
> +		  "offsetof (struct utmp, " #field ") != "	\
> +		  "offsetof (struct utmpx, " #field ")");
> +
> +/* This ensure the getutmp to getutmpx alias is valid.  */
> +_Static_assert (sizeof (struct utmp) == sizeof (struct utmpx),
> +		"sizeof (struct utmp) != sizeof (struct utmpx)");
> +CHECK_SIZE_AND_OFFSET (ut_type)
> +CHECK_SIZE_AND_OFFSET (ut_pid)
> +CHECK_SIZE_AND_OFFSET (ut_line)
> +CHECK_SIZE_AND_OFFSET (ut_user)
> +CHECK_SIZE_AND_OFFSET (ut_id)
> +CHECK_SIZE_AND_OFFSET (ut_host)
> +CHECK_SIZE_AND_OFFSET (ut_tv)
> +
>  
>  /* Copy the information in UTMPX to UTMP. */
>  void
> -getutmp (const struct utmpx *utmpx, struct utmp *utmp)
> +__getutmp (const struct utmpx *utmpx, struct utmp *utmp)
>  {
> +  memset (utmp, 0, sizeof (struct utmpx));
>    utmp->ut_type = utmpx->ut_type;
>    utmp->ut_pid = utmpx->ut_pid;
>    memcpy (utmp->ut_line, utmpx->ut_line, sizeof (utmp->ut_line));
>    memcpy (utmp->ut_user, utmpx->ut_user, sizeof (utmp->ut_user));
>    memcpy (utmp->ut_id, utmpx->ut_id, sizeof (utmp->ut_id));
>    memcpy (utmp->ut_host, utmpx->ut_host, sizeof (utmp->ut_host));
> -  utmp->ut_tv = utmpx->ut_tv;
> +  utmp->ut_tv.tv_sec = utmpx->ut_tv.tv_sec;
> +  utmp->ut_tv.tv_usec = utmpx->ut_tv.tv_usec;
>  }
> +
> +weak_alias (__getutmp, getutmp)
> +strong_alias (__getutmp, getutmpx)
> diff --git a/login/getutmpx.c b/login/getutmpx.c
> index 250a355235..839eb6826e 100644
> --- a/login/getutmpx.c
> +++ b/login/getutmpx.c
> @@ -1,34 +1 @@
> -/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <string.h>
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -/* Copy the information in UTMP to UTMPX. */
> -void
> -getutmpx (const struct utmp *utmp, struct utmpx *utmpx)
> -{
> -  memset (utmpx, 0, sizeof (struct utmpx));
> -  utmpx->ut_type = utmp->ut_type;
> -  utmpx->ut_pid = utmp->ut_pid;
> -  memcpy (utmpx->ut_line, utmp->ut_line, sizeof (utmp->ut_line));
> -  memcpy (utmpx->ut_user, utmp->ut_user, sizeof (utmp->ut_user));
> -  memcpy (utmpx->ut_id, utmp->ut_id, sizeof (utmp->ut_id));
> -  memcpy (utmpx->ut_host, utmp->ut_host, sizeof (utmp->ut_host));
> -  utmpx->ut_tv = utmp->ut_tv;
> -}
> +/* Implemented by getutmp.c. */
> diff --git a/login/updwtmp.c b/login/updwtmp.c
> index f6cd515ac4..489c28b553 100644
> --- a/login/updwtmp.c
> +++ b/login/updwtmp.c
> @@ -17,11 +17,20 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #include <utmp.h>
> +#include <string.h>
> +#include <unistd.h>
>  
>  #include "utmp-private.h"
>  
>  #ifndef TRANSFORM_UTMP_FILE_NAME
> -# define TRANSFORM_UTMP_FILE_NAME(file_name) (file_name)
> +# define TRANSFORM_UTMP_FILE_NAME(file_name)	\
> +  ((strcmp (file_name, _PATH_UTMP "x") == 0	\
> +    && __access (_PATH_UTMP "x", F_OK) != 0)	\
> +   ? _PATH_UTMP					\
> +   : ((strcmp (file_name, _PATH_WTMP "x") == 0	\
> +       && __access (_PATH_WTMP "x", F_OK) != 0)	\
> +      ? _PATH_WTMP				\
> +      : file_name))
>  #endif
>  
>  void
> diff --git a/sysdeps/gnu/utmpx.h b/login/utmpx.h
> similarity index 100%
> rename from sysdeps/gnu/utmpx.h
> rename to login/utmpx.h
> diff --git a/sysdeps/gnu/getutmp.c b/sysdeps/gnu/getutmp.c
> deleted file mode 100644
> index 95a9a4b354..0000000000
> --- a/sysdeps/gnu/getutmp.c
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <assert.h>
> -#include <string.h>
> -#include <utmp.h>
> -#ifndef _UTMPX_H
> -/* This is an ugly hack but we must not see the getutmpx
> declaration.  */ -# define getutmpx XXXgetutmpx
> -# include <utmpx.h>
> -# undef getutmpx
> -#endif
> -
> -void
> -getutmp (const struct utmpx *utmpx, struct utmp *utmp)
> -{
> -  assert (sizeof (struct utmp) == sizeof (struct utmpx));
> -  memcpy (utmp, utmpx, sizeof (struct utmp));
> -}
> -strong_alias (getutmp, getutmpx)
> diff --git a/sysdeps/gnu/getutmpx.c b/sysdeps/gnu/getutmpx.c
> deleted file mode 100644
> index f393734a63..0000000000
> --- a/sysdeps/gnu/getutmpx.c
> +++ /dev/null
> @@ -1 +0,0 @@
> -/* We don't need a separate version.  it is the same as getutmp().
> */ diff --git a/sysdeps/gnu/updwtmp.c b/sysdeps/gnu/updwtmp.c
> deleted file mode 100644
> index 044091b77c..0000000000
> --- a/sysdeps/gnu/updwtmp.c
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <string.h>
> -#include <unistd.h>
> -
> -#define TRANSFORM_UTMP_FILE_NAME(file_name)	\
> -  ((strcmp (file_name, _PATH_UTMP "x") == 0	\
> -    && __access (_PATH_UTMP "x", F_OK) != 0)	\
> -   ? _PATH_UTMP					\
> -   : ((strcmp (file_name, _PATH_WTMP "x") == 0	\
> -       && __access (_PATH_WTMP "x", F_OK) != 0)	\
> -      ? _PATH_WTMP				\
> -      : file_name))
> -
> -#include <login/updwtmp.c>
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c index
> 6380ae2a82..50ce8c4f5c 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c +++
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c @@ -16,22 +16,15 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> -#include <string.h>
> -#include <utmp.h>
> -/* This is an ugly hack but we must not see the getutmpx
> declaration.  */ -#define getutmpx XXXgetutmpx
> -#include <utmpx.h>
> -#undef getutmpx
> +#undef weak_alias
> +#define weak_alias(a, b)
> +#undef strong_alias
> +#define strong_alias(a, b)
>  
> -#include "utmp-compat.h"
> +#include <login/getutmp.c>
>  
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define getutmp __getutmp
> -#define getutmpx __getutmpx
> -#include "sysdeps/gnu/getutmp.c"
> -#undef getutmp
> -#undef getutmpx
> +#include "utmp-compat.h"
>  
>  default_symbol_version (__getutmp, getutmp, UTMP_COMPAT_BASE);
> +_strong_alias (__getutmp, __getutmpx)
>  default_symbol_version (__getutmpx, getutmpx, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c index
> dcd334e5a9..2079571cc1 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c +++
> b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c @@ -25,7 +25,7 @@
>  # undef weak_alias
>  # define weak_alias(n,a)
>  #endif
> -#include "sysdeps/gnu/updwtmp.c"
> +#include <login/updwtmp.c>
>  
>  #if defined SHARED
>  default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/5] login: Add 64-bit time support
  2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
  2020-07-29 21:17   ` Joseph Myers
@ 2020-10-22  9:16   ` Lukasz Majewski
  1 sibling, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2020-10-22  9:16 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 90506 bytes --]

Hi Adhemerval,

> It uses the s390-32 version and consolidates all the implementations.
> The result 'struct utmp' and 'struct utmpx' the same size of the
> old 32-bit time version (the __glibc_reserved in used adjusted).
> 
> New symbols for getutent, getutent_r, getutid, getutid_r, getutline,
> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline,
> pututline, pututxline, updwtmp, updwtmpx, and login are added to
> all architecture but s390-32 (which already added 64-bit time support
> on 32-bit ABI on glibc 2.9).
> 
> Checked on i686-linux-gnu and x86_64-linux-gnu.  I also did a make
> check on all affected ABIs.
> ---
>  bits/struct_utmp.h                            | 12 +++---
>  bits/struct_utmpx.h                           | 11 +++---
>  include/utmp.h                                |  3 ++
>  login/Makefile                                |  4 +-
>  login/Versions                                |  3 ++
>  login/getutent.c                              |  7 +++-
>  login/getutent_r.c                            | 11 +++++-
>  login/getutid.c                               |  7 +++-
>  login/getutid_r.c                             |  7 +++-
>  login/getutline.c                             |  7 +++-
>  login/getutline_r.c                           |  7 +++-
>  login/getutmp.c                               | 10 ++++-
>  login/getutxent.c                             |  9 ++++-
>  login/getutxid.c                              |  9 ++++-
>  login/getutxline.c                            |  9 ++++-
>  login/login.c                                 | 10 ++++-
>  .../linux/s390/s390-32 => login}/login32.c    | 14 ++++---
>  login/pututxline.c                            |  9 ++++-
>  login/updwtmp.c                               |  7 +++-
>  login/updwtmpx.c                              |  9 ++++-
>  .../s390/s390-32 => login}/utmp-convert.h     |  0
>  .../linux/s390/s390-32 => login}/utmp32.c     | 32 +++++++++-------
>  .../linux/s390/s390-32 => login}/utmp32.h     |  0
>  .../s390/s390-32 => login}/utmpx-convert.h    |  0
>  .../linux/s390/s390-32 => login}/utmpx32.c    | 29 +++++++++-----
>  .../linux/s390/s390-32 => login}/utmpx32.h    |  0
>  sysdeps/generic/utmp-compat.h                 |  3 ++
>  sysdeps/mach/hurd/i386/libc.abilist           | 15 ++++++++
>  sysdeps/mach/hurd/i386/libutil.abilist        |  1 +
>  sysdeps/unix/sysv/linux/aarch64/libc.abilist  | 15 ++++++++
>  .../unix/sysv/linux/aarch64/libutil.abilist   |  1 +
>  sysdeps/unix/sysv/linux/alpha/libc.abilist    | 15 ++++++++
>  sysdeps/unix/sysv/linux/alpha/libutil.abilist |  1 +
>  sysdeps/unix/sysv/linux/arc/libc.abilist      | 15 ++++++++
>  sysdeps/unix/sysv/linux/arc/libutil.abilist   |  1 +
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   | 15 ++++++++
>  .../unix/sysv/linux/arm/le/libutil.abilist    |  1 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     | 15 ++++++++
>  sysdeps/unix/sysv/linux/csky/libutil.abilist  |  1 +
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     | 15 ++++++++
>  sysdeps/unix/sysv/linux/hppa/libutil.abilist  |  1 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     | 15 ++++++++
>  sysdeps/unix/sysv/linux/i386/libutil.abilist  |  1 +
>  sysdeps/unix/sysv/linux/ia64/libc.abilist     | 15 ++++++++
>  sysdeps/unix/sysv/linux/ia64/libutil.abilist  |  1 +
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  | 15 ++++++++
>  .../sysv/linux/m68k/m680x0/libutil.abilist    |  1 +
>  .../sysv/linux/microblaze/be/libc.abilist     | 15 ++++++++
>  .../sysv/linux/microblaze/be/libutil.abilist  |  1 +
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   | 15 ++++++++
>  .../sysv/linux/mips/mips32/libutil.abilist    |  1 +
>  .../sysv/linux/mips/mips64/libutil.abilist    |  1 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   | 15 ++++++++
>  .../sysv/linux/mips/mips64/n64/libc.abilist   | 15 ++++++++
>  sysdeps/unix/sysv/linux/nios2/libc.abilist    | 15 ++++++++
>  sysdeps/unix/sysv/linux/nios2/libutil.abilist |  1 +
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  | 15 ++++++++
>  .../linux/powerpc/powerpc32/libutil.abilist   |  1 +
>  .../linux/powerpc/powerpc64/be/libc.abilist   | 15 ++++++++
>  .../powerpc/powerpc64/be/libutil.abilist      |  1 +
>  .../linux/powerpc/powerpc64/le/libc.abilist   | 15 ++++++++
>  .../powerpc/powerpc64/le/libutil.abilist      |  1 +
>  .../unix/sysv/linux/riscv/rv64/libc.abilist   | 15 ++++++++
>  .../sysv/linux/riscv/rv64/libutil.abilist     |  1 +
>  .../unix/sysv/linux/s390/s390-32/getutent.c   | 32 ----------------
>  .../unix/sysv/linux/s390/s390-32/getutent_r.c | 38
> ------------------- .../unix/sysv/linux/s390/s390-32/getutid.c    |
> 32 ---------------- .../unix/sysv/linux/s390/s390-32/getutid_r.c  |
> 35 ----------------- .../unix/sysv/linux/s390/s390-32/getutline.c  |
> 32 ---------------- .../sysv/linux/s390/s390-32/getutline_r.c     |
> 34 ----------------- .../unix/sysv/linux/s390/s390-32/getutmp.c    |
> 30 --------------- .../unix/sysv/linux/s390/s390-32/getutxent.c  | 30
> --------------- .../unix/sysv/linux/s390/s390-32/getutxid.c   | 30
> --------------- .../unix/sysv/linux/s390/s390-32/getutxline.c | 30
> --------------- sysdeps/unix/sysv/linux/s390/s390-32/login.c  | 35
> ----------------- .../unix/sysv/linux/s390/s390-32/pututxline.c | 30
> --------------- .../unix/sysv/linux/s390/s390-32/updwtmp.c    | 32
> ---------------- .../unix/sysv/linux/s390/s390-32/updwtmpx.c   | 30
> --------------- .../sysv/linux/s390/s390-32/utmp-compat.h     |  2 +-
>  .../unix/sysv/linux/s390/s390-64/libc.abilist | 15 ++++++++
>  .../sysv/linux/s390/s390-64/libutil.abilist   |  1 +
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    | 15 ++++++++
>  sysdeps/unix/sysv/linux/sh/le/libutil.abilist |  1 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     | 15 ++++++++
>  .../sysv/linux/sparc/sparc32/libutil.abilist  |  1 +
>  .../sysv/linux/sparc/sparc64/libc.abilist     | 15 ++++++++
>  .../sysv/linux/sparc/sparc64/libutil.abilist  |  1 +
>  .../unix/sysv/linux/x86_64/64/libc.abilist    | 15 ++++++++
>  .../unix/sysv/linux/x86_64/64/libutil.abilist |  1 +
>  .../unix/sysv/linux/x86_64/x32/libc.abilist   | 15 ++++++++
>  .../sysv/linux/x86_64/x32/libutil.abilist     |  1 +
>  91 files changed, 572 insertions(+), 508 deletions(-)
>  rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/login32.c
> (75%) rename {sysdeps/unix/sysv/linux/s390/s390-32 =>
> login}/utmp-convert.h (100%) rename
> {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmp32.c (83%) rename
> {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmp32.h (100%)
> rename {sysdeps/unix/sysv/linux/s390/s390-32 =>
> login}/utmpx-convert.h (100%) rename
> {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmpx32.c (81%)
> rename {sysdeps/unix/sysv/linux/s390/s390-32 => login}/utmpx32.h
> (100%) create mode 100644 sysdeps/generic/utmp-compat.h delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutent.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutid.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutline.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/login.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c delete mode
> 100644 sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
> 
> diff --git a/bits/struct_utmp.h b/bits/struct_utmp.h
> index 4b05c91515..84d4df2590 100644
> --- a/bits/struct_utmp.h
> +++ b/bits/struct_utmp.h
> @@ -38,18 +38,16 @@ struct utmp
>  /* The ut_session and ut_tv fields must be the same size when
> compiled 32- and 64-bit.  This allows data files and shared memory to
> be shared between 32- and 64-bit applications.  */
> -#if __WORDSIZE_TIME64_COMPAT32
> -  int32_t ut_session;		/* Session ID, used for
> windowing.  */
> +  int64_t ut_session;		/* Session ID, used for
> windowing.  */ +#if __TIMESIZE == 64

Ok. 

>    struct
>    {
> -    int32_t tv_sec;		/* Seconds.  */
> -    int32_t tv_usec;		/* Microseconds.  */
> +    int64_t tv_sec;		/* Seconds.  */
> +    int64_t tv_usec;		/* Microseconds.  */
>    } ut_tv;			/* Time entry was made.  */
>  #else
> -  long int ut_session;		/* Session ID, used for
> windowing.  */ struct timeval ut_tv;		/* Time entry was
> made.  */ #endif
> -
>    int32_t ut_addr_v6[4];	/* Internet address of remote host.
> */
> -  char __glibc_reserved[20];		/* Reserved for future
> use.  */
> +  char __glibc_reserved[8];		/* Reserved for future
> use.  */ };
> diff --git a/bits/struct_utmpx.h b/bits/struct_utmpx.h
> index 8bfc786cd8..b5bf539a57 100644
> --- a/bits/struct_utmpx.h
> +++ b/bits/struct_utmpx.h
> @@ -39,17 +39,16 @@ struct utmpx
>  /* The fields ut_session and ut_tv must be the same size when
> compiled 32- and 64-bit.  This allows files and shared memory to be
> shared between 32- and 64-bit applications.  */
> -#if __WORDSIZE_TIME64_COMPAT32
> -  __int32_t ut_session;		/* Session ID, used for
> windowing.  */
> +  __int64_t ut_session;		/* Session ID, used for
> windowing.  */ +#if __TIMESIZE == 64
>    struct
>    {
> -    __int32_t tv_sec;		/* Seconds.  */
> -    __int32_t tv_usec;		/* Microseconds.  */
> +    __int64_t tv_sec;		/* Seconds.  */
> +    __int64_t tv_usec;		/* Microseconds.  */
>    } ut_tv;			/* Time entry was made.  */
>  #else
> -  long int ut_session;		/* Session ID, used for
> windowing.  */ struct timeval ut_tv;		/* Time entry was
> made.  */ #endif
>    __int32_t ut_addr_v6[4];	/* Internet address of remote
> host.  */
> -  char __glibc_reserved[20];		/* Reserved for future
> use.  */
> +  char __glibc_reserved[8];		/* Reserved for future
> use.  */ };
> diff --git a/include/utmp.h b/include/utmp.h
> index 374184e9b2..350b9aab81 100644
> --- a/include/utmp.h
> +++ b/include/utmp.h
> @@ -26,6 +26,9 @@ extern int __getutline_r (const struct utmp *__line,
>  			  struct utmp *__buffer, struct utmp
> **__result); libc_hidden_proto (__getutline_r)
>  
> +extern void __login (const struct utmp *ut);
> +hidden_proto (__login)
> +
>  libutil_hidden_proto (login_tty)
>  
>  # endif /* !_ISOMAC */
> diff --git a/login/Makefile b/login/Makefile
> index 58d5d4d64a..9f37a18101 100644
> --- a/login/Makefile
> +++ b/login/Makefile
> @@ -29,7 +29,7 @@ headers	:= utmp.h bits/utmp.h lastlog.h
> pty.h bits/struct_lastlog.h \ routines := getlogin getlogin_r
> setlogin getlogin_r_chk \ getutent getutent_r getutid getutline
> getutid_r getutline_r \ utmp_file utmpname updwtmp getpt grantpt
> unlockpt ptsname \
> -	    ptsname_r_chk
> +	    ptsname_r_chk utmp32 utmpx32
>  
>  CFLAGS-grantpt.c += -DLIBEXECDIR='"$(libexecdir)"'
>  
> @@ -51,7 +51,7 @@ tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname
> tst-getlogin tst-updwtmpx \ extra-libs      := libutil
>  extra-libs-others := $(extra-libs)
>  
> -libutil-routines:= login login_tty logout logwtmp openpty forkpty
> +libutil-routines:= login login_tty logout logwtmp openpty forkpty
> login32 
>  include ../Rules
>  
> diff --git a/login/Versions b/login/Versions
> index 475fcf063f..86b56bb92e 100644
> --- a/login/Versions
> +++ b/login/Versions
> @@ -51,4 +51,7 @@ libutil {
>    GLIBC_2.0 {
>      forkpty; login; login_tty; logout; logwtmp; openpty;
>    }
> +  GLIBC_2.33 {
> +    login;

Here I'm a bit puzzled - the login is also exported in the above line
for GLIBC_2.0. Why do we need to redo it for GLIBC_2.33 ?

> +  }
>  }
> diff --git a/login/getutent.c b/login/getutent.c
> index 3a8b78c9be..16ca2622d1 100644
> --- a/login/getutent.c
> +++ b/login/getutent.c
> @@ -18,7 +18,8 @@
>  
>  #include <stdlib.h>
>  #include <utmp.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  /* Local buffer to store the result.  */
>  libc_freeres_ptr (static struct utmp *buffer);
> @@ -42,4 +43,8 @@ __getutent (void)
>    return result;
>  }
>  libc_hidden_def (__getutent)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutent, getutent, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__getutent, getutent)
> +#endif

So here you mimic the trick from s390 that we will set #define
UTMP_COMPAT_BASE and then depending on glibc version either
getutent_GLIBC_2.9 (as on s390) or getutent_GLIBC_2.33 (newest) will be
exported?

But I'm wondering why we do need to have such distinction and why we
just cannot export getutent_GLIBC_2_0 (the symbol when it was first
exported) [*] ?
(I guess that getutent was _only_ exported by s390 32 bit - but I'm not
sure).


> diff --git a/login/getutent_r.c b/login/getutent_r.c
> index 7bf5fe136a..5c82e85c09 100644
> --- a/login/getutent_r.c
> +++ b/login/getutent_r.c
> @@ -20,7 +20,8 @@
>  #include <libc-lock.h>
>  #include <stdlib.h>
>  #include <utmp.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  #include "utmp-private.h"
>  
>  /* We need to protect the opening of the file.  */
> @@ -53,7 +54,11 @@ __getutent_r (struct utmp *buffer, struct utmp
> **result) return retval;
>  }
>  libc_hidden_def (__getutent_r)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutent_r, getutent_r, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__getutent_r, getutent_r)
> +#endif
>  
>  
>  struct utmp *
> @@ -70,7 +75,11 @@ __pututline (const struct utmp *data)
>    return buffer;
>  }
>  libc_hidden_def (__pututline)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __pututline, pututline, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__pututline, pututline)
> +#endif
>  
>  
>  void
> diff --git a/login/getutid.c b/login/getutid.c
> index 0c5c106b59..b96ccb2381 100644
> --- a/login/getutid.c
> +++ b/login/getutid.c
> @@ -18,7 +18,8 @@
>  
>  #include <stdlib.h>
>  #include <utmp.h>
> -
> +#include <shlib-compat.h>
> +#include <utmp-compat.h>
>  
>  /* Local buffer to store the result.  */
>  libc_freeres_ptr (static struct utmp *buffer);
> @@ -40,4 +41,8 @@ __getutid (const struct utmp *id)
>    return result;
>  }
>  libc_hidden_def (__getutid)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutid, getutid, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__getutid, getutid)
> +#endif
> diff --git a/login/getutid_r.c b/login/getutid_r.c
> index c655c4f56b..06907a4c92 100644
> --- a/login/getutid_r.c
> +++ b/login/getutid_r.c
> @@ -21,7 +21,8 @@
>  #include <errno.h>
>  #include <stdlib.h>
>  #include <utmp.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  #include "utmp-private.h"
>  
>  
> @@ -55,4 +56,8 @@ __getutid_r (const struct utmp *id, struct utmp
> *buffer, struct utmp **result) return retval;
>  }
>  libc_hidden_def (__getutid_r)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutid_r, getutid_r, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__getutid_r, getutid_r)
> +#endif
> diff --git a/login/getutline.c b/login/getutline.c
> index 34ea8611e2..dea5edffd8 100644
> --- a/login/getutline.c
> +++ b/login/getutline.c
> @@ -18,7 +18,8 @@
>  
>  #include <stdlib.h>
>  #include <utmp.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  /* Local buffer to store the result.  */
>  libc_freeres_ptr (static struct utmp *buffer);
> @@ -41,4 +42,8 @@ __getutline (const struct utmp *line)
>    return result;
>  }
>  libc_hidden_def (__getutline)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutline, getutline, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__getutline, getutline)
> +#endif
> diff --git a/login/getutline_r.c b/login/getutline_r.c
> index 41ad9ff12b..5caab54620 100644
> --- a/login/getutline_r.c
> +++ b/login/getutline_r.c
> @@ -20,7 +20,8 @@
>  #include <errno.h>
>  #include <libc-lock.h>
>  #include <utmp.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  #include "utmp-private.h"
>  
>  
> @@ -43,4 +44,8 @@ __getutline_r (const struct utmp *line, struct utmp
> *buffer, return retval;
>  }
>  libc_hidden_def (__getutline_r)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutline_r, getutline_r,
> UTMP_COMPAT_BASE); +#else
>  weak_alias (__getutline_r, getutline_r)
> +#endif
> diff --git a/login/getutmp.c b/login/getutmp.c
> index 3058a93d1b..d521e5e51e 100644
> --- a/login/getutmp.c
> +++ b/login/getutmp.c
> @@ -21,6 +21,8 @@
>  #define getutmpx __redirect_getutmpx
>  #include <utmpx.h>
>  #undef getutmpx
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  #define CHECK_SIZE_AND_OFFSET(field) \
>    _Static_assert (sizeof ((struct utmp){0}.field)		\
> @@ -59,5 +61,11 @@ __getutmp (const struct utmpx *utmpx, struct utmp
> *utmp) utmp->ut_tv.tv_usec = utmpx->ut_tv.tv_usec;
>  }
>  
> -weak_alias (__getutmp, getutmp)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutmp, getutmp, UTMP_COMPAT_BASE);
> +strong_alias (__getutmp, __getutmpx)
> +versioned_symbol (libc, __getutmpx, getutmpx, UTMP_COMPAT_BASE);
> +#else
> +strong_alias (__getutmp, getutmp)
>  strong_alias (__getutmp, getutmpx)
> +#endif
> diff --git a/login/getutxent.c b/login/getutxent.c
> index ca90a13d4b..505b2b6441 100644
> --- a/login/getutxent.c
> +++ b/login/getutxent.c
> @@ -18,9 +18,16 @@
>  
>  #include <utmp.h>
>  #include <utmpx.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  struct utmpx *
> -getutxent (void)
> +__getutxent (void)
>  {
>    return (struct utmpx *) __getutent ();
>  }
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutxent, getutxent, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__getutxent, getutxent)
> +#endif
> diff --git a/login/getutxid.c b/login/getutxid.c
> index d53993f5e9..871aef11d8 100644
> --- a/login/getutxid.c
> +++ b/login/getutxid.c
> @@ -18,9 +18,16 @@
>  
>  #include <utmp.h>
>  #include <utmpx.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  struct utmpx *
> -getutxid (const struct utmpx *id)
> +__getutxid (const struct utmpx *id)
>  {
>    return (struct utmpx *) __getutid ((const struct utmp *) id);
>  }
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutxid, getutxid, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__getutxid, getutxid)
> +#endif
> diff --git a/login/getutxline.c b/login/getutxline.c
> index f1d28211b0..d212217285 100644
> --- a/login/getutxline.c
> +++ b/login/getutxline.c
> @@ -18,9 +18,16 @@
>  
>  #include <utmp.h>
>  #include <utmpx.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  struct utmpx *
> -getutxline (const struct utmpx *line)
> +__getutxline (const struct utmpx *line)
>  {
>    return (struct utmpx *) __getutline ((const struct utmp *) line);
>  }
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __getutxline, getutxline, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__getutxline, getutxline)
> +#endif
> diff --git a/login/login.c b/login/login.c
> index cc26d2982b..ca2a99210f 100644
> --- a/login/login.c
> +++ b/login/login.c
> @@ -23,6 +23,8 @@
>  #include <unistd.h>
>  #include <stdlib.h>
>  #include <utmp.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  
>  /* Return the result of ttyname in the buffer pointed to by TTY,
> which should @@ -78,7 +80,7 @@ tty_name (int fd, char **tty, size_t
> buf_len) }
>  \f
>  void
> -login (const struct utmp *ut)
> +__login (const struct utmp *ut)
>  {
>  #ifdef PATH_MAX
>    char _tty[PATH_MAX + UT_LINESIZE];
> @@ -137,3 +139,9 @@ login (const struct utmp *ut)
>    /* Update the WTMP file.  Here we have to add a new entry.  */
>    updwtmp (_PATH_WTMP, &copy);
>  }
> +hidden_def (__login)
> +#if SHLIB_COMPAT(libutil, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libutil, __login, login, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__login, login)
> +#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c
> b/login/login32.c similarity index 75%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/login32.c
> rename to login/login32.c
> index 22f908df88..6e451eb745 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c
> +++ b/login/login32.c
> @@ -1,5 +1,5 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> +/* Write utmp and wtmp entries, 32-bit time compat version.
> +   Copyright (C) 2008-2020 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -16,13 +16,14 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> -#include <sys/types.h>
>  #include <utmp.h>
> -#include <libc-symbols.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  #include "utmp32.h"
>  #include "utmp-convert.h"
>  
> +#if SHLIB_COMPAT(libutil, GLIBC_2_0, UTMP_COMPAT_BASE)
>  /* Write the given entry into utmp and wtmp.  */
>  void
>  login32 (const struct utmp32 *entry)
> @@ -30,7 +31,8 @@ login32 (const struct utmp32 *entry)
>    struct utmp in64;
>  
>    utmp_convert32to64 (entry, &in64);
> -  login (&in64);
> +  __login (&in64);
>  }
>  
> -symbol_version (login32, login, GLIBC_2.0);
> +compat_symbol (libutil, login32, login, GLIBC_2_0);
> +#endif
> diff --git a/login/pututxline.c b/login/pututxline.c
> index eec8851d45..ddd6330811 100644
> --- a/login/pututxline.c
> +++ b/login/pututxline.c
> @@ -18,9 +18,16 @@
>  
>  #include <utmp.h>
>  #include <utmpx.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  struct utmpx *
> -pututxline (const struct utmpx *utmpx)
> +__pututxline (const struct utmpx *utmpx)
>  {
>    return (struct utmpx *) __pututline ((const struct utmp *) utmpx);
>  }
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __pututxline, pututxline, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__pututxline, pututxline)
> +#endif
> diff --git a/login/updwtmp.c b/login/updwtmp.c
> index 489c28b553..715ef747d7 100644
> --- a/login/updwtmp.c
> +++ b/login/updwtmp.c
> @@ -19,7 +19,8 @@
>  #include <utmp.h>
>  #include <string.h>
>  #include <unistd.h>
> -
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  #include "utmp-private.h"
>  
>  #ifndef TRANSFORM_UTMP_FILE_NAME
> @@ -41,4 +42,8 @@ __updwtmp (const char *wtmp_file, const struct utmp
> *utmp) __libc_updwtmp (file_name, utmp);
>  }
>  libc_hidden_def (__updwtmp)
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __updwtmp, updwtmp, UTMP_COMPAT_BASE);
> +#else
>  weak_alias (__updwtmp, updwtmp)
> +#endif
> diff --git a/login/updwtmpx.c b/login/updwtmpx.c
> index f95306b621..3f1dbb363b 100644
> --- a/login/updwtmpx.c
> +++ b/login/updwtmpx.c
> @@ -18,9 +18,16 @@
>  
>  #include <utmp.h>
>  #include <utmpx.h>
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
>  
>  void
> -updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
> +__updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
>  {
>    __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
>  }
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +versioned_symbol (libc, __updwtmpx, updwtmpx, UTMP_COMPAT_BASE);
> +#else
> +weak_alias (__updwtmpx, updwtmpx)
> +#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
> b/login/utmp-convert.h similarity index 100%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
> rename to login/utmp-convert.h
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
> b/login/utmp32.c similarity index 83%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
> rename to login/utmp32.c

Ok, so relevant implementation files are moved to generic login
directory.

> index e4b82512f6..7fecb3bdca 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
> +++ b/login/utmp32.c
> @@ -1,5 +1,5 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> +/* Compability symbols for utmp with 32-bit entry times.
> +   Copyright (C) 2008-2020 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -24,6 +24,11 @@
>  #include "utmp32.h"
>  #include "utmp-convert.h"
>  
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
> +
> +#if SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)
> +
>  /* Allocate a static buffer to be returned to the caller.  As well as
>     with the existing version of these functions the caller has to be
>     aware that the contents of this buffer will change with subsequent
> @@ -63,7 +68,7 @@ getutid32 (const struct utmp32 *id)
>  {
>    ACCESS_UTMP_ENTRY (__getutid, id)
>  }
> -symbol_version (getutid32, getutid, GLIBC_2.0);
> +compat_symbol (libc, getutid32, getutid, GLIBC_2_0);
>  
>  /* Search forward from the current point in the utmp file until the
>     next entry with a ut_line matching LINE->ut_line.  */
> @@ -72,7 +77,7 @@ getutline32 (const struct utmp32 *line)
>  {
>    ACCESS_UTMP_ENTRY (__getutline, line)
>  }
> -symbol_version (getutline32, getutline, GLIBC_2.0);
> +compat_symbol (libc, getutline32, getutline, GLIBC_2_0);
>  
>  /* Write out entry pointed to by UTMP_PTR into the utmp file.  */
>  struct utmp32 *
> @@ -80,7 +85,7 @@ pututline32 (const struct utmp32 *utmp_ptr)
>  {
>    ACCESS_UTMP_ENTRY (__pututline, utmp_ptr)
>  }
> -symbol_version (pututline32, pututline, GLIBC_2.0);
> +compat_symbol (libc, pututline32, pututline, GLIBC_2_0);
>  
>  /* Read next entry from a utmp-like file.  */
>  struct utmp32 *
> @@ -96,10 +101,9 @@ getutent32 (void)
>    utmp_convert64to32 (out64, out32);
>    return out32;
>  }
> -symbol_version (getutent32, getutent, GLIBC_2.0);
> +compat_symbol (libc, getutent32, getutent, GLIBC_2_0);
>  
>  /* Reentrant versions of the file for handling utmp files.  */
> -
>  int
>  getutent32_r (struct utmp32 *buffer, struct utmp32 **result)
>  {
> @@ -119,11 +123,11 @@ getutent32_r (struct utmp32 *buffer, struct
> utmp32 **result) 
>    return 0;
>  }
> -symbol_version (getutent32_r, getutent_r, GLIBC_2.0);
> +compat_symbol (libc, getutent32_r, getutent_r, GLIBC_2_0);
>  
>  int
>  getutid32_r (const struct utmp32 *id, struct utmp32 *buffer,
> -	       struct utmp32 **result)
> +	     struct utmp32 **result)
>  {
>    struct utmp in64;
>    struct utmp out64;
> @@ -144,11 +148,11 @@ getutid32_r (const struct utmp32 *id, struct
> utmp32 *buffer, 
>    return 0;
>  }
> -symbol_version (getutid32_r, getutid_r, GLIBC_2.0);
> +compat_symbol (libc, getutid32_r, getutid_r, GLIBC_2_0);
>  
>  int
>  getutline32_r (const struct utmp32 *line,
> -		 struct utmp32 *buffer, struct utmp32 **result)
> +	       struct utmp32 *buffer, struct utmp32 **result)
>  {
>    struct utmp in64;
>    struct utmp out64;
> @@ -170,7 +174,7 @@ getutline32_r (const struct utmp32 *line,
>    return 0;
>  
>  }
> -symbol_version (getutline32_r, getutline_r, GLIBC_2.0);
> +compat_symbol (libc, getutline32_r, getutline_r, GLIBC_2_0);
>  
>  /* Append entry UTMP to the wtmp-like file WTMP_FILE.  */
>  void
> @@ -181,4 +185,6 @@ updwtmp32 (const char *wtmp_file, const struct
> utmp32 *utmp) utmp_convert32to64 (utmp, &in32);
>    __updwtmp (wtmp_file, &in32);
>  }
> -symbol_version (updwtmp32, updwtmp, GLIBC_2.0);
> +compat_symbol (libc, updwtmp32, updwtmp, GLIBC_2_0);
> +
> +#endif /* SHLIB_COMPAT(libc, GLIBC_2_0, UTMP_COMPAT_BASE)   */
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h
> b/login/utmp32.h similarity index 100%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h
> rename to login/utmp32.h
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h
> b/login/utmpx-convert.h similarity index 100%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h
> rename to login/utmpx-convert.h
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
> b/login/utmpx32.c similarity index 81%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
> rename to login/utmpx32.c
> index 3f78fa62db..3ecd5b65f5 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
> +++ b/login/utmpx32.c
> @@ -1,5 +1,5 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> +/* Compability symbols for utmpx with 32-bit entry times.
> +   Copyright (C) 2008-2020 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -27,6 +27,11 @@
>  #include "utmpx32.h"
>  #include "utmpx-convert.h"
>  
> +#include <utmp-compat.h>
> +#include <shlib-compat.h>
> +
> +#if SHLIB_COMPAT(libc, GLIBC_2_1, UTMP_COMPAT_BASE)
> +
>  /* Allocate a static buffer to be returned to the caller.  As well as
>     with the existing version of these functions the caller has to be
>     aware that the contents of this buffer will change with subsequent
> @@ -75,7 +80,7 @@ getutxent32 (void)
>    return out32;
>  
>  }
> -symbol_version (getutxent32, getutxent, GLIBC_2.1);
> +compat_symbol (libc, getutxent32, getutxent, GLIBC_2_1);
>  
>  /* Get the user accounting database entry corresponding to ID.  */
>  struct utmpx32 *
> @@ -83,7 +88,7 @@ getutxid32 (const struct utmpx32 *id)
>  {
>    ACCESS_UTMPX_ENTRY (__getutxid, id);
>  }
> -symbol_version (getutxid32, getutxid, GLIBC_2.1);
> +compat_symbol (libc, getutxid32, getutxid, GLIBC_2_1);
>  
>  /* Get the user accounting database entry corresponding to LINE.  */
>  struct utmpx32 *
> @@ -91,7 +96,7 @@ getutxline32 (const struct utmpx32 *line)
>  {
>    ACCESS_UTMPX_ENTRY (__getutxline, line);
>  }
> -symbol_version (getutxline32, getutxline, GLIBC_2.1);
> +compat_symbol (libc, getutxline32, getutxline, GLIBC_2_1);
>  
>  /* Write the entry UTMPX into the user accounting database.  */
>  struct utmpx32 *
> @@ -99,7 +104,7 @@ pututxline32 (const struct utmpx32 *utmpx)
>  {
>    ACCESS_UTMPX_ENTRY (__pututxline, utmpx);
>  }
> -symbol_version (pututxline32, pututxline, GLIBC_2.1);
> +compat_symbol (libc, pututxline32, pututxline, GLIBC_2_1);
>  
>  /* Append entry UTMP to the wtmpx-like file WTMPX_FILE.  */
>  void
> @@ -110,7 +115,11 @@ updwtmpx32 (const char *wtmpx_file, const struct
> utmpx32 *utmpx) utmpx_convert32to64 (utmpx, &in64);
>    __updwtmpx (wtmpx_file, &in64);
>  }
> -symbol_version (updwtmpx32, updwtmpx, GLIBC_2.1);
> +compat_symbol (libc, updwtmpx32, updwtmpx, GLIBC_2_1);
> +
> +#endif /* SHLIB_COMPAT(libc, GLIBC_2_1_1, UTMP_COMPAT_BASE)   */
> +
> +#if SHLIB_COMPAT(libc, GLIBC_2_1_1, UTMP_COMPAT_BASE)
>  
>  /* Copy the information in UTMPX to UTMP.  */
>  void
> @@ -123,7 +132,7 @@ getutmp32 (const struct utmpx32 *utmpx, struct
> utmp32 *utmp) __getutmp (&in64, &out64);
>    utmp_convert64to32 (&out64, utmp);
>  }
> -symbol_version (getutmp32, getutmp, GLIBC_2.1.1);
> +compat_symbol (libc, getutmp32, getutmp, GLIBC_2_1_1);
>  
>  /* Copy the information in UTMP to UTMPX.  */
>  void
> @@ -136,4 +145,6 @@ getutmpx32 (const struct utmp32 *utmp, struct
> utmpx32 *utmpx) __getutmpx (&in64, &out64);
>    utmpx_convert64to32 (&out64, utmpx);
>  }
> -symbol_version (getutmpx32, getutmpx, GLIBC_2.1.1);
> +compat_symbol (libc, getutmpx32, getutmpx, GLIBC_2_1_1);
> +
> +#endif /* SHLIB_COMPAT(libc, GLIBC_2_1, UTMP_COMPAT_BASE)   */
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
> b/login/utmpx32.h similarity index 100%
> rename from sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
> rename to login/utmpx32.h
> diff --git a/sysdeps/generic/utmp-compat.h
> b/sysdeps/generic/utmp-compat.h new file mode 100644
> index 0000000000..122fd8905d
> --- /dev/null
> +++ b/sysdeps/generic/utmp-compat.h
> @@ -0,0 +1,3 @@
> +/* This macro defines the glibc version tag at which the 64 bit
> struct
> +   utmp functions have been added to the 32 bit glibc.  */
> +#define UTMP_COMPAT_BASE GLIBC_2_33
> diff --git a/sysdeps/mach/hurd/i386/libc.abilist
> b/sysdeps/mach/hurd/i386/libc.abilist index b4e39285d0..a9bbb5028d
> 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -2196,12 +2196,27 @@ GLIBC_2.33 fstat F
>  GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F

Here I'm also confused - this is related to [*] as well.

Wasn't those symbols exported prior GLIBC_2.33? Or were they only
exported by s390?

If they were only exported for s390, why other ports didn't need them
exported?

>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/mach/hurd/i386/libutil.abilist
> b/sysdeps/mach/hurd/i386/libutil.abilist index 1dd59e0afb..6d97d3cd5e
> 100644 --- a/sysdeps/mach/hurd/i386/libutil.abilist
> +++ b/sysdeps/mach/hurd/i386/libutil.abilist
> @@ -4,3 +4,4 @@ GLIBC_2.2.6 login_tty F
>  GLIBC_2.2.6 logout F
>  GLIBC_2.2.6 logwtmp F
>  GLIBC_2.2.6 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index
> 54b707b9cc..9172a3347e 100644 ---
> a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2164,9 +2164,24 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libutil.abilist
> b/sysdeps/unix/sysv/linux/aarch64/libutil.abilist index
> 99889de22e..3c2d9a1c14 100644 ---
> a/sysdeps/unix/sysv/linux/aarch64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/aarch64/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.17 login_tty F GLIBC_2.17 logout F
>  GLIBC_2.17 logwtmp F
>  GLIBC_2.17 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist
> b/sysdeps/unix/sysv/linux/alpha/libc.abilist index
> 9b429fd28f..bd217cb2c2 100644 ---
> a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++
> b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2246,12 +2246,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _IO_fprintf F
>  GLIBC_2.4 _IO_printf F
>  GLIBC_2.4 _IO_sprintf F
> diff --git a/sysdeps/unix/sysv/linux/alpha/libutil.abilist
> b/sysdeps/unix/sysv/linux/alpha/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/alpha/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/alpha/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist
> b/sysdeps/unix/sysv/linux/arc/libc.abilist index
> 7ed5340364..898fd755ea 100644 ---
> a/sysdeps/unix/sysv/linux/arc/libc.abilist +++
> b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -1924,9 +1924,24 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist
> b/sysdeps/unix/sysv/linux/arc/libutil.abilist index
> 61f73bc34e..ea3c23b433 100644 ---
> a/sysdeps/unix/sysv/linux/arc/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/arc/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.32 login_tty F GLIBC_2.32 logout F
>  GLIBC_2.32 logwtmp F
>  GLIBC_2.32 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index
> 3ec1cbdfbc..dd52296951 100644 ---
> a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++
> b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -145,12 +145,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _Exit F
>  GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
>  GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
> diff --git a/sysdeps/unix/sysv/linux/arm/le/libutil.abilist
> b/sysdeps/unix/sysv/linux/arm/le/libutil.abilist index
> cc1420e68c..ea54d58739 100644 ---
> a/sysdeps/unix/sysv/linux/arm/le/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/arm/le/libutil.abilist @@ -1,3 +1,4 @@
> +GLIBC_2.33 login F
>  GLIBC_2.4 forkpty F
>  GLIBC_2.4 login F
>  GLIBC_2.4 login_tty F
> diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist
> b/sysdeps/unix/sysv/linux/csky/libc.abilist index
> 301fd728d7..02636a8fa2 100644 ---
> a/sysdeps/unix/sysv/linux/csky/libc.abilist +++
> b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2108,9 +2108,24 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/csky/libutil.abilist
> b/sysdeps/unix/sysv/linux/csky/libutil.abilist index
> cbd11999a4..165b86bcf8 100644 ---
> a/sysdeps/unix/sysv/linux/csky/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/csky/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.29 login_tty F GLIBC_2.29 logout F
>  GLIBC_2.29 logwtmp F
>  GLIBC_2.29 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist
> b/sysdeps/unix/sysv/linux/hppa/libc.abilist index
> 84834052e1..21912899a1 100644 ---
> a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++
> b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2067,12 +2067,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/hppa/libutil.abilist
> b/sysdeps/unix/sysv/linux/hppa/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/hppa/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/hppa/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist
> b/sysdeps/unix/sysv/linux/i386/libc.abilist index
> b82debaba4..77b0d47f2a 100644 ---
> a/sysdeps/unix/sysv/linux/i386/libc.abilist +++
> b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2233,12 +2233,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/i386/libutil.abilist
> b/sysdeps/unix/sysv/linux/i386/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/i386/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/i386/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist
> b/sysdeps/unix/sysv/linux/ia64/libc.abilist index
> 475b7af1a5..7c84d98fcb 100644 ---
> a/sysdeps/unix/sysv/linux/ia64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/ia64/libc.abilist @@ -2099,12 +2099,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/ia64/libutil.abilist
> b/sysdeps/unix/sysv/linux/ia64/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/ia64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/ia64/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index
> 29127e1341..421a82107f 100644 ---
> a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++
> b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2179,12
> +2179,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist
> b/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index
> e5b4cecacd..6ae7a8f5ba 100644 ---
> a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++
> b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2159,9
> +2159,24 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist
> b/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist index
> 0da0a40c22..2f16f5498a 100644 ---
> a/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/microblaze/be/libutil.abilist @@ -4,3 +4,4
> @@ GLIBC_2.18 login_tty F GLIBC_2.18 logout F
>  GLIBC_2.18 logwtmp F
>  GLIBC_2.18 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index
> b9f56007a2..817b22b428 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2150,12
> +2150,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist
> b/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist
> b/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index
> c161ef11b5..22772a572a 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2156,12
> +2156,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist index
> d4b1528e7a..310db16538 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist @@ -2150,12
> +2150,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist
> b/sysdeps/unix/sysv/linux/nios2/libc.abilist index
> 68fca4e650..ba11176736 100644 ---
> a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++
> b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2197,9 +2197,24 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/nios2/libutil.abilist
> b/sysdeps/unix/sysv/linux/nios2/libutil.abilist index
> 19608bd74d..348b707eee 100644 ---
> a/sysdeps/unix/sysv/linux/nios2/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/nios2/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.21 login_tty F GLIBC_2.21 logout F
>  GLIBC_2.21 logwtmp F
>  GLIBC_2.21 openpty F
> +GLIBC_2.33 login F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index
> bec34b2128..c599b985d1 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@
> -2206,12 +2206,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
> GLIBC_2.33 fstatat F GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _IO_fprintf F
>  GLIBC_2.4 _IO_printf F
>  GLIBC_2.4 _IO_sprintf F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist @@ -4,3
> +4,4 @@ GLIBC_2.0 login_tty F GLIBC_2.0 logout F GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist index
> 35bd161c79..3362f3f6bb 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@
> -2069,12 +2069,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
> GLIBC_2.33 fstatat F GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _IO_fprintf F
>  GLIBC_2.4 _IO_printf F
>  GLIBC_2.4 _IO_sprintf F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist index
> 9cf1da7aa4..41e5bf4a1f 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libutil.abilist @@
> -4,3 +4,4 @@ GLIBC_2.3 login_tty F GLIBC_2.3 logout F GLIBC_2.3
> logwtmp F GLIBC_2.3 openpty F
> +GLIBC_2.33 login F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index
> f1c8ad9cc5..aca57d0f38 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@
> -2359,9 +2359,24 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
> GLIBC_2.33 fstatat F GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist index
> 99889de22e..3c2d9a1c14 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libutil.abilist @@
> -4,3 +4,4 @@ GLIBC_2.17 login_tty F GLIBC_2.17 logout F GLIBC_2.17
> logwtmp F GLIBC_2.17 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist index
> fdfc373871..d4e6f75078 100644 ---
> a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist @@ -2126,9 +2126,24
> @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist
> b/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist index
> cbfec8d46e..d9752a1da2 100644 ---
> a/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.27 login_tty F GLIBC_2.27 logout F
>  GLIBC_2.27 logwtmp F
>  GLIBC_2.27 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c deleted file mode
> 100644 index 615312ed39..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutent.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutent, getutent, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c deleted file mode
> 100644 index 29d8c6a6f9..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <libc-lock.h>
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -#include "utmp-private.h"
> -
> -#if defined SHARED
> -weak_alias (__setutent, setutent)
> -weak_alias (__endutent, endutent)
> -
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutent_r.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutent_r, getutent_r, UTMP_COMPAT_BASE);
> -default_symbol_version (__pututline, pututline, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c deleted file mode
> 100644 index d3c63664df..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutid.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutid, getutid, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c deleted file mode
> 100644 index e5511d406a..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <libc-lock.h>
> -#include <errno.h>
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -#include "utmp-private.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutid_r.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutid_r, getutid_r, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c deleted file mode
> 100644 index 1c98cc5bba..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutline.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutline, getutline, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c deleted file
> mode 100644 index f8b63342b4..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <errno.h>
> -#include <libc-lock.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -#include "utmp-private.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include "login/getutline_r.c"
> -
> -#if defined SHARED
> -default_symbol_version (__getutline_r, getutline_r,
> UTMP_COMPAT_BASE);; -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c deleted file mode
> 100644 index 50ce8c4f5c..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#undef weak_alias
> -#define weak_alias(a, b)
> -#undef strong_alias
> -#define strong_alias(a, b)
> -
> -#include <login/getutmp.c>
> -
> -#include "utmp-compat.h"
> -
> -default_symbol_version (__getutmp, getutmp, UTMP_COMPAT_BASE);
> -_strong_alias (__getutmp, __getutmpx)
> -default_symbol_version (__getutmpx, getutmpx, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c deleted file mode
> 100644 index be887a672b..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define getutxent __getutxent
> -#include "login/getutxent.c"
> -#undef getutxent
> -
> -default_symbol_version (__getutxent, getutxent, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c deleted file mode
> 100644 index 85febe277b..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define getutxid __getutxid
> -#include "login/getutxid.c"
> -#undef getutxid
> -
> -default_symbol_version (__getutxid, getutxid, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c deleted file mode
> 100644 index a69740a712..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define getutxline __getutxline
> -#include "login/getutxline.c"
> -#undef getutxline
> -
> -default_symbol_version (__getutxline, getutxline, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/login.c deleted file mode
> 100644 index 25ee4a8b16..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/login.c
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <assert.h>
> -#include <errno.h>
> -#include <limits.h>
> -#include <string.h>
> -#include <unistd.h>
> -#include <stdlib.h>
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define login __login
> -#include "login/login.c"
> -#undef login
> -
> -default_symbol_version (__login, login, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c deleted file mode
> 100644 index c8f773d9dc..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define pututxline __pututxline
> -#include "login/pututxline.c"
> -#undef pututxline
> -
> -default_symbol_version (__pututxline, pututxline, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c deleted file mode
> 100644 index 2079571cc1..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -
> -#include "utmp-compat.h"
> -#include "utmp-private.h"
> -
> -#if defined SHARED
> -# undef weak_alias
> -# define weak_alias(n,a)
> -#endif
> -#include <login/updwtmp.c>
> -
> -#if defined SHARED
> -default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);
> -#endif
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
> b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c deleted file mode
> 100644 index ce94139c3c..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
> -   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <utmp.h>
> -#include <utmpx.h>
> -
> -#include "utmp-compat.h"
> -
> -#undef weak_alias
> -#define weak_alias(n,a)
> -#define updwtmpx __updwtmpx
> -#include "login/updwtmpx.c"
> -#undef updwtmpx
> -
> -default_symbol_version (__updwtmpx, updwtmpx, UTMP_COMPAT_BASE);
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h
> b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h index
> 4e5972b65d..ef8115370c 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h +++
> b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h @@ -18,4 +18,4 @@
>  
>  /* This macro defines the glibc version tag at which the 64 bit
> struct utmp functions have been added to the 32 bit glibc.  */
> -#define UTMP_COMPAT_BASE GLIBC_2.9
> +#define UTMP_COMPAT_BASE GLIBC_2_9
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index
> bd96aeaff7..0df18459dc 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -2105,12
> +2105,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _IO_fprintf F
>  GLIBC_2.4 _IO_printf F
>  GLIBC_2.4 _IO_sprintf F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist
> b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist index
> 14bd135ea8..3f66f39bac 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist @@ -4,3 +4,4
> @@ GLIBC_2.2 login_tty F GLIBC_2.2 logout F
>  GLIBC_2.2 logwtmp F
>  GLIBC_2.2 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index
> b4cebb11dd..ea78226332 100644 ---
> a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2071,12 +2071,27 @@
> GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/sh/le/libutil.abilist
> b/sysdeps/unix/sysv/linux/sh/le/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/sh/le/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/sh/le/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index
> f208405859..6f3a2df230 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2195,12
> +2195,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 _IO_fprintf F
>  GLIBC_2.4 _IO_printf F
>  GLIBC_2.4 _IO_sprintf F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist
> b/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist @@ -4,3 +4,4
> @@ GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist index
> 44e68aded2..b4e75bb47e 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist @@ -2122,12
> +2122,27 @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist
> b/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist index
> aa2d35b323..1bd22adb45 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist @@ -4,3 +4,4
> @@ GLIBC_2.0 login_tty F GLIBC_2.0 logout F
>  GLIBC_2.0 logwtmp F
>  GLIBC_2.0 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index
> 51e76861f6..74c0c26ba5 100644 ---
> a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++
> b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -2080,12 +2080,27
> @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
>  GLIBC_2.4 __confstr_chk F
>  GLIBC_2.4 __fgets_chk F
>  GLIBC_2.4 __fgets_unlocked_chk F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist
> b/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist index
> 1356ed4115..7df76778a4 100644 ---
> a/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.2.5 login_tty F GLIBC_2.2.5 logout F
>  GLIBC_2.2.5 logwtmp F
>  GLIBC_2.2.5 openpty F
> +GLIBC_2.33 login F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index
> f83473c11f..3597a3ff88 100644 ---
> a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -2177,9 +2177,24
> @@ GLIBC_2.33 fstat F GLIBC_2.33 fstat64 F
>  GLIBC_2.33 fstatat F
>  GLIBC_2.33 fstatat64 F
> +GLIBC_2.33 getutent F
> +GLIBC_2.33 getutent_r F
> +GLIBC_2.33 getutid F
> +GLIBC_2.33 getutid_r F
> +GLIBC_2.33 getutline F
> +GLIBC_2.33 getutline_r F
> +GLIBC_2.33 getutmp F
> +GLIBC_2.33 getutmpx F
> +GLIBC_2.33 getutxent F
> +GLIBC_2.33 getutxid F
> +GLIBC_2.33 getutxline F
>  GLIBC_2.33 lstat F
>  GLIBC_2.33 lstat64 F
>  GLIBC_2.33 mknod F
>  GLIBC_2.33 mknodat F
> +GLIBC_2.33 pututline F
> +GLIBC_2.33 pututxline F
>  GLIBC_2.33 stat F
>  GLIBC_2.33 stat64 F
> +GLIBC_2.33 updwtmp F
> +GLIBC_2.33 updwtmpx F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist
> b/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist index
> cff23106f5..9431f297d8 100644 ---
> a/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist +++
> b/sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist @@ -4,3 +4,4 @@
> GLIBC_2.16 login_tty F GLIBC_2.16 logout F
>  GLIBC_2.16 logwtmp F
>  GLIBC_2.16 openpty F
> +GLIBC_2.33 login F




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/5] login: Move gnu utmpx to default implementaion
  2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
  2020-10-22  8:15   ` Lukasz Majewski
@ 2020-10-22  9:16   ` Andreas Schwab
  1 sibling, 0 replies; 25+ messages in thread
From: Andreas Schwab @ 2020-10-22  9:16 UTC (permalink / raw)
  To: Adhemerval Zanella via Libc-alpha; +Cc: Alistair Francis

On Jul 29 2020, Adhemerval Zanella via Libc-alpha wrote:

>  /* Copy the information in UTMPX to UTMP. */
>  void
> -getutmp (const struct utmpx *utmpx, struct utmp *utmp)
> +__getutmp (const struct utmpx *utmpx, struct utmp *utmp)
>  {
> +  memset (utmp, 0, sizeof (struct utmpx));

I think it is better to use sizeof (struct utmp), even if we already
proved that it's the same.

But then, what prevents us from using memcpy directly?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/5] login: User 64-bit time on struct lastlog
  2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
  2020-07-29 21:04   ` Andreas Schwab
  2020-07-29 21:14   ` Andreas Schwab
@ 2020-10-22  9:25   ` Lukasz Majewski
  2 siblings, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2020-10-22  9:25 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]

Hi Adhemerval,

> It is not used directly on any symbol, so there is no need to add
> compat ones.
> ---
>  bits/struct_lastlog.h                         |  4 +--
>  .../sysv/linux/s390/bits/struct_lastlog.h     | 35
> ------------------- 2 files changed, 2 insertions(+), 37 deletions(-)
>  delete mode 100644 sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
> 
> diff --git a/bits/struct_lastlog.h b/bits/struct_lastlog.h
> index 122a44abd0..6882015d7c 100644
> --- a/bits/struct_lastlog.h
> +++ b/bits/struct_lastlog.h
> @@ -24,8 +24,8 @@
>     previous logins.  */
>  struct lastlog
>    {
> -#if __WORDSIZE_TIME64_COMPAT32
> -    int32_t ll_time;
> +#if __TIMESIZE != 64
> +    int64_t ll_time;

Maybe __time64_t would fit better here?

>  #else
>      __time_t ll_time;
>  #endif

Reviewed-by: Lukasz Majewski <lukma@denx.de>

> diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
> b/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h deleted file
> mode 100644 index 2fa409aeec..0000000000
> --- a/sysdeps/unix/sysv/linux/s390/bits/struct_lastlog.h
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/* The 'struct lastlog' type.
> -   Copyright (C) 2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be
> useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#ifndef _UTMP_H
> -# error "Never include <bits/struct_lastlog.h> directly; use
> <utmp.h> instead." -#endif
> -
> -/* The structure describing an entry in the database of
> -   previous logins.  */
> -struct lastlog
> -  {
> -#if __WORDSIZE == 32
> -    int64_t ll_time;
> -#else
> -    __time_t ll_time;
> -#endif
> -    char ll_line[UT_LINESIZE];
> -    char ll_host[UT_HOSTSIZE];
> -  };
> -




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32
  2020-07-29 20:51 ` [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32 Adhemerval Zanella via Libc-alpha
@ 2020-10-22  9:31   ` Lukasz Majewski
  0 siblings, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2020-10-22  9:31 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Alistair Francis, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 9422 bytes --]

Hi Adhemerval,

> With 'struct utmpx', 'struct utmp', and 'struct lastlog' using
> 64-bit time unconditionally this macro is not used anymore.
> ---
>  bits/wordsize.h                                 | 6 ------
>  sysdeps/aarch64/bits/wordsize.h                 | 2 --
>  sysdeps/mips/bits/wordsize.h                    | 6 ------
>  sysdeps/powerpc/powerpc32/bits/wordsize.h       | 2 --
>  sysdeps/powerpc/powerpc64/bits/wordsize.h       | 2 --
>  sysdeps/riscv/bits/wordsize.h                   | 6 ------
>  sysdeps/s390/s390-32/bits/wordsize.h            | 2 --
>  sysdeps/s390/s390-64/bits/wordsize.h            | 2 --
>  sysdeps/sparc/sparc32/bits/wordsize.h           | 2 --
>  sysdeps/sparc/sparc64/bits/wordsize.h           | 2 --
>  sysdeps/unix/sysv/linux/alpha/bits/wordsize.h   | 1 -
>  sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h | 2 --
>  sysdeps/unix/sysv/linux/sparc/bits/wordsize.h   | 2 --
>  sysdeps/wordsize-32/bits/wordsize.h             | 1 -
>  sysdeps/wordsize-64/bits/wordsize.h             | 1 -
>  sysdeps/x86/bits/wordsize.h                     | 3 ---
>  16 files changed, 42 deletions(-)
> 
> diff --git a/bits/wordsize.h b/bits/wordsize.h
> index 14edae3a11..e20fd2e4c2 100644
> --- a/bits/wordsize.h
> +++ b/bits/wordsize.h
> @@ -19,9 +19,3 @@
>     __WORDSIZE is 32 and ptrdiff_t is type 'int' and leave undefined
> if __WORDSIZE is 64.  */
>  #define __WORDSIZE32_PTRDIFF_LONG
> -
> -/* Set to 1 in order to force time types to be 32 bits instead of 64
> bits in
> -   struct lastlog and struct utmp{,x} on 64-bit ports.  This may be
> done in
> -   order to make 64-bit ports compatible with 32-bit ports.  Set to
> 0 for
> -   64-bit ports where the time types are 64-bits or for any 32-bit
> ports.  */ -#define __WORDSIZE_TIME64_COMPAT32
> diff --git a/sysdeps/aarch64/bits/wordsize.h
> b/sysdeps/aarch64/bits/wordsize.h index ee01841773..adc083d662 100644
> --- a/sysdeps/aarch64/bits/wordsize.h
> +++ b/sysdeps/aarch64/bits/wordsize.h
> @@ -24,5 +24,3 @@
>  # define __WORDSIZE32_SIZE_ULONG	1
>  # define __WORDSIZE32_PTRDIFF_LONG	1
>  #endif
> -
> -#define __WORDSIZE_TIME64_COMPAT32	0
> diff --git a/sysdeps/mips/bits/wordsize.h
> b/sysdeps/mips/bits/wordsize.h index d14f497895..3af04daea6 100644
> --- a/sysdeps/mips/bits/wordsize.h
> +++ b/sysdeps/mips/bits/wordsize.h
> @@ -19,12 +19,6 @@
>  
>  #define __WORDSIZE			_MIPS_SZPTR
>  
> -#if _MIPS_SIM == _ABI64
> -# define __WORDSIZE_TIME64_COMPAT32	1
> -#else
> -# define __WORDSIZE_TIME64_COMPAT32	0
> -#endif
> -
>  #if __WORDSIZE == 32
>  #define __WORDSIZE32_SIZE_ULONG		0
>  #define __WORDSIZE32_PTRDIFF_LONG	0
> diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h
> b/sysdeps/powerpc/powerpc32/bits/wordsize.h index
> 04ca9debf0..df1aa27244 100644 ---
> a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++
> b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -2,10 +2,8 @@
>  
>  #if defined __powerpc64__
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
>  #endif
> diff --git a/sysdeps/powerpc/powerpc64/bits/wordsize.h
> b/sysdeps/powerpc/powerpc64/bits/wordsize.h index
> 04ca9debf0..df1aa27244 100644 ---
> a/sysdeps/powerpc/powerpc64/bits/wordsize.h +++
> b/sysdeps/powerpc/powerpc64/bits/wordsize.h @@ -2,10 +2,8 @@
>  
>  #if defined __powerpc64__
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
>  #endif
> diff --git a/sysdeps/riscv/bits/wordsize.h
> b/sysdeps/riscv/bits/wordsize.h index faccc71828..182e3d33a6 100644
> --- a/sysdeps/riscv/bits/wordsize.h
> +++ b/sysdeps/riscv/bits/wordsize.h
> @@ -21,9 +21,3 @@
>  #else
>  # error unsupported ABI
>  #endif
> -
> -#if __riscv_xlen == 64
> -# define __WORDSIZE_TIME64_COMPAT32 1
> -#else
> -# error "rv32i-based targets are not supported"
> -#endif
> diff --git a/sysdeps/s390/s390-32/bits/wordsize.h
> b/sysdeps/s390/s390-32/bits/wordsize.h index 129e47182b..755050861e
> 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h
> +++ b/sysdeps/s390/s390-32/bits/wordsize.h
> @@ -7,5 +7,3 @@
>  # define __WORDSIZE32_SIZE_ULONG       1
>  # define __WORDSIZE32_PTRDIFF_LONG      0
>  #endif
> -
> -#define __WORDSIZE_TIME64_COMPAT32     0
> diff --git a/sysdeps/s390/s390-64/bits/wordsize.h
> b/sysdeps/s390/s390-64/bits/wordsize.h index 00e88b0628..01245a5b71
> 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h
> +++ b/sysdeps/s390/s390-64/bits/wordsize.h
> @@ -7,5 +7,3 @@
>  # define __WORDSIZE32_SIZE_ULONG       1
>  # define __WORDSIZE32_PTRDIFF_LONG     0
>  #endif
> -
> -#define __WORDSIZE_TIME64_COMPAT32     0
> diff --git a/sysdeps/sparc/sparc32/bits/wordsize.h
> b/sysdeps/sparc/sparc32/bits/wordsize.h index 2f66f10d72..10b73267f0
> 100644 --- a/sysdeps/sparc/sparc32/bits/wordsize.h
> +++ b/sysdeps/sparc/sparc32/bits/wordsize.h
> @@ -2,10 +2,8 @@
>  
>  #if defined __arch64__ || defined __sparcv9
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
>  #endif
> diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h
> b/sysdeps/sparc/sparc64/bits/wordsize.h index 2f66f10d72..10b73267f0
> 100644 --- a/sysdeps/sparc/sparc64/bits/wordsize.h
> +++ b/sysdeps/sparc/sparc64/bits/wordsize.h
> @@ -2,10 +2,8 @@
>  
>  #if defined __arch64__ || defined __sparcv9
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
>  #endif
> diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
> b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h index
> 74289c244a..6d955a9f27 100644 ---
> a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++
> b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h @@ -16,4 +16,3 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #define __WORDSIZE	64
> -#define __WORDSIZE_TIME64_COMPAT32	0
> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
> b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h index
> 04ca9debf0..df1aa27244 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h +++
> b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h @@ -2,10 +2,8 @@
>  
>  #if defined __powerpc64__
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
>  #endif
> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
> b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h index
> 7562875ee2..10b73267f0 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++
> b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -2,10 +2,8 @@
>  
>  #if defined __arch64__ || defined __sparcv9
>  # define __WORDSIZE	64
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  #else
>  # define __WORDSIZE	32
>  # define __WORDSIZE32_SIZE_ULONG	0
>  # define __WORDSIZE32_PTRDIFF_LONG	0
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  #endif
> diff --git a/sysdeps/wordsize-32/bits/wordsize.h
> b/sysdeps/wordsize-32/bits/wordsize.h index 759906a08d..869a7ab2aa
> 100644 --- a/sysdeps/wordsize-32/bits/wordsize.h
> +++ b/sysdeps/wordsize-32/bits/wordsize.h
> @@ -16,6 +16,5 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #define __WORDSIZE			32
> -#define __WORDSIZE_TIME64_COMPAT32	0
>  #define __WORDSIZE32_SIZE_ULONG		0
>  #define __WORDSIZE32_PTRDIFF_LONG	0
> diff --git a/sysdeps/wordsize-64/bits/wordsize.h
> b/sysdeps/wordsize-64/bits/wordsize.h index 44b9725814..8613a6cb3c
> 100644 --- a/sysdeps/wordsize-64/bits/wordsize.h
> +++ b/sysdeps/wordsize-64/bits/wordsize.h
> @@ -16,4 +16,3 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #define __WORDSIZE			64
> -#define __WORDSIZE_TIME64_COMPAT32	0
> diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h
> index 70f652bca1..cf250cc6df 100644
> --- a/sysdeps/x86/bits/wordsize.h
> +++ b/sysdeps/x86/bits/wordsize.h
> @@ -9,9 +9,6 @@
>  #endif
>  
>  #ifdef __x86_64__
> -# define __WORDSIZE_TIME64_COMPAT32	1
>  /* Both x86-64 and x32 use the 64-bit system call interface.  */
>  # define __SYSCALL_WORDSIZE		64
> -#else
> -# define __WORDSIZE_TIME64_COMPAT32	0
>  #endif

Reviewed-by: Lukasz Majewski <lukma@denx.de>

As those patches are available for review on the mailing list since the
end of July, and nobody but me had any comments, will you find soon some
time to pull them to -master? 

In general you made generic use of the s390-32 working code, so IMHO,
this patch series shouldn't do much harm.



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-10-22  9:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 20:51 [PATCH 1/5] login: Consolidate utmp and utmpx headers Adhemerval Zanella via Libc-alpha
2020-07-29 20:51 ` [PATCH 2/5] login: Move gnu utmpx to default implementaion Adhemerval Zanella via Libc-alpha
2020-10-22  8:15   ` Lukasz Majewski
2020-10-22  9:16   ` Andreas Schwab
2020-07-29 20:51 ` [PATCH 3/5] login: Add 64-bit time support Adhemerval Zanella via Libc-alpha
2020-07-29 21:17   ` Joseph Myers
2020-07-30 12:34     ` Adhemerval Zanella via Libc-alpha
2020-08-02 19:02       ` Maciej W. Rozycki via Libc-alpha
2020-08-02 22:05         ` Adhemerval Zanella via Libc-alpha
2020-10-22  9:16   ` Lukasz Majewski
2020-07-29 20:51 ` [PATCH 4/5] login: User 64-bit time on struct lastlog Adhemerval Zanella via Libc-alpha
2020-07-29 21:04   ` Andreas Schwab
2020-07-29 21:14   ` Andreas Schwab
2020-07-30 12:39     ` Adhemerval Zanella via Libc-alpha
2020-07-30 16:19       ` Florian Weimer via Libc-alpha
2020-07-30 18:54         ` Joseph Myers
2020-07-30 21:53           ` Adhemerval Zanella via Libc-alpha
2020-07-31  0:31             ` Joseph Myers
2020-07-30 21:46         ` Adhemerval Zanella via Libc-alpha
2020-10-22  9:25   ` Lukasz Majewski
2020-07-29 20:51 ` [PATCH 5/5] Remove __WORDSIZE_TIME64_COMPAT32 Adhemerval Zanella via Libc-alpha
2020-10-22  9:31   ` Lukasz Majewski
2020-07-29 21:08 ` [PATCH 1/5] login: Consolidate utmp and utmpx headers Joseph Myers
2020-07-30 12:36   ` Adhemerval Zanella via Libc-alpha
2020-10-22  8:06 ` Lukasz Majewski

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 read-only IMAP folder(s) and NNTP newsgroup(s).