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: <C1V35KAVQM0U.2UPMSFF20IXI8@lenovo-laptop>
Date:   Tue, 07 Apr 2020 16:37:42 +0100
From:   "Alex Dewar" <alex.dewar@....co.uk>
To:     "Julia Lawall" <julia.lawall@...ia.fr>
Cc:     "Luis Chamberlain" <mcgrof@...nel.org>,
        "Gilles Muller" <Gilles.Muller@...6.fr>,
        "Nicolas Palix" <nicolas.palix@...g.fr>,
        "Michal Marek" <michal.lkml@...kovi.net>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        "Kate Stewart" <kstewart@...uxfoundation.org>,
        "Allison Randal" <allison@...utok.net>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        <cocci@...teme.lip6.fr>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Coccinelle: zalloc_simple: Fix patch mode for
 dma_alloc_coherent()

On Mon Apr 6, 2020 at 9:15 PM, Julia Lawall wrote:
>
> 
>
> 
> On Fri, 3 Apr 2020, Alex Dewar wrote:
>
> 
> > Commit dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()"), in
> > removing dma_zalloc_coherent() treewide, inadvertently removed the patch
> > rule for dma_alloc_coherent(), leaving Coccinelle unable to auto-generate
> > patches for this case. Fix this.
> >
> > Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()")
> > CC: Luis Chamberlain <mcgrof@...nel.org>
> > Signed-off-by: Alex Dewar <alex.dewar@....co.uk>
> > ---
> >  scripts/coccinelle/api/alloc/zalloc-simple.cocci | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> > index 26cda3f48f01..c53aab7fe096 100644
> > --- a/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> > +++ b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> > @@ -70,6 +70,15 @@ statement S;
> >  - x = (T)vmalloc(E1);
> >  + x = (T)vzalloc(E1);
> >  |
> > +- x = dma_alloc_coherent(E2,E1,E3,E4);
> > ++ x = dma_alloc_coherent(E2,E1,E3,E4);
>
> 
> Hi,
>
> 
> I don't understand the above case. The before and after code seem to be
> the same?
>
> 
> julia
>
> 
>
> 
> > +|
> > +- x = (T *)dma_alloc_coherent(E2,E1,E3,E4);
> > ++ x = dma_alloc_coherent(E2,E1,E3,E4);
> > +|
> > +- x = (T)dma_alloc_coherent(E2,E1,E3,E4);
> > ++ x = (T)dma_alloc_coherent(E2,E1,E3,E4);
> > +|
> >  - x = kmalloc_node(E1,E2,E3);
> >  + x = kzalloc_node(E1,E2,E3);
> >  |
> > --
> > 2.26.0
> >
> >
>
> 
>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ