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: <20191122085953.GA6289@zn.tnic>
Date:   Fri, 22 Nov 2019 09:59:53 +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 Thu, Nov 21, 2019 at 09:52:19AM -0700, Dave Jiang wrote:
> No what I mean was those primitives are missing the checks and we should
> probably address that at some point.

Oh, patches are always welcome! :)

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

Sure.

So, here's the deal: the more I look at this thing, the more I think
this iosubmit_cmds512() function should not be in a generic header but
in an intel-/driver-specific one. Why?

Well, movdir64b is Intel-only for now, you don't have a fallback
option for the platforms which do not support that insn and it is more
preferential for you to do the feature check once at driver init and
then call the function because you *know* you have movdir64b support
and not have any feature check in the function itself, not even a fast
static_cpu_has() one.

And this way you can do away with alignment and size checks because you
control what your driver does.

If it turns out that this function needs to be shared with other
platforms, then we can consider lifting it into a generic header and
making it more generic.

Ok?

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ