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: <20200110134236.GM2844@hirez.programming.kicks-ass.net>
Date:   Fri, 10 Jan 2020 14:42:36 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Qais Yousef <qais.yousef@....com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        valentin.schneider@....com, qperret@...gle.com,
        Patrick Bellasi <patrick.bellasi@...bug.net>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] sched/rt: Add a new sysctl to control uclamp_util_min

On Thu, Jan 09, 2020 at 01:00:58PM +0000, Qais Yousef wrote:
> On 01/08/20 14:44, Peter Zijlstra wrote:

> > Did cpu_uclamp_write() forget to check for input<0 ?
> 
> Hmm just tried that and it seems so
> 
> # echo -1 > cpu.uclamp.min
> # cat cpu.uclamp.min
> 42949671.96
> 
> capacity_from_percent(); we check for
> 
> 7301                 if (req.percent > UCLAMP_PERCENT_SCALE) {
> 7302                         req.ret = -ERANGE;
> 7303                         return req;
> 7304                 }
> 
> But req.percent is s64, maybe it should be u64?

		if ((u64)req.percent > UCLAMP_PERCENT_SCALE)

should do, I think.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ