lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 9 Jun 2009 15:09:30 +1000 From: Stephen Rothwell <sfr@...b.auug.org.au> To: Jens Axboe <jens.axboe@...cle.com> Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org, Hannes Reinecke <hare@...e.de>, john cooper <john.cooper@...hat.com>, Rusty Russell <rusty@...tcorp.com.au> Subject: linux-next: manual merge of the block tree with the rr tree Hi Jens, Today's linux-next merge of the block tree got conflicts in drivers/block/virtio_blk.c and include/linux/virtio_blk.h between commit a69a9b05d1050c24767d438bbe220157b7ff9250 ("Add serial number support for virtio_blk, V4a") from the rr tree and commit 1cde26f928863d90e9e7c1217880c8450464d305 ("virtio_blk: SG_IO passthru support") from the block tree. I fixed it up (see below) and can carry the fix as necessary. -- Cheers, Stephen Rothwell sfr@...b.auug.org.au diff --cc drivers/block/virtio_blk.c index ad8cb22,c4845b1..0000000 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@@ -178,14 -175,16 +203,22 @@@ static int virtblk_ioctl(struct block_d unsigned cmd, unsigned long data) { struct gendisk *disk = bdev->bd_disk; + void __user *argp = (void __user *)data; + struct virtio_blk *vblk = disk->private_data; - /* - * Only allow the generic SCSI ioctls if the host can support it. - */ - if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) - return -ENOIOCTLCMD; - - return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, - (void __user *)data); + switch (cmd) { + case HDIO_GET_IDENTITY: + return virtblk_identify(disk, argp); + default: ++ /* ++ * Only allow the generic SCSI ioctls if the host ++ * can support it. ++ */ ++ if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) ++ return -ENOIOCTLCMD; ++ + return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); + } } /* We provide getgeo only to please some old bootloader/partitioning tools */ @@@ -390,7 -390,7 +424,7 @@@ static struct virtio_device_id id_table static unsigned int features[] = { VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, - VIRTIO_BLK_F_IDENTIFY - VIRTIO_BLK_F_SCSI, ++ VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY, }; static struct virtio_driver virtio_blk = { diff --cc include/linux/virtio_blk.h index eb470d5,4dbcbc1..0000000 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h @@@ -15,9 -15,7 +15,10 @@@ #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ + #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ +#define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */ + +#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ struct virtio_blk_config { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists