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]
Date:	Sun, 01 Nov 2015 17:34:07 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	ogerlitz@...lanox.com
Cc:	netdev@...r.kernel.org, saeedm@...lanox.com, achiad@...lanox.com
Subject: Re: [PATCH net-next 4/8] net/mlx5e: Consider IRQ affinity changes
 in NAPI poll

From: Or Gerlitz <ogerlitz@...lanox.com>
Date: Sun,  1 Nov 2015 19:35:18 +0200

> @@ -49,6 +50,15 @@ struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq)
>  	return cqe;
>  }
>  
> +static inline bool mlx5e_no_channel_affinity_change(struct mlx5e_channel *c)
> +{
> +	int current_cpu = smp_processor_id();
> +	struct irq_data *d = irq_desc_get_irq_data(c->irq_desc);
> +	struct cpumask *aff = irq_data_get_affinity_mask(d);
> +
> +	return cpumask_test_cpu(current_cpu, aff);
> +}

This is so much pointer dereferencing and then a bitmask test as well.

Are you really sure sure an extremely rare situation warrants this
test every single NAPI poll call?

If this is a real problem, then every driver is susceptible to the
issue and it therefore warrants a generic solution.  And if we have
generic infrastructure for this situation in the code NAPI polling
networking code, I guarantee that it will probably be implemented much
more cheaply than this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ