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]
Date:   Mon, 27 Feb 2017 13:52:35 +0100
From:   Romain Perier <romain.perier@...labora.com>
To:     Joe Perches <joe@...ches.com>,
        Peter Senna Tschudin <peter.senna@...labora.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        jeffrey.t.kirsher@...el.com,
        "David S. Miller" <davem@...emloft.net>, stas.yakovlev@...il.com,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Peter Senna Tschudin <peter.senna@...labora.co.uk>
Subject: Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API

Hello,


Le 27/02/2017 à 13:38, Joe Perches a écrit :
> On Mon, 2017-02-27 at 13:26 +0100, Romain Perier wrote:
>> Hello,
>>
>>
>> Le 27/02/2017 à 12:22, Peter Senna Tschudin a écrit :
>>> On Sun, Feb 26, 2017 at 08:24:25PM +0100, Romain Perier wrote:
>>>> pci_pool_*() functions should be replaced by the corresponding functions
>>>> in the DMA pool API. This adds support to check for use of these pci
>>>> functions and display a warning when it is the case.
>>>>
>>> I guess Joe Perches did sent some comments for this one, did you address
>>> them?
>> See the changelog of 00/20 (for v2). I have already integrated his
>> comments :)
> Not quite.  You need to add blank lines before and after
> the new test you added.

Ok

>
> I also wonder if you've in fact converted all of the
> pci_pool struct and function uses why a new checkpatch
> test is needed at all.

That's just to avoid futures mistakes/uses.

>
> Also, it seems none of these patches have reached lkml.
> Are you sending the patch series with MIME/html parts?

Normally no. I use git send-email for all my patches.

Regards,
Romain

>
>>> Reviewed-by: Peter Senna Tschudin <peter.senna@...labora.com>
>>>> Signed-off-by: Romain Perier <romain.perier@...labora.com>
>>>> ---
>>>>  scripts/checkpatch.pl | 9 ++++++++-
>>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>>> index baa3c7b..f2c775c 100755
>>>> --- a/scripts/checkpatch.pl
>>>> +++ b/scripts/checkpatch.pl
>>>> @@ -6064,7 +6064,14 @@ sub process {
>>>>  			WARN("USE_DEVICE_INITCALL",
>>>>  			     "please use device_initcall() or more appropriate function instead of __initcall() (see include/linux/init.h)\n" . $herecurr);
>>>>  		}
>>>> -
>>>> +# check for old PCI api pci_pool_*(), use dma_pool_*() instead
>>>> +		if ($line =~ /\bpci_pool(?:_(?:create|destroy|alloc|zalloc|free)|)\b/) {
>>>> +			if (WARN("USE_DMA_POOL",
>>>> +				 "please use the dma pool api or more appropriate function instead of the old pci pool api\n" . $herecurr) &&
>>>> +			    $fix) {
>>>> +				while ($fixed[$fixlinenr] =~ s/\bpci_pool(_(?:create|destroy|alloc|zalloc|free)|)\b/dma_pool$1/) {}
>>>> +			}
>>>> +		}
>>>>  # check for various structs that are normally const (ops, kgdb, device_tree)
>>>>  		if ($line !~ /\bconst\b/ &&
>>>>  		    $line =~ /\bstruct\s+($const_structs)\b/) {
>>>> -- 
>>>> 2.9.3

Powered by blists - more mailing lists