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>] [day] [month] [year] [list]
Date:   Tue, 09 Jun 2020 15:50:42 -0700
From:   Joe Perches <joe@...ches.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: RFC: Allow kfree to free all types of allocations ?

There are a lot of patches trying to match
various [kv].alloc allocations to specific frees.

But are there frees in a fast path?

Why not convert kfree to add a few extra tests
and add #defines for existing uses

Something like:

void kfree(const void *addr)
{
	if (is_kernel_rodata((unsigned long)addr))
		return;

	if (is_vmalloc_addr(addr))
		_vfree(addr);
	else
		_kfree(addr);
}

And add defines like:

#define kvfree		kfree
#define vfree		kfree
#define kfree_const	kfree

Does 4 extra tests really matter?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ