From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Petr Vandrovec <petr@vandrovec.name>
Cc: dan@dennedy.org, linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code
Date: Mon, 07 May 2007 18:40:23 +0200 [thread overview]
Message-ID: <463F5677.4080906@s5r6.in-berlin.de> (raw)
In-Reply-To: <20070507021447.GA22197@vana.vc.cvut.cz>
Petr Vandrovec wrote:
[...]
> * read() always failed with -EFAULT. This was happening due to
> raw1394_compat_read copying data to wrong location - access_ok always
> failed as 'r' is kernel address, not user. Whole function just tried to
> copy data from 'r' to 'r', which is not good.
>
> * write(fd, buf, 52) from 32bit app was returning 56. Most of callers did not
> care, but some (arm registration) did, and anyway it looks bad if request for
> writing 52 bytes returns 56. And returning sizeof anything in 'int' is not
> good as well. So all functions now return '0' instead of
> sizeof(struct raw1394_request) on success, and write() itself provides correct
> return value (it just returns value it was asked to write on success as raw1394
> does not do any partial writes at all).
>
> * Related to this was problem that write() could have returned 0 when kernel
> state would become corrupted and moved to different state than
> opened/initialized/connected. Now it returns -EBADFD which seemed appropriate.
>
> * And add compat_ioctl. Although all structures are more or less same,
> raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted
> padding in the middle. I did not add any translation for ioctls passing array
> of integers around as integers seem to have same size (32 bits) on all
> architectures supported by Linux.
[...]
Thanks for these fixes. They look good at first glance but I will look
at them in more detail during the week (and hope that Dan can have a
look at them too). I will get back to you once more before I commit
because I would like to split it into three patches (for
raw1394_compat_read, for write, and for compat_ioctl).
--
Stefan Richter
-=====-=-=== -=-= --===
http://arcgraph.de/sr/
next prev parent reply other threads:[~2007-05-07 16:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-07 2:14 Petr Vandrovec
2007-05-07 16:40 ` Stefan Richter [this message]
2007-05-15 3:52 ` Dan Dennedy
2007-05-15 22:59 ` Stefan Richter
2007-05-15 23:00 ` [PATCH 1/3] ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel Stefan Richter
2007-05-15 23:01 ` [PATCH 2/3] ieee1394: raw1394: Fix write() " Stefan Richter
2007-05-15 23:02 ` [PATCH 3/3] ieee1394: raw1394: Add ioctl() " Stefan Richter
2007-05-15 23:51 ` [PATCH] Fix/add raw1394 CONFIG_COMPAT code Petr Vandrovec
2007-05-19 23:55 ` Arnd Bergmann
2007-05-20 0:02 ` Stefan Richter
2007-05-20 15:03 ` Arnd Bergmann
2007-05-20 15:28 ` Stefan Richter
2007-05-20 15:37 ` Arnd Bergmann
2007-05-20 15:55 ` Stefan Richter
2007-05-21 7:28 ` Stefan Richter
2007-05-21 16:52 ` [PATCH] ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment Stefan Richter
2007-05-23 4:54 ` [PATCH] Fix/add raw1394 CONFIG_COMPAT code Dan Dennedy
2007-05-23 6:32 ` Stefan Richter
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=463F5677.4080906@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=dan@dennedy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=petr@vandrovec.name \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome