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: <4ff9f435-9932-f555-9f19-65f92041950e@redhat.com>
Date:   Fri, 4 Jun 2021 18:36:58 +0200
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, Phil Auld <pauld@...hat.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Kate Carcia <kcarcia@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Clark Willaims <williams@...hat.com>,
        John Kacur <jkacur@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH V3 6/9] trace/hwlat: Use the generic function to
 read/write width and window

On 6/3/21 11:27 PM, Steven Rostedt wrote:
> On Fri, 14 May 2021 22:51:15 +0200
> Daniel Bristot de Oliveira <bristot@...hat.com> wrote:
> 
>> @@ -733,16 +624,18 @@ static ssize_t hwlat_mode_write(struct file *filp, const char __user *ubuf,
>>  	return ret;
>>  }
>>  
>> -static const struct file_operations width_fops = {
>> -	.open		= tracing_open_generic,
>> -	.read		= hwlat_read,
>> -	.write		= hwlat_width_write,
>> +static struct trace_ull_config hwlat_width = {
>> +	.lock		= &hwlat_data.lock,
>> +	.val		= &hwlat_data.sample_width,
>> +	.max		= &hwlat_data.sample_window,
>> +	.min		= NULL,
>>  };
>>  
>> -static const struct file_operations window_fops = {
>> -	.open		= tracing_open_generic,
>> -	.read		= hwlat_read,
>> -	.write		= hwlat_window_write,
>> +static struct trace_ull_config hwlat_window = {
> Yeah, the naming convention needs to be changed, because ull_config is
> meaningless, and this code makes no sense. I know what it is doing, but if
> I didn't, I'd have no clue what it was doing by reading it. :-p

I will rework the patch 5/9 to add a better explanation for the read/write
functions, and I will add comments to this patch, explaining the reason for the
min/max values.

Sound good?

-- Daniel

> -- Steve
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ