On Wed, May 19, 2021 at 10:33 PM Arnd Bergmann <arnd@xxxxxxxx> wrote: > > --- a/net/ethtool/ioctl.c > +++ b/net/ethtool/ioctl.c > @@ -810,7 +810,7 @@ static noinline_for_stack int > ethtool_get_sset_info(struct net_device *dev, > > static bool ethtool_translate_compat(void) > { > -#ifdef CONFIG_X86_64 > +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) > /* On x86, translation is needed for i386 but not x32 */ > return in_ia32_syscall(); > #else No, that wouldn't work either, as that triggers the BUILD_BUG_ON() for UML. This is getting rather ugly but hopefully covers all cases: diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index dd09e6aceae1..c323bbfa97b3 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -811,8 +811,10 @@ static noinline_for_stack int ethtool_get_sset_info(struct net_device *dev, static bool ethtool_translate_compat(void) { #ifdef CONFIG_X86_64 +#ifdef CONFIG_COMPAT /* On x86, translation is needed for i386 but not x32 */ return in_ia32_syscall(); +#endif #else BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) != sizeof(struct ethtool_rxnfc)); Arnd