Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sat, Jul 27, 2013 at 09:39:43PM -0700, David Miller wrote: > From: Greg KH > Date: Sat, 27 Jul 2013 21:16:16 -0700 > > > On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: > >> On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: > >> > From: Ben Hutchings > >> > Date: Sat, 27 Jul 2013 16:58:28 +0100 > >> > > >> > > I'm not so sure this is suitable for stable. It doesn't seem to be > >> > > helpful to either userland or kernel code. > >> > > > >> > > In the kernel, we were checking that ver == 1 and type == 1 thus this > >> > > wasn't hurting us. > >> > > > >> > > If userland does anything more with these fields then it's probably > >> > > already working around the swapped fields. It can work with both old > >> > > and new headers by doing: > >> > > >> > It's up to you, I would rather have the corrected version propagated > >> > as soon as possible. But that's just me. > >> > >> Let's see what Greg thinks. > > > > I'm guessing that Linus's tree is also "wrong" here, correct? If so, > > the fix that goes into that tree should also go here as well. > > > > Or am I confused? > > Linus's tree has had this change for a full release. It went into > 3.10 But isn't this a review of the 3.10-stable series? So what is the probme? > It's correcting a mistake that has been there since the header > file even existed. Ok, then I think this should be made, fixes are good to have, right? So, unless someone objects, I'll just keep this as-is. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sat, Jul 27, 2013 at 09:39:43PM -0700, David Miller wrote: From: Greg KH gre...@linuxfoundation.org Date: Sat, 27 Jul 2013 21:16:16 -0700 On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: From: Ben Hutchings b...@decadent.org.uk Date: Sat, 27 Jul 2013 16:58:28 +0100 I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. Let's see what Greg thinks. I'm guessing that Linus's tree is also wrong here, correct? If so, the fix that goes into that tree should also go here as well. Or am I confused? Linus's tree has had this change for a full release. It went into 3.10 But isn't this a review of the 3.10-stable series? So what is the probme? It's correcting a mistake that has been there since the header file even existed. Ok, then I think this should be made, fixes are good to have, right? So, unless someone objects, I'll just keep this as-is. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
From: Greg KH Date: Sat, 27 Jul 2013 21:16:16 -0700 > On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: >> On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: >> > From: Ben Hutchings >> > Date: Sat, 27 Jul 2013 16:58:28 +0100 >> > >> > > I'm not so sure this is suitable for stable. It doesn't seem to be >> > > helpful to either userland or kernel code. >> > > >> > > In the kernel, we were checking that ver == 1 and type == 1 thus this >> > > wasn't hurting us. >> > > >> > > If userland does anything more with these fields then it's probably >> > > already working around the swapped fields. It can work with both old >> > > and new headers by doing: >> > >> > It's up to you, I would rather have the corrected version propagated >> > as soon as possible. But that's just me. >> >> Let's see what Greg thinks. > > I'm guessing that Linus's tree is also "wrong" here, correct? If so, > the fix that goes into that tree should also go here as well. > > Or am I confused? Linus's tree has had this change for a full release. It went into 3.10 It's correcting a mistake that has been there since the header file even existed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: > On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: > > From: Ben Hutchings > > Date: Sat, 27 Jul 2013 16:58:28 +0100 > > > > > I'm not so sure this is suitable for stable. It doesn't seem to be > > > helpful to either userland or kernel code. > > > > > > In the kernel, we were checking that ver == 1 and type == 1 thus this > > > wasn't hurting us. > > > > > > If userland does anything more with these fields then it's probably > > > already working around the swapped fields. It can work with both old > > > and new headers by doing: > > > > It's up to you, I would rather have the corrected version propagated > > as soon as possible. But that's just me. > > Let's see what Greg thinks. I'm guessing that Linus's tree is also "wrong" here, correct? If so, the fix that goes into that tree should also go here as well. Or am I confused? greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: > From: Ben Hutchings > Date: Sat, 27 Jul 2013 16:58:28 +0100 > > > I'm not so sure this is suitable for stable. It doesn't seem to be > > helpful to either userland or kernel code. > > > > In the kernel, we were checking that ver == 1 and type == 1 thus this > > wasn't hurting us. > > > > If userland does anything more with these fields then it's probably > > already working around the swapped fields. It can work with both old > > and new headers by doing: > > It's up to you, I would rather have the corrected version propagated > as soon as possible. But that's just me. Let's see what Greg thinks. Ben. -- Ben Hutchings All extremists should be taken out and shot. signature.asc Description: This is a digitally signed message part
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
From: Ben Hutchings Date: Sat, 27 Jul 2013 16:58:28 +0100 > I'm not so sure this is suitable for stable. It doesn't seem to be > helpful to either userland or kernel code. > > In the kernel, we were checking that ver == 1 and type == 1 thus this > wasn't hurting us. > > If userland does anything more with these fields then it's probably > already working around the swapped fields. It can work with both old > and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Fri, 2013-07-26 at 13:46 -0700, Greg Kroah-Hartman wrote: > 3.10-stable review patch. If anyone has any objections, please let me know. > > -- > > From: Changli Gao > > [ Upstream commit b1a5a34bd0b8767ea689e68f8ea513e9710b671e ] > > Ver and type in pppoe_hdr should be swapped as defined by RFC2516 > section-4. > > Signed-off-by: David S. Miller > Signed-off-by: Greg Kroah-Hartman I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) /* use pppoe_hdr fields normally */ #else /* definitions were wrong before, work around it */ #endif If this is backported to stable, there is no usable version test. Userland will have to bypass the bitfields entirely: type = *(uint8_t *)hdr & 0xf; ver = *(uint8_t *)hdr >> 4; Ben. > --- > include/uapi/linux/if_pppox.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/include/uapi/linux/if_pppox.h > +++ b/include/uapi/linux/if_pppox.h > @@ -135,11 +135,11 @@ struct pppoe_tag { > > struct pppoe_hdr { > #if defined(__LITTLE_ENDIAN_BITFIELD) > - __u8 ver : 4; > __u8 type : 4; > + __u8 ver : 4; > #elif defined(__BIG_ENDIAN_BITFIELD) > - __u8 type : 4; > __u8 ver : 4; > + __u8 type : 4; > #else > #error "Please fix " > #endif -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. signature.asc Description: This is a digitally signed message part
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Fri, 2013-07-26 at 13:46 -0700, Greg Kroah-Hartman wrote: 3.10-stable review patch. If anyone has any objections, please let me know. -- From: Changli Gao xiao...@gmail.com [ Upstream commit b1a5a34bd0b8767ea689e68f8ea513e9710b671e ] Ver and type in pppoe_hdr should be swapped as defined by RFC2516 section-4. Signed-off-by: David S. Miller da...@davemloft.net Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: #if LINUX_VERSION_CODE = KERNEL_VERSION(3,11,0) /* use pppoe_hdr fields normally */ #else /* definitions were wrong before, work around it */ #endif If this is backported to stable, there is no usable version test. Userland will have to bypass the bitfields entirely: type = *(uint8_t *)hdr 0xf; ver = *(uint8_t *)hdr 4; Ben. --- include/uapi/linux/if_pppox.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/uapi/linux/if_pppox.h +++ b/include/uapi/linux/if_pppox.h @@ -135,11 +135,11 @@ struct pppoe_tag { struct pppoe_hdr { #if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ver : 4; __u8 type : 4; + __u8 ver : 4; #elif defined(__BIG_ENDIAN_BITFIELD) - __u8 type : 4; __u8 ver : 4; + __u8 type : 4; #else #error Please fix asm/byteorder.h #endif -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. signature.asc Description: This is a digitally signed message part
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
From: Ben Hutchings b...@decadent.org.uk Date: Sat, 27 Jul 2013 16:58:28 +0100 I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: From: Ben Hutchings b...@decadent.org.uk Date: Sat, 27 Jul 2013 16:58:28 +0100 I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. Let's see what Greg thinks. Ben. -- Ben Hutchings All extremists should be taken out and shot. signature.asc Description: This is a digitally signed message part
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: From: Ben Hutchings b...@decadent.org.uk Date: Sat, 27 Jul 2013 16:58:28 +0100 I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. Let's see what Greg thinks. I'm guessing that Linus's tree is also wrong here, correct? If so, the fix that goes into that tree should also go here as well. Or am I confused? greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ 06/79] net: Swap ver and type in pppoe_hdr
From: Greg KH gre...@linuxfoundation.org Date: Sat, 27 Jul 2013 21:16:16 -0700 On Sun, Jul 28, 2013 at 04:14:31AM +0100, Ben Hutchings wrote: On Sat, 2013-07-27 at 17:55 -0700, David Miller wrote: From: Ben Hutchings b...@decadent.org.uk Date: Sat, 27 Jul 2013 16:58:28 +0100 I'm not so sure this is suitable for stable. It doesn't seem to be helpful to either userland or kernel code. In the kernel, we were checking that ver == 1 and type == 1 thus this wasn't hurting us. If userland does anything more with these fields then it's probably already working around the swapped fields. It can work with both old and new headers by doing: It's up to you, I would rather have the corrected version propagated as soon as possible. But that's just me. Let's see what Greg thinks. I'm guessing that Linus's tree is also wrong here, correct? If so, the fix that goes into that tree should also go here as well. Or am I confused? Linus's tree has had this change for a full release. It went into 3.10 It's correcting a mistake that has been there since the header file even existed. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ 06/79] net: Swap ver and type in pppoe_hdr
3.10-stable review patch. If anyone has any objections, please let me know. -- From: Changli Gao [ Upstream commit b1a5a34bd0b8767ea689e68f8ea513e9710b671e ] Ver and type in pppoe_hdr should be swapped as defined by RFC2516 section-4. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/if_pppox.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/uapi/linux/if_pppox.h +++ b/include/uapi/linux/if_pppox.h @@ -135,11 +135,11 @@ struct pppoe_tag { struct pppoe_hdr { #if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ver : 4; __u8 type : 4; + __u8 ver : 4; #elif defined(__BIG_ENDIAN_BITFIELD) - __u8 type : 4; __u8 ver : 4; + __u8 type : 4; #else #error "Please fix " #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[ 06/79] net: Swap ver and type in pppoe_hdr
3.10-stable review patch. If anyone has any objections, please let me know. -- From: Changli Gao xiao...@gmail.com [ Upstream commit b1a5a34bd0b8767ea689e68f8ea513e9710b671e ] Ver and type in pppoe_hdr should be swapped as defined by RFC2516 section-4. Signed-off-by: David S. Miller da...@davemloft.net Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- include/uapi/linux/if_pppox.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/uapi/linux/if_pppox.h +++ b/include/uapi/linux/if_pppox.h @@ -135,11 +135,11 @@ struct pppoe_tag { struct pppoe_hdr { #if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ver : 4; __u8 type : 4; + __u8 ver : 4; #elif defined(__BIG_ENDIAN_BITFIELD) - __u8 type : 4; __u8 ver : 4; + __u8 type : 4; #else #error Please fix asm/byteorder.h #endif -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/