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:   Wed, 29 May 2019 11:15:54 +0000
From:   Laurentiu Tudor <laurentiu.tudor@....com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "hch@....de" <hch@....de>,
        "stern@...land.harvard.edu" <stern@...land.harvard.edu>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "marex@...x.de" <marex@...x.de>, Leo Li <leoyang.li@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "noring@...rew.org" <noring@...rew.org>,
        "JuergenUrban@....de" <JuergenUrban@....de>
Subject: Re: [PATCH v7 2/5] USB: use genalloc for USB HCs with local memory



On 29.05.2019 13:38, Greg KH wrote:
> On Wed, May 29, 2019 at 01:28:40PM +0300, laurentiu.tudor@....com wrote:
>> From: Laurentiu Tudor <laurentiu.tudor@....com>
>>
>> For HCs that have local memory, replace the current DMA API usage
>> with a genalloc generic allocator to manage the mappings for these
>> devices. To help users, introduce a new HCD API,
>> usb_hcd_setup_local_mem() that will setup up the genalloc backing
>> up the device local memory. It will be used in subsequent patches.
>> This is in preparation for dropping the existing "coherent" dma
>> mem declaration APIs. Current implementation was relying on a short
>> circuit in the DMA API that in the end, was acting as an allocator
>> for these type of devices.
>> For sh arch to compile GENERIC_ALLOCATOR needs to be selected in
>> Kconfig.
>>
>> For context, see thread here: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2019%2F4%2F22%2F357&amp;data=02%7C01%7Claurentiu.tudor%40nxp.com%7Cade28e1f322c4502cd4808d6e421d0ba%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636947231220264072&amp;sdata=xvmzDztMbeD9GwlcAfx7bBoxhARWgB3vmQkqiE81Lbg%3D&amp;reserved=0
>>
>> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@....com>
>> Signed-off-by: Fredrik Noring <noring@...rew.org>
>> Tested-by: Fredrik Noring <noring@...rew.org>
>> Reported-by: kbuild test robot <lkp@...el.com>
>> ---
>>   drivers/usb/Kconfig         |  1 +
>>   drivers/usb/core/buffer.c   |  9 +++++++++
>>   drivers/usb/core/hcd.c      | 36 ++++++++++++++++++++++++++++++++++++
>>   drivers/usb/host/ohci-hcd.c | 23 ++++++++++++++++++-----
>>   drivers/usb/host/ohci-mem.c | 35 +++++++++++++++++++++++++++++++----
>>   drivers/usb/host/ohci.h     |  2 ++
>>   include/linux/usb/hcd.h     |  5 +++++
>>   7 files changed, 102 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
>> index e4b27413f528..389c57d8eba7 100644
>> --- a/drivers/usb/Kconfig
>> +++ b/drivers/usb/Kconfig
>> @@ -45,6 +45,7 @@ config USB_ARCH_HAS_HCD
>>   config USB
>>   	tristate "Support for Host-side USB"
>>   	depends on USB_ARCH_HAS_HCD
>> +	select GENERIC_ALLOCATOR
> 
> Are there any arches that does not have GENERIC_ALLOCATOR?  I don't want
> to suddenly cut off a bunch of working systems from having USB support.
> 

lkp report mentions only sh, but even if there are others, I think that 
now having the explicit select should cover them, right?

---
Best Regards, Laurentiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ