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:	Thu, 20 Nov 2008 13:00:54 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.28-rc5 03/11] kmemleak: Add the memory
	allocation/freeing hooks


* Catalin Marinas <catalin.marinas@....com> wrote:

> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -112,6 +112,7 @@
>  #include	<linux/rtmutex.h>
>  #include	<linux/reciprocal_div.h>
>  #include	<linux/debugobjects.h>
> +#include	<linux/memleak.h>

please move this line up 5-7 lines so that it auto-merges fine with 
the kmemcheck-next tree.

> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -24,6 +24,7 @@
>  #include <linux/kallsyms.h>
>  #include <linux/memory.h>
>  #include <linux/math64.h>
> +#include <linux/memleak.h>

ditto.

> -	return __vmalloc_area_node(area, gfp_mask, prot, -1,
> -					__builtin_return_address(0));
> +	void *addr = __vmalloc_area_node(area, gfp_mask, prot, -1,
> +					 __builtin_return_address(0));
> +
> +	/* this needs ref_count = 2 since vm_struct also contains a
> +	 * pointer to this address. The guard page is also subtracted
> +	 * from the size */
> +	memleak_alloc(addr, area->size - PAGE_SIZE, 2);

please use the customary comment style:

  /*
   * Comment .....
   * ...... goes here:
   */

Thanks,

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