* [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift [not found] <20190627010137.5612-4-c0d1n61at3@gmail.com> @ 2019-06-27 3:25 ` Jiunn Chang 2019-06-27 3:34 ` Shuah Khan 2019-06-27 5:04 ` [Linux-kernel-mentees][PATCH v3] " Jiunn Chang 0 siblings, 2 replies; 9+ messages in thread From: Jiunn Chang @ 2019-06-27 3:25 UTC (permalink / raw) To: skhan; +Cc: linux-kernel-mentees, linux-wireless, linux-kernel, johannes 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 Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com> --- include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 6f09d1500960..fa7ebbc6ff27 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -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, }; /** -- 2.22.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-27 3:25 ` [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift Jiunn Chang @ 2019-06-27 3:34 ` Shuah Khan 2019-06-28 13:57 ` Johannes Berg 2019-06-27 5:04 ` [Linux-kernel-mentees][PATCH v3] " Jiunn Chang 1 sibling, 1 reply; 9+ messages in thread From: Shuah Khan @ 2019-06-27 3:34 UTC (permalink / raw) To: Jiunn Chang Cc: linux-kernel-mentees, linux-wireless, linux-kernel, johannes, Shuah Khan On 6/26/19 9:25 PM, Jiunn Chang wrote: > 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 > > Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com> > --- Move version change lines here. They don't belong in the commit log. > include/uapi/linux/nl80211.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h > index 6f09d1500960..fa7ebbc6ff27 100644 > --- a/include/uapi/linux/nl80211.h > +++ b/include/uapi/linux/nl80211.h > @@ -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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-27 3:34 ` Shuah Khan @ 2019-06-28 13:57 ` Johannes Berg 2019-06-28 15:04 ` Shuah Khan 2019-07-04 18:34 ` Jiunn Chang 0 siblings, 2 replies; 9+ messages in thread From: Johannes Berg @ 2019-06-28 13:57 UTC (permalink / raw) To: Shuah Khan, Jiunn Chang Cc: linux-kernel-mentees, linux-wireless, linux-kernel On Wed, 2019-06-26 at 21:34 -0600, Shuah Khan wrote: > On 6/26/19 9:25 PM, Jiunn Chang wrote: > > 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 > > > > Signed-off-by: Jiunn Chang <c0d1n61at3@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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-28 13:57 ` Johannes Berg @ 2019-06-28 15:04 ` Shuah Khan 2019-06-28 15:17 ` Johannes Berg 2019-07-04 18:34 ` Jiunn Chang 1 sibling, 1 reply; 9+ messages in thread From: Shuah Khan @ 2019-06-28 15:04 UTC (permalink / raw) To: Johannes Berg, Jiunn Chang Cc: linux-kernel-mentees, linux-wireless, linux-kernel, Shuah Khan On 6/28/19 7:57 AM, Johannes Berg wrote: > On Wed, 2019-06-26 at 21:34 -0600, Shuah Khan wrote: >> On 6/26/19 9:25 PM, Jiunn Chang wrote: >>> 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 >>> >>> Signed-off-by: Jiunn Chang <c0d1n61at3@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 > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-28 15:04 ` Shuah Khan @ 2019-06-28 15:17 ` Johannes Berg 2019-06-28 15:27 ` Shuah Khan 0 siblings, 1 reply; 9+ messages in thread From: Johannes Berg @ 2019-06-28 15:17 UTC (permalink / raw) To: Shuah Khan, Jiunn Chang Cc: linux-kernel-mentees, linux-wireless, linux-kernel Hi Shuah, > 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 ;-) > 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? > 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. 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-28 15:17 ` Johannes Berg @ 2019-06-28 15:27 ` Shuah Khan 0 siblings, 0 replies; 9+ messages in thread From: Shuah Khan @ 2019-06-28 15:27 UTC (permalink / raw) To: Johannes Berg, Jiunn Chang Cc: linux-kernel-mentees, linux-wireless, linux-kernel, Shuah Khan On 6/28/19 9:17 AM, Johannes Berg wrote: > Hi Shuah, > >> 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 ;-) > >> 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? > >> 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. >> 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-06-28 13:57 ` Johannes Berg 2019-06-28 15:04 ` Shuah Khan @ 2019-07-04 18:34 ` Jiunn Chang 2019-07-04 20:20 ` Johannes Berg 1 sibling, 1 reply; 9+ messages in thread From: Jiunn Chang @ 2019-07-04 18:34 UTC (permalink / raw) To: Johannes Berg Cc: Shuah Khan, linux-kernel-mentees, linux-wireless, linux-kernel On Fri, Jun 28, 2019 at 03:57:05PM +0200, Johannes Berg wrote: > On Wed, 2019-06-26 at 21:34 -0600, Shuah Khan wrote: > > On 6/26/19 9:25 PM, Jiunn Chang wrote: > > > 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 > > > > > > Signed-off-by: Jiunn Chang <c0d1n61at3@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 > Hello Johannes, Would you like me to send v3 with the change log in the patch description? THX, Jiunn ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift 2019-07-04 18:34 ` Jiunn Chang @ 2019-07-04 20:20 ` Johannes Berg 0 siblings, 0 replies; 9+ messages in thread From: Johannes Berg @ 2019-07-04 20:20 UTC (permalink / raw) To: Jiunn Chang Cc: Shuah Khan, linux-kernel-mentees, linux-wireless, linux-kernel On Thu, 2019-07-04 at 13:34 -0500, Jiunn Chang wrote: > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Linux-kernel-mentees][PATCH v3] nl80211: Fix undefined behavior in bit shift 2019-06-27 3:25 ` [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift Jiunn Chang 2019-06-27 3:34 ` Shuah Khan @ 2019-06-27 5:04 ` Jiunn Chang 1 sibling, 0 replies; 9+ messages in thread From: Jiunn Chang @ 2019-06-27 5:04 UTC (permalink / raw) To: skhan; +Cc: linux-kernel-mentees, linux-wireless, linux-kernel, johannes Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned. Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com> --- 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(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 6f09d1500960..fa7ebbc6ff27 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -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, }; /** -- 2.22.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-07-04 20:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190627010137.5612-4-c0d1n61at3@gmail.com>
2019-06-27 3:25 ` [Linux-kernel-mentees][PATCH v2] nl80211: Fix undefined behavior in bit shift Jiunn Chang
2019-06-27 3:34 ` Shuah Khan
2019-06-28 13:57 ` Johannes Berg
2019-06-28 15:04 ` Shuah Khan
2019-06-28 15:17 ` Johannes Berg
2019-06-28 15:27 ` Shuah Khan
2019-07-04 18:34 ` Jiunn Chang
2019-07-04 20:20 ` Johannes Berg
2019-06-27 5:04 ` [Linux-kernel-mentees][PATCH v3] " Jiunn Chang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox