Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-29 Thread Geyslan Gregório Bem
2013/10/28 Geyslan Gregório Bem : > 2013/10/28 Geyslan Gregório Bem >> >> 2013/10/27 Eric Van Hensbergen >>> >>> Looks like the right approach. The one other optional thing I mentioned >>> was support for passing NULL for rdev and not trying to parse the device >>> info when rdev == NULL. Its

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-28 Thread Geyslan Gregório Bem
2013/10/28 Geyslan Gregório Bem > > 2013/10/27 Eric Van Hensbergen >> >> Looks like the right approach. The one other optional thing I mentioned was >> support for passing NULL for rdev and not trying to parse the device info >> when rdev == NULL. Its a very slight optimization in the grand s

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-22 Thread Geyslan Gregório Bem
2013/10/21 Geyslan Gregório Bem : > 2013/10/21 Geyslan Gregório Bem : >> 2013/10/20 Eric Van Hensbergen : >>> Please resubmit a clean patch which includes the check of sscanf for exactly >>> the correct number of arguments and handles errors properly in other cases. >>> That last bit may be a bit p

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-21 Thread Geyslan Gregório Bem
2013/10/21 Geyslan Gregório Bem : > 2013/10/20 Eric Van Hensbergen : >> Please resubmit a clean patch which includes the check of sscanf for exactly >> the correct number of arguments and handles errors properly in other cases. >> That last bit may be a bit problematic since right now the only erro

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-21 Thread Geyslan Gregório Bem
2013/10/20 Eric Van Hensbergen : > Please resubmit a clean patch which includes the check of sscanf for exactly > the correct number of arguments and handles errors properly in other cases. > That last bit may be a bit problematic since right now the only errors are > prints and we seem to be other

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Geyslan Gregório Bem
Joe, Nice, I'll wait their reply, there are other p9 patches that I have already sent and am awaiting Eric's. Thank you again. Geyslan Gregório Bem hackingbits.com 2013/10/7 Joe Perches : > On Mon, 2013-10-07 at 21:09 -0300, Geyslan Gregório Bem wrote: >> Joe, >> >> Thank you for reply. >> >>

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 21:09 -0300, Geyslan Gregório Bem wrote: > Joe, > > Thank you for reply. > > What do you think about: > > strncpy(ext, stat->extension, sizeof(ext)); > + if (sscanf(ext, "%c %u %u", &type, &major, &minor) < 3) { > +

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Geyslan Gregório Bem
Joe, Thank you for reply. What do you think about: strncpy(ext, stat->extension, sizeof(ext)); + if (sscanf(ext, "%c %u %u", &type, &major, &minor) < 3) { + p9_debug(P9_DEBUG_ERROR, + "It's necessa

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 19:19 -0300, Geyslan G. Bem wrote: > Changes the sign type to unsigned, avoiding the possibility of > wrap when ORing the p9 or unix bit modes. [] > diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c [] > @@ -144,7 +144,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_i

[PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Geyslan G. Bem
Changes the sign type to unsigned, avoiding the possibility of wrap when ORing the p9 or unix bit modes. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index b352457..574095e 1006