Re: [PATCH] virtio-blk: limit seg_max to a safe value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 18, 2021 at 04:04:15PM +0100, Stefan Hajnoczi wrote:
> +	/* Prevent integer overflows and excessive blk-mq req cmd_size */
> +	sg_elems = min_t(u32, sg_elems, SG_MAX_SEGMENTS);

Please pick your own constant here instead of abusing some kernel
implementation detail (that is fairly SCSI specific to start with).

It might be useful to also document such limits, even if just advisory,
in the virtio spec.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux