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:	Wed, 07 Sep 2011 08:33:08 -0700
From:	Venkateswararao Jujjuri <jvrao@...ux.vnet.ibm.com>
To:	Dan Carpenter <error27@...il.com>
CC:	Eric Van Hensbergen <ericvh@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	"M. Mohan Kumar" <mohan@...ibm.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch 2/2] 9p: change an int to unsigned int

On 08/26/2011 09:57 AM, Dan Carpenter wrote:
> The size of things should be unsigned because negative sizes are
> silly.  My concern is the the limit checks don't take negative values
> into consideration in p9_client_create()
> 	if (clnt->msize>  clnt->trans_mod->maxsize)
> 		clnt->msize = clnt->trans_mod->maxsize;
> and in p9_tag_alloc()
> 	int alloc_msize = min(c->msize, max_size);
>
> I don't know if this is exported to user space?  Hopefully it's not
> too late to change this.
It is not exported to user space but the other way is true;
  msize can be populate from mount option. It should be fine.
>
> Signed-off-by: Dan Carpenter<error27@...il.com>
Reviewed-by: Venkateswararao Jujjuri <jvrao@...ux.vnet.ibm.com>
>
> diff --git a/include/net/9p/client.h b/include/net/9p/client.h
> index 55ce72c..d479d7d 100644
> --- a/include/net/9p/client.h
> +++ b/include/net/9p/client.h
> @@ -151,7 +151,7 @@ struct p9_req_t {
>
>   struct p9_client {
>   	spinlock_t lock; /* protect client structure */
> -	int msize;
> +	unsigned int msize;
>   	unsigned char proto_version;
>   	struct p9_trans_module *trans_mod;
>   	enum p9_trans_status status;

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