NFS-client patch [message #2985] |
Fri, 05 May 2006 05:04 |
Groening
Messages: 2 Registered: March 2006 Location: Russia, Khabarovsk
|
Junior Member |
|
|
We have a patch by dev to make NFS-client work in VPS:
diff -r -u linux-2.6.16-ovz/arch/i386/kernel/process.c linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c
--- linux-2.6.16-ovz/arch/i386/kernel/process.c 2006-04-14 12:53:49.000000000 +0000
+++ linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c 2006-04-14 13:01:23.000000000 +0000
@@ -341,13 +341,6 @@
{
struct pt_regs regs;
- /* Don't allow kernel_thread() inside VE */
- if (!ve_is_super(get_exec_env())) {
- printk("kernel_thread call inside VE\n");
- dump_stack();
- return -EPERM;
- }
-
memset(®s, 0, sizeof(regs));
regs.ebx = (unsigned long) fn;
diff -r -u linux-2.6.16-ovz/fs/nfs/inode.c linux-2.6.16-ovz_with_nfs/fs/nfs/inode.c
--- linux-2.6.16-ovz/fs/nfs/inode.c 2006-04-14 12:53:17.000000000 +0000
+++ linux-2.6.16-ovz_with_nfs/fs/nfs/inode.c 2006-04-14 12:58:40.000000000 +0000
@@ -1721,7 +1721,7 @@
.name = "nfs",
.get_sb = nfs_get_sb,
.kill_sb = nfs_kill_super,
- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
+ .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA|FS_VIRTUALIZED,
};
#ifdef CONFIG_NFS_V4
diff -r -u linux-2.6.16-ovz/kernel/exit.c linux-2.6.16-ovz_with_nfs/kernel/exit.c
--- linux-2.6.16-ovz/kernel/exit.c 2006-04-14 12:53:49.000000000 +0000
+++ linux-2.6.16-ovz_with_nfs/kernel/exit.c 2006-04-14 13:00:32.000000000 +0000
@@ -276,9 +276,6 @@
{
struct task_struct *curr = current->group_leader;
- WARN_ON(is_virtual_pid(pgrp));
- WARN_ON(is_virtual_pid(session));
-
if (curr->signal->session != session) {
detach_pid(curr, PIDTYPE_SID);
curr->signal->session = session;
diff -r -u linux-2.6.16-ovz/net/sunrpc/rpc_pipe.c linux-2.6.16-ovz_with_nfs/net/sunrpc/rpc_pipe.c
--- linux-2.6.16-ovz/net/sunrpc/rpc_pipe.c 2006-04-14 12:53:20.000000000 +0000
+++ linux-2.6.16-ovz_with_nfs/net/sunrpc/rpc_pipe.c 2006-04-14 12:59:46.000000000 +0000
@@ -824,6 +824,7 @@
.name = "rpc_pipefs",
.get_sb = rpc_get_sb,
.kill_sb = kill_litter_super,
+ .fs_flags = FS_VIRTUALIZED,
};
static void
and this work, but if we apply patch where will be removed piece:
diff -r -u linux-2.6.16-ovz/arch/i386/kernel/process.c linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c
--- linux-2.6.16-ovz/arch/i386/kernel/process.c 2006-04-14 12:53:49.000000000 +0000
+++ linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c 2006-04-14 13:01:23.000000000 +0000
@@ -341,13 +341,6 @@
{
struct pt_regs regs;
- /* Don't allow kernel_thread() inside VE */
- if (!ve_is_super(get_exec_env())) {
- printk("kernel_thread call inside VE\n");
- dump_stack();
- return -EPERM;
- }
-
memset(®s, 0, sizeof(regs));
regs.ebx = (unsigned long) fn;
this patch also will be works.
Attention! Questions:
1) If this patch work, why it don't included in distrbutive?
2) Why if we removed piece, which turn on kernel threads in VPS, this patch is also works?
3) And why in openvz turned off kernel threads? (more technical details please)
|
|
|
Re: NFS-client patch [message #2988 is a reply to message #2985] |
Fri, 05 May 2006 06:11 |
Vasily Tarasov
Messages: 1345 Registered: January 2006
|
Senior Member |
|
|
> 2) Why if we removed piece, which turn on kernel threads in VPS, this patch is also works?
This patch was ported from 2.4 kernel, and there it's neccesary for nfs to run kernel threads.
> 3) And why in openvz turned off kernel threads? (more technical details please)
AFAIK, for security reasons.
|
|
|