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: <CACVXFVNn9wu2sU=47csi+stvzN0TnOV4E8xBHYknxo9uDksMuQ@mail.gmail.com>
Date:   Thu, 8 Aug 2019 07:50:59 +0800
From:   Ming Lei <tom.leiming@...il.com>
To:     Ming Lei <ming.lei@...hat.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>, Jens Axboe <axboe@...nel.dk>,
        Keith Busch <keith.busch@...el.com>,
        Sagi Grimberg <sagi@...mberg.me>,
        Marc Zyngier <marc.zyngier@....com>, linux-pci@...r.kernel.org,
        Shivasharan Srikanteshwara 
        <shivasharan.srikanteshwara@...adcom.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-nvme <linux-nvme@...ts.infradead.org>,
        linux-block <linux-block@...r.kernel.org>,
        Sumit Saxena <sumit.saxena@...adcom.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Kashyap Desai <kashyap.desai@...adcom.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] genirq/affinity: create affinity mask for single vector

Hello Thomas and Guys,

On Mon, Aug 5, 2019 at 9:19 AM Ming Lei <ming.lei@...hat.com> wrote:
>
> Since commit c66d4bd110a1f8 ("genirq/affinity: Add new callback for
> (re)calculating interrupt sets"), irq_create_affinity_masks() returns
> NULL in case of single vector. This change has caused regression on some
> drivers, such as lpfc.
>
> The problem is that single vector may be triggered in some generic cases:
> 1) kdump kernel 2) irq vectors resource is close to exhaustion.
>
> If we don't create affinity mask for single vector, almost every caller
> has to handle the special case.
>
> So still create affinity mask for single vector, since irq_create_affinity_masks()
> is capable of handling that.
>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Bjorn Helgaas <helgaas@...nel.org>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: linux-block@...r.kernel.org
> Cc: Sagi Grimberg <sagi@...mberg.me>
> Cc: linux-nvme@...ts.infradead.org
> Cc: linux-pci@...r.kernel.org
> Cc: Keith Busch <keith.busch@...el.com>
> Cc: Sumit Saxena <sumit.saxena@...adcom.com>
> Cc: Kashyap Desai <kashyap.desai@...adcom.com>
> Cc: Shivasharan Srikanteshwara <shivasharan.srikanteshwara@...adcom.com>
> Fixes: c66d4bd110a1f8 ("genirq/affinity: Add new callback for (re)calculating interrupt sets")
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
> ---
>  kernel/irq/affinity.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index 4352b08ae48d..6fef48033f96 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -251,11 +251,9 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
>          * Determine the number of vectors which need interrupt affinities
>          * assigned. If the pre/post request exhausts the available vectors
>          * then nothing to do here except for invoking the calc_sets()
> -        * callback so the device driver can adjust to the situation. If there
> -        * is only a single vector, then managing the queue is pointless as
> -        * well.
> +        * callback so the device driver can adjust to the situation.
>          */
> -       if (nvecs > 1 && nvecs > affd->pre_vectors + affd->post_vectors)
> +       if (nvecs > affd->pre_vectors + affd->post_vectors)
>                 affvecs = nvecs - affd->pre_vectors - affd->post_vectors;
>         else
>                 affvecs = 0;

Without this patch, kdump kernel may not work, so could you take a look
at this patch?

Thanks,
Ming Lei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ