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  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:   Thu, 16 May 2019 17:15:48 +0200
From:   Fredrik Noring <noring@...rew.org>
To:     Laurentiu Tudor <laurentiu.tudor@....com>
Cc:     Robin Murphy <robin.murphy@....com>, "hch@....de" <hch@....de>,
        "stern@...land.harvard.edu" <stern@...land.harvard.edu>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "marex@...x.de" <marex@...x.de>,
        "JuergenUrban@....de" <JuergenUrban@....de>,
        Leo Li <leoyang.li@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem
 rework

Hi Laurentiu,

> I took your code, added the missing mapping and placed it in a patch. 
> Please see attached (compile tested only).

Thanks! Unfortunately, the OHCI fails with errors such as

	usb 1-1: device descriptor read/64, error -12

that I tracked down to the calls

	   hub_port_init
	-> usb_control_msg
	-> usb_internal_control_msg
	-> usb_start_wait_urb
	-> usb_submit_urb
	-> usb_hcd_submit_urb
	-> hcd->driver->urb_enqueue
	-> ohci_urb_enqueue
	-> ed_get
	-> ed_alloc
	-> dma_pool_zalloc
	-> dma_pool_alloc
	-> pool_alloc_page,

which returns NULL. Then I noticed

	/* pool_alloc_page() might sleep, so temporarily drop &pool->lock */

that might be a problem considering that the HCD handles pool memory in
IRQ handlers, for instance:

	   do_IRQ
	-> generic_handle_irq
	-> handle_level_irq
	-> handle_irq_event
	-> handle_irq_event_percpu
	-> __handle_irq_event_percpu
	-> usb_hcd_irq
	-> ohci_irq
	-> ohci_work
	-> finish_urb
	-> __usb_hcd_giveback_urb
	-> usb_hcd_unmap_urb_for_dma
	-> hcd_buffer_free

Also, DMA_BUFFER_SIZE in ohci-ps2.c is only 256 KiB in total. Is the new
pool implementation at least as efficient as the previous one?

Fredrik

Powered by blists - more mailing lists