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:	Tue, 16 Sep 2014 15:42:42 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	therbert@...gle.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next 2/7] fou: Support for foo-over-udp RX path

From: Tom Herbert <therbert@...gle.com>
Date: Mon, 15 Sep 2014 20:30:19 -0700

> +static inline struct fou *fou_from_sock(struct sock *sk)
> +{
> +	return (struct fou *)sk->sk_user_data;
> +}

Void pointers never need explicit casts, please remove it.

> +static int fou_create(struct net *net, struct fou_cfg *cfg,
> +		      struct socket **sockp)
> +{
 ...
> +	/* Mark socket as an encapsulation socket. See net/ipv4/udp.c */
> +	fou->protocol = cfg->protocol;
> +	fou->port =  cfg->udp_config.local_udp_port;

Hmmm...

> +	u16 port = htons(cfg->udp_config.local_udp_port);
> +	int err = -EINVAL;
> +
> +	spin_lock(&fou_lock);
> +	list_for_each_entry(fou, &fou_list, list) {

Why different endianness for create and destroy?  Please make both
operations use the same endianness for the port.

> +		if (fou->port == port) {
--
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