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: <1372344595.2060.15.camel@joe-AO722>
Date:	Thu, 27 Jun 2013 07:49:55 -0700
From:	Joe Perches <joe@...ches.com>
To:	Daniel Borkmann <dborkman@...hat.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-sctp@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: sctp: rework debugging framework
 to use pr_debug and friends

On Thu, 2013-06-27 at 11:43 +0200, Daniel Borkmann wrote:
>   - Changed %pIg into %pIS, thanks Joe Perches

Hi Daniel.

> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
[]
> +	pr_debug("%s: association:%p addr:%pIS port:%d\n",
> +		 __func__, asoc, &peer->ipaddr.sa,
> +		 ntohs(peer->ipaddr.v4.sin_port));

This is why I think %pIS should have an option
to print port/flow, etc.

In this case it's using v4 and you are mixing
unknown and known forms.  It looks untidy.
You should probably use peer->sa.sin_port instead.

> @@ -636,12 +638,8 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
>  	/* AF_INET and AF_INET6 share common port field. */
>  	port = ntohs(addr->v4.sin_port);
>  
> -	SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_add_peer:association %p addr: ",
> -				 " port: %d state:%d\n",
> -				 asoc,
> -				 addr,
> -				 port,
> -				 peer_state);
> +	pr_debug("%s: association:%p addr:%pIS port:%d state:%d\n", __func__,
> +		 asoc, &addr->sa,port , peer_state);

here too, but port may be unused when !CONFIG_DEBUG

I didn't look at the rest of the patch.

--
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