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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090509120955.GA5749@liondog.tnic>
Date:	Sat, 9 May 2009 14:09:55 +0200
From:	Borislav Petkov <petkovbb@...glemail.com>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Borislav Petkov <petkovbb@...glemail.com>, bzolnier@...il.com,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/14] ide-tape: fix potential fs requests bug

Hi,

On Sat, May 09, 2009 at 12:25:14PM +0200, Sam Ravnborg wrote:
> OK - but If I am wondering maybe the next reader will
> think the same
> A small comment:
> /* idetape_get_mode_sense_results() prevent sizes less than 1 << 9 */
> Seems to be reasonable.

but you _shouldn't_ be wondering since there's no way for the ide tape
to have smaller blocksize, at least according to the spec - I've yet to
see a device with lesser blocksize.

However, if we still get divide-by-zero then there's something else
that is broken in the driver and a simple comment won't prevent us from
hitting the bug. Instead, the code has to be fixed (and we'll fix it
like the countless other times we've done it sofar).

By the way, ide-floppy does the same calculation because some devices
do have blocksize > 512. And there's no comment there either in
ide_floppy_get_capacity(), the line doing:

floppy->bs_factor = length / 512;

which is basically the same operation (>> 9) for integer types.

And the reason for not having comment there is that 512 is the smallest
blocksize for that type of devices and a comment like that is simply
superfluous because blocksize < 512 is just _not_ _happening_ for the
zillion devices out there.

-- 
Regards/Gruss,
    Boris.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ