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: <20191115090532.zsqhh46sbrijsyyl@e107158-lin.cambridge.arm.com>
Date:   Fri, 15 Nov 2019 09:05:33 +0000
From:   Qais Yousef <qais.yousef@....com>
To:     Valentin Schneider <valentin.schneider@....com>
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org,
        peterz@...radead.org, vincent.guittot@...aro.org,
        Dietmar.Eggemann@....com, tj@...nel.org,
        patrick.bellasi@...bug.net, surenb@...gle.com, qperret@...gle.com
Subject: Re: [PATCH] sched/uclamp: Fix overzealous type replacement

On 11/15/19 00:05, Valentin Schneider wrote:
> On 14/11/2019 20:28, Qais Yousef wrote:
> > On 11/13/19 16:53, Valentin Schneider wrote:
> >> Some uclamp helpers had their return type changed from 'unsigned int' to
> >> 'enum uclamp_id' by commit
> >>
> >>   0413d7f33e60 ("sched/uclamp: Always use 'enum uclamp_id' for clamp_id values")
> >>
> >> but it happens that some *actually* do return an unsigned int value. Those
> >> are the helpers that return a utilization value: uclamp_rq_max_value() and
> >> uclamp_eff_value(). Fix those up.
> >>
> >> Note that this doesn't lead to any obj diff using a relatively recent
> >> aarch64 compiler (8.3-2019.03). The current code of e.g. uclamp_eff_value()
> >> already figures out that the return value is 11 bits (bits_per(1024)) and
> >> doesn't seem to do anything funny. I'm still marking this as fixing the
> >> above commit to be on the safe side.
> >>
> >> Fixes: 0413d7f33e60 ("sched/uclamp: Always use 'enum uclamp_id' for clamp_id values")
> >> Signed-off-by: Valentin Schneider <valentin.schneider@....com>
> >> ---
> > 
> > The changelog could be a bit simpler and more explicitly say 0413d7f33e60
> > wrongly changed the return type of some functions. For a second I thought
> > something weird is going inside these functions.
> > 
> 
> The first paragraph is exactly that, no? The rest (that starts with "Note
> that") is just optional stuff I look into because I was curious.

The way it read to me is that the function was returning uclamp_id as unsigned
int, hence my confusion/comment. Anyway, it's not a big deal. It's not really
a problem.

Thanks

--
Qais Yousef

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ