linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Christoph Hellwig <hch@lst.de>
Cc: kernel test robot <oliver.sang@intel.com>,
	Jens Axboe <axboe@kernel.dk>, LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <lkp@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>
Subject: Re: [ide] b7fb14d3ac: EIP:ioread32_rep
Date: Wed, 7 Jul 2021 12:05:34 -0700	[thread overview]
Message-ID: <CAHk-=wgEM5VcCEtOyCqLnWAXdAumqnAR077Nv5Q_eG+ZDd+owA@mail.gmail.com> (raw)
In-Reply-To: <20210707083528.GA353@lst.de>

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

      reply	other threads:[~2021-07-07 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 15:00 [ide] b7fb14d3ac: EIP:ioread32_rep kernel test robot
2021-07-05 12:57 ` Christoph Hellwig
2021-07-05 20:00   ` Linus Torvalds
2021-07-06 14:36     ` Christoph Hellwig
2021-07-06 19:08       ` Linus Torvalds
2021-07-07  8:12         ` Christoph Hellwig
2021-07-07  8:35           ` Christoph Hellwig
2021-07-07 19:05             ` Linus Torvalds [this message]

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='CAHk-=wgEM5VcCEtOyCqLnWAXdAumqnAR077Nv5Q_eG+ZDd+owA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bp@alien8.de \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).