aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorNiklas Cassel <[email protected]>2025-11-19 14:13:15 +0000
committerNiklas Cassel <[email protected]>2025-11-20 12:37:18 +0000
commit91842ed844a068a41a38f97a1ac5535b909279cd (patch)
tree8c15ce45aa3278096f7c37a5182fcb862549e8a6 /lib/test_fortify/write_overflow-strlcpy-src.c
parentata: libata-scsi: Fix system suspend for a security locked drive (diff)
downloadkernel-91842ed844a068a41a38f97a1ac5535b909279cd.tar.gz
kernel-91842ed844a068a41a38f97a1ac5535b909279cd.zip
ata: libata-core: Set capacity to zero for a security locked drive
For Security locked drives (drives that have Security enabled, and have not been Security unlocked by boot firmware), the automatic partition scanning will result in the user being spammed with errors such as: ata5.00: failed command: READ DMA ata5.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 7 dma 4096 in res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error) ata5.00: status: { DRDY ERR } ata5.00: error: { ABRT } sd 4:0:0:0: [sda] tag#7 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sd 4:0:0:0: [sda] tag#7 Sense Key : Aborted Command [current] sd 4:0:0:0: [sda] tag#7 Add. Sense: No additional sense information during boot, because most commands except for IDENTIFY will be aborted by a Security locked drive. For a Security locked drive, set capacity to zero, so that no automatic partition scanning will happen. If the user later unlocks the drive using e.g. hdparm, the close() by the user space application should trigger a revalidation of the drive. Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions