* linux-next: build failure after merge of the pidfd tree
@ 2020-05-12 10:18 Stephen Rothwell
2020-05-12 10:20 ` Christian Brauner
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2020-05-12 10:18 UTC (permalink / raw)
To: Christian Brauner; +Cc: Linux Next Mailing List, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]
Hi all,
After merging the pidfd tree, today's linux-next build (x86_64
allnoconfig) failed like this:
fs/nsfs.c:232:6: error: redefinition of 'proc_ns_file'
232 | bool proc_ns_file(const struct file *file)
| ^~~~~~~~~~~~
In file included from fs/nsfs.c:6:
include/linux/proc_fs.h:194:20: note: previous definition of 'proc_ns_file' was here
194 | static inline bool proc_ns_file(const struct file *file)
| ^~~~~~~~~~~~
Caused by commit
1e76b8ad203a ("nsproxy: attach to namespaces via pidfds")
I have applied the following hack for today:
From 07065344c6fb39c440b0de5f75842066bc97a675 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 May 2020 20:08:51 +1000
Subject: [PATCH] nsproxy: protect proc_ns_file() when CONFIG_PROC_FS is not set
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
fs/nsfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nsfs.c b/fs/nsfs.c
index 800c1d0eb0d0..9215ad7597d6 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -229,10 +229,12 @@ int ns_get_name(char *buf, size_t size, struct task_struct *task,
return res;
}
+#ifdef CONFIG_PROC_FS
bool proc_ns_file(const struct file *file)
{
return file->f_op == &ns_file_operations;
}
+#endif
struct file *proc_ns_fget(int fd)
{
--
2.26.2
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the pidfd tree
2020-05-12 10:18 linux-next: build failure after merge of the pidfd tree Stephen Rothwell
@ 2020-05-12 10:20 ` Christian Brauner
2020-05-12 10:28 ` Christian Brauner
0 siblings, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2020-05-12 10:20 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christian Brauner, Linux Next Mailing List, Linux Kernel Mailing List
On Tue, May 12, 2020 at 08:18:11PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the pidfd tree, today's linux-next build (x86_64
> allnoconfig) failed like this:
>
> fs/nsfs.c:232:6: error: redefinition of 'proc_ns_file'
> 232 | bool proc_ns_file(const struct file *file)
> | ^~~~~~~~~~~~
> In file included from fs/nsfs.c:6:
> include/linux/proc_fs.h:194:20: note: previous definition of 'proc_ns_file' was here
> 194 | static inline bool proc_ns_file(const struct file *file)
> | ^~~~~~~~~~~~
>
> Caused by commit
>
> 1e76b8ad203a ("nsproxy: attach to namespaces via pidfds")
>
> I have applied the following hack for today:
Thanks for spotting this. I'll fix this now.
Christian
>
> From 07065344c6fb39c440b0de5f75842066bc97a675 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 12 May 2020 20:08:51 +1000
> Subject: [PATCH] nsproxy: protect proc_ns_file() when CONFIG_PROC_FS is not set
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> fs/nsfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/nsfs.c b/fs/nsfs.c
> index 800c1d0eb0d0..9215ad7597d6 100644
> --- a/fs/nsfs.c
> +++ b/fs/nsfs.c
> @@ -229,10 +229,12 @@ int ns_get_name(char *buf, size_t size, struct task_struct *task,
> return res;
> }
>
> +#ifdef CONFIG_PROC_FS
> bool proc_ns_file(const struct file *file)
> {
> return file->f_op == &ns_file_operations;
> }
> +#endif
>
> struct file *proc_ns_fget(int fd)
> {
> --
> 2.26.2
>
> --
> Cheers,
> Stephen Rothwell
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the pidfd tree
2020-05-12 10:20 ` Christian Brauner
@ 2020-05-12 10:28 ` Christian Brauner
0 siblings, 0 replies; 6+ messages in thread
From: Christian Brauner @ 2020-05-12 10:28 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christian Brauner, Linux Next Mailing List, Linux Kernel Mailing List
On Tue, May 12, 2020 at 12:20:24PM +0200, Christian Brauner wrote:
> On Tue, May 12, 2020 at 08:18:11PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the pidfd tree, today's linux-next build (x86_64
> > allnoconfig) failed like this:
> >
> > fs/nsfs.c:232:6: error: redefinition of 'proc_ns_file'
> > 232 | bool proc_ns_file(const struct file *file)
> > | ^~~~~~~~~~~~
> > In file included from fs/nsfs.c:6:
> > include/linux/proc_fs.h:194:20: note: previous definition of 'proc_ns_file' was here
> > 194 | static inline bool proc_ns_file(const struct file *file)
> > | ^~~~~~~~~~~~
> >
> > Caused by commit
> >
> > 1e76b8ad203a ("nsproxy: attach to namespaces via pidfds")
> >
> > I have applied the following hack for today:
>
> Thanks for spotting this. I'll fix this now.
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index acfd5012db4e..592a6e47b235 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -70,7 +70,7 @@ struct proc_dir_entry *proc_create_single_data(const char *name, umode_t mode,
int (*show)(struct seq_file *, void *), void *data);
#define proc_create_single(name, mode, parent, show) \
proc_create_single_data(name, mode, parent, show, NULL)
-
+
extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
struct proc_dir_entry *,
const struct proc_ops *,
@@ -104,7 +104,6 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo
proc_write_t write,
void *data);
extern struct pid *tgid_pidfd_to_pid(const struct file *file);
-extern bool proc_ns_file(const struct file *file);
#ifdef CONFIG_PROC_PID_ARCH_STATUS
/*
@@ -160,11 +159,6 @@ static inline struct pid *tgid_pidfd_to_pid(const struct file *file)
return ERR_PTR(-EBADF);
}
-static inline bool proc_ns_file(const struct file *file)
-{
- return false;
-}
-
#endif /* CONFIG_PROC_FS */
struct net;
@@ -185,4 +179,6 @@ static inline struct pid_namespace *proc_pid_ns(const struct inode *inode)
return inode->i_sb->s_fs_info;
}
+bool proc_ns_file(const struct file *file);
+
#endif /* _LINUX_PROC_FS_H */
should fix it cleanly.
Thanks, I've added an allnoconfig to my local tests now!
Christian
^ permalink raw reply related [flat|nested] 6+ messages in thread
* linux-next: build failure after merge of the pidfd tree
@ 2019-03-28 2:04 Stephen Rothwell
2019-03-28 2:28 ` Christian Brauner
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-03-28 2:04 UTC (permalink / raw)
To: Christian Brauner; +Cc: Linux Next Mailing List, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 2571 bytes --]
Hi Christian,
After merging the pidfd tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
kernel/pid.c: In function '__do_sys_pidfd_open':
kernel/pid.c:652:7: error: 'fd' redeclared as different kind of symbol
long fd = -EINVAL;
^~
In file included from kernel/pid.c:40:
kernel/pid.c:649:46: note: previous definition of 'fd' was here
SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
~~~~~^~
include/linux/syscalls.h:117:27: note: in definition of macro '__SC_DECL'
#define __SC_DECL(t, a) t a
^
include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP3'
#define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP4'
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
^~~~~
include/linux/syscalls.h:253:36: note: in expansion of macro '__MAP'
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
^~~~~
include/linux/syscalls.h:226:2: note: in expansion of macro '__SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~
include/linux/syscalls.h:218:36: note: in expansion of macro 'SYSCALL_DEFINEx'
#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~
kernel/pid.c:649:1: note: in expansion of macro 'SYSCALL_DEFINE4'
SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
^~~~~~~~~~~~~~~
kernel/pid.c:663:7: error: 'procfd' undeclared (first use in this function); did you mean 'pidfd'?
if (procfd != -1 || pidfd != -1)
^~~~~~
pidfd
kernel/pid.c:663:7: note: each undeclared identifier is reported only once for each function it appears in
Caused by commit
9170fba40db0 ("pid: add pidfd_open()")
I have used the version of the pifd tree from next-20190327 for today.
Please do *not* use linux-next as a development tree (I have seen several
different version of this code over the past few days :-(). The rules
for linux-next included code include:
"
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.
Basically, this should be just what you would send to Linus (or ask him
to fetch)."
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the pidfd tree
2019-03-28 2:04 Stephen Rothwell
@ 2019-03-28 2:28 ` Christian Brauner
2019-03-28 2:57 ` Stephen Rothwell
0 siblings, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2019-03-28 2:28 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Linux Next Mailing List, Linux Kernel Mailing List
On March 28, 2019 3:04:49 AM GMT+01:00, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>Hi Christian,
>
>After merging the pidfd tree, today's linux-next build (arm
>multi_v7_defconfig) failed like this:
>
>kernel/pid.c: In function '__do_sys_pidfd_open':
>kernel/pid.c:652:7: error: 'fd' redeclared as different kind of symbol
> long fd = -EINVAL;
> ^~
>In file included from kernel/pid.c:40:
>kernel/pid.c:649:46: note: previous definition of 'fd' was here
> SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
> ~~~~~^~
>include/linux/syscalls.h:117:27: note: in definition of macro
>'__SC_DECL'
> #define __SC_DECL(t, a) t a
> ^
>include/linux/syscalls.h:112:35: note: in expansion of macro '__MAP3'
> #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__)
> ^~~~~~
>include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP4'
> #define __MAP(n,...) __MAP##n(__VA_ARGS__)
> ^~~~~
>include/linux/syscalls.h:253:36: note: in expansion of macro '__MAP'
> static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
> ^~~~~
>include/linux/syscalls.h:226:2: note: in expansion of macro
>'__SYSCALL_DEFINEx'
> __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
> ^~~~~~~~~~~~~~~~~
>include/linux/syscalls.h:218:36: note: in expansion of macro
>'SYSCALL_DEFINEx'
>#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name,
>__VA_ARGS__)
> ^~~~~~~~~~~~~~~
>kernel/pid.c:649:1: note: in expansion of macro 'SYSCALL_DEFINE4'
> SYSCALL_DEFINE4(pidfd_open, pid_t, pid, int, fd, int, pidfd,
> ^~~~~~~~~~~~~~~
>kernel/pid.c:663:7: error: 'procfd' undeclared (first use in this
>function); did you mean 'pidfd'?
> if (procfd != -1 || pidfd != -1)
> ^~~~~~
> pidfd
>kernel/pid.c:663:7: note: each undeclared identifier is reported only
>once for each function it appears in
>
>Caused by commit
>
> 9170fba40db0 ("pid: add pidfd_open()")
>
>I have used the version of the pifd tree from next-20190327 for today.
>
>Please do *not* use linux-next as a development tree (I have seen
>several
>different version of this code over the past few days :-(). The rules
>for linux-next included code include:
>"
> * posted to the relevant mailing list,
> * reviewed by you (or another maintainer of your subsystem tree),
> * successfully unit tested, and
> * destined for the current or next Linux merge window.
>
>Basically, this should be just what you would send to Linus (or ask him
>to fetch)."
Yeah, that should not have ended up there.
This was caused by a faulty regex in my push script that pushes to different servers.
One of them always builds a kernel and runs the tests that come with all patches on the for-next and work branches.
Sorry about that. Should be fixed now.
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-12 10:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 10:18 linux-next: build failure after merge of the pidfd tree Stephen Rothwell
2020-05-12 10:20 ` Christian Brauner
2020-05-12 10:28 ` Christian Brauner
-- strict thread matches above, loose matches on Subject: below --
2019-03-28 2:04 Stephen Rothwell
2019-03-28 2:28 ` Christian Brauner
2019-03-28 2:57 ` Stephen Rothwell
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).