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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <955c998f-4550-4945-8dab-c5901d833074@epam.com>
Date:   Tue, 14 Nov 2023 08:20:07 +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 5/7] xen/events: drop xen_allocate_irqs_dynamic()



On 16.10.23 09:28, Juergen Gross wrote:


Hello Juergen

> Instead of having a common function for allocating a single IRQ or a
> consecutive number of IRQs, split up the functionality into the callers
> of xen_allocate_irqs_dynamic().
> 
> This allows to handle any allocation error in xen_irq_init() gracefully
> instead of panicing the system. Let xen_irq_init() return the irq_info
> pointer or NULL in case of an allocation error.
> 
> Additionally set the IRQ into irq_info already at allocation time, as
> otherwise the IRQ would be '0' (which is a valid IRQ number) until
> being set.
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>   drivers/xen/events/events_base.c | 74 +++++++++++++++++++-------------
>   1 file changed, 44 insertions(+), 30 deletions(-)
> 

[snip]

> @@ -1725,6 +1738,7 @@ void rebind_evtchn_irq(evtchn_port_t evtchn, int irq)
>   	   so there should be a proper type */
>   	BUG_ON(info->type == IRQT_UNBOUND);
>   
> +	info->irq = irq;


I failed to understand why this is added here. Doesn't irq remain the 
same, and info->irq remains valid? Could you please clarify.

Other changes lgtm.


>   	(void)xen_irq_info_evtchn_setup(irq, evtchn, NULL);
>   
>   	mutex_unlock(&irq_mapping_update_lock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ