OSDN Git Service

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)
commitf184210bca6c9d0091ff5e5629dea4cbb8a17c0f
tree52f839810a5504d80b7ef6310c95b9dcedb7ecb4
parent94aae4caacda89a1bdb7198b260f4ca3595b7ed7
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