* mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'?
@ 2025-05-22 13:22 Naresh Kamboju
2025-05-22 14:01 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2025-05-22 13:22 UTC (permalink / raw)
To: linux-fsdevel, linux-mips, open list, lkft-triage,
Linux Regressions
Cc: Thomas Bogendoerfer, Anders Roxell, Al Viro, Christian Brauner,
Arnd Bergmann, Dan Carpenter
Regressions on mips malta_defconfig build failed with gcc-12 on the Linux next
tag next-20250521 and next-20250522.
First seen on the next-20250521
Good: next-20250516
Bad: next-20250521
Regressions found on mips:
- build/gcc-12-malta_defconfig
Regression Analysis:
- New regression? Yes
- Reproducible? Yes
Build regression: mips gcc-12 malta_defconfig 'SOCK_COREDUMP'
undeclared (first use in this function); did you mean 'SOCK_RDM'?
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
## Build log
net/unix/af_unix.c: In function 'unix_find_bsd':
net/unix/af_unix.c:1152:21: error: 'SOCK_COREDUMP' undeclared (first
use in this function); did you mean 'SOCK_RDM'?
1152 | if (flags & SOCK_COREDUMP) {
| ^~~~~~~~~~~~~
| SOCK_RDM
fs/coredump.c: In function 'do_coredump':
fs/coredump.c:899:64: error: 'SOCK_COREDUMP' undeclared (first use in
this function); did you mean 'SOCK_RDM'?
899 | addr_len, O_NONBLOCK |
SOCK_COREDUMP);
|
^~~~~~~~~~~~~
| SOCK_RDM
fs/coredump.c:899:64: note: each undeclared identifier is reported
only once for each function it appears in
make[4]: *** [scripts/Makefile.build:203: fs/coredump.o] Error 1
## Source
* Kernel version: 6.15.0-rc7
* Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
* Git sha: 460178e842c7a1e48a06df684c66eb5fd630bcf7
* Git describe: next-20250522
## Build
* Build log: https://qa-reports.linaro.org/api/testruns/28516701/log_file/
* Build history:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250522/testrun/28516701/suite/build/test/gcc-12-malta_defconfig/history/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2xRo9ld0H5IJGyGHQxUSopFLZrU/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2xRo9ld0H5IJGyGHQxUSopFLZrU/config
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'?
2025-05-22 13:22 mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'? Naresh Kamboju
@ 2025-05-22 14:01 ` Arnd Bergmann
2025-05-23 9:03 ` Christian Brauner
2025-05-23 12:15 ` Naresh Kamboju
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-05-22 14:01 UTC (permalink / raw)
To: Naresh Kamboju, linux-fsdevel, linux-mips, open list, lkft-triage,
Linux Regressions
Cc: Thomas Bogendoerfer, Anders Roxell, Alexander Viro,
Christian Brauner, Dan Carpenter
On Thu, May 22, 2025, at 15:22, Naresh Kamboju wrote:
> ## Build log
> net/unix/af_unix.c: In function 'unix_find_bsd':
> net/unix/af_unix.c:1152:21: error: 'SOCK_COREDUMP' undeclared (first
> use in this function); did you mean 'SOCK_RDM'?
> 1152 | if (flags & SOCK_COREDUMP) {
SOCK_COREDUMP should be defined outside of ARCH_HAS_SOCKET_TYPES.
How about reducing the scope of that check like this?
Arnd
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index 4724a563c5bf..43a09f0dd3ff 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -36,15 +36,6 @@ enum sock_type {
SOCK_PACKET = 10,
};
-#define SOCK_MAX (SOCK_PACKET + 1)
-/* Mask which covers at least up to SOCK_MASK-1. The
- * * remaining bits are used as flags. */
-#define SOCK_TYPE_MASK 0xf
-
-/* Flags for socket, socketpair, paccept */
-#define SOCK_CLOEXEC O_CLOEXEC
-#define SOCK_NONBLOCK O_NONBLOCK
-
#define ARCH_HAS_SOCKET_TYPES 1
#endif /* _ASM_SOCKET_H */
diff --git a/include/linux/net.h b/include/linux/net.h
index 139c85d0f2ea..f60fff91e1df 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -70,6 +70,7 @@ enum sock_type {
SOCK_DCCP = 6,
SOCK_PACKET = 10,
};
+#endif /* ARCH_HAS_SOCKET_TYPES */
#define SOCK_MAX (SOCK_PACKET + 1)
/* Mask which covers at least up to SOCK_MASK-1. The
@@ -83,8 +84,6 @@ enum sock_type {
#endif
#define SOCK_COREDUMP O_NOCTTY
-#endif /* ARCH_HAS_SOCKET_TYPES */
-
/**
* enum sock_shutdown_cmd - Shutdown types
* @SHUT_RD: shutdown receptions
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'?
2025-05-22 14:01 ` Arnd Bergmann
@ 2025-05-23 9:03 ` Christian Brauner
2025-05-23 12:15 ` Naresh Kamboju
1 sibling, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2025-05-23 9:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Naresh Kamboju, linux-fsdevel, linux-mips, open list, lkft-triage,
Linux Regressions, Thomas Bogendoerfer, Anders Roxell,
Alexander Viro, Dan Carpenter
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
On Thu, May 22, 2025 at 04:01:53PM +0200, Arnd Bergmann wrote:
> On Thu, May 22, 2025, at 15:22, Naresh Kamboju wrote:
>
> > ## Build log
> > net/unix/af_unix.c: In function 'unix_find_bsd':
> > net/unix/af_unix.c:1152:21: error: 'SOCK_COREDUMP' undeclared (first
> > use in this function); did you mean 'SOCK_RDM'?
> > 1152 | if (flags & SOCK_COREDUMP) {
>
> SOCK_COREDUMP should be defined outside of ARCH_HAS_SOCKET_TYPES.
> How about reducing the scope of that check like this?
>
> Arnd
I applied the appended patch.
[-- Attachment #2: 0001-mips-net-ensure-that-SOCK_COREDUMP-is-defined.patch --]
[-- Type: text/x-diff, Size: 1819 bytes --]
From 4e83ae6ec87dddac070ba349d3b839589b1bb957 Mon Sep 17 00:00:00 2001
From: Christian Brauner <brauner@kernel.org>
Date: Fri, 23 May 2025 10:47:06 +0200
Subject: [PATCH] mips, net: ensure that SOCK_COREDUMP is defined
For historical reasons mips has to override the socket enum values but
the defines are all the same. So simply move the ARCH_HAS_SOCKET_TYPES
scope.
Fixes: a9194f88782a ("coredump: add coredump socket")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
arch/mips/include/asm/socket.h | 9 ---------
include/linux/net.h | 3 +--
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index 4724a563c5bf..43a09f0dd3ff 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -36,15 +36,6 @@ enum sock_type {
SOCK_PACKET = 10,
};
-#define SOCK_MAX (SOCK_PACKET + 1)
-/* Mask which covers at least up to SOCK_MASK-1. The
- * * remaining bits are used as flags. */
-#define SOCK_TYPE_MASK 0xf
-
-/* Flags for socket, socketpair, paccept */
-#define SOCK_CLOEXEC O_CLOEXEC
-#define SOCK_NONBLOCK O_NONBLOCK
-
#define ARCH_HAS_SOCKET_TYPES 1
#endif /* _ASM_SOCKET_H */
diff --git a/include/linux/net.h b/include/linux/net.h
index 139c85d0f2ea..f60fff91e1df 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -70,6 +70,7 @@ enum sock_type {
SOCK_DCCP = 6,
SOCK_PACKET = 10,
};
+#endif /* ARCH_HAS_SOCKET_TYPES */
#define SOCK_MAX (SOCK_PACKET + 1)
/* Mask which covers at least up to SOCK_MASK-1. The
@@ -83,8 +84,6 @@ enum sock_type {
#endif
#define SOCK_COREDUMP O_NOCTTY
-#endif /* ARCH_HAS_SOCKET_TYPES */
-
/**
* enum sock_shutdown_cmd - Shutdown types
* @SHUT_RD: shutdown receptions
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'?
2025-05-22 14:01 ` Arnd Bergmann
2025-05-23 9:03 ` Christian Brauner
@ 2025-05-23 12:15 ` Naresh Kamboju
1 sibling, 0 replies; 4+ messages in thread
From: Naresh Kamboju @ 2025-05-23 12:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-fsdevel, linux-mips, open list, lkft-triage,
Linux Regressions, Thomas Bogendoerfer, Anders Roxell,
Alexander Viro, Christian Brauner, Dan Carpenter
Hi Arnd,
On Thu, 22 May 2025 at 19:32, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, May 22, 2025, at 15:22, Naresh Kamboju wrote:
>
> > ## Build log
> > net/unix/af_unix.c: In function 'unix_find_bsd':
> > net/unix/af_unix.c:1152:21: error: 'SOCK_COREDUMP' undeclared (first
> > use in this function); did you mean 'SOCK_RDM'?
> > 1152 | if (flags & SOCK_COREDUMP) {
>
> SOCK_COREDUMP should be defined outside of ARCH_HAS_SOCKET_TYPES.
> How about reducing the scope of that check like this?
>
> Arnd
>
Thanks for sharing a quick fix patch.
This below patch is applied and build test pass.
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
> index 4724a563c5bf..43a09f0dd3ff 100644
> --- a/arch/mips/include/asm/socket.h
> +++ b/arch/mips/include/asm/socket.h
> @@ -36,15 +36,6 @@ enum sock_type {
> SOCK_PACKET = 10,
> };
>
> -#define SOCK_MAX (SOCK_PACKET + 1)
> -/* Mask which covers at least up to SOCK_MASK-1. The
> - * * remaining bits are used as flags. */
> -#define SOCK_TYPE_MASK 0xf
> -
> -/* Flags for socket, socketpair, paccept */
> -#define SOCK_CLOEXEC O_CLOEXEC
> -#define SOCK_NONBLOCK O_NONBLOCK
> -
> #define ARCH_HAS_SOCKET_TYPES 1
>
> #endif /* _ASM_SOCKET_H */
> diff --git a/include/linux/net.h b/include/linux/net.h
> index 139c85d0f2ea..f60fff91e1df 100644
> --- a/include/linux/net.h
> +++ b/include/linux/net.h
> @@ -70,6 +70,7 @@ enum sock_type {
> SOCK_DCCP = 6,
> SOCK_PACKET = 10,
> };
> +#endif /* ARCH_HAS_SOCKET_TYPES */
>
> #define SOCK_MAX (SOCK_PACKET + 1)
> /* Mask which covers at least up to SOCK_MASK-1. The
> @@ -83,8 +84,6 @@ enum sock_type {
> #endif
> #define SOCK_COREDUMP O_NOCTTY
>
> -#endif /* ARCH_HAS_SOCKET_TYPES */
> -
> /**
> * enum sock_shutdown_cmd - Shutdown types
> * @SHUT_RD: shutdown receptions
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-23 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 13:22 mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'? Naresh Kamboju
2025-05-22 14:01 ` Arnd Bergmann
2025-05-23 9:03 ` Christian Brauner
2025-05-23 12:15 ` Naresh Kamboju
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).