These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
4.4: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope")
===
0e410e158e5b is the one I'm interested in. Looks like it landed in 4.16, and got backported to 4.14-stable.
===
c5caf21ab0cf8 depends on c6d308534aef6 ("UBSAN: run-time undefined behavior sanity checker"), and I don't want to bring in all of UBSAN to 4.4. I'll send a patch for 0e410e158e5b.
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
4.4: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope")
I'm guessing I will get build warnings here too :(
===
0e410e158e5b is the one I'm interested in. Looks like it landed in 4.16, and got backported to 4.14-stable.
===
c5caf21ab0cf8 depends on c6d308534aef6 ("UBSAN: run-time undefined behavior sanity checker"), and I don't want to bring in all of UBSAN to 4.4. I'll send a patch for 0e410e158e5b.
I don't undersand, can you send a patch series for the patches you want to have applied? That makes it easier to understand.
thanks,
greg k-h
On Sat, Aug 11, 2018 at 9:40 AM Greg KH gregkh@linuxfoundation.org wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
What? Such innocent patches.
$ git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ git checkout -b 4.9-stable-kasan stable/linux-4.9.y <git log shows 4.9.118> $ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b $ make defconfig $ make -j46
I get -Wstringop-truncation, -Wstringop-overflow=, -Wpacked-not-aligned, -Warray-bounds warnings with gcc-8 with or without these patches.
Can you share your config, or what the warning was? Did I checkout the wrong branch?
4.4: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope")
I'm guessing I will get build warnings here too :(
===
0e410e158e5b is the one I'm interested in. Looks like it landed in 4.16, and got backported to 4.14-stable.
===
c5caf21ab0cf8 depends on c6d308534aef6 ("UBSAN: run-time undefined behavior sanity checker"), and I don't want to bring in all of UBSAN to 4.4. I'll send a patch for 0e410e158e5b.
I don't undersand, can you send a patch series for the patches you want to have applied? That makes it easier to understand.
Yes, sorry, I'll do that for 4.4 once we figure out what the 4.9 issues are.
On Mon, Aug 13, 2018 at 02:25:12PM -0700, Nick Desaulniers wrote:
On Sat, Aug 11, 2018 at 9:40 AM Greg KH gregkh@linuxfoundation.org wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
What? Such innocent patches.
$ git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ git checkout -b 4.9-stable-kasan stable/linux-4.9.y <git log shows 4.9.118> $ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b $ make defconfig $ make -j46
I get -Wstringop-truncation, -Wstringop-overflow=, -Wpacked-not-aligned, -Warray-bounds warnings with gcc-8 with or without these patches.
Can you share your config, or what the warning was? Did I checkout the wrong branch?
I used 'make allmodconfig' on a x86 Fedora 27 release which is using gcc 7.3.1. Adding those patches adds a ton of warnings. Let me go do a test build and send you the full log...
thanks,
greg k-h
On Tue, Aug 14, 2018 at 09:24:29AM +0200, Greg KH wrote:
On Mon, Aug 13, 2018 at 02:25:12PM -0700, Nick Desaulniers wrote:
On Sat, Aug 11, 2018 at 9:40 AM Greg KH gregkh@linuxfoundation.org wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
What? Such innocent patches.
$ git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ git checkout -b 4.9-stable-kasan stable/linux-4.9.y <git log shows 4.9.118> $ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b $ make defconfig $ make -j46
I get -Wstringop-truncation, -Wstringop-overflow=, -Wpacked-not-aligned, -Warray-bounds warnings with gcc-8 with or without these patches.
Can you share your config, or what the warning was? Did I checkout the wrong branch?
I used 'make allmodconfig' on a x86 Fedora 27 release which is using gcc 7.3.1. Adding those patches adds a ton of warnings. Let me go do a test build and send you the full log...
Attached is the full build log. Before those 2 patches were added, no build warnings. Afterward, I now have 148 build warnings. So something is not right here.
thanks,
greg k-h
On Tue, Aug 14, 2018 at 9:37 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Tue, Aug 14, 2018 at 09:24:29AM +0200, Greg KH wrote:
On Mon, Aug 13, 2018 at 02:25:12PM -0700, Nick Desaulniers wrote:
On Sat, Aug 11, 2018 at 9:40 AM Greg KH gregkh@linuxfoundation.org wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
What? Such innocent patches.
$ git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ git checkout -b 4.9-stable-kasan stable/linux-4.9.y <git log shows 4.9.118> $ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b $ make defconfig $ make -j46
I get -Wstringop-truncation, -Wstringop-overflow=, -Wpacked-not-aligned, -Warray-bounds warnings with gcc-8 with or without these patches.
Can you share your config, or what the warning was? Did I checkout the wrong branch?
I used 'make allmodconfig' on a x86 Fedora 27 release which is using gcc 7.3.1. Adding those patches adds a ton of warnings. Let me go do a test build and send you the full log...
Attached is the full build log. Before those 2 patches were added, no build warnings. Afterward, I now have 148 build warnings. So something is not right here.
I think the issue here is that e7c52b84fb ("kasan: rework Kconfig settings") should have been backported after c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope"). You'll need to "rebackport" the former one (hide use-after-scope under CONFIG_KASAN_EXTRA and set FRAME_WARN to 3072 with KASAN_EXTRA).
On Tue, Aug 14, 2018 at 02:44:19PM +0200, Andrey Konovalov wrote:
On Tue, Aug 14, 2018 at 9:37 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Tue, Aug 14, 2018 at 09:24:29AM +0200, Greg KH wrote:
On Mon, Aug 13, 2018 at 02:25:12PM -0700, Nick Desaulniers wrote:
On Sat, Aug 11, 2018 at 9:40 AM Greg KH gregkh@linuxfoundation.org wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
These patches are needed for kasan+clang support. I confirmed they apply cleanly in order (top to bottom):
4.9: commit c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope") commit 0e410e158e5b ("kasan: don't emit builtin calls when sanitization is off")
By applying these, I get a ton of new build warnings, so I can't add them :(
What? Such innocent patches.
$ git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ git checkout -b 4.9-stable-kasan stable/linux-4.9.y <git log shows 4.9.118> $ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b $ make defconfig $ make -j46
I get -Wstringop-truncation, -Wstringop-overflow=, -Wpacked-not-aligned, -Warray-bounds warnings with gcc-8 with or without these patches.
Can you share your config, or what the warning was? Did I checkout the wrong branch?
I used 'make allmodconfig' on a x86 Fedora 27 release which is using gcc 7.3.1. Adding those patches adds a ton of warnings. Let me go do a test build and send you the full log...
Attached is the full build log. Before those 2 patches were added, no build warnings. Afterward, I now have 148 build warnings. So something is not right here.
I think the issue here is that e7c52b84fb ("kasan: rework Kconfig settings") should have been backported after c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope"). You'll need to "rebackport" the former one (hide use-after-scope under CONFIG_KASAN_EXTRA and set FRAME_WARN to 3072 with KASAN_EXTRA).
Again, if someone could send me a patch series that are properly backported, it would make everything a lot easier and allow these patches to actually be applied :)
thanks,
greg k-h
+Arnd
On Tue, Aug 14, 2018 at 5:44 AM Andrey Konovalov andreyknvl@google.com wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
$ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b
I think the issue here is that e7c52b84fb ("kasan: rework Kconfig settings") should have been backported after c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope"). You'll need to "rebackport" the former one (hide use-after-scope under CONFIG_KASAN_EXTRA and set FRAME_WARN to 3072 with KASAN_EXTRA).
It looks like e7c52b84fb is already in the 4.9 tree as commit ef3af3465ab4, partially.
Oh, I see what you mean by "rebackport."
Greg, I'm happy to send the patch set. Do you (or anyone else) recommend sending a revert of ef3af3465ab4 + a new patch, or just a new patch?
Do you expect anything in the commit message that denotes how whether a patch applied cleanly or required manual intervention?
On Tue, Aug 14, 2018 at 10:34 PM Nick Desaulniers ndesaulniers@google.com wrote:
+Arnd
On Tue, Aug 14, 2018 at 5:44 AM Andrey Konovalov andreyknvl@google.com wrote:
On Mon, Aug 06, 2018 at 02:08:32PM -0700, Nick Desaulniers wrote:
$ git cherry-pick c5caf21ab0cf8 $ git cherry-pick 0e410e158e5b
I think the issue here is that e7c52b84fb ("kasan: rework Kconfig settings") should have been backported after c5caf21ab0cf8 ("kasan: turn on -fsanitize-address-use-after-scope"). You'll need to "rebackport" the former one (hide use-after-scope under CONFIG_KASAN_EXTRA and set FRAME_WARN to 3072 with KASAN_EXTRA).
It looks like e7c52b84fb is already in the 4.9 tree as commit ef3af3465ab4, partially.
Oh, I see what you mean by "rebackport."
Greg, I'm happy to send the patch set. Do you (or anyone else) recommend sending a revert of ef3af3465ab4 + a new patch, or just a new patch?
Do you expect anything in the commit message that denotes how whether a patch applied cleanly or required manual intervention?
I'm missing the background on what you are trying to do here. Do you actually want to use the -fsanitize-address-use-after-scope feature that got added later, or do you just need the -fno-builtin option? In the latter case, I think the easiest solution would be to do a manual backport of 0e410e158e5b by itself, adjusting for context, and describing what you have done in the changelog.
Arnd
On Tue, Aug 14, 2018 at 1:56 PM Arnd Bergmann arnd@arndb.de wrote:
I'm missing the background on what you are trying to do here.
Sorry, comments https://android-review.googlesource.com/c/kernel/common/+/725213 have more context.
Do you actually want to use the -fsanitize-address-use-after-scope feature that got added later, or do you just need the -fno-builtin option? In the latter case, I think the easiest solution would be to do a manual backport of 0e410e158e5b by itself, adjusting for context, and describing what you have done in the changelog.
Thanks for the recommendation, I was definitely over thinking this. Sent:
https://www.spinics.net/lists/stable/msg251682.html: [PATCH 4.9] kasan: don't emit builtin calls when sanitization is off https://www.spinics.net/lists/stable/msg251683.html: [PATCH 4.4] kasan: don't emit builtin calls when sanitization is off
linux-stable-mirror@lists.linaro.org