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] [day] [month] [year] [list]
Message-ID: <5FC3163CFD30C246ABAA99954A238FA8388B37D4@FRAEML521-MBS.china.huawei.com>
Date:   Fri, 11 Jan 2019 10:34:44 +0000
From:   Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
To:     Suzuki K Poulose <suzuki.poulose@....com>,
        "marc.zyngier@....com" <marc.zyngier@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "shankerd@...eaurora.org" <shankerd@...eaurora.org>,
        "ganapatrao.kulkarni@...ium.com" <ganapatrao.kulkarni@...ium.com>,
        "Robert.Richter@...ium.com" <Robert.Richter@...ium.com>,
        "Guohanjun (Hanjun Guo)" <guohanjun@...wei.com>,
        John Garry <john.garry@...wei.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH v3] irqchip: gicv3-its: Use NUMA aware memory allocation
 for ITS tables

Hi Suzuki,

> -----Original Message-----
> From: Suzuki K Poulose [mailto:suzuki.poulose@....com]
> Sent: 11 January 2019 09:42
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>;
> marc.zyngier@....com; linux-kernel@...r.kernel.org
> Cc: shankerd@...eaurora.org; ganapatrao.kulkarni@...ium.com;
> Robert.Richter@...ium.com; Guohanjun (Hanjun Guo)
> <guohanjun@...wei.com>; John Garry <john.garry@...wei.com>;
> linux-arm-kernel@...ts.infradead.org; Linuxarm <linuxarm@...wei.com>
> Subject: Re: [PATCH v3] irqchip: gicv3-its: Use NUMA aware memory allocation
> for ITS tables
> 

[...]

> >   drivers/irqchip/irq-gic-v3-its.c | 20 ++++++++++++--------
> >   1 file changed, 12 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> > index db20e99..ab01061 100644
> > --- a/drivers/irqchip/irq-gic-v3-its.c
> > +++ b/drivers/irqchip/irq-gic-v3-its.c
> > @@ -1749,7 +1749,8 @@ static int its_setup_baser(struct its_node *its,
> struct its_baser *baser,
> >   		order = get_order(GITS_BASER_PAGES_MAX * psz);
> >   	}
> >
> > -	base = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, order);
> > +	base = (void *)page_address(alloc_pages_node(its->numa_node,
> > +				    GFP_KERNEL | __GFP_ZERO, order));
> 
> If alloc_pages_node() fails, the page_address() could crash the system.
> 
> > -	its->cmd_base = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
> > -						get_order(ITS_CMD_QUEUE_SZ));
> > +	its->cmd_base = (void
> *)page_address(alloc_pages_node(its->numa_node,
> > +					     GFP_KERNEL | __GFP_ZERO,
> > +					     get_order(ITS_CMD_QUEUE_SZ)));
> 
> Similarly here. We may want to handle it properly.

Ah..good catch. I will change it and rebase on top of 5.0-rc1 as suggested by Marc.

Thanks,
Shameer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ