* [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36
@ 2023-01-10 17:48 Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" Daniel P. Berrangé
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2023-01-10 17:48 UTC (permalink / raw)
To: qemu-devel
Cc: Marc-André Lureau, Thomas Huth, Philippe Mathieu-Daudé,
Daniel P. Berrangé, Laurent Vivier, Paolo Bonzini
It didn't appear that glibc was going to fix the problem
breaking includes of linux/mount.h vs sys/mount.h, so
QEMU applied a workaround copying the symbols/structs we
need into a local header.
Since then Linux modified linux/btrfs.h to pull in
linux/fs.h which caused a clash with our workaround.
Rather than invent workarounds for our workarounds,
we can luckily just drop our previous workarounds.
glibc has been fixed after all, and backported this
fix to the stable 2.36 release series too. We should
just expect distros to pull in the stable fix, which
Fedora at least has already done.
Daniel P. Berrangé (2):
Revert "linux-user: add more compat ioctl definitions"
Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h"
linux-user/syscall.c | 43 -------------------------------------------
meson.build | 2 --
2 files changed, 45 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions"
2023-01-10 17:48 [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Daniel P. Berrangé
@ 2023-01-10 17:49 ` Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h" Daniel P. Berrangé
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2023-01-10 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: Marc-André Lureau, Thomas Huth, Philippe Mathieu-Daudé,
Daniel P. Berrangé, Laurent Vivier, Paolo Bonzini
This reverts commit c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.
glibc has fixed (in 2.36.9000-40-g774058d729) the problem
that caused a clash when both sys/mount.h annd linux/mount.h
are included, and backported this to the 2.36 stable release
too:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
It is saner for QEMU to remove the workaround it applied for
glibc 2.36 and expect distros to ship the 2.36 maint release
with the fix. This avoids needing to add a further workaround
to QEMU to deal with the fact that linux/brtfs.h now also pulls
in linux/mount.h via linux/fs.h since Linux 6.1
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
linux-user/syscall.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1f8c10f8ef..9c1e9555e1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -111,31 +111,6 @@
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
-
-#define BLKGETSIZE64 _IOR(0x12,114,size_t)
-#define BLKDISCARD _IO(0x12,119)
-#define BLKIOMIN _IO(0x12,120)
-#define BLKIOOPT _IO(0x12,121)
-#define BLKALIGNOFF _IO(0x12,122)
-#define BLKPBSZGET _IO(0x12,123)
-#define BLKDISCARDZEROES _IO(0x12,124)
-#define BLKSECDISCARD _IO(0x12,125)
-#define BLKROTATIONAL _IO(0x12,126)
-#define BLKZEROOUT _IO(0x12,127)
-
-#define FIBMAP _IO(0x00,1)
-#define FIGETBSZ _IO(0x00,2)
-
-struct file_clone_range {
- __s64 src_fd;
- __u64 src_offset;
- __u64 src_length;
- __u64 dest_offset;
-};
-
-#define FICLONE _IOW(0x94, 9, int)
-#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
-
#else
#include <linux/fs.h>
#endif
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h"
2023-01-10 17:48 [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" Daniel P. Berrangé
@ 2023-01-10 17:49 ` Daniel P. Berrangé
2023-01-11 9:55 ` [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Marc-André Lureau
2023-01-25 13:30 ` Laurent Vivier
3 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2023-01-10 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: Marc-André Lureau, Thomas Huth, Philippe Mathieu-Daudé,
Daniel P. Berrangé, Laurent Vivier, Paolo Bonzini
This reverts commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532.
glibc has fixed (in 2.36.9000-40-g774058d729) the problem
that caused a clash when both sys/mount.h annd linux/mount.h
are included, and backported this to the 2.36 stable release
too:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
It is saner for QEMU to remove the workaround it applied for
glibc 2.36 and expect distros to ship the 2.36 maint release
with the fix. This avoids needing to add a further workaround
to QEMU to deal with the fact that linux/brtfs.h now also pulls
in linux/mount.h via linux/fs.h since Linux 6.1
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
linux-user/syscall.c | 18 ------------------
meson.build | 2 --
2 files changed, 20 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9c1e9555e1..f2b7634f5e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -95,25 +95,7 @@
#include <linux/soundcard.h>
#include <linux/kd.h>
#include <linux/mtio.h>
-
-#ifdef HAVE_SYS_MOUNT_FSCONFIG
-/*
- * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
- * which in turn prevents use of linux/fs.h. So we have to
- * define the constants ourselves for now.
- */
-#define FS_IOC_GETFLAGS _IOR('f', 1, long)
-#define FS_IOC_SETFLAGS _IOW('f', 2, long)
-#define FS_IOC_GETVERSION _IOR('v', 1, long)
-#define FS_IOC_SETVERSION _IOW('v', 2, long)
-#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
-#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
-#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
-#define FS_IOC32_GETVERSION _IOR('v', 1, int)
-#define FS_IOC32_SETVERSION _IOW('v', 2, int)
-#else
#include <linux/fs.h>
-#endif
#include <linux/fd.h>
#if defined(CONFIG_FIEMAP)
#include <linux/fiemap.h>
diff --git a/meson.build b/meson.build
index 175517eafd..32fed7ea6e 100644
--- a/meson.build
+++ b/meson.build
@@ -2039,8 +2039,6 @@ config_host_data.set('HAVE_OPTRESET',
cc.has_header_symbol('getopt.h', 'optreset'))
config_host_data.set('HAVE_IPPROTO_MPTCP',
cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
-config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
- cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
# has_member
config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36
2023-01-10 17:48 [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h" Daniel P. Berrangé
@ 2023-01-11 9:55 ` Marc-André Lureau
2023-01-25 13:30 ` Laurent Vivier
3 siblings, 0 replies; 5+ messages in thread
From: Marc-André Lureau @ 2023-01-11 9:55 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Thomas Huth, Philippe Mathieu-Daudé,
Laurent Vivier, Paolo Bonzini
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
Hi
On Tue, Jan 10, 2023 at 9:49 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:
> It didn't appear that glibc was going to fix the problem
> breaking includes of linux/mount.h vs sys/mount.h, so
> QEMU applied a workaround copying the symbols/structs we
> need into a local header.
>
> Since then Linux modified linux/btrfs.h to pull in
> linux/fs.h which caused a clash with our workaround.
> Rather than invent workarounds for our workarounds,
> we can luckily just drop our previous workarounds.
> glibc has been fixed after all, and backported this
> fix to the stable 2.36 release series too. We should
> just expect distros to pull in the stable fix, which
> Fedora at least has already done.
>
> Daniel P. Berrangé (2):
> Revert "linux-user: add more compat ioctl definitions"
> Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h"
>
> linux-user/syscall.c | 43 -------------------------------------------
> meson.build | 2 --
> 2 files changed, 45 deletions(-)
>
> --
> 2.38.1
>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[-- Attachment #2: Type: text/html, Size: 1585 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36
2023-01-10 17:48 [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Daniel P. Berrangé
` (2 preceding siblings ...)
2023-01-11 9:55 ` [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Marc-André Lureau
@ 2023-01-25 13:30 ` Laurent Vivier
3 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2023-01-25 13:30 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Thomas Huth, Philippe Mathieu-Daudé,
Paolo Bonzini
Le 10/01/2023 à 18:48, Daniel P. Berrangé a écrit :
> It didn't appear that glibc was going to fix the problem
> breaking includes of linux/mount.h vs sys/mount.h, so
> QEMU applied a workaround copying the symbols/structs we
> need into a local header.
>
> Since then Linux modified linux/btrfs.h to pull in
> linux/fs.h which caused a clash with our workaround.
> Rather than invent workarounds for our workarounds,
> we can luckily just drop our previous workarounds.
> glibc has been fixed after all, and backported this
> fix to the stable 2.36 release series too. We should
> just expect distros to pull in the stable fix, which
> Fedora at least has already done.
>
> Daniel P. Berrangé (2):
> Revert "linux-user: add more compat ioctl definitions"
> Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h"
>
> linux-user/syscall.c | 43 -------------------------------------------
> meson.build | 2 --
> 2 files changed, 45 deletions(-)
>
Applied to my linux-user-for-8.0 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-25 13:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10 17:48 [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" Daniel P. Berrangé
2023-01-10 17:49 ` [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h" Daniel P. Berrangé
2023-01-11 9:55 ` [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36 Marc-André Lureau
2023-01-25 13:30 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).