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-next>] [day] [month] [year] [list]
Message-ID: <20090619090405.GA3222@localdomain.by>
Date:	Fri, 19 Jun 2009 12:04:05 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...l.by>
To:	Jens Axboe <jens.axboe@...cle.com>
Cc:	"Martin K. Petersen" <martin.petersen@...cle.com>,
	linux-kernel@...r.kernel.org
Subject: blk-settings.c integer truncation

Hello.

commit e475bba2fdee9c3dbfe25f026f8fb8de69508ad2
introduced 'void blk_set_default_limits(struct queue_limits *lim)'

blkdev.h
...
#endif
#define BLK_BOUNCE_ANY		(-1ULL)
#define BLK_BOUNCE_ISA		(ISA_DMA_THRESHOLD)


struct queue_limits {
	unsigned long		bounce_pfn;
	unsigned long		seg_boundary_mask;
....
};

Assignment at block/blk-settings.c:115 (4 bytes = 8 bytes):
lim->bounce_pfn = BLK_BOUNCE_ANY;

leads to truncation:
block/blk-settings.c: In function ‘blk_set_default_limits’:
block/blk-settings.c:115: warning: large integer implicitly truncated to unsigned type


Should BLK_BOUNCE_ANY be (-1UL)?


Thanks.

	Sergey

p.s.
In case it's already fixed - let me know.
--
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