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:   Tue, 14 Nov 2023 18:16:41 +0000
From:   Oleksandr Tyshchenko <Oleksandr_Tyshchenko@...m.com>
To:     Juergen Gross <jgross@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Stefano Stabellini <sstabellini@...nel.org>,
        "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH 7/7] xen/events: remove some info_for_irq() calls in pirq
 handling



On 16.10.23 09:28, Juergen Gross wrote:

Hello Juergen


> Instead of the IRQ number user the struct irq_info pointer as parameter
> in the internal pirq related functions. This allows to drop some calls
> of info_for_irq().
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>


Looks good, so

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>


Just one NIT below ...


[snip]

>   
> -static void pirq_query_unmask(int irq)
> +static void pirq_query_unmask(struct irq_info *info)
>   {
>   	struct physdev_irq_status_query irq_status;
> -	struct irq_info *info = info_for_irq(irq);
>   
>   	BUG_ON(info->type != IRQT_PIRQ);
>   
> -	irq_status.irq = pirq_from_irq(irq);
> +	irq_status.irq = info->u.pirq.pirq;


  ... what is the reason to open-code pirq_from_irq() here?
For example, __startup_pirq() continues to use helper in almost the same 
situation ...


[snip]

>   
> -static unsigned int __startup_pirq(unsigned int irq)
> +static unsigned int __startup_pirq(struct irq_info *info)
>   {
>   	struct evtchn_bind_pirq bind_pirq;
> -	struct irq_info *info = info_for_irq(irq);
> -	evtchn_port_t evtchn = evtchn_from_irq(irq);
> +	evtchn_port_t evtchn = info->evtchn;
>   	int rc;
>   
>   	BUG_ON(info->type != IRQT_PIRQ);
> @@ -851,20 +868,20 @@ static unsigned int __startup_pirq(unsigned int irq)
>   	if (VALID_EVTCHN(evtchn))
>   		goto out;
>   
> -	bind_pirq.pirq = pirq_from_irq(irq);
> +	bind_pirq.pirq = pirq_from_irq(info);

    ... here



[snip]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ