lkml.org 
[lkml]   [2021]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [ide] b7fb14d3ac: EIP:ioread32_rep
On Wed, Jul 7, 2021 at 1:35 AM Christoph Hellwig <hch@lst.de> wrote:
>
> Actually, not it doesn't. Sorry. So for a non-aligned large request
> this won't work. So we'll need to actually loop here.
>
> This is probably better and fixes the issue as well (and ATAPI
> probably needs the same treatment):

Thanks, this looks sane and correct to me.

But please do add a comment (or perhaps even better - an actual check)
that the offset is at least 4-byte aligned. Because this splitting of
the buffer at page boundaries can only work if you still have at least
that 32-bit alignment.

At least that's the case for ata_sff_data_xfer32() (which was what
triggered that original oops). I did not really check the other
data_xfer functions, although I did look at a couple of them. At least
vlb32_data_xfer() has the exact same issue.

A couple of others would be ok with just 16-byte aligned splits. But I
*hope* nobody needs more than 32-bit alignment (and considering the
legacy status of this model, I'd be surprised if they need more, but
who knows..).

Linus

\
 
 \ /
  Last update: 2021-07-07 21:06    [W:0.047 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site