Re: [patch 0/5] Support for sanitization flag in low-level pageallocator

From: Peter Zijlstra
Date: Thu May 28 2009 - 15:45:32 EST


On Thu, 2009-05-28 at 12:50 +0100, Alan Cox wrote:
> The performance cost of such a security action are NIL when the feature
> is disabled. So the performance cost in the general case is irrelevant.

Not really, much of the code posted in this thread has the form:

int sanitize_all_mem; /* note the lack of __read_mostly */

void some_existing_function()
{
if (sanitize_all_mem) { /* extra branch */
/* do stuff */
}
}

void sanitize_obj(void *obj)
{
if (!sanitize_all_mem) /* extra branch */
return;

/* do stuff */
}


void another_existing_function()
{
sanitize_obj(obj); /* extra call */
}

That doesn't equal NIL, that equals extra function calls and branches.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/