uapi: linux: Fix undefined behavior in bit shift
Subsystems (5)
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
--- include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/if_packet.h +1 -1
@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
Signature · 1 line
2.22.0
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
--- include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/if_packet.h +1 -1
@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
Signature · 1 line
2.22.0
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
--- include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_ioctl.h +1 -1
@@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args {#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)#define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31)#define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30)#define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)#define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
Signature · 1 line
2.22.0
skhan at linuxfoundation.org (Shuah Khan)
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
Quoted 14 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>--- include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/kfd_ioctl.h +0
-0
include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_acquire_vm_args { · line 345
Quoted 8 lines
include/uapi/linux/kfd_ioctl.h +1
-1@@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args {#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)#define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31)#define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30)#define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)#define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
Hi Jiunn,
cc mailing lists.
-- Shuah
PATCH v2 1/1 drm/amdkfd: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
--- include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_ioctl.h +1 -1
@@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args {#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)#define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31)#define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30)#define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)#define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
Signature · 1 line
2.22.0
Re: [Linux-kernel-mentees][PATCH v2] drm/amdkfd: Fix undefined behavior in bit shift
Quoted 9 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <[email protected]>---
Move version change lines here.
Quoted 9 lines
include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/kfd_ioctl.h +0
-0
include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_acquire_vm_args { · line 345
Quoted 8 lines
include/uapi/linux/kfd_ioctl.h +1
-1@@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args {#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)#define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31)#define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30)#define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)#define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
thanks,
-- Shuah
PATCH v3 1/1 drm/amdkfd: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
---
Changes included in v3:
- remove change log from patch description
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_ioctl.h +1 -1
@@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args {#define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2)#define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3)/* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31)#define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30)#define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29)#define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)
Signature · 1 line
2.22.0
c0d1n61at3 at gmail.com (Jiunn Chang)
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
--- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/nl80211.h +1 -1
@@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {NL80211_FEATURE_TDLS_CHANNEL_SWITCH =1 <<28 ,NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR =1 <<29 ,NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR =1 <<30 , - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, };/**
Signature · 1 line
2.22.0
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
Quoted 14 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>--- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/nl80211.h +0
-0
include/uapi/linux/nl80211.h enum nl80211_feature_flags { · line 5320
Quoted 8 lines
include/uapi/linux/nl80211.h +1
-1@@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {NL80211_FEATURE_TDLS_CHANNEL_SWITCH =1 <<28 ,NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR =1 <<29 ,NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR =1 <<30 , - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, };/**
cc mailing lists.
-- Shuah
PATCH v2 1/1 nl80211: Fix undefined behavior in bit shift
In reply to c0d1n61at3 at gmail.com (Jiunn Chang)Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
--- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/nl80211.h +1 -1
@@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {NL80211_FEATURE_TDLS_CHANNEL_SWITCH =1 <<28 ,NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR =1 <<29 ,NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR =1 <<30 , - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, };/**
Signature · 1 line
2.22.0
Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Quoted 9 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <c0d1n61at3 at gmail.com>---
Move version change lines here. They don't belong in the commit log.
Quoted 9 lines
include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/nl80211.h +0
-0
include/uapi/linux/nl80211.h enum nl80211_feature_flags { · line 5320
Quoted 8 lines
include/uapi/linux/nl80211.h +1
-1@@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {NL80211_FEATURE_TDLS_CHANNEL_SWITCH =1 <<28 ,NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR =1 <<29 ,NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR =1 <<30 , - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, };/**
thanks,
-- Shuah
Johannes Berg
maintainerRe: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Quoted 4 lines · Shuah Khan
Quoted 3 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Quoted 8 lines
Quoted 6 lines
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <c0d1n61at3 at gmail.com>---
Move version change lines here. They don't belong in the commit log.
FWIW, in many cases people (maintainers) now *do* want them in the commit log. Here, they're just editorial, so agree, but if real technical changes were made due to reviews, they can indeed be useful.
johannes
Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Quoted 12 lines · Johannes Berg
Quoted 11 lines · Shuah Khan
Quoted 9 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <c0d1n61at3 at gmail.com>---
Quoted 8 lines
Quoted 1 line
Move version change lines here. They don't belong in the commit log.
FWIW, in many cases people (maintainers) now *do* want them in the commit log. Here, they're just editorial, so agree, but if real technical changes were made due to reviews, they can indeed be useful.
johannes
I went looking in the git log. Looks like there are several commits with "Changes since" included in the commit log. It still appears to be maintainer preference. Probably from networking and networking related areas - wireless being one of them. This trend is recent it appears in any case.
There is a value to seeing changes as the work evolves. However, there is the concern that how log should it be.
This example commit has history from RFC stage and no doubt very useful since this is a new driver.
8ef988b914bd449458eb2174febb67b0f137b33c
If we make this more of a norm, we do want to make sure, we evolve from informal nature of these "Changes since", to "Commit log" text.
thanks,
-- Shuah
Johannes Berg
maintainerRe: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Hi Shuah,
Quoted 5 lines
I went looking in the git log. Looks like there are several commits with "Changes since" included in the commit log. It still appears to be maintainer preference. Probably from networking and networking related areas - wireless being one of them. This trend is recent it appears in any case.
Yeah. I was really just observing that I'd seen this, and some people (I guess 'many' was an exaggeration) actively request it to be in the commit log. I "grew up" with "changelog after ---" too ;-)
Quoted 2 lines
There is a value to seeing changes as the work evolves. However, there is the concern that how log should it be.
That doesn't parse, what did you mean?
Quoted 7 lines
This example commit has history from RFC stage and no doubt very useful since this is a new driver.
8ef988b914bd449458eb2174febb67b0f137b33cIf we make this more of a norm, we do want to make sure, we evolve from informal nature of these "Changes since", to "Commit log" text.
Not sure it's really worth it, but I guess some recommendations could be useful. If it is indeed to become the norm, and there aren't some people who strongly feel it should *not* be included.
johannes
Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Quoted 8 lines · Johannes Berg
Hi Shuah,
Quoted 5 lines
I went looking in the git log. Looks like there are several commits with "Changes since" included in the commit log. It still appears to be maintainer preference. Probably from networking and networking related areas - wireless being one of them. This trend is recent it appears in any case.
Quoted 8 lines
Yeah. I was really just observing that I'd seen this, and some people (I guess 'many' was an exaggeration) actively request it to be in the commit log. I "grew up" with "changelog after ---" too ;-)
Quoted 2 lines
There is a value to seeing changes as the work evolves. However, there is the concern that how log should it be.
That doesn't parse, what did you mean?
Say we are on version 16 of a patch series, when does the commit log become too long to be useful?
Quoted 6 lines
Quoted 6 lines
This example commit has history from RFC stage and no doubt very useful since this is a new driver.
8ef988b914bd449458eb2174febb67b0f137b33c
This commit has a very long commit log starting from RFC stage. It is very informative.
Quoted 7 lines
Quoted 2 lines
If we make this more of a norm, we do want to make sure, we evolve from informal nature of these "Changes since", to "Commit log" text.
Not sure it's really worth it, but I guess some recommendations could be useful. If it is indeed to become the norm, and there aren't some people who strongly feel it should *not* be included.
Yeah. If it becomes a norm, we probably will have to set some limits how long, and reads like part of the commit log as opposed to something slapped on at the end.
thanks,
-- Shuah
Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
In reply to Johannes BergQuoted 12 lines · Johannes Berg
Quoted 11 lines · Shuah Khan
Quoted 9 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <c0d1n61at3 at gmail.com>---
Quoted 8 lines
Quoted 1 line
Move version change lines here. They don't belong in the commit log.
FWIW, in many cases people (maintainers) now *do* want them in the commit log. Here, they're just editorial, so agree, but if real technical changes were made due to reviews, they can indeed be useful.
johannes
Hello Johannes,
Would you like me to send v3 with the change log in the patch description?
THX,
Jiunn
Johannes Berg
maintainerRe: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift
Quoted 2 lines · Jiunn Chang
Would you like me to send v3 with the change log in the patch description?
No no, like I said, it's not very useful in this case anyway.
johannes
PATCH v3 1/1 nl80211: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
---
Changes included in v3:
- remove change log from patch description
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/nl80211.h +1 -1
@@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {NL80211_FEATURE_TDLS_CHANNEL_SWITCH =1 <<28 ,NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR =1 <<29 ,NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR =1 <<30 , - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, };/**
Signature · 1 line
2.22.0
PATCH 1/1 uapi: linux: Fix undefined behavior in bit shift
In reply to Jiunn ChangQuoted 14 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>--- include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/if_packet.h +0
-0
include/uapi/linux/if_packet.h struct tpacket_auxdata { · line 129
Quoted 8 lines
include/uapi/linux/if_packet.h +1
-1@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
Hi Jiunn,
You will have to cc mailing lists. You sent two patches for two changes in this file. Combining them in one patch might be a good idea.
btw. I just sent email with some tips and guidelines. Please refer to them before sending patches.
thanks,
-- Shuah
PATCH v2 1/1 packet: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
--- include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/if_packet.h +1 -1
@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
Signature · 1 line
2.22.0
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
Quoted 7 lines · Jiunn Chang
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
These version change lines don't belong in the change log.
Quoted 2 lines
Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>---
Move them here.
Quoted 9 lines
include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/if_packet.h +0
-0
include/uapi/linux/if_packet.h struct tpacket_auxdata { · line 129
Quoted 8 lines
include/uapi/linux/if_packet.h +1
-1@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
thanks,
-- Shuah
David Miller
maintainerRe: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600
Quoted 9 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsThese version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
Quoted 11 lines · David Miller
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600Quoted 8 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
Quoted 5 lines
Quoted 1 line
These version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
As a general rule, please don't include change lines in the commit log. For networking changes that get sent to David and netdev, as David points out here, he likes them in the commit log, please include them in the commit log.
I am working on FAQ (Frequently Answered Questions) section for mentees. I will add this to it.
thanks,
-- Shuah
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
Quoted 19 lines · Shuah Khan
Quoted 11 lines · David Miller
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600Quoted 8 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsQuoted 5 lines
Quoted 1 line
These version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
Quoted 7 lines
As a general rule, please don't include change lines in the commit log. For networking changes that get sent to David and netdev, as David points out here, he likes them in the commit log, please include them in the commit log.
I am working on FAQ (Frequently Answered Questions) section for mentees. I will add this to it.
Same for bpf trees.
We prefer developers put as much as info as possible into commit logs and cover letters.
Explanation of v1->v2->v3 differences is invaluable not only at the point of code review, but in the future.
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
Quoted 25 lines · Alexei Starovoitov
Quoted 24 lines · Shuah Khan
Quoted 11 lines · David Miller
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600Quoted 8 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsQuoted 5 lines
Quoted 1 line
These version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
As a general rule, please don't include change lines in the commit log. For networking changes that get sent to David and netdev, as David points out here, he likes them in the commit log, please include them in the commit log.
Quoted 9 lines
Quoted 2 lines
I am working on FAQ (Frequently Answered Questions) section for mentees. I will add this to it.
Same for bpf trees.
We prefer developers put as much as info as possible into commit logs and cover letters.
Explanation ofv1->v2->v3differences is invaluable not only at the point of code review, but in the future.
Thanks Alex. I will add that to the FAQ.
-- Shuah
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
In reply to David MillerQuoted 11 lines · David Miller
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600Quoted 8 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
Quoted 4 lines
Quoted 1 line
These version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
Hello David,
Would you like me to send v3 with the change log in the patch description?
I would be happy to do that.
THX,
Jiunn
David Miller
maintainerRe: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
From: Jiunn Chang <[email protected]>
Date: Thu, 27 Jun 2019 11:57:28 -0500
Quoted 12 lines · David Miller
Quoted 11 lines
From: Shuah Khan <skhan at linuxfoundation.org>
Date: Wed, 26 Jun 2019 21:32:52 -0600Quoted 8 lines · Jiunn Chang
Quoted 6 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
These version change lines don't belong in the change log.
For networking changes I actually like the change lines to be in the commit log. So please don't stray people this way, thanks.
Hello David,
Would you like me to send v3 with the change log in the patch description?
I'll use v2 which had this done correctly.
PATCH v3 1/1 packet: Fix undefined behavior in bit shift
In reply to Jiunn ChangShifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
---
Changes included in v3:
- remove change log from patch description
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/if_packet.h +1 -1
@@ -123,7 +123,7 @@ struct tpacket_auxdata {/* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29)#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)/* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31)/* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1
Signature · 1 line
2.22.0
Re: [Linux-kernel-mentees][PATCH v2] packet: Fix undefined behavior in bit shift
In reply to Jiunn ChangFrom: Jiunn Chang <c0d1n61at3 at gmail.com>
Date: Wed, 26 Jun 2019 22:25:30 -0500
Quoted 8 lines
Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing listsSigned-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
Applied.