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: <20220817004445.43216-1-hucool.lihua@huawei.com>
Date:   Wed, 17 Aug 2022 08:44:45 +0800
From:   Li Hua <hucool.lihua@...wei.com>
To:     <peterz@...radead.org>
CC:     <bristot@...hat.com>, <bsegall@...gle.com>,
        <dietmar.eggemann@....com>, <hucool.lihua@...wei.com>,
        <juri.lelli@...hat.com>, <linux-kernel@...r.kernel.org>,
        <mgorman@...e.de>, <mingo@...hat.com>, <rostedt@...dmis.org>,
        <stable@...r.kernel.org>, <vincent.guittot@...aro.org>,
        <vschneid@...hat.com>
Subject: Re: [PATCH -next] sched/cputime: Fix the bug of reading time backward from /proc/stat

It's unreadable, I'm sorry about that.

The CPU statistics time read from /proc/stat should only be incremented. The bug
I found is that the value read latest is smaller than the former.

The root cause of the problem is that the "vtime->utime" and "delta" are temporarily
added to the stack and show to the user. The value of 'vtime->utime + delta' depends
on which task the CPU is executing. As bellow:
show_stat -> kcpustat_cpu_fetch -> kcpustat_cpu_fetch_vtime -> cpustat[CPUTIME_USER] += vtime->utime + delta

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ