Re: dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On Mon, Jul 13 2015 at 1:01pm -0400, Milan Broz wrote: > (sorry, resending again, not sure if it was sent correctly) > > On 07/13/2015 06:33 PM, Joseph Salisbury wrote: > > Hi Milan, > > > > The Ubuntu kernel has been carrying this patch since the discussion[0] > > we were having about the bug. I don't see that patch was ever included > > in mainline. Do you happen to know if this patch is still needed or was > > the bug we were seeing fixed in some other way? > > I think it was superseded by later Mike's approach to reverse the logic > - disable write same for all targets and require to explicitly allow it. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 > (+later patches) > > So I think we do no need this patch upstream anymore. > > Mike, am I right here? Yeah, a DM target needs to opt-in by setting ti->num_write_same_bios (only linear, stripe and mpath do at this time). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
(sorry, resending again, not sure if it was sent correctly) On 07/13/2015 06:33 PM, Joseph Salisbury wrote: > Hi Milan, > > The Ubuntu kernel has been carrying this patch since the discussion[0] > we were having about the bug. I don't see that patch was ever included > in mainline. Do you happen to know if this patch is still needed or was > the bug we were seeing fixed in some other way? I think it was superseded by later Mike's approach to reverse the logic - disable write same for all targets and require to explicitly allow it. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 (+later patches) So I think we do no need this patch upstream anymore. Mike, am I right here? Milan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 07/13/2015 06:33 PM, Joseph Salisbury wrote: > Hi Milan, > > The Ubuntu kernel has been carrying this patch since the discussion[0] > we were having about the bug. I don't see that patch was ever included > in mainline. Do you happen to know if this patch is still needed or was > the bug we were seeing fixed in some other way? I think it was superseded by later Mike's approach to reverse the logic - disable write same for all targets and require to explicitly allow it. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 (+later patches) So I think we do no need this patch upstream anymore. Mike, am I right here? Milan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 05:20 PM, Joseph Salisbury wrote: > On 12/19/2012 04:07 PM, Milan Broz wrote: >> Does this help? >> >> dm-crypt: never use write same >> >> Ciphertext device is not compatible with WRITE SAME, >> disable it for all dmcrypt devices. >> >> Signed-off-by: Milan Broz >> >> --- a/drivers/md/dm-crypt.c >> +++ b/drivers/md/dm-crypt.c >> @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct >> dm_target *ti, >> return fn(ti, cc->dev, cc->start, ti->len, data); >> } >> +static void crypt_io_hints(struct dm_target *ti, >> +struct queue_limits *limits) >> +{ >> +limits->max_write_same_sectors = 0; >> +} >> + >> static struct target_type crypt_target = { >> .name = "crypt", >> .version = {1, 11, 0}, >> @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { >> .message = crypt_message, >> .merge = crypt_merge, >> .iterate_devices = crypt_iterate_devices, >> +.io_hints = crypt_io_hints, >> }; >> static int __init dm_crypt_init(void) >> > Great work, Milan. Your patch fixes the bug, stops the panic and > allows dm-crypt to function properly. > > Will you be requesting this in v3.8 ? > > Thanks again, > > Joe > Hi Milan, The Ubuntu kernel has been carrying this patch since the discussion[0] we were having about the bug. I don't see that patch was ever included in mainline. Do you happen to know if this patch is still needed or was the bug we were seeing fixed in some other way? Thanks, Joe [0] https://lists.ubuntu.com/archives/kernel-team/2012-December/023524.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On Mon, Jul 13 2015 at 1:01pm -0400, Milan Broz mb...@redhat.com wrote: (sorry, resending again, not sure if it was sent correctly) On 07/13/2015 06:33 PM, Joseph Salisbury wrote: Hi Milan, The Ubuntu kernel has been carrying this patch since the discussion[0] we were having about the bug. I don't see that patch was ever included in mainline. Do you happen to know if this patch is still needed or was the bug we were seeing fixed in some other way? I think it was superseded by later Mike's approach to reverse the logic - disable write same for all targets and require to explicitly allow it. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 (+later patches) So I think we do no need this patch upstream anymore. Mike, am I right here? Yeah, a DM target needs to opt-in by setting ti-num_write_same_bios (only linear, stripe and mpath do at this time). -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 05:20 PM, Joseph Salisbury wrote: On 12/19/2012 04:07 PM, Milan Broz wrote: Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz mb...@redhat.com --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc-dev, cc-start, ti-len, data); } +static void crypt_io_hints(struct dm_target *ti, +struct queue_limits *limits) +{ +limits-max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = crypt, .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, +.io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) Great work, Milan. Your patch fixes the bug, stops the panic and allows dm-crypt to function properly. Will you be requesting this in v3.8 ? Thanks again, Joe Hi Milan, The Ubuntu kernel has been carrying this patch since the discussion[0] we were having about the bug. I don't see that patch was ever included in mainline. Do you happen to know if this patch is still needed or was the bug we were seeing fixed in some other way? Thanks, Joe [0] https://lists.ubuntu.com/archives/kernel-team/2012-December/023524.html -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 07/13/2015 06:33 PM, Joseph Salisbury wrote: Hi Milan, The Ubuntu kernel has been carrying this patch since the discussion[0] we were having about the bug. I don't see that patch was ever included in mainline. Do you happen to know if this patch is still needed or was the bug we were seeing fixed in some other way? I think it was superseded by later Mike's approach to reverse the logic - disable write same for all targets and require to explicitly allow it. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 (+later patches) So I think we do no need this patch upstream anymore. Mike, am I right here? Milan -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
(sorry, resending again, not sure if it was sent correctly) On 07/13/2015 06:33 PM, Joseph Salisbury wrote: Hi Milan, The Ubuntu kernel has been carrying this patch since the discussion[0] we were having about the bug. I don't see that patch was ever included in mainline. Do you happen to know if this patch is still needed or was the bug we were seeing fixed in some other way? I think it was superseded by later Mike's approach to reverse the logic - disable write same for all targets and require to explicitly allow it. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-table.c?id=c1a94672a830e01d58c7c7e8de530c3f136d6ff2 (+later patches) So I think we do no need this patch upstream anymore. Mike, am I right here? Milan -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On Wed, Dec 19 2012 at 7:11pm -0500, Martin K. Petersen wrote: > > "Milan" == Milan Broz writes: > > Milan> dm-crypt: never use write same > > Milan> Ciphertext device is not compatible with WRITE SAME, disable it > Milan> for all dmcrypt devices. > > Milan> Signed-off-by: Milan Broz > > Acked-by: Martin K. Petersen I've developed more comprehensive WRITE SAME support for DM. It can be used in conjunction with Milan's patch (which enables Milan's patch to go in too and be more easily tagged for v3.7 stable). Anyway, my changes are available in the 'dm-write-same' branch of my github tree: git://github.com/snitm/linux.git See the top 5 commits: https://github.com/snitm/linux/commits/dm-write-same (topmost needs to be folded, I'll do that when posting to dm-devel in reply to this mail) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
> "Milan" == Milan Broz writes: Milan> dm-crypt: never use write same Milan> Ciphertext device is not compatible with WRITE SAME, disable it Milan> for all dmcrypt devices. Milan> Signed-off-by: Milan Broz Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 11:20 PM, Joseph Salisbury wrote: > Great work, Milan. Your patch fixes the bug, stops the panic and allows > dm-crypt to function properly. Thanks. > > Will you be requesting this in v3.8 ? This should go into 3.7 stable as well, I am talking with Alasdair already how to handle it. Milan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 04:07 PM, Milan Broz wrote: Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc->dev, cc->start, ti->len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits->max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = "crypt", .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) Great work, Milan. Your patch fixes the bug, stops the panic and allows dm-crypt to function properly. Will you be requesting this in v3.8 ? Thanks again, Joe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 04:07 PM, Milan Broz wrote: Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc->dev, cc->start, ti->len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits->max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = "crypt", .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) I'll give it a spin right now. Thanks for the quick work! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc->dev, cc->start, ti->len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits->max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = "crypt", .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/19/2012 08:58 PM, Mike Snitzer wrote: > On Wed, Dec 19 2012 at 11:58am -0500, > Martin K. Petersen wrote: > >>> "Joseph" == Joseph Salisbury writes: >> >> Joseph> I captured the netconsole output from boot until I reproduced >> Joseph> the bug. The RIP points to kcryptd_crypt_write_io_submit() in >> Joseph> ~/drivers/md/dm-crypt.c. The output can be seen at: >> >> I'm thinking that dm-crypt should probably set max_write_same_sectors to >> 0. It doesn't really make much sense for a crypto driver to pass that >> command through. IMHO WRITE_SAME doesn't not make sense in encrypted storage. The same sectors in plaintext are _not_ the same in ciphertext. NEVER. (If so, you have a security problem.) It must be disabled in dmcrypt explicitly then (max_write_same_sectors?). Is it only dmcrypt, or encrypted fs are affected too? Milan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
> "Joseph" == Joseph Salisbury writes: Joseph> Martin, were you using the scsi_debug module, or a real scsi Joseph> device(s)? I used scsi_debug for the test. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
> "Mike" == Mike Snitzer writes: Mike> But do we know mount to somwhow be issuing WRITE SAME requests? I'm assuming that ext4 is somehow calling sb_issue_zeroout(). Mike> Martin, why is it you weren't able to reproduce (I haven't Mike> attempted yet)? Dunno. But regardless of any bugs, WRITE SAME will still need some special attention in the context of dm-crypt. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/19/2012 02:58 PM, Mike Snitzer wrote: On Wed, Dec 19 2012 at 11:58am -0500, Martin K. Petersen wrote: "Joseph" == Joseph Salisbury writes: Joseph> I captured the netconsole output from boot until I reproduced Joseph> the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph> ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. Mike, do you want to look into this? Milan (cc'd) is more well-versed with dm-crypt. Though we likely need to audit DM relative to WRITE SAME too (will do once I understand what added safety/constraints are needed). But do we know mount to somwhow be issuing WRITE SAME requests? Martin, why is it you weren't able to reproduce (I haven't attempted yet)? Martin, were you using the scsi_debug module, or a real scsi device(s)? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On Wed, Dec 19 2012 at 11:58am -0500, Martin K. Petersen wrote: > > "Joseph" == Joseph Salisbury writes: > > Joseph> I captured the netconsole output from boot until I reproduced > Joseph> the bug. The RIP points to kcryptd_crypt_write_io_submit() in > Joseph> ~/drivers/md/dm-crypt.c. The output can be seen at: > > I'm thinking that dm-crypt should probably set max_write_same_sectors to > 0. It doesn't really make much sense for a crypto driver to pass that > command through. > > Mike, do you want to look into this? Milan (cc'd) is more well-versed with dm-crypt. Though we likely need to audit DM relative to WRITE SAME too (will do once I understand what added safety/constraints are needed). But do we know mount to somwhow be issuing WRITE SAME requests? Martin, why is it you weren't able to reproduce (I haven't attempted yet)? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
> "Joseph" == Joseph Salisbury writes: Joseph> I captured the netconsole output from boot until I reproduced Joseph> the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph> ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. Mike, do you want to look into this? -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I captured the netconsole output from boot until I reproduced Joseph the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. Mike, do you want to look into this? -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On Wed, Dec 19 2012 at 11:58am -0500, Martin K. Petersen martin.peter...@oracle.com wrote: Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I captured the netconsole output from boot until I reproduced Joseph the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. Mike, do you want to look into this? Milan (cc'd) is more well-versed with dm-crypt. Though we likely need to audit DM relative to WRITE SAME too (will do once I understand what added safety/constraints are needed). But do we know mount to somwhow be issuing WRITE SAME requests? Martin, why is it you weren't able to reproduce (I haven't attempted yet)? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/19/2012 02:58 PM, Mike Snitzer wrote: On Wed, Dec 19 2012 at 11:58am -0500, Martin K. Petersen martin.peter...@oracle.com wrote: Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I captured the netconsole output from boot until I reproduced Joseph the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. Mike, do you want to look into this? Milan (cc'd) is more well-versed with dm-crypt. Though we likely need to audit DM relative to WRITE SAME too (will do once I understand what added safety/constraints are needed). But do we know mount to somwhow be issuing WRITE SAME requests? Martin, why is it you weren't able to reproduce (I haven't attempted yet)? Martin, were you using the scsi_debug module, or a real scsi device(s)? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Mike == Mike Snitzer snit...@redhat.com writes: Mike But do we know mount to somwhow be issuing WRITE SAME requests? I'm assuming that ext4 is somehow calling sb_issue_zeroout(). Mike Martin, why is it you weren't able to reproduce (I haven't Mike attempted yet)? Dunno. But regardless of any bugs, WRITE SAME will still need some special attention in the context of dm-crypt. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/19/2012 08:58 PM, Mike Snitzer wrote: On Wed, Dec 19 2012 at 11:58am -0500, Martin K. Petersen martin.peter...@oracle.com wrote: Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I captured the netconsole output from boot until I reproduced Joseph the bug. The RIP points to kcryptd_crypt_write_io_submit() in Joseph ~/drivers/md/dm-crypt.c. The output can be seen at: I'm thinking that dm-crypt should probably set max_write_same_sectors to 0. It doesn't really make much sense for a crypto driver to pass that command through. IMHO WRITE_SAME doesn't not make sense in encrypted storage. The same sectors in plaintext are _not_ the same in ciphertext. NEVER. (If so, you have a security problem.) It must be disabled in dmcrypt explicitly then (max_write_same_sectors?). Is it only dmcrypt, or encrypted fs are affected too? Milan -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph Martin, were you using the scsi_debug module, or a real scsi Joseph device(s)? I used scsi_debug for the test. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz mb...@redhat.com --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc-dev, cc-start, ti-len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits-max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = crypt, .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 04:07 PM, Milan Broz wrote: Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz mb...@redhat.com --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc-dev, cc-start, ti-len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits-max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = crypt, .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) I'll give it a spin right now. Thanks for the quick work! -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 04:07 PM, Milan Broz wrote: Does this help? dm-crypt: never use write same Ciphertext device is not compatible with WRITE SAME, disable it for all dmcrypt devices. Signed-off-by: Milan Broz mb...@redhat.com --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc-dev, cc-start, ti-len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits-max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = crypt, .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void) Great work, Milan. Your patch fixes the bug, stops the panic and allows dm-crypt to function properly. Will you be requesting this in v3.8 ? Thanks again, Joe -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On 12/19/2012 11:20 PM, Joseph Salisbury wrote: Great work, Milan. Your patch fixes the bug, stops the panic and allows dm-crypt to function properly. Thanks. Will you be requesting this in v3.8 ? This should go into 3.7 stable as well, I am talking with Alasdair already how to handle it. Milan -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
Milan == Milan Broz mb...@redhat.com writes: Milan dm-crypt: never use write same Milan Ciphertext device is not compatible with WRITE SAME, disable it Milan for all dmcrypt devices. Milan Signed-off-by: Milan Broz mb...@redhat.com Acked-by: Martin K. Petersen martin.peter...@oracle.com -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: dm-crypt: never use write same (was Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME)
On Wed, Dec 19 2012 at 7:11pm -0500, Martin K. Petersen martin.peter...@oracle.com wrote: Milan == Milan Broz mb...@redhat.com writes: Milan dm-crypt: never use write same Milan Ciphertext device is not compatible with WRITE SAME, disable it Milan for all dmcrypt devices. Milan Signed-off-by: Milan Broz mb...@redhat.com Acked-by: Martin K. Petersen martin.peter...@oracle.com I've developed more comprehensive WRITE SAME support for DM. It can be used in conjunction with Milan's patch (which enables Milan's patch to go in too and be more easily tagged for v3.7 stable). Anyway, my changes are available in the 'dm-write-same' branch of my github tree: git://github.com/snitm/linux.git See the top 5 commits: https://github.com/snitm/linux/commits/dm-write-same (topmost needs to be folded, I'll do that when posting to dm-devel in reply to this mail) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 05:35 PM, Martin K. Petersen wrote: "Joseph" == Joseph Salisbury writes: Joseph> I see that you are the author of this patch, so I wanted to run Joseph> this by you. I was thinking of requesting a revert for v3.7, Joseph> but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. Hi Martin, I captured the netconsole output from boot until I reproduced the bug. The RIP points to kcryptd_crypt_write_io_submit() in ~/drivers/md/dm-crypt.c. The output can be seen at: https://launchpadlibrarian.net/126102023/netconsole-lp1089818.log Thanks again, Joe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 05:35 PM, Martin K. Petersen wrote: Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I see that you are the author of this patch, so I wanted to run Joseph this by you. I was thinking of requesting a revert for v3.7, Joseph but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. Hi Martin, I captured the netconsole output from boot until I reproduced the bug. The RIP points to kcryptd_crypt_write_io_submit() in ~/drivers/md/dm-crypt.c. The output can be seen at: https://launchpadlibrarian.net/126102023/netconsole-lp1089818.log Thanks again, Joe -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 05:35 PM, Martin K. Petersen wrote: "Joseph" == Joseph Salisbury writes: Joseph> I see that you are the author of this patch, so I wanted to run Joseph> this by you. I was thinking of requesting a revert for v3.7, Joseph> but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. Thanks for the feedback, Martin. I will do some additional research and testing. I'll be sure to capture a full backtrace for analysis. Thanks again, Joe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 04:11 PM, Mike Snitzer wrote: On Fri, Dec 14 2012 at 3:30pm -0500, Joseph Salisbury wrote: Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd Author: Martin K. Petersen Date: Tue Sep 18 12:19:32 2012 -0400 [SCSI] sd: Implement support for WRITE SAME The regression was introduced as of v3.7-rc7. The bug can be reproduced with the following commands, which will operate on a virtual scsi_debug device, so they won't change any data on the test system. However, this will completely crash the system: sudo modprobe scsi_debug sudo luksformat -t ext4 /dev/sdb <- Or whatever device gets assigned after inserting scsi_debug. sudo cryptsetup luksOpen /dev/sdb treasure Everything works fine up to here, but the following will cause the crash: sudo mount /dev/mapper/treasure /mnt The bug can be reproduced on bare metal, in a VM and on i386 or amd64. I see that you are the author of this patch, so I wanted to run this by you. I was thinking of requesting a revert for v3.7, but I wanted to get your feedback first. Thanks, Joe [0] https://bugs.launchpad.net/bugs/1089818 The WRITE SAME change was introduced long before v3.7-rc7. I think your bisect is somehow wrong. From Linus' tree: git describe --contains 5db4486 v3.7-rc7~19^2 Reverting commit 5db4486 solves the bug previously mentioned. Milan Broz recently pointed out issues he found with luks when using a late 3.7-rc (rc7 afaik). Linus fixed that issue with this commit (which landed in the final v3.7): http://git.kernel.org/linus/684c9aaebbb0ea3a9954 That may not be _the_ problem though. But have you tried the final v3.7? Yes, v3.7 without reverting 5db4486 exhibits the bug. Mike I'll research further and provide additional data. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
> "Joseph" == Joseph Salisbury writes: Joseph> I see that you are the author of this patch, so I wanted to run Joseph> this by you. I was thinking of requesting a revert for v3.7, Joseph> but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On Fri, Dec 14 2012 at 3:30pm -0500, Joseph Salisbury wrote: > Hi Martin, > > A bug was opened against the Ubuntu kernel[0]. After a kernel > bisect, it was found that reverting the following commit resolved > this bug: > > commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd > Author: Martin K. Petersen > Date: Tue Sep 18 12:19:32 2012 -0400 > [SCSI] sd: Implement support for WRITE SAME > > The regression was introduced as of v3.7-rc7. > > The bug can be reproduced with the following commands, which will > operate on a virtual scsi_debug device, so they won't change any > data on the test system. However, this will completely crash the > system: > > sudo modprobe scsi_debug > sudo luksformat -t ext4 /dev/sdb <- Or whatever device gets assigned > after inserting scsi_debug. > sudo cryptsetup luksOpen /dev/sdb treasure > > Everything works fine up to here, but the following will cause the crash: > > sudo mount /dev/mapper/treasure /mnt > > The bug can be reproduced on bare metal, in a VM and on i386 or amd64. > > I see that you are the author of this patch, so I wanted to run this > by you. I was thinking of requesting a revert for v3.7, but I > wanted to get your feedback first. > > > Thanks, > > Joe > > > [0] https://bugs.launchpad.net/bugs/1089818 The WRITE SAME change was introduced long before v3.7-rc7. I think your bisect is somehow wrong. Milan Broz recently pointed out issues he found with luks when using a late 3.7-rc (rc7 afaik). Linus fixed that issue with this commit (which landed in the final v3.7): http://git.kernel.org/linus/684c9aaebbb0ea3a9954 That may not be _the_ problem though. But have you tried the final v3.7? Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd Author: Martin K. Petersen Date: Tue Sep 18 12:19:32 2012 -0400 [SCSI] sd: Implement support for WRITE SAME The regression was introduced as of v3.7-rc7. The bug can be reproduced with the following commands, which will operate on a virtual scsi_debug device, so they won't change any data on the test system. However, this will completely crash the system: sudo modprobe scsi_debug sudo luksformat -t ext4 /dev/sdb <- Or whatever device gets assigned after inserting scsi_debug. sudo cryptsetup luksOpen /dev/sdb treasure Everything works fine up to here, but the following will cause the crash: sudo mount /dev/mapper/treasure /mnt The bug can be reproduced on bare metal, in a VM and on i386 or amd64. I see that you are the author of this patch, so I wanted to run this by you. I was thinking of requesting a revert for v3.7, but I wanted to get your feedback first. Thanks, Joe [0] https://bugs.launchpad.net/bugs/1089818 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd Author: Martin K. Petersen martin.peter...@oracle.com Date: Tue Sep 18 12:19:32 2012 -0400 [SCSI] sd: Implement support for WRITE SAME The regression was introduced as of v3.7-rc7. The bug can be reproduced with the following commands, which will operate on a virtual scsi_debug device, so they won't change any data on the test system. However, this will completely crash the system: sudo modprobe scsi_debug sudo luksformat -t ext4 /dev/sdb - Or whatever device gets assigned after inserting scsi_debug. sudo cryptsetup luksOpen /dev/sdb treasure Everything works fine up to here, but the following will cause the crash: sudo mount /dev/mapper/treasure /mnt The bug can be reproduced on bare metal, in a VM and on i386 or amd64. I see that you are the author of this patch, so I wanted to run this by you. I was thinking of requesting a revert for v3.7, but I wanted to get your feedback first. Thanks, Joe [0] https://bugs.launchpad.net/bugs/1089818 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On Fri, Dec 14 2012 at 3:30pm -0500, Joseph Salisbury joseph.salisb...@canonical.com wrote: Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd Author: Martin K. Petersen martin.peter...@oracle.com Date: Tue Sep 18 12:19:32 2012 -0400 [SCSI] sd: Implement support for WRITE SAME The regression was introduced as of v3.7-rc7. The bug can be reproduced with the following commands, which will operate on a virtual scsi_debug device, so they won't change any data on the test system. However, this will completely crash the system: sudo modprobe scsi_debug sudo luksformat -t ext4 /dev/sdb - Or whatever device gets assigned after inserting scsi_debug. sudo cryptsetup luksOpen /dev/sdb treasure Everything works fine up to here, but the following will cause the crash: sudo mount /dev/mapper/treasure /mnt The bug can be reproduced on bare metal, in a VM and on i386 or amd64. I see that you are the author of this patch, so I wanted to run this by you. I was thinking of requesting a revert for v3.7, but I wanted to get your feedback first. Thanks, Joe [0] https://bugs.launchpad.net/bugs/1089818 The WRITE SAME change was introduced long before v3.7-rc7. I think your bisect is somehow wrong. Milan Broz recently pointed out issues he found with luks when using a late 3.7-rc (rc7 afaik). Linus fixed that issue with this commit (which landed in the final v3.7): http://git.kernel.org/linus/684c9aaebbb0ea3a9954 That may not be _the_ problem though. But have you tried the final v3.7? Mike -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I see that you are the author of this patch, so I wanted to run Joseph this by you. I was thinking of requesting a revert for v3.7, Joseph but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 04:11 PM, Mike Snitzer wrote: On Fri, Dec 14 2012 at 3:30pm -0500, Joseph Salisbury joseph.salisb...@canonical.com wrote: Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd Author: Martin K. Petersen martin.peter...@oracle.com Date: Tue Sep 18 12:19:32 2012 -0400 [SCSI] sd: Implement support for WRITE SAME The regression was introduced as of v3.7-rc7. The bug can be reproduced with the following commands, which will operate on a virtual scsi_debug device, so they won't change any data on the test system. However, this will completely crash the system: sudo modprobe scsi_debug sudo luksformat -t ext4 /dev/sdb - Or whatever device gets assigned after inserting scsi_debug. sudo cryptsetup luksOpen /dev/sdb treasure Everything works fine up to here, but the following will cause the crash: sudo mount /dev/mapper/treasure /mnt The bug can be reproduced on bare metal, in a VM and on i386 or amd64. I see that you are the author of this patch, so I wanted to run this by you. I was thinking of requesting a revert for v3.7, but I wanted to get your feedback first. Thanks, Joe [0] https://bugs.launchpad.net/bugs/1089818 The WRITE SAME change was introduced long before v3.7-rc7. I think your bisect is somehow wrong. From Linus' tree: git describe --contains 5db4486 v3.7-rc7~19^2 Reverting commit 5db4486 solves the bug previously mentioned. Milan Broz recently pointed out issues he found with luks when using a late 3.7-rc (rc7 afaik). Linus fixed that issue with this commit (which landed in the final v3.7): http://git.kernel.org/linus/684c9aaebbb0ea3a9954 That may not be _the_ problem though. But have you tried the final v3.7? Yes, v3.7 without reverting 5db4486 exhibits the bug. Mike I'll research further and provide additional data. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [v3.7 Regression] [SCSI] sd: Implement support for WRITE SAME
On 12/14/2012 05:35 PM, Martin K. Petersen wrote: Joseph == Joseph Salisbury joseph.salisb...@canonical.com writes: Joseph I see that you are the author of this patch, so I wanted to run Joseph this by you. I was thinking of requesting a revert for v3.7, Joseph but I wanted to get your feedback first. I copied luksformat from a Debian box so I could try to reproduce on OL6. Everything works fine for me here. I set up a encrypted ext4 device, unpacked a kernel tarball, and did a build. The oops screenshot in the launchpad bug report is pretty useless. Please provide a full backtrace so we can get a better idea what's going on. Thanks for the feedback, Martin. I will do some additional research and testing. I'll be sure to capture a full backtrace for analysis. Thanks again, Joe -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/