News for hackers. Stuff that matters.
Re:WD Passport 4TB drives don't support WRITE SAME command by trasz on Thursday March 26, 2020 @02:02PM (#22696162)
If not supporting WRITE SAME turns out to be a security issue, it's a bug in the operating system.

And yes, some filesystems do - ESX, for example, uses what they call VAAI, which is a set of optional (standardized) SCSI functionality, like WRITE SAME, COMPARE AND SWAP (iirc), and server side copy.

Re:WD Passport 4TB drives don't support WRITE SAME command by jjoonathan on Thursday March 26, 2020 @04:12PM (#22697429)
Ah, blame tennis, my favorite game!

Is there an alternative non-optional strategy for achieving secure delete (or revocation semantics of some kind)? If not, this is a fundamental capability that you can't paper over by slapping an abstraction layer on top any more than you could turn a 1TB HDD into a 2TB HDD with an abstraction layer. If so, it seems to me like the bug is very much in the hard drive / standards, not in the operating system.

Re:WD Passport 4TB drives don't support WRITE SAME command by kllrnohj on Thursday March 26, 2020 @04:23PM (#22697588)
> Is there an alternative non-optional strategy for achieving secure delete

Issue normal data writes of blocks that are filled with zeros. The same way regular data makes it to the drive just fine will also of course work for data that's all zeros.

Re:WD Passport 4TB drives don't support WRITE SAME command by jjoonathan on Thursday March 26, 2020 @05:54PM (#22698378)
Oh, so WRITE SAME doesn't come with "no wear leveling" semantics? That makes emulation much more reasonable.
Re:WD Passport 4TB drives don't support WRITE SAME command by kllrnohj on Thursday March 26, 2020 @08:01PM (#22699253)
I think the only way to get "no wear leveling" is the ATA Secure Erase command. Which you only need for devices that do wear leveling in the first place which the drive in question doesn't anyway so it's a bit moot.
Re:WD Passport 4TB drives don't support WRITE SAME command by pixl97 on Thursday March 26, 2020 @05:04PM (#22697981)
Would that work on a filesystem that supports sparse files?
Re:WD Passport 4TB drives don't support WRITE SAME command by throwaway373438 on Thursday March 26, 2020 @05:10PM (#22698028)
We're talking about the filesystem driver itself issuing the write.

The above is a discussion about whether the filesystem driver or the block device driver would issue the SCSI commands.

This would never happen from userspace.

Re:WD Passport 4TB drives don't support WRITE SAME command by tedunangst on Thursday March 26, 2020 @06:27PM (#22698621)
Why would you need to overwrite blocks of a sparse file? Which blocks would you be overwriting?
Re:WD Passport 4TB drives don't support WRITE SAME command by outworlder on Thursday March 26, 2020 @03:01PM (#22696715)
> If not supporting WRITE SAME turns out to be a security issue, it's a bug in the operating system.

Is it though? There is probably a big drawback in terms of resource consumption if this is not supported. Not all environments may be ok with this.

Re:WD Passport 4TB drives don't support WRITE SAME command by codys on Thursday March 26, 2020 @03:27PM (#22696987)
That sounds like a performance issue, not a security issue?
Re:WD Passport 4TB drives don't support WRITE SAME command by HelloNurse on Thursday March 26, 2020 @03:37PM (#22697099)
The (potential) security issue is that the operating system fails to clear disk space, possibly incorrectly assuming it has actually been cleared.
Re:WD Passport 4TB drives don't support WRITE SAME command by cornishpixels on Thursday March 26, 2020 @04:00PM (#22697329)
Except that it receives an error, so if it's assuming that, it's wrong.

This command is not mandated to be supported. Therefore, if an OS assumes it is supported, that's an OS problem, not the drive.

Re:WD Passport 4TB drives don't support WRITE SAME command by rowanG077 on Thursday March 26, 2020 @09:00PM (#22699584)
I don't see how this could occur. Either you do WRITE SAME and it works or it doesn't and you have to manually issue WRITE commands.