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 Jun 2016 15:46:36 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Daniel Lezcano <daniel.lezcano@...aro.org>
cc:	nicolas.pitre@...aro.org, shreyas@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org, peterz@...radead.org,
	rafael@...nel.org, vincent.guittot@...aro.org
Subject: Re: [PATCH V6] irq: Track the interrupt timings

On Tue, 14 Jun 2016, Daniel Lezcano wrote:
> +/**
> + * irqtiming_get_next - return the next irq timing
> + *
> + * @irq: a pointer to an integer representing the interrupt number
> + *
> + * This function allows to browse safely the interrupt descriptors in order
> + * to retrieve the interrupts timings. The parameter gives the interrupt
> + * number to begin with and will return the interrupt timings for the next
> + * allocated irq. This approach gives us the possibility to go through the
> + * different interrupts without having to handle the sparse irq.
> + *
> + * The function changes @irq to the next allocated irq + 1, it should be
> + * passed back again and again until NULL is returned. Usually this function
> + * is called the first time with @irq = 0.
> + *
> + * Returns a struct irq_timings, NULL if we reach the end of the interrupts
> + * list.
> + */
> +struct irq_timings *irq_timings_get_next(int *irq)
> +{
> +	struct irq_desc *desc;
> +	int next;
> +
> +again:
> +	/* Do a racy lookup of the next allocated irq */
> +	next = irq_get_next_irq(*irq);
> +	if (next >= nr_irqs)
> +		return NULL;
> +
> +	*irq = next + 1;
> +
> +	/*
> +	 * Now lookup the descriptor. It's RCU protected. This

Please mention in the function description above that this function
must be called inside of a rcu_read() locked section.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ