From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai-core@domain.hid
Subject: [Xenomai-core] [PATCH] Fix POSIX skin build for 2.4.x
Date: Thu, 21 Feb 2008 16:43:31 +0100 [thread overview]
Message-ID: <47BD9C23.6000705@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
Hi Gilles,
the backport from trunk was borken. This patch makes 2.4.x build again,
but - BIG-FAT-WARNING - I haven't tested the result.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
[-- Attachment #2: fix-uaccess-tests.patch --]
[-- Type: text/x-patch, Size: 1920 bytes --]
Index: xenomai-2.4.x/ksrc/skins/posix/syscall.c
===================================================================
--- xenomai-2.4.x/ksrc/skins/posix/syscall.c (Revision 3513)
+++ xenomai-2.4.x/ksrc/skins/posix/syscall.c (Arbeitskopie)
@@ -1847,7 +1847,7 @@ static int __mq_send(struct task_struct
if (IS_ERR(msg))
return PTR_ERR(msg);
- if(__xn_copy_from_user(msg->data,
+ if(__xn_copy_from_user(curr, msg->data,
(void __user *)__xn_reg_arg2(regs), len)) {
pse51_mq_finish_send(ufd->kfd, mq, msg);
return -EFAULT;
@@ -1903,7 +1903,7 @@ static int __mq_timedsend(struct task_st
if (IS_ERR(msg))
return PTR_ERR(msg);
- if(__xn_copy_from_user(msg->data,
+ if(__xn_copy_from_user(curr, msg->data,
(void __user *)__xn_reg_arg2(regs), len)) {
pse51_mq_finish_send(ufd->kfd, mq, msg);
return -EFAULT;
@@ -1952,7 +1952,7 @@ static int __mq_receive(struct task_stru
if (IS_ERR(msg))
return PTR_ERR(msg);
- if (__xn_copy_to_user((void __user *)__xn_reg_arg2(regs),
+ if (__xn_copy_to_user(curr, (void __user *)__xn_reg_arg2(regs),
msg->data, msg->len)) {
pse51_mq_finish_rcv(ufd->kfd, mq, msg);
return -EFAULT;
@@ -2029,7 +2029,7 @@ static int __mq_timedreceive(struct task
if (IS_ERR(msg))
return PTR_ERR(msg);
- if (__xn_copy_to_user((void __user *)__xn_reg_arg2(regs),
+ if (__xn_copy_to_user(curr, (void __user *)__xn_reg_arg2(regs),
msg->data, msg->len)) {
pse51_mq_finish_rcv(ufd->kfd, mq, msg);
return -EFAULT;
@@ -2041,8 +2041,10 @@ static int __mq_timedreceive(struct task
if (err)
return err;
- if (__xn_safe_copy_to_user((void __user *)__xn_reg_arg3(regs),
- &len, sizeof(len)))
+ if (!__xn_access_ok
+ (curr, VERIFY_WRITE, __xn_reg_arg3(regs), sizeof(len)) ||
+ __xn_copy_to_user(curr, (void __user *)__xn_reg_arg3(regs),
+ &len, sizeof(len)))
return -EFAULT;
if (__xn_reg_arg4(regs))
next reply other threads:[~2008-02-21 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 15:43 Jan Kiszka [this message]
2008-02-21 15:50 ` [Xenomai-core] [PATCH] Fix POSIX skin build for 2.4.x Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47BD9C23.6000705@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Xenomai-core@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.