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, 7 Mar 2012 17:11:55 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch 1/2] mm, counters: remove task argument to sync_mm_rss
 and __sync_task_rss_stat

On Tue, 6 Mar 2012 19:21:39 -0800 (PST)
David Rientjes <rientjes@...gle.com> wrote:

> -static void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm)
> +static void __sync_task_rss_stat(struct mm_struct *mm)
>  {
>  	int i;
>  
>  	for (i = 0; i < NR_MM_COUNTERS; i++) {
> -		if (task->rss_stat.count[i]) {
> -			add_mm_counter(mm, i, task->rss_stat.count[i]);
> -			task->rss_stat.count[i] = 0;
> +		if (current->rss_stat.count[i]) {
> +			add_mm_counter(mm, i, current->rss_stat.count[i]);
> +			current->rss_stat.count[i] = 0;
>  		}
>  	}
> -	task->rss_stat.events = 0;
> +	current->rss_stat.events = 0;
>  }

hm, with my gcc it's beneficial to cache `current' in a local.  But
when I tried that, Weird Things happened, because gcc has gone and
decided to inline __sync_task_rss_stat() into its callers.  I don't see
how that could have been the right thing to do.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ