DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ
Date: Fri, 5 Dec 2014 15:51:01 +0000
Message-ID: <20141205155100.GA9040@bricha3-MOBL3> (raw)
In-Reply-To: <1417789147-5636-1-git-send-email-olivier.matz@6wind.com>

On Fri, Dec 05, 2014 at 03:19:07PM +0100, Olivier Matz wrote:
> From: Alan Carew <alan.carew@intel.com>
> 
> When using test-pmd with flow director in FreeBSD, the application will
> segfault/Bus error while parsing the command-line. This is due to how
> each commands result structure is represented during parsing, where the offsets
> for each tokens value is stored in a character array(char result_buf[BUFSIZ])
> in cmdline_parse()(./lib/librte_cmdline/cmdline_parse.c).
> 
> The overflow occurs where BUFSIZ is less than the size of a commands result
> structure, in this case "struct cmd_pkt_filter_result"
> (app/test-pmd/cmdline.c) is 1088 bytes and BUFSIZ on FreeBSD is 1024 bytes as
> opposed to 8192 bytes on Linux.
> 
> The problem can be reproduced by running test-pmd on FreeBSD:
> ./testpmd -c 0x3 -n 4 -- -i --portmask=0x3 --pkt-filter-mode=perfect
> And adding a filter:
> add_perfect_filter 0 udp src 192.168.0.0 1024 dst 192.168.0.0 1024 flexbytes
> 0x800 vlan 0 queue 0 soft 0x17
> 
> This patch removes the OS dependency on BUFSIZ and defines and uses a
> library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192
> 
> Added boundary checking to ensure this buffer size cannot overflow, with
> an error message being produced.
> 
> Suggested-by: Olivier MATZ <olivier.matz@6wind.com>
> http://git.droids-corp.org/?p=libcmdline.git;a=commitdiff;h=b1d5b169352e57df3fc14c51ffad4b83f3e5613f
> 
> Signed-off-by: Alan Carew <alan.carew@intel.com>
> Signed-off-by: Olivier MATZ <olivier.matz@6wind.com>

Tested on FreeBSD 10 and this patch fixes the issue described.

Tested-by: Bruce Richardson <bruce.richardson@intel.com>

> ---
>  app/test-pmd/parameters.c                    |  6 +++--
>  app/test/test_cmdline_etheraddr.c            | 13 +++++-----
>  app/test/test_cmdline_ipaddr.c               | 27 ++++++++++++--------
>  app/test/test_cmdline_num.c                  | 31 +++++++++++++----------
>  app/test/test_cmdline_portlist.c             | 13 +++++-----
>  app/test/test_cmdline_string.c               | 13 ++++++----
>  examples/cmdline/parse_obj_list.c            |  6 ++++-
>  examples/cmdline/parse_obj_list.h            |  3 ++-
>  examples/vhost_xen/xenstore_parse.c          |  5 ++--
>  lib/librte_cmdline/cmdline_parse.c           | 35 ++++++++++++++++---------
>  lib/librte_cmdline/cmdline_parse.h           | 11 +++++---
>  lib/librte_cmdline/cmdline_parse_etheraddr.c |  5 +++-
>  lib/librte_cmdline/cmdline_parse_etheraddr.h |  4 +--
>  lib/librte_cmdline/cmdline_parse_ipaddr.c    |  6 ++++-
>  lib/librte_cmdline/cmdline_parse_ipaddr.h    |  4 +--
>  lib/librte_cmdline/cmdline_parse_num.c       | 38 +++++++++++++++++++++++++++-
>  lib/librte_cmdline/cmdline_parse_num.h       |  4 +--
>  lib/librte_cmdline/cmdline_parse_portlist.c  |  5 +++-
>  lib/librte_cmdline/cmdline_parse_portlist.h  |  4 +--
>  lib/librte_cmdline/cmdline_parse_string.c    |  6 ++++-
>  lib/librte_cmdline/cmdline_parse_string.h    |  2 +-
>  lib/librte_pmd_bond/rte_eth_bond_args.c      |  3 ++-
>  22 files changed, 168 insertions(+), 76 deletions(-)
> 
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> index 9573a43..8558985 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -223,7 +223,8 @@ init_peer_eth_addrs(char *config_filename)
>  		if (fgets(buf, sizeof(buf), config_file) == NULL)
>  			break;
>  
> -		if (cmdline_parse_etheraddr(NULL, buf, &peer_eth_addrs[i]) < 0 ){
> +		if (cmdline_parse_etheraddr(NULL, buf, &peer_eth_addrs[i],
> +				sizeof(peer_eth_addrs[i])) < 0 ){
>  			printf("Bad MAC address format on line %d\n", i+1);
>  			fclose(config_file);
>  			return -1;
> @@ -658,7 +659,8 @@ launch_args_parse(int argc, char** argv)
>  						 "eth-peer: port %d >= RTE_MAX_ETHPORTS(%d)\n",
>  						 n, RTE_MAX_ETHPORTS);
>  
> -				if (cmdline_parse_etheraddr(NULL, port_end, &peer_addr) < 0 )
> +				if (cmdline_parse_etheraddr(NULL, port_end,
> +						&peer_addr, sizeof(peer_addr)) < 0 )
>  					rte_exit(EXIT_FAILURE,
>  						 "Invalid ethernet address: %s\n",
>  						 port_end);
> diff --git a/app/test/test_cmdline_etheraddr.c b/app/test/test_cmdline_etheraddr.c
> index 45c61ff..e4f4231 100644
> --- a/app/test/test_cmdline_etheraddr.c
> +++ b/app/test/test_cmdline_etheraddr.c
> @@ -130,14 +130,15 @@ test_parse_etheraddr_invalid_param(void)
>  	int ret = 0;
>  
>  	/* try all null */
> -	ret = cmdline_parse_etheraddr(NULL, NULL, NULL);
> +	ret = cmdline_parse_etheraddr(NULL, NULL, NULL, 0);
>  	if (ret != -1) {
>  		printf("Error: parser accepted null parameters!\n");
>  		return -1;
>  	}
>  
>  	/* try null buf */
> -	ret = cmdline_parse_etheraddr(NULL, NULL, (void*)&result);
> +	ret = cmdline_parse_etheraddr(NULL, NULL, (void*)&result,
> +		sizeof(result));
>  	if (ret != -1) {
>  		printf("Error: parser accepted null string!\n");
>  		return -1;
> @@ -149,7 +150,7 @@ test_parse_etheraddr_invalid_param(void)
>  	snprintf(buf, sizeof(buf), "%s",
>  			ether_addr_valid_strs[0].str);
>  
> -	ret = cmdline_parse_etheraddr(NULL, buf, NULL);
> +	ret = cmdline_parse_etheraddr(NULL, buf, NULL, 0);
>  	if (ret == -1) {
>  		printf("Error: parser rejected null result!\n");
>  		return -1;
> @@ -185,7 +186,7 @@ test_parse_etheraddr_invalid_data(void)
>  		memset(&result, 0, sizeof(struct ether_addr));
>  
>  		ret = cmdline_parse_etheraddr(NULL, ether_addr_invalid_strs[i],
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret != -1) {
>  			printf("Error: parsing %s succeeded!\n",
>  					ether_addr_invalid_strs[i]);
> @@ -210,7 +211,7 @@ test_parse_etheraddr_valid(void)
>  		memset(&result, 0, sizeof(struct ether_addr));
>  
>  		ret = cmdline_parse_etheraddr(NULL, ether_addr_valid_strs[i].str,
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret < 0) {
>  			printf("Error: parsing %s failed!\n",
>  					ether_addr_valid_strs[i].str);
> @@ -229,7 +230,7 @@ test_parse_etheraddr_valid(void)
>  		memset(&result, 0, sizeof(struct ether_addr));
>  
>  		ret = cmdline_parse_etheraddr(NULL, ether_addr_garbage_strs[i],
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret < 0) {
>  			printf("Error: parsing %s failed!\n",
>  					ether_addr_garbage_strs[i]);
> diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
> index 4ce928d..471d2ff 100644
> --- a/app/test/test_cmdline_ipaddr.c
> +++ b/app/test/test_cmdline_ipaddr.c
> @@ -425,7 +425,8 @@ test_parse_ipaddr_valid(void)
>  							buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_valid_strs[i].str, (void*)&result);
> +				ipaddr_valid_strs[i].str, (void*)&result,
> +				sizeof(result));
>  
>  			/* if should have passed, or should have failed */
>  			if ((ret < 0) ==
> @@ -474,7 +475,8 @@ test_parse_ipaddr_valid(void)
>  							buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_garbage_addr4_strs[i], (void*)&result);
> +				ipaddr_garbage_addr4_strs[i], (void*)&result,
> +				sizeof(result));
>  
>  			/* if should have passed, or should have failed */
>  			if ((ret < 0) ==
> @@ -515,7 +517,8 @@ test_parse_ipaddr_valid(void)
>  							buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_garbage_addr6_strs[i], (void*)&result);
> +				ipaddr_garbage_addr6_strs[i], (void*)&result,
> +				sizeof(result));
>  
>  			/* if should have passed, or should have failed */
>  			if ((ret < 0) ==
> @@ -557,7 +560,8 @@ test_parse_ipaddr_valid(void)
>  							buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_garbage_network4_strs[i], (void*)&result);
> +				ipaddr_garbage_network4_strs[i], (void*)&result,
> +				sizeof(result));
>  
>  			/* if should have passed, or should have failed */
>  			if ((ret < 0) ==
> @@ -598,7 +602,8 @@ test_parse_ipaddr_valid(void)
>  							buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_garbage_network6_strs[i], (void*)&result);
> +				ipaddr_garbage_network6_strs[i], (void*)&result,
> +				sizeof(result));
>  
>  			/* if should have passed, or should have failed */
>  			if ((ret < 0) ==
> @@ -651,7 +656,8 @@ test_parse_ipaddr_invalid_data(void)
>  					buf, sizeof(buf));
>  
>  			ret = cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -					ipaddr_invalid_strs[i], (void*)&result);
> +				ipaddr_invalid_strs[i], (void*)&result,
> +				sizeof(result));
>  
>  			if (ret != -1) {
>  				printf("Error: parsing %s as %s succeeded!\n",
> @@ -677,25 +683,26 @@ test_parse_ipaddr_invalid_param(void)
>  	token.ipaddr_data.flags = CMDLINE_IPADDR_V4;
>  
>  	/* null token */
> -	if (cmdline_parse_ipaddr(NULL, buf, (void*)&result) != -1) {
> +	if (cmdline_parse_ipaddr(NULL, buf, (void*)&result,
> +			sizeof(result)) != -1) {
>  		printf("Error: parser accepted invalid parameters!\n");
>  		return -1;
>  	}
>  	/* null buffer */
>  	if (cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -			NULL, (void*)&result) != -1) {
> +			NULL, (void*)&result, sizeof(result)) != -1) {
>  		printf("Error: parser accepted invalid parameters!\n");
>  		return -1;
>  	}
>  	/* empty buffer */
>  	if (cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -			"", (void*)&result) != -1) {
> +			"", (void*)&result, sizeof(result)) != -1) {
>  		printf("Error: parser accepted invalid parameters!\n");
>  		return -1;
>  	}
>  	/* null result */
>  	if (cmdline_parse_ipaddr((cmdline_parse_token_hdr_t*)&token,
> -			buf, NULL) == -1) {
> +			buf, NULL, 0) == -1) {
>  		printf("Error: parser rejected null result!\n");
>  		return -1;
>  	}
> diff --git a/app/test/test_cmdline_num.c b/app/test/test_cmdline_num.c
> index 799d68c..04263d3 100644
> --- a/app/test/test_cmdline_num.c
> +++ b/app/test/test_cmdline_num.c
> @@ -350,14 +350,14 @@ test_parse_num_invalid_param(void)
>  			num_valid_positive_strs[0].str);
>  
>  	/* try all null */
> -	ret = cmdline_parse_num(NULL, NULL, NULL);
> +	ret = cmdline_parse_num(NULL, NULL, NULL, 0);
>  	if (ret != -1) {
>  		printf("Error: parser accepted null parameters!\n");
>  		return -1;
>  	}
>  
>  	/* try null token */
> -	ret = cmdline_parse_num(NULL, buf, (void*)&result);
> +	ret = cmdline_parse_num(NULL, buf, (void*)&result, sizeof(result));
>  	if (ret != -1) {
>  		printf("Error: parser accepted null token!\n");
>  		return -1;
> @@ -365,14 +365,15 @@ test_parse_num_invalid_param(void)
>  
>  	/* try null buf */
>  	ret = cmdline_parse_num((cmdline_parse_token_hdr_t*)&token, NULL,
> -			(void*)&result);
> +		(void*)&result, sizeof(result));
>  	if (ret != -1) {
>  		printf("Error: parser accepted null string!\n");
>  		return -1;
>  	}
>  
>  	/* try null result */
> -	ret = cmdline_parse_num((cmdline_parse_token_hdr_t*)&token, buf, NULL);
> +	ret = cmdline_parse_num((cmdline_parse_token_hdr_t*)&token, buf,
> +		NULL, 0);
>  	if (ret == -1) {
>  		printf("Error: parser rejected null result!\n");
>  		return -1;
> @@ -426,7 +427,7 @@ test_parse_num_invalid_data(void)
>  			memset(&buf, 0, sizeof(buf));
>  
>  			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*)&token,
> -					num_invalid_strs[i], (void*)&result);
> +				num_invalid_strs[i], (void*)&result, sizeof(result));
>  			if (ret != -1) {
>  				/* get some info about what we are trying to parse */
>  				cmdline_get_help_num((cmdline_parse_token_hdr_t*)&token,
> @@ -466,8 +467,9 @@ test_parse_num_valid(void)
>  			cmdline_get_help_num((cmdline_parse_token_hdr_t*)&token,
>  					buf, sizeof(buf));
>  
> -			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token, num_valid_positive_strs[i].str,
> -					(void*)&result);
> +			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token,
> +				num_valid_positive_strs[i].str,
> +				(void*)&result, sizeof(result));
>  
>  			/* if it should have passed but didn't, or if it should have failed but didn't */
>  			if ((ret < 0) == (can_parse_unsigned(num_valid_positive_strs[i].result, type) > 0)) {
> @@ -493,8 +495,9 @@ test_parse_num_valid(void)
>  			cmdline_get_help_num((cmdline_parse_token_hdr_t*)&token,
>  					buf, sizeof(buf));
>  
> -			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token, num_valid_negative_strs[i].str,
> -					(void*)&result);
> +			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token,
> +				num_valid_negative_strs[i].str,
> +				(void*)&result, sizeof(result));
>  
>  			/* if it should have passed but didn't, or if it should have failed but didn't */
>  			if ((ret < 0) == (can_parse_signed(num_valid_negative_strs[i].result, type) > 0)) {
> @@ -542,8 +545,9 @@ test_parse_num_valid(void)
>  			cmdline_get_help_num((cmdline_parse_token_hdr_t*)&token,
>  					buf, sizeof(buf));
>  
> -			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token, num_garbage_positive_strs[i].str,
> -					(void*)&result);
> +			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token,
> +				num_garbage_positive_strs[i].str,
> +				(void*)&result, sizeof(result));
>  
>  			/* if it should have passed but didn't, or if it should have failed but didn't */
>  			if ((ret < 0) == (can_parse_unsigned(num_garbage_positive_strs[i].result, type) > 0)) {
> @@ -569,8 +573,9 @@ test_parse_num_valid(void)
>  			cmdline_get_help_num((cmdline_parse_token_hdr_t*)&token,
>  					buf, sizeof(buf));
>  
> -			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token, num_garbage_negative_strs[i].str,
> -					(void*)&result);
> +			ret = cmdline_parse_num((cmdline_parse_token_hdr_t*) &token,
> +				num_garbage_negative_strs[i].str,
> +				(void*)&result, sizeof(result));
>  
>  			/* if it should have passed but didn't, or if it should have failed but didn't */
>  			if ((ret < 0) == (can_parse_signed(num_garbage_negative_strs[i].result, type) > 0)) {
> diff --git a/app/test/test_cmdline_portlist.c b/app/test/test_cmdline_portlist.c
> index 9f9633c..b9664b0 100644
> --- a/app/test/test_cmdline_portlist.c
> +++ b/app/test/test_cmdline_portlist.c
> @@ -139,21 +139,22 @@ test_parse_portlist_invalid_param(void)
>  	memset(&result, 0, sizeof(cmdline_portlist_t));
>  
>  	/* try all null */
> -	ret = cmdline_parse_portlist(NULL, NULL, NULL);
> +	ret = cmdline_parse_portlist(NULL, NULL, NULL, 0);
>  	if (ret != -1) {
>  		printf("Error: parser accepted null parameters!\n");
>  		return -1;
>  	}
>  
>  	/* try null buf */
> -	ret = cmdline_parse_portlist(NULL, NULL, (void*)&result);
> +	ret = cmdline_parse_portlist(NULL, NULL, (void*)&result,
> +		sizeof(result));
>  	if (ret != -1) {
>  		printf("Error: parser accepted null string!\n");
>  		return -1;
>  	}
>  
>  	/* try null result */
> -	ret = cmdline_parse_portlist(NULL, portlist_valid_strs[0].str, NULL);
> +	ret = cmdline_parse_portlist(NULL, portlist_valid_strs[0].str, NULL, 0);
>  	if (ret == -1) {
>  		printf("Error: parser rejected null result!\n");
>  		return -1;
> @@ -188,7 +189,7 @@ test_parse_portlist_invalid_data(void)
>  		memset(&result, 0, sizeof(cmdline_portlist_t));
>  
>  		ret = cmdline_parse_portlist(NULL, portlist_invalid_strs[i],
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret != -1) {
>  			printf("Error: parsing %s succeeded!\n",
>  					portlist_invalid_strs[i]);
> @@ -213,7 +214,7 @@ test_parse_portlist_valid(void)
>  		memset(&result, 0, sizeof(cmdline_portlist_t));
>  
>  		ret = cmdline_parse_portlist(NULL, portlist_valid_strs[i].str,
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret < 0) {
>  			printf("Error: parsing %s failed!\n",
>  					portlist_valid_strs[i].str);
> @@ -232,7 +233,7 @@ test_parse_portlist_valid(void)
>  		memset(&result, 0, sizeof(cmdline_portlist_t));
>  
>  		ret = cmdline_parse_portlist(NULL, portlist_garbage_strs[i],
> -				(void*)&result);
> +			(void*)&result, sizeof(result));
>  		if (ret < 0) {
>  			printf("Error: parsing %s failed!\n",
>  					portlist_garbage_strs[i]);
> diff --git a/app/test/test_cmdline_string.c b/app/test/test_cmdline_string.c
> index 3ec0ce1..915a7d7 100644
> --- a/app/test/test_cmdline_string.c
> +++ b/app/test/test_cmdline_string.c
> @@ -178,7 +178,7 @@ test_parse_string_invalid_param(void)
>  		printf("Error: function accepted null token!\n");
>  		return -1;
>  	}
> -	if (cmdline_parse_string(NULL, buf, NULL) != -1) {
> +	if (cmdline_parse_string(NULL, buf, NULL, 0) != -1) {
>  		printf("Error: function accepted null token!\n");
>  		return -1;
>  	}
> @@ -189,7 +189,8 @@ test_parse_string_invalid_param(void)
>  		return -1;
>  	}
>  	if (cmdline_parse_string(
> -			(cmdline_parse_token_hdr_t*)&token, NULL, (void*)&result) != -1) {
> +			(cmdline_parse_token_hdr_t*)&token, NULL,
> +			(void*)&result, sizeof(result)) != -1) {
>  		printf("Error: function accepted null buffer!\n");
>  		return -1;
>  	}
> @@ -200,7 +201,7 @@ test_parse_string_invalid_param(void)
>  	}
>  	/* test null result */
>  	if (cmdline_parse_string(
> -			(cmdline_parse_token_hdr_t*)&token, buf, NULL) == -1) {
> +			(cmdline_parse_token_hdr_t*)&token, buf, NULL, 0) == -1) {
>  		printf("Error: function rejected null result!\n");
>  		return -1;
>  	}
> @@ -233,7 +234,8 @@ test_parse_string_invalid_data(void)
>  		token.string_data.str = string_invalid_strs[i].fixed_str;
>  
>  		if (cmdline_parse_string((cmdline_parse_token_hdr_t*)&token,
> -				string_invalid_strs[i].str, (void*)buf) != -1) {
> +				string_invalid_strs[i].str, (void*)buf,
> +				sizeof(buf)) != -1) {
>  			memset(help_str, 0, sizeof(help_str));
>  			memset(&help_token, 0, sizeof(help_token));
>  
> @@ -330,7 +332,8 @@ test_parse_string_valid(void)
>  		token.string_data.str = string_parse_strs[i].fixed_str;
>  
>  		if (cmdline_parse_string((cmdline_parse_token_hdr_t*)&token,
> -				string_parse_strs[i].str, (void*)buf) < 0) {
> +				string_parse_strs[i].str, (void*)buf,
> +				sizeof(buf)) < 0) {
>  
>  			/* clean help data */
>  			memset(&help_token, 0, sizeof(help_token));
> diff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c
> index 2625ca3..cdbaf2f 100644
> --- a/examples/cmdline/parse_obj_list.c
> +++ b/examples/cmdline/parse_obj_list.c
> @@ -84,7 +84,8 @@ struct cmdline_token_ops token_obj_list_ops = {
>  };
>  
>  int
> -parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
> +parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *buf, void *res,
> +	unsigned ressize)
>  {
>  	struct token_obj_list *tk2 = (struct token_obj_list *)tk;
>  	struct token_obj_list_data *tkd = &tk2->obj_list_data;
> @@ -94,6 +95,9 @@ parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
>  	if (*buf == 0)
>  		return -1;
>  
> +	if (res && ressize < sizeof(struct object *))
> +		return -1;
> +
>  	while(!cmdline_isendoftoken(buf[token_len]))
>  		token_len++;
>  
> diff --git a/examples/cmdline/parse_obj_list.h b/examples/cmdline/parse_obj_list.h
> index 297fec4..871c53a 100644
> --- a/examples/cmdline/parse_obj_list.h
> +++ b/examples/cmdline/parse_obj_list.h
> @@ -91,7 +91,8 @@ typedef struct token_obj_list parse_token_obj_list_t;
>  
>  extern struct cmdline_token_ops token_obj_list_ops;
>  
> -int parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res);
> +int parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
> +	unsigned ressize);
>  int complete_get_nb_obj_list(cmdline_parse_token_hdr_t *tk);
>  int complete_get_elt_obj_list(cmdline_parse_token_hdr_t *tk, int idx,
>  			      char *dstbuf, unsigned int size);
> diff --git a/examples/vhost_xen/xenstore_parse.c b/examples/vhost_xen/xenstore_parse.c
> index fdd69b2..9441639 100644
> --- a/examples/vhost_xen/xenstore_parse.c
> +++ b/examples/vhost_xen/xenstore_parse.c
> @@ -77,7 +77,7 @@ struct grant_node_item {
>  } __attribute__((packed));
>  
>  int cmdline_parse_etheraddr(void *tk, const char *srcbuf,
> -			    void *res);
> +	void *res, unsigned ressize);
>  
>  /* Map grant ref refid at addr_ori*/
>  static void *
> @@ -676,7 +676,8 @@ xen_parse_etheraddr(struct xen_vring *vring)
>  	if ((buf = xen_read_node(path, &len)) == NULL)
>  		goto out;
>  
> -	if (cmdline_parse_etheraddr(NULL, buf, &vring->addr) < 0)
> +	if (cmdline_parse_etheraddr(NULL, buf, &vring->addr,
> +			sizeof(vring->addr)) < 0)
>  		goto out;
>  	ret = 0;
>  out:
> diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
> index 940480d..dfc885c 100644
> --- a/lib/librte_cmdline/cmdline_parse.c
> +++ b/lib/librte_cmdline/cmdline_parse.c
> @@ -138,7 +138,7 @@ nb_common_chars(const char * s1, const char * s2)
>   */
>  static int
>  match_inst(cmdline_parse_inst_t *inst, const char *buf,
> -	   unsigned int nb_match_token, void * result_buf)
> +	   unsigned int nb_match_token, void *resbuf, unsigned resbuf_size)
>  {
>  	unsigned int token_num=0;
>  	cmdline_parse_token_hdr_t * token_p;
> @@ -162,12 +162,23 @@ match_inst(cmdline_parse_inst_t *inst, const char *buf,
>  		if ( isendofline(*buf) || iscomment(*buf) )
>  			break;
>  
> -		if (result_buf)
> -			n = token_hdr.ops->parse(token_p, buf,
> -						 (char *)result_buf +
> -						 token_hdr.offset);
> -		else
> -			n = token_hdr.ops->parse(token_p, buf, NULL);
> +		if (resbuf == NULL) {
> +			n = token_hdr.ops->parse(token_p, buf, NULL, 0);
> +		} else {
> +			unsigned rb_sz;
> +
> +			if (token_hdr.offset > resbuf_size) {
> +				printf("Parse error(%s:%d): Token offset(%u) "
> +					"exceeds maximum size(%u)\n",
> +					__FILE__, __LINE__,
> +					token_hdr.offset, resbuf_size);
> +				return -ENOBUFS;
> +			}
> +			rb_sz = resbuf_size - token_hdr.offset;
> +
> +			n = token_hdr.ops->parse(token_p, buf, (char *)resbuf +
> +				token_hdr.offset, rb_sz);
> +		}
>  
>  		if (n < 0)
>  			break;
> @@ -219,7 +230,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
>  	unsigned int inst_num=0;
>  	cmdline_parse_inst_t *inst;
>  	const char *curbuf;
> -	char result_buf[BUFSIZ];
> +	char result_buf[CMDLINE_PARSE_RESULT_BUFSIZE];
>  	void (*f)(void *, struct cmdline *, void *) = NULL;
>  	void *data = NULL;
>  	int comment = 0;
> @@ -280,7 +291,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
>  		debug_printf("INST %d\n", inst_num);
>  
>  		/* fully parsed */
> -		tok = match_inst(inst, buf, 0, result_buf);
> +		tok = match_inst(inst, buf, 0, result_buf, sizeof(result_buf));
>  
>  		if (tok > 0) /* we matched at least one token */
>  			err = CMDLINE_PARSE_BAD_ARGS;
> @@ -377,10 +388,10 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
>  		inst = ctx[inst_num];
>  		while (inst) {
>  			/* parse the first tokens of the inst */
> -			if (nb_token && match_inst(inst, buf, nb_token, NULL))
> +			if (nb_token && match_inst(inst, buf, nb_token, NULL, 0))
>  				goto next;
>  
> -			debug_printf("instruction match \n");
> +			debug_printf("instruction match\n");
>  			token_p = inst->tokens[nb_token];
>  			if (token_p)
>  				memcpy(&token_hdr, token_p, sizeof(token_hdr));
> @@ -471,7 +482,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
>  		/* we need to redo it */
>  		inst = ctx[inst_num];
>  
> -		if (nb_token && match_inst(inst, buf, nb_token, NULL))
> +		if (nb_token && match_inst(inst, buf, nb_token, NULL, 0))
>  			goto next2;
>  
>  		token_p = inst->tokens[nb_token];
> diff --git a/lib/librte_cmdline/cmdline_parse.h b/lib/librte_cmdline/cmdline_parse.h
> index f18836d..4b25c45 100644
> --- a/lib/librte_cmdline/cmdline_parse.h
> +++ b/lib/librte_cmdline/cmdline_parse.h
> @@ -80,6 +80,9 @@ extern "C" {
>  #define CMDLINE_PARSE_COMPLETE_AGAIN    1
>  #define CMDLINE_PARSE_COMPLETED_BUFFER  2
>  
> +/* maximum buffer size for parsed result */
> +#define CMDLINE_PARSE_RESULT_BUFSIZE 8192
> +
>  /**
>   * Stores a pointer to the ops struct, and the offset: the place to
>   * write the parsed result in the destination structure.
> @@ -110,12 +113,14 @@ typedef struct cmdline_token_hdr cmdline_parse_token_hdr_t;
>   * -1 on error and 0 on success.
>   */
>  struct cmdline_token_ops {
> -	/** parse(token ptr, buf, res pts) */
> -	int (*parse)(cmdline_parse_token_hdr_t *, const char *, void *);
> +	/** parse(token ptr, buf, res pts, buf len) */
> +	int (*parse)(cmdline_parse_token_hdr_t *, const char *, void *,
> +		unsigned int);
>  	/** return the num of possible choices for this token */
>  	int (*complete_get_nb)(cmdline_parse_token_hdr_t *);
>  	/** return the elt x for this token (token, idx, dstbuf, size) */
> -	int (*complete_get_elt)(cmdline_parse_token_hdr_t *, int, char *, unsigned int);
> +	int (*complete_get_elt)(cmdline_parse_token_hdr_t *, int, char *,
> +		unsigned int);
>  	/** get help for this token (token, dstbuf, size) */
>  	int (*get_help)(cmdline_parse_token_hdr_t *, char *, unsigned int);
>  };
> diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c
> index 5285c40..64ae86c 100644
> --- a/lib/librte_cmdline/cmdline_parse_etheraddr.c
> +++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c
> @@ -137,12 +137,15 @@ my_ether_aton(const char *a)
>  
>  int
>  cmdline_parse_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
> -			const char *buf, void *res)
> +	const char *buf, void *res, unsigned ressize)
>  {
>  	unsigned int token_len = 0;
>  	char ether_str[ETHER_ADDRSTRLENLONG+1];
>  	struct ether_addr *tmp;
>  
> +	if (res && ressize < sizeof(struct ether_addr))
> +		return -1;
> +
>  	if (!buf || ! *buf)
>  		return -1;
>  
> diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.h b/lib/librte_cmdline/cmdline_parse_etheraddr.h
> index 4427e40..0085bb3 100644
> --- a/lib/librte_cmdline/cmdline_parse_etheraddr.h
> +++ b/lib/librte_cmdline/cmdline_parse_etheraddr.h
> @@ -73,9 +73,9 @@ typedef struct cmdline_token_etheraddr cmdline_parse_token_etheraddr_t;
>  extern struct cmdline_token_ops cmdline_token_etheraddr_ops;
>  
>  int cmdline_parse_etheraddr(cmdline_parse_token_hdr_t *tk, const char *srcbuf,
> -			    void *res);
> +	void *res, unsigned ressize);
>  int cmdline_get_help_etheraddr(cmdline_parse_token_hdr_t *tk, char *dstbuf,
> -			       unsigned int size);
> +	unsigned int size);
>  
>  #define TOKEN_ETHERADDR_INITIALIZER(structure, field)       \
>  {                                                           \
> diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c
> index ac83514..7f33599 100644
> --- a/lib/librte_cmdline/cmdline_parse_ipaddr.c
> +++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c
> @@ -306,7 +306,8 @@ inet_pton6(const char *src, unsigned char *dst)
>  }
>  
>  int
> -cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
> +cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res,
> +	unsigned ressize)
>  {
>  	struct cmdline_token_ipaddr *tk2;
>  	unsigned int token_len = 0;
> @@ -315,6 +316,9 @@ cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
>  	char *prefix, *prefix_end;
>  	long prefixlen = 0;
>  
> +	if (res && ressize < sizeof(cmdline_ipaddr_t))
> +		return -1;
> +
>  	if (!buf || !tk || ! *buf)
>  		return -1;
>  
> diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.h b/lib/librte_cmdline/cmdline_parse_ipaddr.h
> index 0e2f490..296c374 100644
> --- a/lib/librte_cmdline/cmdline_parse_ipaddr.h
> +++ b/lib/librte_cmdline/cmdline_parse_ipaddr.h
> @@ -92,9 +92,9 @@ typedef struct cmdline_token_ipaddr cmdline_parse_token_ipaddr_t;
>  extern struct cmdline_token_ops cmdline_token_ipaddr_ops;
>  
>  int cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *srcbuf,
> -			 void *res);
> +	void *res, unsigned ressize);
>  int cmdline_get_help_ipaddr(cmdline_parse_token_hdr_t *tk, char *dstbuf,
> -			    unsigned int size);
> +	unsigned int size);
>  
>  #define TOKEN_IPADDR_INITIALIZER(structure, field)      \
>  {                                                       \
> diff --git a/lib/librte_cmdline/cmdline_parse_num.c b/lib/librte_cmdline/cmdline_parse_num.c
> index 0b9e4d0..1cf53d9 100644
> --- a/lib/librte_cmdline/cmdline_parse_num.c
> +++ b/lib/librte_cmdline/cmdline_parse_num.c
> @@ -119,10 +119,40 @@ add_to_res(unsigned int c, uint64_t *res, unsigned int base)
>  	return 0;
>  }
>  
> +static int
> +check_res_size(struct cmdline_token_num_data *nd, unsigned ressize)
> +{
> +	switch (nd->type) {
> +		case INT8:
> +		case UINT8:
> +			if (ressize < sizeof(int8_t))
> +				return -1;
> +			break;
> +		case INT16:
> +		case UINT16:
> +			if (ressize < sizeof(int16_t))
> +				return -1;
> +			break;
> +		case INT32:
> +		case UINT32:
> +			if (ressize < sizeof(int32_t))
> +				return -1;
> +			break;
> +		case INT64:
> +		case UINT64:
> +			if (ressize < sizeof(int64_t))
> +				return -1;
> +			break;
> +		default:
> +			return -1;
> +	}
> +	return 0;
> +}
>  
>  /* parse an int */
>  int
> -cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res)
> +cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
> +	unsigned ressize)
>  {
>  	struct cmdline_token_num_data nd;
>  	enum num_parse_state_t st = START;
> @@ -141,6 +171,12 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res)
>  
>  	memcpy(&nd, &((struct cmdline_token_num *)tk)->num_data, sizeof(nd));
>  
> +	/* check that we have enough room in res */
> +	if (res) {
> +		if (check_res_size(&nd, ressize) < 0)
> +			return -1;
> +	}
> +
>  	while ( st != ERROR && c && ! cmdline_isendoftoken(c) ) {
>  		debug_printf("%c %x -> ", c, c);
>  		switch (st) {
> diff --git a/lib/librte_cmdline/cmdline_parse_num.h b/lib/librte_cmdline/cmdline_parse_num.h
> index 77f2f9b..5376806 100644
> --- a/lib/librte_cmdline/cmdline_parse_num.h
> +++ b/lib/librte_cmdline/cmdline_parse_num.h
> @@ -89,9 +89,9 @@ typedef struct cmdline_token_num cmdline_parse_token_num_t;
>  extern struct cmdline_token_ops cmdline_token_num_ops;
>  
>  int cmdline_parse_num(cmdline_parse_token_hdr_t *tk,
> -		      const char *srcbuf, void *res);
> +	const char *srcbuf, void *res, unsigned ressize);
>  int cmdline_get_help_num(cmdline_parse_token_hdr_t *tk,
> -			 char *dstbuf, unsigned int size);
> +	char *dstbuf, unsigned int size);
>  
>  #define TOKEN_NUM_INITIALIZER(structure, field, numtype)    \
>  {                                                           \
> diff --git a/lib/librte_cmdline/cmdline_parse_portlist.c b/lib/librte_cmdline/cmdline_parse_portlist.c
> index 7eac05c..834f2e6 100644
> --- a/lib/librte_cmdline/cmdline_parse_portlist.c
> +++ b/lib/librte_cmdline/cmdline_parse_portlist.c
> @@ -127,7 +127,7 @@ parse_ports(cmdline_portlist_t * pl, const char * str)
>  
>  int
>  cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
> -		const char *buf, void *res)
> +	const char *buf, void *res, unsigned ressize)
>  {
>  	unsigned int token_len = 0;
>  	char portlist_str[PORTLIST_TOKEN_SIZE+1];
> @@ -136,6 +136,9 @@ cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
>  	if (!buf || ! *buf)
>  		return (-1);
>  
> +	if (res && ressize < PORTLIST_TOKEN_SIZE)
> +		return -1;
> +
>  	pl = res;
>  
>  	while (!cmdline_isendoftoken(buf[token_len]) &&
> diff --git a/lib/librte_cmdline/cmdline_parse_portlist.h b/lib/librte_cmdline/cmdline_parse_portlist.h
> index 6fdc406..8505059 100644
> --- a/lib/librte_cmdline/cmdline_parse_portlist.h
> +++ b/lib/librte_cmdline/cmdline_parse_portlist.h
> @@ -81,9 +81,9 @@ typedef struct cmdline_token_portlist cmdline_parse_token_portlist_t;
>  extern struct cmdline_token_ops cmdline_token_portlist_ops;
>  
>  int cmdline_parse_portlist(cmdline_parse_token_hdr_t *tk,
> -		      const char *srcbuf, void *res);
> +	const char *srcbuf, void *res, unsigned ressize);
>  int cmdline_get_help_portlist(cmdline_parse_token_hdr_t *tk,
> -			 char *dstbuf, unsigned int size);
> +	char *dstbuf, unsigned int size);
>  
>  #define TOKEN_PORTLIST_INITIALIZER(structure, field)        \
>  {                                                           \
> diff --git a/lib/librte_cmdline/cmdline_parse_string.c b/lib/librte_cmdline/cmdline_parse_string.c
> index b1bfe91..45883b3 100644
> --- a/lib/librte_cmdline/cmdline_parse_string.c
> +++ b/lib/librte_cmdline/cmdline_parse_string.c
> @@ -105,13 +105,17 @@ get_next_token(const char *s)
>  }
>  
>  int
> -cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
> +cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *buf, void *res,
> +	unsigned ressize)
>  {
>  	struct cmdline_token_string *tk2;
>  	struct cmdline_token_string_data *sd;
>  	unsigned int token_len;
>  	const char *str;
>  
> +	if (res && ressize < STR_TOKEN_SIZE)
> +		return -1;
> +
>  	if (!tk || !buf || ! *buf)
>  		return -1;
>  
> diff --git a/lib/librte_cmdline/cmdline_parse_string.h b/lib/librte_cmdline/cmdline_parse_string.h
> index 52c916c..c205622 100644
> --- a/lib/librte_cmdline/cmdline_parse_string.h
> +++ b/lib/librte_cmdline/cmdline_parse_string.h
> @@ -83,7 +83,7 @@ typedef struct cmdline_token_string cmdline_parse_token_string_t;
>  extern struct cmdline_token_ops cmdline_token_string_ops;
>  
>  int cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *srcbuf,
> -			 void *res);
> +	void *res, unsigned ressize);
>  int cmdline_complete_get_nb_string(cmdline_parse_token_hdr_t *tk);
>  int cmdline_complete_get_elt_string(cmdline_parse_token_hdr_t *tk, int idx,
>  				    char *dstbuf, unsigned int size);
> diff --git a/lib/librte_pmd_bond/rte_eth_bond_args.c b/lib/librte_pmd_bond/rte_eth_bond_args.c
> index 4114833..ca4de38 100644
> --- a/lib/librte_pmd_bond/rte_eth_bond_args.c
> +++ b/lib/librte_pmd_bond/rte_eth_bond_args.c
> @@ -254,7 +254,8 @@ bond_ethdev_parse_bond_mac_addr_kvarg(const char *key __rte_unused,
>  		return -1;
>  
>  	/* Parse MAC */
> -	return cmdline_parse_etheraddr(NULL, value, extra_args);
> +	return cmdline_parse_etheraddr(NULL, value, extra_args,
> +		sizeof(struct ether_addr));
>  }
>  
>  int
> -- 
> 2.1.0
> 

  reply	other threads:[~2014-12-05 15:51 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 18:34 [dpdk-dev] [PATCH 00/10] VM Power Management Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 01/10] Channel Manager and Monitor for VM Power Management(Host) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 02/10] VM Power Management CLI(Host) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 03/10] CPU Frequency Power Management(Host) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 04/10] " Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 05/10] VM communication channels for VM Power Management(Guest) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 06/10] Alternate implementation of librte_power " Alan Carew
2014-09-22 19:17   ` Neil Horman
2014-09-23  7:48     ` Carew, Alan
2014-09-22 18:34 ` [dpdk-dev] [PATCH 07/10] Packet format for VM Power Management(Host and Guest) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 08/10] Build system integration for VM Power Management(Guest and Host) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 09/10] VM Power Management Unit Tests(Guest) Alan Carew
2014-09-22 18:34 ` [dpdk-dev] [PATCH 10/10] VM Power Management CLI(Guest) Alan Carew
2014-09-24 17:26 ` [dpdk-dev] [PATCH v2 00/10] VM Power Management Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 01/10] Channel Manager and Monitor for VM Power Management(Host) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 02/10] VM Power Management CLI(Host) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 03/10] CPU Frequency Power Management(Host) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 04/10] VM Power Management application and Makefile Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 05/10] VM Power Management CLI(Guest) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 06/10] VM communication channels for VM Power Management(Guest) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 07/10] librte_power common interface for Guest and Host Alan Carew
2014-09-25 10:10     ` Neil Horman
2014-09-25 17:06       ` Carew, Alan
2014-09-25 17:49         ` Neil Horman
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 08/10] Packet format for VM Power Management(Host and Guest) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 09/10] Build system integration for VM Power Management(Guest and Host) Alan Carew
2014-09-24 17:26   ` [dpdk-dev] [PATCH v2 10/10] VM Power Management Unit Tests Alan Carew
2014-09-25  2:56   ` [dpdk-dev] [PATCH v2 00/10] VM Power Management Liu, Yong
2014-09-29 15:18   ` [dpdk-dev] [PATCH v3 " Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 01/10] Channel Manager and Monitor for VM Power Management(Host) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 02/10] VM Power Management CLI(Host) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 03/10] CPU Frequency Power Management(Host) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 04/10] VM Power Management application and Makefile Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 05/10] VM Power Management CLI(Guest) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 06/10] VM communication channels for VM Power Management(Guest) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 07/10] librte_power common interface for Guest and Host Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 08/10] Packet format for VM Power Management(Host and Guest) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 09/10] Build system integration for VM Power Management(Guest and Host) Alan Carew
2014-09-29 15:18     ` [dpdk-dev] [PATCH v3 10/10] VM Power Management Unit Tests Alan Carew
2014-09-29 17:29     ` [dpdk-dev] [PATCH v3 00/10] VM Power Management Neil Horman
2014-10-12 19:36     ` [dpdk-dev] [PATCH v4 " Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 01/10] Channel Manager and Monitor for VM Power Management(Host) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 02/10] VM Power Management CLI(Host) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 03/10] CPU Frequency Power Management(Host) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 04/10] VM Power Management application and Makefile Alan Carew
2014-10-16 18:28         ` De Lara Guarch, Pablo
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 05/10] VM Power Management CLI(Guest) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 06/10] VM communication channels for VM Power Management(Guest) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 07/10] librte_power common interface for Guest and Host Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 08/10] Packet format for VM Power Management(Host and Guest) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 09/10] Build system integration for VM Power Management(Guest and Host) Alan Carew
2014-10-12 19:36       ` [dpdk-dev] [PATCH v4 10/10] VM Power Management Unit Tests Alan Carew
2014-10-13  6:17       ` [dpdk-dev] [PATCH v4 00/10] VM Power Management Liu, Yong
2014-10-13 20:26       ` Thomas Monjalon
2014-10-14 12:37         ` Carew, Alan
2014-10-14 15:03           ` Thomas Monjalon
2014-10-16 15:21             ` Carew, Alan
2014-10-28 15:21               ` Thomas Monjalon
2014-11-10  9:05                 ` Carew, Alan
2014-11-10 17:54                   ` O'driscoll, Tim
2014-11-21 23:51                     ` Zhu, Heqing
2014-11-22 17:17                     ` Vincent JARDIN
2014-12-09 17:35                       ` Paolo Bonzini
2014-12-11 23:18                         ` Thomas Monjalon
2014-12-12 13:00                           ` Carew, Alan
2014-12-12 14:50                             ` Paolo Bonzini
2014-12-12 16:10                               ` Thomas Monjalon
2014-12-12 16:13                                 ` Paolo Bonzini
2014-11-21 17:42       ` [dpdk-dev] [PATCH v5 00/10] Virtual Machine " Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 01/10] Channel Manager and Monitor for VM Power Management(Host) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 02/10] VM Power Management CLI(Host) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 03/10] CPU Frequency Power Management(Host) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 04/10] VM Power Management application and Makefile Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 05/10] VM Power Management CLI(Guest) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 06/10] VM communication channels for VM Power Management(Guest) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 07/10] librte_power common interface for Guest and Host Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 08/10] Packet format for VM Power Management(Host and Guest) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 09/10] Build system integration for VM Power Management(Guest and Host) Pablo de Lara
2014-11-21 17:42         ` [dpdk-dev] [PATCH v5 10/10] VM Power Management Unit Tests Pablo de Lara
2014-11-25 16:18         ` [dpdk-dev] [PATCH v6 00/10] Virtual Machine Power Management Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 01/10] Channel Manager and Monitor for VM Power Management(Host) Pablo de Lara
2014-11-29 15:21             ` Neil Horman
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 02/10] VM Power Management CLI(Host) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 03/10] CPU Frequency Power Management(Host) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 04/10] VM Power Management application and Makefile Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 05/10] VM Power Management CLI(Guest) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 06/10] VM communication channels for VM Power Management(Guest) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 07/10] librte_power common interface for Guest and Host Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 08/10] Packet format for VM Power Management(Host and Guest) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 09/10] Build system integration for VM Power Management(Guest and Host) Pablo de Lara
2014-11-25 16:18           ` [dpdk-dev] [PATCH v6 10/10] VM Power Management Unit Tests Pablo de Lara
2014-11-26 16:41           ` [dpdk-dev] [PATCH v6 00/10] Virtual Machine Power Management Thomas Monjalon
2014-11-10  9:19     ` [dpdk-dev] [PATCH v2] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ Alan Carew
2014-12-05 14:16       ` Olivier MATZ
2014-12-05 14:19         ` [dpdk-dev] [PATCH v3] " Olivier Matz
2014-12-05 15:51           ` Bruce Richardson [this message]
2014-12-05 15:58             ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141205155100.GA9040@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git