Re: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-07-24 Thread Ard Biesheuvel
On Wed, 24 Jul 2019 at 19:10, Pascal Van Leeuwen wrote: > > Ard, > > > -Original Message- > > From: Ard Biesheuvel > > Sent: Monday, July 22, 2019 6:43 PM > > To: Pascal Van Leeuwen > > Cc: Milan Broz ; Herbert Xu > > ; dm-devel@redhat.com; linux- > > cry...@vger.kernel.org; Horia Geant

[dm-devel] [PATCH V4 2/2] scsi: implement .cleanup_rq callback

2019-07-24 Thread Ming Lei
Implement .cleanup_rq() callback for freeing driver private part of the request. Then we can avoid to leak this part if the request isn't completed by SCSI, and freed by blk-mq or upper layer(such as dm-rq) finally. Cc: Ewan D. Milne Cc: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig

[dm-devel] [PATCH V4 1/2] blk-mq: add callback of .cleanup_rq

2019-07-24 Thread Ming Lei
SCSI maintains its own driver private data hooked off of each SCSI request, and the pridate data won't be freed after scsi_queue_rq() returns BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE. An upper layer driver (e.g. dm-rq) may need to retry these SCSI requests, before SCSI has fully dispatched them, du

Re: [dm-devel] [PATCH V3 1/2] blk-mq: add callback of .cleanup_rq

2019-07-24 Thread Mike Snitzer
On Tue, Jul 23 2019 at 11:12pm -0400, Ming Lei wrote: > dm-rq needs to free request which has been dispatched and not completed > by underlying queue. However, the underlying queue may have allocated > private data for this request in .queue_rq(), so the request private data > will be leaked in d

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-07-24 Thread Pascal Van Leeuwen
Ard, > -Original Message- > From: Ard Biesheuvel > Sent: Monday, July 22, 2019 6:43 PM > To: Pascal Van Leeuwen > Cc: Milan Broz ; Herbert Xu > ; dm-devel@redhat.com; linux- > cry...@vger.kernel.org; Horia Geanta > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphertext stealin

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-07-24 Thread Pascal Van Leeuwen
Ah, ugh, my bad. Ignore my previous mail below. Turns out the tf_xts_tv_template I was looking at is for xts(twofish) not xts(aes) ... which was not immediately obvious from the name, for me. Pascal van Leeuwen Silicon IP Architect, Multi-Protocol Engines @ Verimatrix www.insidesecure.com > ---

RE: [dm-devel] xts fuzz testing and lack of ciphertext stealing support

2019-07-24 Thread Pascal Van Leeuwen
Ard, > -Original Message- > From: Ard Biesheuvel > Sent: Monday, July 22, 2019 6:43 PM > To: Pascal Van Leeuwen > Cc: Milan Broz ; Herbert Xu > ; dm-devel@redhat.com; linux- > cry...@vger.kernel.org; Horia Geanta > Subject: Re: [dm-devel] xts fuzz testing and lack of ciphertext steali