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] [day] [month] [year] [list]
Message-ID: <CAHQ1cqFR4ztK7zToN3OeTDYEXaGMkLa8uY3ka+Sgmf3dwxJsFg@mail.gmail.com>
Date:   Wed, 8 Jan 2020 07:50:12 -0800
From:   Andrey Smirnov <andrew.smirnov@...il.com>
To:     Horia Geanta <horia.geanta@....com>
Cc:     Vakul Garg <vakul.garg@....com>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        Chris Healy <cphealy@...il.com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Iuliana Prodan <iuliana.prodan@....com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/5] CAAM JR lifecycle

On Sat, Nov 16, 2019 at 10:15 PM Andrey Smirnov
<andrew.smirnov@...il.com> wrote:
>
> On Wed, Nov 13, 2019 at 11:25 AM Andrey Smirnov
> <andrew.smirnov@...il.com> wrote:
> >
> > On Wed, Nov 13, 2019 at 10:57 AM Horia Geanta <horia.geanta@....com> wrote:
> > >
> > > On 11/6/2019 5:19 PM, Andrey Smirnov wrote:
> > > > On Tue, Nov 5, 2019 at 11:27 PM Vakul Garg <vakul.garg@....com> wrote:
> > > >>
> > > >>
> > > >>
> > > >>> -----Original Message-----
> > > >>> From: linux-crypto-owner@...r.kernel.org <linux-crypto-
> > > >>> owner@...r.kernel.org> On Behalf Of Andrey Smirnov
> > > >>> Sent: Tuesday, November 5, 2019 8:44 PM
> > > >>> To: linux-crypto@...r.kernel.org
> > > >>> Cc: Andrey Smirnov <andrew.smirnov@...il.com>; Chris Healy
> > > >>> <cphealy@...il.com>; Lucas Stach <l.stach@...gutronix.de>; Horia Geanta
> > > >>> <horia.geanta@....com>; Herbert Xu <herbert@...dor.apana.org.au>;
> > > >>> Iuliana Prodan <iuliana.prodan@....com>; dl-linux-imx <linux-
> > > >>> imx@....com>; linux-kernel@...r.kernel.org
> > > >>> Subject: [PATCH 0/5] CAAM JR lifecycle
> > > >>>
> > > >>> Everyone:
> > > >>>
> > > >>> This series is a different approach to addressing the issues brought up in
> > > >>> [discussion]. This time the proposition is to get away from creating per-JR
> > > >>> platfrom device, move all of the underlying code into caam.ko and disable
> > > >>> manual binding/unbinding of the CAAM device via sysfs. Note that this series
> > > >>> is a rough cut intented to gauge if this approach could be acceptable for
> > > >>> upstreaming.
> > > >>>
> > > >>> Thanks,
> > > >>> Andrey Smirnov
> > > >>>
> > > >>> [discussion] lore.kernel.org/lkml/20190904023515.7107-13-
> > > >>> andrew.smirnov@...il.com
> > > >>>
> > > >>> Andrey Smirnov (5):
> > > >>>   crypto: caam - use static initialization
> > > >>>   crypto: caam - introduce caam_jr_cbk
> > > >>>   crypto: caam - convert JR API to use struct caam_drv_private_jr
> > > >>>   crypto: caam - do not create a platform devices for JRs
> > > >>>   crypto: caam - disable CAAM's bind/unbind attributes
> > > >>>
> > > >>
> > > >> To access caam jobrings from DPDK (user space drivers), we unbind job-ring's platform device from the kernel.
> > > >> What would be the alternate way to enable job ring drivers in user space?
> > > >>
> > > >
> > > > Wouldn't either building your kernel with
> > > > CONFIG_CRYPTO_DEV_FSL_CAAM_JR=n (this series doesn't handle that right
> > > > currently due to being a rough cut) or disabling specific/all JRs via
> > > > DT accomplish the same goal?
> > > >
> > > It's not a 1:1 match, the ability to move a ring to user space / VM etc.
> > > *dynamically* goes away.
> > >
> >
> > Wouldn't it be possible to do that dynamically using DT overlays? That
> > is "modprobe -r caam; <apply overlay>; modprobe caam"?
> >
>
> Or, alternatively, could adding a module parameter, say "jr_mask", to
> limit JRs controlled by the driver cover dynamic use case?
>

Horia, could you please comment on the above? I think getting rid of
struct device for JRs is the best approach to dealing with described
corner case problems + it will allows us to get rid of this custom JR
users lifecycle management
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/crypto/caam/jr.c?h=v5.4.8#n26
since it can be just done as a part for caam_probe(), so I'd like to
either move forward on this series or close this discussion.

Thanks,
Andrey Smirnov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ