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:   Fri, 3 Nov 2017 00:35:53 +0100
From:   Florian Westphal <fw@...len.de>
To:     Charlie Sale <chucks.8090@...il.com>
Cc:     pablo@...filter.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

Charlie Sale <chucks.8090@...il.com> wrote:
> Fixed FIXME comment in code my changing a vmalloc call
> to a kmalloc call. Thought it would be a good place to
> start for a first patch.

Please at least compile test your patches.

> -	/* FIXME: don't use vmalloc() here or anywhere else -HW */
> -	hinfo = vmalloc(sizeof(struct xt_hashlimit_htable) +
> -	                sizeof(struct hlist_head) * size);
> +
> +	hinfo = kmalloc(sizeof(*hinfo) +
> +			sizeof(struct hlist_head) * size, GPT_KERNEL);

If anything this should be switched to kvmalloc, not kmalloc.

Also, hinfo cannot be free'd via vfree after this change, so you need to
adjust all free operations too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ