lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef6bc4a4-b307-9bc4-f3be-f7ab7232d303@intel.com>
Date:   Thu, 21 Nov 2019 09:52:19 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     Borislav Petkov <bp@...en8.de>
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 11/21/19 3:59 AM, Borislav Petkov wrote:
> 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?

No what I mean was those primitives are missing the checks and we should 
probably address that at some point.

> 
> 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?
> 

How would I detect that? Add a size (in bytes) parameter for the total 
source data?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ