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: <759b1eb2-2d3d-89df-9ea0-38622f285284@oracle.com>
Date:   Mon, 4 Sep 2017 15:54:23 +0800
From:   Ethan Zhao <ethan.zhao@...cle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...hat.com, mcgrof@...nel.org, keescook@...omium.org,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        james.puthukattukaran@...cle.com, ethan.kernel@...il.com
Subject: Re: [PATCH v2] sched: check user input value of sysctl_sched_time_avg

Peter,


On 2017/9/4 15:49, Peter Zijlstra wrote:
> On Sat, Sep 02, 2017 at 02:57:32PM +0800, Ethan Zhao wrote:
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 6648fbb..609bed2 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -367,7 +367,7 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write,
>>   		.data		= &sysctl_sched_time_avg,
>>   		.maxlen		= sizeof(unsigned int),
>>   		.mode		= 0644,
>> -		.proc_handler	= proc_dointvec,
>> +		.proc_handler	= sched_time_avg_handler,
> *sigh*, what's wrong with the below? Too easy?
  :),  seems I walked zigzag several cycles to get the right point.

  Thanks,
  Ethan
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 6648fbbb8157..bbbc6a17c15e 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -367,7 +367,8 @@ static struct ctl_table kern_table[] = {
>   		.data		= &sysctl_sched_time_avg,
>   		.maxlen		= sizeof(unsigned int),
>   		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_min_max,
> +		.extra1		= &one,
>   	},
>   #ifdef CONFIG_SCHEDSTATS
>   	{
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ