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]
Message-ID: <20220308221407.5f26332b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 8 Mar 2022 22:14:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Dimitris Michailidis <d.michailidis@...gible.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH net-next] net/fungible: Fix local_memory_node error

On Mon,  7 Mar 2022 20:53:21 -0800 Dimitris Michailidis wrote:
> Stephen Rothwell reported the following failure on powerpc:
> 
> ERROR: modpost: ".local_memory_node"
> [drivers/net/ethernet/fungible/funeth/funeth.ko] undefined!
> 
> AFAICS this is because local_memory_node() is a non-inline non-exported
> function when CONFIG_HAVE_MEMORYLESS_NODES=y. It is also the wrong API
> to get a CPU's memory node. Use cpu_to_mem() in the two spots it's used.

Can the ids actually not match? I'm asking because nobody else is doing
the cpu -> mem node conversions.

> Fixes: ee6373ddf3a9 ("net/funeth: probing and netdev ops")
> Fixes: db37bc177dae ("net/funeth: add the data path")
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Dimitris Michailidis <dmichail@...gible.com>
> ---
>  drivers/net/ethernet/fungible/funeth/funeth_main.c | 2 +-
>  drivers/net/ethernet/fungible/funeth/funeth_txrx.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/fungible/funeth/funeth_main.c b/drivers/net/ethernet/fungible/funeth/funeth_main.c
> index c58b10c216ef..67dd02ed1fa3 100644
> --- a/drivers/net/ethernet/fungible/funeth/funeth_main.c
> +++ b/drivers/net/ethernet/fungible/funeth/funeth_main.c
> @@ -253,7 +253,7 @@ static struct fun_irq *fun_alloc_qirq(struct funeth_priv *fp, unsigned int idx,
>  	int cpu, res;
>  
>  	cpu = cpumask_local_spread(idx, node);
> -	node = local_memory_node(cpu_to_node(cpu));
> +	node = cpu_to_mem(cpu);
>  
>  	irq = kzalloc_node(sizeof(*irq), GFP_KERNEL, node);
>  	if (!irq)
> diff --git a/drivers/net/ethernet/fungible/funeth/funeth_txrx.h b/drivers/net/ethernet/fungible/funeth/funeth_txrx.h
> index 7aed0561aeac..04c9f91b7489 100644
> --- a/drivers/net/ethernet/fungible/funeth/funeth_txrx.h
> +++ b/drivers/net/ethernet/fungible/funeth/funeth_txrx.h
> @@ -239,7 +239,7 @@ static inline void fun_txq_wr_db(const struct funeth_txq *q)
>  
>  static inline int fun_irq_node(const struct fun_irq *p)
>  {
> -	return local_memory_node(cpu_to_node(cpumask_first(&p->affinity_mask)));
> +	return cpu_to_mem(cpumask_first(&p->affinity_mask));
>  }
>  
>  int fun_rxq_napi_poll(struct napi_struct *napi, int budget);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ