* [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel?
@ 2013-02-19 10:55 Jacek Konieczny
2013-02-19 11:40 ` [Cluster-devel] [PATCH] dlm: Allow 64-bit request when CONFIG_COMPAT is on Jacek Konieczny
2013-02-25 16:11 ` [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? David Teigland
0 siblings, 2 replies; 3+ messages in thread
From: Jacek Konieczny @ 2013-02-19 10:55 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
I have recently upgraded my development cluster from 3.6.x to 3.7.1
kernel and clvmd stopped working (all locking operation result in 'Invalid
argument'). I have traced the problem to this call:
write(8, "\6\0\0\0\0\0\0\0\1\0\0\0\1\1\0\0\5@\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\320\307\351\326\277\177\0\0\20\17\36\331\277\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\313\351\326\277\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Hlk5NeaVF0qhDF20RBq61EZaIj5yyUJgWxxs4ntZedP34Rj3E2wadZfVwtOcvpKb", 184) = -1 EINVAL (Invalid argument)
Kernel sources show only a few conditions which can result in the EINVAL error
and the one introduced by the 'dlm: check the maximum size of a request from
user' patch seemed suspicious to me.
The commit: http://git.kernel.org/?p=linux/kernel/git/teigland/linux-dlm.git;a=commitdiff;h=2b75bc9121e54e22537207b47b71373bcb0be41c
Should a 64-bit kernel really refuse requests using the 64-bit
dlm_write_request struct when compiled with CONFIG_COMPAT on?
To verify my suspicions I have compiled the 3.7.9 with a little patch dropping
the '(count > sizeof(struct dlm_write_request32) + DLM_RESNAME_MAXLEN)' check,
which solved the problem for me.
The patch will follow, though I am still not sure this is the solution.
Greets,
Jacek
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] [PATCH] dlm: Allow 64-bit request when CONFIG_COMPAT is on
2013-02-19 10:55 [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? Jacek Konieczny
@ 2013-02-19 11:40 ` Jacek Konieczny
2013-02-25 16:11 ` [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? David Teigland
1 sibling, 0 replies; 3+ messages in thread
From: Jacek Konieczny @ 2013-02-19 11:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
Even if kernel is compiled for 32-bit ABI compatibility it still should
able to process 64-bit dlm_write_request struct.
The regression was introduced by:
b75bc91 dlm: check the maximum size of a request from user
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
fs/dlm/user.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 7ff4985..d08a156 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -503,11 +503,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
#endif
return -EINVAL;
-#ifdef CONFIG_COMPAT
- if (count > sizeof(struct dlm_write_request32) + DLM_RESNAME_MAXLEN)
-#else
if (count > sizeof(struct dlm_write_request) + DLM_RESNAME_MAXLEN)
-#endif
return -EINVAL;
kbuf = kzalloc(count + 1, GFP_NOFS);
--
1.8.0.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel?
2013-02-19 10:55 [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? Jacek Konieczny
2013-02-19 11:40 ` [Cluster-devel] [PATCH] dlm: Allow 64-bit request when CONFIG_COMPAT is on Jacek Konieczny
@ 2013-02-25 16:11 ` David Teigland
1 sibling, 0 replies; 3+ messages in thread
From: David Teigland @ 2013-02-25 16:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Tue, Feb 19, 2013 at 11:55:14AM +0100, Jacek Konieczny wrote:
> Hi,
>
> I have recently upgraded my development cluster from 3.6.x to 3.7.1
> kernel and clvmd stopped working (all locking operation result in 'Invalid
> argument'). I have traced the problem to this call:
>
> write(8, "\6\0\0\0\0\0\0\0\1\0\0\0\1\1\0\0\5@\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\320\307\351\326\277\177\0\0\20\17\36\331\277\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\313\351\326\277\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Hlk5NeaVF0qhDF20RBq61EZaIj5yyUJgWxxs4ntZedP34Rj3E2wadZfVwtOcvpKb", 184) = -1 EINVAL (Invalid argument)
>
> Kernel sources show only a few conditions which can result in the EINVAL error
> and the one introduced by the 'dlm: check the maximum size of a request from
> user' patch seemed suspicious to me.
>
> The commit: http://git.kernel.org/?p=linux/kernel/git/teigland/linux-dlm.git;a=commitdiff;h=2b75bc9121e54e22537207b47b71373bcb0be41c
>
> Should a 64-bit kernel really refuse requests using the 64-bit
> dlm_write_request struct when compiled with CONFIG_COMPAT on?
>
> To verify my suspicions I have compiled the 3.7.9 with a little patch dropping
> the '(count > sizeof(struct dlm_write_request32) + DLM_RESNAME_MAXLEN)' check,
> which solved the problem for me.
>
> The patch will follow, though I am still not sure this is the solution.
Hi, the fix is already upstream: d4b0bcf32b946590afd29e202d6a399b84fe6c67
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-25 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 10:55 [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? Jacek Konieczny
2013-02-19 11:40 ` [Cluster-devel] [PATCH] dlm: Allow 64-bit request when CONFIG_COMPAT is on Jacek Konieczny
2013-02-25 16:11 ` [Cluster-devel] DLM regression in 64-bit 3.7.x Kernel? David Teigland
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).