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: <20100322123046.GA4288@hmsreliant.think-freely.org>
Date:	Mon, 22 Mar 2010 08:30:46 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Amerigo Wang <amwang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	elendil@...net.nl, David Miller <davem@...emloft.net>
Subject: Re: [Patch v2] netpoll: warn when there are spaces in parameters

On Mon, Mar 22, 2010 at 04:59:58AM -0400, Amerigo Wang wrote:
> v2: update according to Frans' comments.
> 
> Currently, if we leave spaces before dst port,
> netconsole will silently accept it as 0. Warn about this.
> 
> Also, when spaces appear in other places, make them
> visible in error messages.
> 
> Signed-off-by: WANG Cong <amwang@...hat.com>
> Cc: David Miller <davem@...emloft.net>
> 
> ---
> 
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index 7aa6972..6df1863 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -614,7 +614,7 @@ void netpoll_print_options(struct netpoll *np)
>  			 np->name, np->local_port);
>  	printk(KERN_INFO "%s: local IP %pI4\n",
>  			 np->name, &np->local_ip);
> -	printk(KERN_INFO "%s: interface %s\n",
> +	printk(KERN_INFO "%s: interface '%s'\n",
>  			 np->name, np->dev_name);
>  	printk(KERN_INFO "%s: remote port %d\n",
>  			 np->name, np->remote_port);
> @@ -661,6 +661,9 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
>  		if ((delim = strchr(cur, '@')) == NULL)
>  			goto parse_failed;
>  		*delim = 0;
> +		if (*cur == ' ' || *cur == '\t')
> +			printk(KERN_INFO "%s: warning: whitespace"
> +					"is not allowed\n", np->name);
>  		np->remote_port = simple_strtol(cur, NULL, 10);
>  		cur = delim;
>  	}
> @@ -708,7 +711,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
>  	return 0;
>  
>   parse_failed:
> -	printk(KERN_INFO "%s: couldn't parse config at %s!\n",
> +	printk(KERN_INFO "%s: couldn't parse config at '%s'!\n",
>  	       np->name, cur);
>  	return -1;
>  }
Acked-by: Neil Horman <nhorman@...driver.com>

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
--
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