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: <4BD20B7E.2070201@gmail.com>
Date:	Fri, 23 Apr 2010 13:05:02 -0800
From:	Kent Overstreet <kent.overstreet@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] bcache: ver 3

On 04/23/2010 12:39 PM, Randy Dunlap wrote:

>> +#define label(l, foo)	if (0) { l: foo; }
>
> I'd prefer that macro to go away.

I kind of like it, the way I use it it's shorthand for "return with x status"; 
it just makes return codes and exiting cleaner. But if you still hate it after 
you've read the functions where it's used, I can take it out.

>> +	return d[i / keys_per_page] + (i % keys_per_page);
>
> That builds OK on i386?  or does it need udivdi3() and/or umoddi3()?

If my understanding is correct, those are only needed for 64 bits, i indexes 
into a single node so 32 bits is plenty.

>
>> +}
>
>> +static int lookup_dev(struct cache_device *c, struct bio *bio)
>> +{
>> +	int dev;
>> +	for (dev = 0; dev<  256; dev++)
>
> Use a macro for 256.. in lots of places.

Yes, definitely.

> 		bcache: cannot allocate memory
> "kmalloc error" sounds like kmalloc() had an internal error.

Agreed.

> Need to document the sysfs interfaces:

Ok, I'll start on that.

>> +	err = "vmalloc error";
>
> 		"cannot vmalloc memory";

Done.

--
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