* [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-19 20:08 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-05-19 20:08 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: kbuild-all, linux-arch, Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git compat-alloc-user-space-9
head: c20b182ddc8032c63c381bf868f99222bab89537
commit: 5cbe995d81d1ea310babe2c123bf1a40dff25e46 [6/41] ethtool: improve compat ioctl handling
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=5cbe995d81d1ea310babe2c123bf1a40dff25e46
git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
git fetch --no-tags asm-generic compat-alloc-user-space-9
git checkout 5cbe995d81d1ea310babe2c123bf1a40dff25e46
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
net/ethtool/ioctl.c: In function 'ethtool_translate_compat':
>> net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
815 | return in_ia32_syscall();
| ^~~~~~~~~~~~~~~
| in_compat_syscall
cc1: some warnings being treated as errors
vim +815 net/ethtool/ioctl.c
810
811 static bool ethtool_translate_compat(void)
812 {
813 #ifdef CONFIG_X86_64
814 /* On x86, translation is needed for i386 but not x32 */
> 815 return in_ia32_syscall();
816 #else
817 BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
818 sizeof(struct ethtool_rxnfc));
819 #endif
820 return false;
821 }
822
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24499 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-19 20:08 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-05-19 20:08 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1902 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git compat-alloc-user-space-9
head: c20b182ddc8032c63c381bf868f99222bab89537
commit: 5cbe995d81d1ea310babe2c123bf1a40dff25e46 [6/41] ethtool: improve compat ioctl handling
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=5cbe995d81d1ea310babe2c123bf1a40dff25e46
git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
git fetch --no-tags asm-generic compat-alloc-user-space-9
git checkout 5cbe995d81d1ea310babe2c123bf1a40dff25e46
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
net/ethtool/ioctl.c: In function 'ethtool_translate_compat':
>> net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
815 | return in_ia32_syscall();
| ^~~~~~~~~~~~~~~
| in_compat_syscall
cc1: some warnings being treated as errors
vim +815 net/ethtool/ioctl.c
810
811 static bool ethtool_translate_compat(void)
812 {
813 #ifdef CONFIG_X86_64
814 /* On x86, translation is needed for i386 but not x32 */
> 815 return in_ia32_syscall();
816 #else
817 BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
818 sizeof(struct ethtool_rxnfc));
819 #endif
820 return false;
821 }
822
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24499 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
2021-05-19 20:08 ` kernel test robot
@ 2021-05-19 20:33 ` Arnd Bergmann
-1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-19 20:33 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-arch, Christoph Hellwig
On Wed, May 19, 2021 at 10:08 PM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git compat-alloc-user-space-9
> head: c20b182ddc8032c63c381bf868f99222bab89537
> commit: 5cbe995d81d1ea310babe2c123bf1a40dff25e46 [6/41] ethtool: improve compat ioctl handling
> config: um-allmodconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=5cbe995d81d1ea310babe2c123bf1a40dff25e46
> git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
> git fetch --no-tags asm-generic compat-alloc-user-space-9
> git checkout 5cbe995d81d1ea310babe2c123bf1a40dff25e46
> # save the attached .config to linux build tree
> make W=1 ARCH=um
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> net/ethtool/ioctl.c: In function 'ethtool_translate_compat':
> >> net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
> 815 | return in_ia32_syscall();
> | ^~~~~~~~~~~~~~~
> | in_compat_syscall
> cc1: some warnings being treated as errors
>
>
> vim +815 net/ethtool/ioctl.c
>
> 810
> 811 static bool ethtool_translate_compat(void)
> 812 {
> 813 #ifdef CONFIG_X86_64
> 814 /* On x86, translation is needed for i386 but not x32 */
> > 815 return in_ia32_syscall();
> 816 #else
> 817 BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
> 818 sizeof(struct ethtool_rxnfc));
> 819 #endif
I never noticed that uml sets CONFIG_X86_64, but that makes sense.
Changing the check to
--- 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
Arnd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-19 20:33 ` Arnd Bergmann
0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-19 20:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]
On Wed, May 19, 2021 at 10:08 PM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git compat-alloc-user-space-9
> head: c20b182ddc8032c63c381bf868f99222bab89537
> commit: 5cbe995d81d1ea310babe2c123bf1a40dff25e46 [6/41] ethtool: improve compat ioctl handling
> config: um-allmodconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=5cbe995d81d1ea310babe2c123bf1a40dff25e46
> git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
> git fetch --no-tags asm-generic compat-alloc-user-space-9
> git checkout 5cbe995d81d1ea310babe2c123bf1a40dff25e46
> # save the attached .config to linux build tree
> make W=1 ARCH=um
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> net/ethtool/ioctl.c: In function 'ethtool_translate_compat':
> >> net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
> 815 | return in_ia32_syscall();
> | ^~~~~~~~~~~~~~~
> | in_compat_syscall
> cc1: some warnings being treated as errors
>
>
> vim +815 net/ethtool/ioctl.c
>
> 810
> 811 static bool ethtool_translate_compat(void)
> 812 {
> 813 #ifdef CONFIG_X86_64
> 814 /* On x86, translation is needed for i386 but not x32 */
> > 815 return in_ia32_syscall();
> 816 #else
> 817 BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
> 818 sizeof(struct ethtool_rxnfc));
> 819 #endif
I never noticed that uml sets CONFIG_X86_64, but that makes sense.
Changing the check to
--- 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
Arnd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
2021-05-19 20:33 ` Arnd Bergmann
@ 2021-05-19 20:39 ` Arnd Bergmann
-1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-19 20:39 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-arch, Christoph Hellwig
On Wed, May 19, 2021 at 10:33 PM Arnd Bergmann <arnd@arndb.de> 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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-19 20:39 ` Arnd Bergmann
0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-19 20:39 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]
On Wed, May 19, 2021 at 10:33 PM Arnd Bergmann <arnd@arndb.de> 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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
2021-05-19 20:33 ` Arnd Bergmann
@ 2021-05-20 5:19 ` Christoph Hellwig
-1 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2021-05-20 5:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: kernel test robot, kbuild-all, linux-arch, Christoph Hellwig
On Wed, May 19, 2021 at 10:33:08PM +0200, Arnd Bergmann wrote:
> 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
Please just use compat_need_64bit_alignment_fixup() instead.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-20 5:19 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2021-05-20 5:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Wed, May 19, 2021 at 10:33:08PM +0200, Arnd Bergmann wrote:
> 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
Please just use compat_need_64bit_alignment_fixup() instead.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
2021-05-20 5:19 ` Christoph Hellwig
@ 2021-05-20 7:30 ` Arnd Bergmann
-1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-20 7:30 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: kernel test robot, kbuild-all, linux-arch
On Thu, May 20, 2021 at 7:19 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, May 19, 2021 at 10:33:08PM +0200, Arnd Bergmann wrote:
> > 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
>
> Please just use compat_need_64bit_alignment_fixup() instead.
Ah perfect, thanks for adding that interface.
Arnd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'?
@ 2021-05-20 7:30 ` Arnd Bergmann
0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-05-20 7:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
On Thu, May 20, 2021 at 7:19 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, May 19, 2021 at 10:33:08PM +0200, Arnd Bergmann wrote:
> > 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
>
> Please just use compat_need_64bit_alignment_fixup() instead.
Ah perfect, thanks for adding that interface.
Arnd
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-05-20 7:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 20:08 [asm-generic:compat-alloc-user-space-9 6/41] net/ethtool/ioctl.c:815:9: error: implicit declaration of function 'in_ia32_syscall'; did you mean 'in_compat_syscall'? kernel test robot
2021-05-19 20:08 ` kernel test robot
2021-05-19 20:33 ` Arnd Bergmann
2021-05-19 20:33 ` Arnd Bergmann
2021-05-19 20:39 ` Arnd Bergmann
2021-05-19 20:39 ` Arnd Bergmann
2021-05-20 5:19 ` Christoph Hellwig
2021-05-20 5:19 ` Christoph Hellwig
2021-05-20 7:30 ` Arnd Bergmann
2021-05-20 7:30 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.