From: zhong jiang <zhongjiang@huawei.com> To: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org>, <akpm@linux-foundation.org>, <mingo@redhat.com>, <minchan@kernel.org>, <mhocko@suse.com>, <hpa@zytor.com>, <x86@kernel.org>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, "Zhen Lei" <thunder.leizhen@huawei.com> Subject: Re: [PATCH] futex: avoid undefined behaviour when shift exponent is negative Date: Sat, 26 Aug 2017 10:51:35 +0800 [thread overview] Message-ID: <59A0E237.1070501@huawei.com> (raw) In-Reply-To: <alpine.DEB.2.20.1708252308500.2124@nanos> On 2017/8/26 5:13, Thomas Gleixner wrote: > On Fri, 25 Aug 2017, zhong jiang wrote: >> From: zhong jiang <zhongjiang@huawei.com> >> Date: Fri, 25 Aug 2017 12:05:56 +0800 >> Subject: [PATCH v2] futex: avoid undefined behaviour when shift exponent is >> negative > Please do not send patches without changing the subject line so it's clear > that there is a new patch. ok >> using a shift value < 0 or > 31 will get crap as a result. because >> it's just undefined. The issue still disturb me, so I try to fix >> it again by excluding the especially condition. > Which is obsolete now as this code is unified accross all architectures and > the shift issue is addressed in the generic version of it. So all > architectures get the same fix. See: > > http://git.kernel.org/tip/30d6e0a4190d37740e9447e4e4815f06992dd8c3 ok , I miss the above patch. > And no, we won't add that x86 fix before that unification hits mainline > because that undefined behaviour is harmless as it only affects the user > space value of the futex. IOW, the caller gets what it asked for: crap. Thank you for clarification. Regards zhongjiang > Thanks, > > tglx > > > . >
WARNING: multiple messages have this Message-ID (diff)
From: zhong jiang <zhongjiang@huawei.com> To: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org>, akpm@linux-foundation.org, mingo@redhat.com, minchan@kernel.org, mhocko@suse.com, hpa@zytor.com, x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhen Lei <thunder.leizhen@huawei.com> Subject: Re: [PATCH] futex: avoid undefined behaviour when shift exponent is negative Date: Sat, 26 Aug 2017 10:51:35 +0800 [thread overview] Message-ID: <59A0E237.1070501@huawei.com> (raw) In-Reply-To: <alpine.DEB.2.20.1708252308500.2124@nanos> On 2017/8/26 5:13, Thomas Gleixner wrote: > On Fri, 25 Aug 2017, zhong jiang wrote: >> From: zhong jiang <zhongjiang@huawei.com> >> Date: Fri, 25 Aug 2017 12:05:56 +0800 >> Subject: [PATCH v2] futex: avoid undefined behaviour when shift exponent is >> negative > Please do not send patches without changing the subject line so it's clear > that there is a new patch. ok >> using a shift value < 0 or > 31 will get crap as a result. because >> it's just undefined. The issue still disturb me, so I try to fix >> it again by excluding the especially condition. > Which is obsolete now as this code is unified accross all architectures and > the shift issue is addressed in the generic version of it. So all > architectures get the same fix. See: > > http://git.kernel.org/tip/30d6e0a4190d37740e9447e4e4815f06992dd8c3 ok , I miss the above patch. > And no, we won't add that x86 fix before that unification hits mainline > because that undefined behaviour is harmless as it only affects the user > space value of the futex. IOW, the caller gets what it asked for: crap. Thank you for clarification. Regards zhongjiang > Thanks, > > tglx > > > . > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-08-26 2:52 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-06-21 11:43 [PATCH] futex: avoid undefined behaviour when shift exponent is negative zhong jiang 2017-06-21 16:40 ` Ingo Molnar 2017-06-21 16:40 ` Ingo Molnar 2017-06-28 4:35 ` zhong jiang 2017-06-28 4:35 ` zhong jiang 2017-06-28 21:43 ` hpa 2017-06-28 21:43 ` hpa 2017-06-29 2:12 ` zhong jiang 2017-06-29 2:12 ` zhong jiang 2017-06-29 4:29 ` hpa 2017-06-29 4:29 ` hpa 2017-06-29 5:57 ` zhong jiang 2017-06-29 5:57 ` zhong jiang 2017-06-28 22:13 ` Thomas Gleixner 2017-06-28 22:13 ` Thomas Gleixner 2017-06-29 1:54 ` zhong jiang 2017-06-29 1:54 ` zhong jiang 2017-06-29 6:33 ` Thomas Gleixner 2017-06-29 6:33 ` Thomas Gleixner 2017-06-29 7:04 ` zhong jiang 2017-06-29 7:04 ` zhong jiang 2017-08-25 5:21 ` zhong jiang 2017-08-25 5:21 ` zhong jiang 2017-08-25 21:13 ` Thomas Gleixner 2017-08-25 21:13 ` Thomas Gleixner 2017-08-26 2:51 ` zhong jiang [this message] 2017-08-26 2:51 ` zhong jiang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=59A0E237.1070501@huawei.com \ --to=zhongjiang@huawei.com \ --cc=akpm@linux-foundation.org \ --cc=hpa@zytor.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mhocko@suse.com \ --cc=minchan@kernel.org \ --cc=mingo@kernel.org \ --cc=mingo@redhat.com \ --cc=tglx@linutronix.de \ --cc=thunder.leizhen@huawei.com \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.