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]
Message-ID: <20231008105801.GC6320@noisy.programming.kicks-ass.net>
Date:   Sun, 8 Oct 2023 12:58:01 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "brookxu.cn" <brookxu.cn@...il.com>
Cc:     bsingharora@...il.com, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] delayacct: convert task->delays to a object

On Sun, Oct 08, 2023 at 06:49:37PM +0800, brookxu.cn wrote:
> From: Chunguang Xu <chunguang.xu@...pee.com>
> 
> Since in some scenarios we still want to get the task delayacct
> through taskstats, so commit <0cd7c741f01de> introduces a sysctl to

This is not the canonical way to reference a commit.

> enable it dynamically. However, since task->delays is allocated
> during fork(), task->delays will not be reallocated when delayacct
> is enabled later. This will make we cannot get the delayacct of old
> tasks, but the new tasks cans. This can easily lead to confusion.
> Therefore, try to workaround this issue by convert task->delays to
> an object.

And grow task_struct for no reason? I think not.

> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 77f01ac385f7..5cc78184a31f 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -37,6 +37,7 @@
>  #include <linux/kcsan.h>
>  #include <linux/rv.h>
>  #include <linux/livepatch_sched.h>
> +#include <linux/delayacct.h>
>  #include <asm/kmap_size.h>
>  
>  /* task_struct member predeclarations (sorted alphabetically): */
> @@ -1331,7 +1332,7 @@ struct task_struct {
>  	struct page_frag		task_frag;
>  
>  #ifdef CONFIG_TASK_DELAY_ACCT
> -	struct task_delay_info		*delays;
> +	struct task_delay_info		delays;
>  #endif

Yeah, no.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ