Skip to contentSkip to conversation

Fix compile for CONFIG_SYSVIPC=n or CONFIG_SYSCTL=n

PATCH In review Stephen Rothwell 2 participants 2 messages Feb 20, 2006 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw

PATCH 1/1 Fix compile for CONFIG_SYSVIPC=n or CONFIG_SYSCTL=n

In reply to a message not in the archive

The compat syscalls are added to sys_ni.c since they are not defined if the above CONFIG options are off. Also, nfs would not build with CONFIG_SYSCTL off.

Noticed by Arthur Othieno.

---

 include/linux/nfs_fs.h |    2 +-
 kernel/sys_ni.c        |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
Quoted 7 lines · On Sun, 19 Feb 2006 22:52:31 +1100 Paul Mackerras <[email protected]> wrote:
Quoted 4 lines · Arthur Othieno
arch/powerpc/kernel/sys_ppc32.c +0 -0
@@ -440,7 +440,13 @@ long compat_sys_ipc(u32 call, u32 first,
 
Quoted 13 lines

arch/powerpc/kernel/sys_ppc32.c long compat_sys_ipc(u32 call, u32 first, · line 449

Quoted 10 lines
arch/powerpc/kernel/sys_ppc32.c +7 -1
 	return -ENOSYS;
 }
-#endif
+#else
+long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
+	       u32 fifth)
+{
+	return -ENOSYS;
+}
+#endif /* CONFIG_SYSVIPC */

Can't we just add a couple of cond_syscall lines to kernel/sys_ni.c instead?

Linus, can we have this applied for 2.6.16. It presumably affects sparc64 (at least for CONFIG_SYSVIPC) as well as powerpc. The NFS fix would affect all architectures, I think?

This has been compile tested with the CONFIG options on and off for powerpc.

Signature · 5 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

c1a27bc400a1412c7c758775bb695e8b98d1c0c3
include/linux/nfs_fs.h +1 -1
index 547d649..b4dc6e2 100644
@@ -398,7 +398,7 @@ extern struct inode_operations nfs_symli
 extern int nfs_register_sysctl(void);
 extern void nfs_unregister_sysctl(void);
 #else
-#define nfs_register_sysctl() do { } while(0)
+#define nfs_register_sysctl() 0
 #define nfs_unregister_sysctl() do { } while(0)
 #endif
 
kernel/sys_ni.c +2 -0
index 17313b9..1067090 100644
@@ -104,6 +104,8 @@ cond_syscall(sys_setreuid16);
 cond_syscall(sys_setuid16);
 cond_syscall(sys_vm86old);
 cond_syscall(sys_vm86);
+cond_syscall(compat_sys_ipc);
+cond_syscall(compat_sys_sysctl);
 
 /* arch-specific weak syscall entries */
 cond_syscall(sys_pciconfig_read);
Signature · 1 line
1.2.1
Acked-by on v1 1/1
#3 lore raw
Quoted 7 lines · Stephen Rothwell

The compat syscalls are added to sys_ni.c since they are not defined if the above CONFIG options are off. Also, nfs would not build with CONFIG_SYSCTL off.

Noticed by Arthur Othieno.

Looks good, thanks ;-)

Quoted 68 lines

---

 include/linux/nfs_fs.h |    2 +-
 kernel/sys_ni.c        |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
Quoted 7 lines · On Sun, 19 Feb 2006 22:52:31 +1100 Paul Mackerras <[email protected]> wrote:
Quoted 4 lines · Arthur Othieno
arch/powerpc/kernel/sys_ppc32.c +0 -0
@@ -440,7 +440,13 @@ long compat_sys_ipc(u32 call, u32 first,
 
Quoted 13 lines

arch/powerpc/kernel/sys_ppc32.c long compat_sys_ipc(u32 call, u32 first, · line 449

Quoted 10 lines
arch/powerpc/kernel/sys_ppc32.c +7 -1
 	return -ENOSYS;
 }
-#endif
+#else
+long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
+	       u32 fifth)
+{
+	return -ENOSYS;
+}
+#endif /* CONFIG_SYSVIPC */

Can't we just add a couple of cond_syscall lines to kernel/sys_ni.c instead?

Linus, can we have this applied for 2.6.16. It presumably affects sparc64 (at least for CONFIG_SYSVIPC) as well as powerpc. The NFS fix would affect all architectures, I think?

This has been compile tested with the CONFIG options on and off for powerpc.

Signature · 5 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

c1a27bc400a1412c7c758775bb695e8b98d1c0c3
include/linux/nfs_fs.h +1 -1
index 547d649..b4dc6e2 100644
@@ -398,7 +398,7 @@ extern struct inode_operations nfs_symli
 extern int nfs_register_sysctl(void);
 extern void nfs_unregister_sysctl(void);
 #else
-#define nfs_register_sysctl() do { } while(0)
+#define nfs_register_sysctl() 0
 #define nfs_unregister_sysctl() do { } while(0)
 #endif
 
kernel/sys_ni.c +2 -0
index 17313b9..1067090 100644
@@ -104,6 +104,8 @@ cond_syscall(sys_setreuid16);
 cond_syscall(sys_setuid16);
 cond_syscall(sys_vm86old);
 cond_syscall(sys_vm86);
+cond_syscall(compat_sys_ipc);
+cond_syscall(compat_sys_sysctl);
 
 /* arch-specific weak syscall entries */
 cond_syscall(sys_pciconfig_read);
Signature · 1 line
1.2.1