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]
Date:	Mon, 3 Aug 2009 10:32:28 -0700
From:	"Othman, Ossama" <ossama.othman@...el.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Moorestown RAR Handler driver, MRST 2.6.31-rc3

Hi Sam,

>Please use:
>+ memrar-y := memrar_allocator.o memrar_handler.o
>
>The foo-objs syntax is deprecated.

Thanks!  I'll make that change.

The file `Documentation/kbuild/makefiles.txt' doesn't mention the deprecation, AFAICT.  Can you tell me where it is documented?

>> +
>> +
>> +#include "memrar_allocator.h"
>> +#include <linux/slab.h>
>> +#include <linux/bug.h>
>
><linux/...> comes _before_ you own includes.
>And an empty line in between.

Will do!

This guideline doesn't appear in Documentation/CodingStyle.  Should it?
 
>> +
>> +
>> +struct memrar_allocator *memrar_create_allocator(unsigned long base,
>> +						 size_t capacity,
>> +						 size_t block_size)
>> +{
>> +	struct memrar_allocator *allocator = 0;
>
>It is recommended to separate definition,
>and assignment.
>So this should look like this:
>
>	struct memrar_allocator *allocator;
>
>	allocator = 0;

Okay, I'll fix that, too.  Should this go into Documentation/CodingStyle, too?

>> +
>> +	/* Validate parameters. */
>> +	if (/*
>> +	     * Make sure we can allocate the entire memory allocator
>> +	     * space.
>> +	     */
>> +		ULONG_MAX - capacity >= base
>> +
>> +		/* Zero capacity or block size are obviously invalid. */
>> +		&& capacity != 0
>> +		&& block_size != 0) {
>
>Very ugly way to comment your if (..) IMHO
>Put the comment abvoe the if.

You're not the only that has mentioned that :).  I'll fix this in the next revision, as well.

>I'm short on time - so this is the comments for today...

Thanks a lot for the feedback, Sam!  I'll address all of your comments in the next revision!

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