Hi,
I'm having troubles compiling the Ubuntu dapper 2.6.15 kernel
with vserver patch 2.0.2-rc18
I'm starting with the 2.6.15-vs2.0.2-rc13 vserver patch
and use interdiff to catch up with the latest vserver 2.0.2-rc18
This has worked without bigger problems so far - but with
the latest 2.0.2-rc18 interdiff compiling fails quickly in
include/linux/sched.h
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-x86_64
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/x86_64/kernel/asm-offsets.s
In file included from arch/x86_64/kernel/asm-offsets.c:7:
include/linux/sched.h:1141: error: syntax error before '||' token
make[2]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory
`/home/debuild/dapper/linux-vserver-2.6.15/linux-source-2.6.15-2.6.15/debian/build/linux-source-2.6.15'
make: *** [build] Error 2
debuild: fatal error at line 768:
dpkg-buildpackage failed!
The problem is the vxcapable fix in rc18
--- linux-2.6.16.8-vs2.0.2-rc17/include/linux/vs_base.h 2006-03-20
17:34:50 +0100
+++ linux-2.6.16.11-vs2.0.2-rc18/include/linux/vs_base.h
2006-04-28 02:00:37 +0200
@@ -97,6 +97,9 @@
(current->vx_info && \
(current->vx_info->vx_initpid == (n)))
+#define vx_capable(b,c) (capable(b) || \
+ ((current->euid == 0) && vx_ccaps(c)))
+
vx_capable is replaced by a macro but on my system include/linux/sched.h
still contains a function definition from the 2.6.15-vs2.0.2-rc13 patch
(maybe a problem with my interdiffs)
@@ -1105,15 +1125,28 @@ static inline int sas_ss_flags(unsigned
#ifdef CONFIG_SECURITY
/* code is in security.c */
extern int capable(int cap);
+extern int vx_capable(int cap, int ccap);
#else
static inline int capable(int cap)
{
+ if (vx_check_bit(VXC_CAP_MASK, cap) && !vx_mcaps(1L << cap))
+ return 0;
if (cap_raised(current->cap_effective, cap)) {
current->flags |= PF_SUPERPRIV;
return 1;
}
return 0;
}
+
+static inline int vx_capable(int cap, int ccap)
+{
+ if (cap_raised(current->cap_effective, cap) &&
+ vx_ccaps(ccap)) {
+ current->flags |= PF_SUPERPRIV;
+ return 1;
+ }
+ return 0;
+}
#endif
When I remove the "static inline int vx_capable" declaration and
definition from sched.h the kernel compiles again.
Could somebody please tell me:
* is it ok to simply remove the
"static inline int vx_capable function" from sched.h ?
* but the patch from above to "inline int capable" must be kept ?
static inline int capable(int cap)
{
+ if (vx_check_bit(VXC_CAP_MASK, cap) && !vx_mcaps(1L << cap))
+ return 0;
if (cap_raised(current->cap_effective, cap)) {
Thanks,
Gerald
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed May 3 16:12:01 2006