Re: [PATCH] USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN

2016-06-06 Thread Martin MOKREJŠ
Hi Alan, thank you for your effort. I applied it to 4.6.0 and I haven't seen the USBSAN message reported anymore about this (though I do for ext4 and IP stack for example). Tested-By: Martin MOKREJŠ Alan Stern wrote: Several people have reported that UBSAN doesn't like the pointer arithmetic

[PATCH] USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN

2016-05-19 Thread Alan Stern
Several people have reported that UBSAN doesn't like the pointer arithmetic in ehci_hub_control(): u32 __iomem *status_reg = &ehci->regs->port_status[ (wIndex & 0xff) - 1]; u32 __iomem *hostpc_reg = &ehci->regs->hostpc[(wIndex & 0xff) - 1];