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:   Fri, 17 Jan 2020 11:47:58 +0000
From:   Quentin Perret <qperret@...gle.com>
To:     Thara Gopinath <thara.gopinath@...aro.org>
Cc:     mingo@...hat.com, peterz@...radead.org, ionela.voinescu@....com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rui.zhang@...el.com, daniel.lezcano@...aro.org,
        viresh.kumar@...aro.org, linux-kernel@...r.kernel.org,
        amit.kachhap@...il.com, javi.merino@...nel.org,
        kernel-team@...roid.com
Subject: Re: [Patch v8 7/7] sched/fair: Enable tuning of decay period

On Tuesday 14 Jan 2020 at 14:57:39 (-0500), Thara Gopinath wrote:
> +static int __init setup_sched_thermal_decay_shift(char *str)
> +{
> +	int _shift;
> +
> +	if (kstrtoint(str, 0, &_shift))
> +		pr_warn("Unable to set scheduler thermal pressure decay shift parameter\n");

Nit: looking at kstrtoint() it seems that _shift will be left unmodified
upon failure. To avoid feeding a random value to clamp() below, perhaps
initialize _shift to 0 ?

> +	sched_thermal_decay_shift = clamp(_shift, 0, 10);
> +	return 1;
> +}

Thanks,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ