]> git.baikalelectronics.ru Git - kernel.git/commit
target: check XCOPY segment descriptor CSCD IDs
authorDavid Disseldorp <ddiss@suse.de>
Mon, 2 Jan 2017 17:04:06 +0000 (18:04 +0100)
committerBart Van Assche <bart.vanassche@sandisk.com>
Tue, 10 Jan 2017 16:41:13 +0000 (08:41 -0800)
commitb46b71a2b6f707aa22c4fc674ff4d924c6258619
tree52f839810a5504d80b7ef6310c95b9dcedb7ecb4
parent9b57f6413785b89d7208606d964e3162c89d6862
target: check XCOPY segment descriptor CSCD IDs

Ensure that the segment descriptor CSCD descriptor ID values correspond
to CSCD descriptor entries located in the XCOPY command parameter list.
SPC4r37 6.4.6.1 Table 150 specifies this range as 0000h to 07FFh, where
the CSCD descriptor location in the parameter list can be located via:
16 + (id * 32)

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[ bvanassche: inserted "; " in the format string of an error message
  and also moved a "||" operator from the start of a line to the end
  of the previous line ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
drivers/target/target_core_xcopy.c
drivers/target/target_core_xcopy.h