Re: [PATCH] um: ubd: Fix crash from option parsing

2021-01-22 Thread Paul Lawrence
> This was addressed/fixed by the below patch, though that one doesn't > the first "file" variable check. I don't believe the first file variable can in fact be NULL, so my check was unnecessary. Pleased to see this has been fixed, we can abandon my patch now. Paul

[PATCH] um: ubd: Fix crash from option parsing

2021-01-19 Thread Paul Lawrence
Below patch will cause NULL ptr dereferences if the optional filenames are not present. Fixes: ef3ba87cb7c9 (um: ubd: Set device serial attribute from cmdline) Signed-off-by: Paul Lawrence --- arch/um/drivers/ubd_kern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

Re: [dm-devel] [RFC] dm-bow working prototype

2018-10-29 Thread Paul Lawrence
The snapshot target could be hacked so that it remembers space trimmed with REQ_OP_DISCARD and won't reallocate these blocks. But I suspect that running discard over the whole device would degrade performance more than copying some unneeded data. How much data do you intend to backup with thi

[RFC] dm-bow working prototype

2018-10-23 Thread Paul Lawrence
-by: Paul Lawrence Cc: Alasdair Kergon Cc: Mike Snitzer Cc: dm-de...@redhat.com Cc: Jonathan Corbet Cc: Shaohua Li Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-r...@vger.kernel.org --- Documentation/device-mapper/dm-bow.txt | 103 +++ drivers/md/Kconfig

[PATCH] staging: android: ashmem: Remove deadlock

2018-03-07 Thread Paul Lawrence
ned-off-by: Paul Lawrence Cc: # 4.9.x Cc: # 4.4.x Cc: # 3.18.x: ce8a3a9e76d01 Cc: # 3.18.x Cc: Ben Hutchings --- drivers/staging/android/ashmem.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashm

[PATCH v4 5/5] kasan: added functions for unpoisoning stack variables

2017-12-04 Thread Paul Lawrence
. Signed-off-by: Alexander Potapenko [ghackm...@google.com: fix memset() parameters, and tweak commit message to describe new callbacks] Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- mm/kasan/kasan.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/mm/kasan

[PATCH v4 4/5] kasan: Add tests for alloca poisoning

2017-12-04 Thread Paul Lawrence
Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- lib/test_kasan.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index ef1a3ac1397e..2724f86c4cef 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -472,6 +472,26

[PATCH v4 1/5] kasan: add compiler support for clang

2017-12-04 Thread Paul Lawrence
For now we can hard-code ASAN ABI level 5, since historical clang builds can't build the kernel anyway. We also need to emulate gcc's __SANITIZE_ADDRESS__ flag, or memset() calls won't be instrumented. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- include

[PATCH v4 3/5] kasan: support alloca() poisoning

2017-12-04 Thread Paul Lawrence
f the dynamic stack area, so unpoisoning is simpler. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- mm/kasan/kasan.c | 34 ++ mm/kasan/kasan.h | 8 mm/kasan/report.c | 4 scripts/Makefile.kasan | 3 ++- 4 files change

[PATCH v4 2/5] kasan/Makefile: Support LLVM style asan parameters.

2017-12-04 Thread Paul Lawrence
) to enable all KASAN features. Signed-off-by: Andrey Ryabinin Signed-off-by: Paul Lawrence --- scripts/Makefile.kasan | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan index 1ce7115aa499..d5a

[PATCH v4 0/5] kasan: support alloca, LLVM

2017-12-04 Thread Paul Lawrence
tests for alloca poisoning No change [PATCH v3 5/5] kasan: added functions for unpoisoning stack variables No change Paul Lawrence (5): kasan: add compiler support for clang kasan/Makefile: Support LLVM style asan parameters. kasan: support alloca() poisoning kasan: Add tests for

[PATCH v3 2/5] kasan/Makefile: Support LLVM style asan parameters.

2017-12-01 Thread Paul Lawrence
LLVM doesn't understand GCC-style paramters ("--param asan-foo=bar"), thus we currently we don't use inline/globals/stack instrumentation when building the kernel with clang. Add support for LLVM-style parameters ("-mllvm -asan-foo=bar") to enable all KASAN features. Signed-off-by: Andrey Ryabini

[PATCH v3 5/5] kasan: added functions for unpoisoning stack variables

2017-12-01 Thread Paul Lawrence
. Signed-off-by: Alexander Potapenko [ghackm...@google.com: fix memset() parameters, and tweak commit message to describe new callbacks] Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- mm/kasan/kasan.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/mm/kasan

[PATCH v3 4/5] kasan: Add tests for alloca poisonong

2017-12-01 Thread Paul Lawrence
Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- lib/test_kasan.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index ef1a3ac1397e..2724f86c4cef 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -472,6 +472,26

[PATCH v3 3/5] kasan: support alloca() poisoning

2017-12-01 Thread Paul Lawrence
f the dynamic stack area, so unpoisoning is simpler. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- mm/kasan/kasan.c | 34 ++ mm/kasan/kasan.h | 8 mm/kasan/report.c | 4 scripts/Makefile.kasan | 3 ++- 4 files change

[PATCH v3 0/5] kasan: support alloca, LLVM

2017-12-01 Thread Paul Lawrence
kasan: support alloca() poisoning Added alloca makefile option here Modified to only unpoison the last block [PATCH v3 4/5] kasan: Add tests for alloca poisoning No change [PATCH v3 5/5] kasan: added functions for unpoisoning stack variables No change Paul Lawrence (5): kasan: add com

[PATCH v3 1/5] kasan: add compiler support for clang

2017-12-01 Thread Paul Lawrence
For now we can hard-code ASAN ABI level 5, since historical clang builds can't build the kernel anyway. We also need to emulate gcc's __SANITIZE_ADDRESS__ flag, or memset() calls won't be instrumented. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- include

[PATCH v2 4/5] kasan: support LLVM-style asan parameters

2017-11-29 Thread Paul Lawrence
Use cc-option to figure out whether the compiler's sanitizer uses LLVM-style parameters ("-mllvm -asan-foo=bar") or GCC-style parameters ("--param asan-foo=bar"). Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- sc

[PATCH v2 2/5] kasan: Add tests for alloca poisonong

2017-11-29 Thread Paul Lawrence
Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence lib/test_kasan.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index ef1a3ac1397e..2724f86c4cef 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -472,6 +472,26

[PATCH v2 3/5] kasan: added functions for unpoisoning stack variables

2017-11-29 Thread Paul Lawrence
. Signed-off-by: Alexander Potapenko [ghackm...@google.com: fix memset() parameters, and tweak commit message to describe new callbacks] Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- mm/kasan/kasan.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/mm/kasan

[PATCH v2 5/5] kasan: add compiler support for clang

2017-11-29 Thread Paul Lawrence
For now we can hard-code ASAN ABI level 5, since historical clang builds can't build the kernel anyway. We also need to emulate gcc's __SANITIZE_ADDRESS__ flag, or memset() calls won't be instrumented. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence --- include

[PATCH v2 0/5] kasan: support alloca, LLVM

2017-11-29 Thread Paul Lawrence
ld be rejected if one was not known. Also if both were empty, CFLAGS_KASAN would be " " which mostly disabled kasan on older compilers. Added support for gcc, tested on ToT compiler [PATCH v2 5/5] kasan: add compiler support for clang Made comments single line Paul Lawrence (5):

[PATCH v2 1/5] kasan: support alloca() poisoning

2017-11-29 Thread Paul Lawrence
f the dynamic stack area, so unpoisoning is simpler. Signed-off-by: Greg Hackmann Signed-off-by: Paul Lawrence mm/kasan/kasan.c | 32 mm/kasan/kasan.h | 8 mm/kasan/report.c | 4 3 files changed, 44 insertions(+) diff --git a/mm/kasan/kasan.c b/mm/