Thread (17 messages) 17 messages, 6 authors, 2017-10-18

RE: Adjusting further size determinations?

From: David Laight <hidden>
Date: 2017-10-18 12:58:58
Also in: kernel-janitors, linuxppc-dev, lkml

From: SF Markus Elfring
quoted
quoted
quoted
quoted
Unpleasant consequences are possible in both cases.
How much do you care to reduce the failure probability further?
Zero.
I am interested to improve the software situation a bit more here.
There are probably better places to spend your time!

If you want 'security' for kmalloc() then:

#define KMALLOC_TYPE(flags) (type *)kmalloc(sizeof (type), flags)
#define KMALLOC(ptr, flags) *(ptr) = KMALLOC_TYPE(typeof *(ptr), flags)

and change:
	ptr = kmalloc(sizeof *ptr, flags);
to:
	KMALLOC(&ptr, flags);

But it is all churn for churn's sake.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help