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:	Wed, 2 Jul 2014 12:18:52 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Yan, Zheng" <zheng.z.yan@...el.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org, acme@...radead.org,
	eranian@...gle.com, andi@...stfloor.org
Subject: Re: [PATCH V4 05/16] perf, core: pmu specific data for perf task
 context

On Mon, Jun 30, 2014 at 04:50:42PM +0800, Yan, Zheng wrote:

> @@ -3068,6 +3077,14 @@ alloc_perf_context(struct pmu *pmu, struct task_struct *task)
>  	if (!ctx)
>  		return NULL;
>  
> +	if (task && pmu->task_ctx_size > 0) {
> +		ctx->task_ctx_data = kzalloc(pmu->task_ctx_size, GFP_KERNEL);
> +		if (!ctx->task_ctx_data) {
> +			kfree(ctx);
> +			return NULL;
> +		}
> +	}

Can we delay this allocation until such time as that its actually
needed? Otherwise we're wasting all this memory..

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ