[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191121105913.GB6540@zn.tnic>
Date: Thu, 21 Nov 2019 11:59:13 +0100
From: Borislav Petkov <bp@...en8.de>
To: Dave Jiang <dave.jiang@...el.com>
Cc: "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"vkoul@...nel.org" <vkoul@...nel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
"Lin, Jing" <jing.lin@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"Kumar, Sanjay K" <sanjay.k.kumar@...el.com>,
"Dey, Megha" <megha.dey@...el.com>,
"Pan, Jacob jun" <jacob.jun.pan@...el.com>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH RFC 01/14] x86/asm: add iosubmit_cmds512() based on
movdir64b CPU instruction
On Wed, Nov 20, 2019 at 05:10:41PM -0700, Dave Jiang wrote:
> I'll add the check on the destination address. The call is modeled after
> __iowrite64_copy() / __iowrite32_copy() in lib/iomap_copy.c. Looks like
> those functions do not check for the alignment requirements either.
So just because they don't check, you don't need to check either?
Can you guarantee that all callers will always do the right thing?
I mean, if you don't care too much, why even write "(must be 512-bit
aligned)"? Who cares then if the data is aligned or not...
> > > + * @dst: destination, in MMIO space (must be 512-bit aligned)
> > > + * @src: source
> > > + * @count: number of 512 bits quantities to submit
> >
> > Where's that check on the data?
>
> I don't follow?
What do you do if the caller doesn't submit data in 512 bits quantities?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists