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-next>] [day] [month] [year] [list]
Date:	Mon, 5 Aug 2013 08:07:25 +0000
From:	"Du, ChangbinX" <changbinx.du@...el.com>
To:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"balbi@...com" <balbi@...com>,
	"sarah.a.sharp@...uxfoundation.org" 
	<sarah.a.sharp@...uxfoundation.org>, "Wu, Hao" <hao.wu@...el.com>,
	"Tang, Jianqiang" <jianqiang.tang@...el.com>,
	"Zhuang, Jin Can" <jin.can.zhuang@...el.com>,
	"Huang, Xiaochao" <xiaochao.huang@...el.com>
Subject: About TRB_TO_EP_INDEX() macro using

Recently when I check xHCI code, find that some functions try to get EP index 
from a Command Completion Event TRB via TRB_TO_EP_INDEX() macro.

This is totally wrong. The macro definition is:

	#define TRB_TO_EP_INDEX(p)		((((p) & (0x1f << 16)) >> 16) - 1)

TRB_TO_EP_INDEX only applies to Transfer Event TRB. But for Command 
Completion Event TRB, there is no Endpoint ID field. So, we cannot directly 
get EP index from these TRBs, but we can find it by the TRB Pointer.

Here list two functions for you to check:
	handle_stopped_endpoint()
	handle_reset_ep_completion()

Regards & Thanks!
Changbin


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ