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: <1a8ccc87-6f04-7918-65ad-76c0cf13af07@redhat.com>
Date:   Mon, 21 Jun 2021 13:50:47 +0200
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     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>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 06/12] trace: Add a generic function to read/write u64
 values from tracefs

On 6/18/21 6:56 PM, Steven Rostedt wrote:
>> +        return simple_read_from_buffer(ubuf, cnt, ppos, buf, len);
> Egad, this entire patch is filled with whitespace issues!
> 
> Please check your other patches too.

<talking to myself>
daniel daniel daniel.... after all these years...
</talking to myself>

Sorry... it was only in this patch.

>> +}
>> +
> 
>> +
>> +#define ULL_STR_SIZE		22	/* 20 digits max */
> Nit. I'd make this 24, just to be integer aligned. I mean, it's used as:
> 
> 
> trace_min_max_read(struct file *filp, char __user *ubuf, size_t cnt,
> 		      loff_t *ppos)
> {
> 	struct trace_min_max_param *param = filp->private_data;
> 	char buf[ULL_STR_SIZE];
> 	u64 val;
> 	int len;
> 
> Probably should reverse the above as well, that way if you do have
> ULL_STR_SIZE as 24, then the int len, will fit right in before the u64
> val. Although, I think compilers are free to optimize that too :-/

I will do that!

-- Daniel

> -- Steve
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ