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:   Wed, 30 Jan 2019 22:27:40 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Alexey Dobriyan <adobriyan@...il.com>
cc:     LKML <linux-kernel@...r.kernel.org>,
        Waiman Long <longman@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        linux-fsdevel@...r.kernel.org, Davidlohr Bueso <dave@...olabs.net>,
        Miklos Szeredi <miklos@...redi.hu>,
        Daniel Colascione <dancol@...gle.com>,
        Dave Chinner <david@...morbit.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Marc Zyngier <marc.zyngier@....com>
Subject: Re: [patch 2/2] proc/stat: Make the interrupt statistics more
 efficient

On Thu, 31 Jan 2019, Alexey Dobriyan wrote:

> On Wed, Jan 30, 2019 at 01:31:32PM +0100, Thomas Gleixner wrote:
> > +static void show_irq_gap(struct seq_file *p, int gap)
> > +{
> > +	static const char zeros[] = " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
> > +
> > +	while (gap > 0) {
> > +		int inc = min_t(int, gap, ARRAY_SIZE(zeros) / 2);
> > +
> > +		seq_write(p, zeros, 2 * inc);
> > +		gap -= inc;
> > +	}
> > +}
> > +
> > +static void show_all_irqs(struct seq_file *p)
> > +{
> > +	int i, next = 0;
> > +
> > +	for_each_active_irq(i) {
> > +		show_irq_gap(p, i - next);
> > +		seq_put_decimal_ull(p, " ", kstat_irqs_usr(i));
> > +		next = i + 1;
> > +	}
> > +	show_irq_gap(p, nr_irqs - next);
> > +}
> 
> Every signed int can and should be unsigned int in this patch.
> 

Indeed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ