(, 0, sizeof(struct ifreq));
strcpy((char*)_name, "gre0");
req.ifr_flags = IFF_UP | IFF_MULTICAST;
ioctl(tun_fd, TUNSETIFF, );
ioctl(sock, SIOCSIFFLAGS, "gre0");
write(tun_fd, "hi", 0);
return 0;
}
======
Signed
generic file so that page_owner can also
> do same filteration.
>
> Initial KASAN commit
> id=be7635e7287e0e8013af3c89a6354a9e0182594c
>
> Signed-off-by: Vaneet Narang
> Signed-off-by: Maninder Singh
Reviewed-by: Alexander Potapenko
> ---
> include/linux/stacktrace.h | 25 +++
ot;(__sp)
> :
> [entry]"r"(entry),
> [ss]"i"(__KERNEL_DS),
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index b836a7274e12..4457e41378e4 100644
> --- a/arch/x86/mm/fault.c
>
On Tue, Sep 19, 2017 at 2:55 PM, Alexander Potapenko wrote:
> On Tue, Sep 19, 2017 at 11:45 AM, Josh Poimboeuf wrote:
>> For inline asm statements which have a CALL instruction, we list the
>> stack pointer as a constraint to convince GCC to ensure the frame
>> po
stackdepot used to call memcmp(), which compiler tools normally
instrument, therefore every lookup used to unnecessarily call
instrumented code.
This is somewhat ok in the case of KASAN, but under KMSAN a lot of time
was spent in the instrumentation.
Signed-off-by: Alexander Potapenko
---
v2
.c:292
==
Signed-off-by: Alexander Potapenko
Reviewed-by: Xin Long
---
v2 is identical to v1, resending per request by Marcelo Ricardo Leitner.
---
net/sctp/ipv6.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
On Tue, Aug 8, 2017 at 8:47 PM, Marcelo Ricardo Leitner
wrote:
> On Tue, Jul 18, 2017 at 04:55:57PM +0200, Alexander Potapenko wrote:
>> KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and
>> sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below).
&g
Don't attempt to read the first two elements of name[] unless they
were actually copied from the userspace.
This bug has been detected by KMSAN.
Signed-off-by: Alexander Potapenko
---
kernel/sysctl_binary.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel
Hi everyone,
On Mon, Jul 10, 2017 at 10:32 PM, Andrew Morton
wrote:
> On Fri, 7 Jul 2017 18:18:31 -0500 (CDT) Christoph Lameter
> wrote:
>
>> On Fri, 7 Jul 2017, Andrew Morton wrote:
>>
>> > On Fri, 7 Jul 2017 10:34:08 +0200 Alexander Potapenko
>>
return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246
==
Signed-off-by: Alexander Potapenko
---
include/net/sctp/sctp.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sc
On Thu, Jul 13, 2017 at 8:10 PM, Alexander Potapenko wrote:
> If the iterator (|pos.p| or |err|) has already reached the end of
> chunk, we shouldn't access iterator->length.
>
> This bug has been detected by KMSAN. For the following pair of system
> calls:
>
> sock
On Thu, Jul 13, 2017 at 8:14 PM, Alexander Potapenko wrote:
> On Thu, Jul 13, 2017 at 8:10 PM, Alexander Potapenko
> wrote:
>> If the iterator (|pos.p| or |err|) has already reached the end of
>> chunk, we shouldn't access iterator->length.
>>
>> Th
On Thu, Jul 13, 2017 at 8:32 PM, David Miller wrote:
> From: Alexander Potapenko
> Date: Thu, 13 Jul 2017 20:10:34 +0200
>
>> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
>> index a9519a06a23b..f13632ee33f0 100644
>> --- a/include/net/sctp/sctp.
_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246
======
Signed-off-by: Alexander Potapenko
---
v2: per comment from David Miller, make sure the whole iterator->length
fits into the remaining buffer.
---
include/net/
_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246
======
Signed-off-by: Alexander Potapenko
---
v3: fix compilation
v2: per comment from David Miller, make sure the whole iterator->length
fits into the remaining buffer
On Fri, Jul 14, 2017 at 5:58 PM, David Miller wrote:
> From: Alexander Potapenko
> Date: Fri, 14 Jul 2017 12:03:29 +0200
>
>> v2: per comment from David Miller, make sure the whole iterator->length
>> fits into the remaining buffer.
>
> Please compile and
process_backlog+0x667/0xba0 net/core/dev.c:4866
napi_poll net/core/dev.c:5268
net_rx_action+0xc95/0x1590 net/core/dev.c:5333
__do_softirq+0x485/0x942 kernel/softirq.c:284
==
Signed-off-by: Alexander Potapenko
---
net/ipv6
On Fri, Jul 14, 2017 at 7:23 PM, David Miller wrote:
> From: Alexander Potapenko
> Date: Fri, 14 Jul 2017 18:33:01 +0200
>
>> On Fri, Jul 14, 2017 at 5:58 PM, David Miller wrote:
>>> From: Alexander Potapenko
>>> Date: Fri, 14 Jul 2017 12:03:29 +0200
>>&g
On Fri, Jul 14, 2017 at 7:04 PM, Neal Cardwell wrote:
> On Fri, Jul 14, 2017 at 12:54 PM, Alexander Potapenko
> wrote:
>> KMSAN reported use of uninitialized memory in skb_set_hash_from_sk(),
>> which originated from the TCP request socket created in
>> cookie_v6_che
On Sat, Jul 8, 2017 at 1:18 AM, Christoph Lameter wrote:
> On Fri, 7 Jul 2017, Andrew Morton wrote:
>
>> On Fri, 7 Jul 2017 10:34:08 +0200 Alexander Potapenko
>> wrote:
>>
>> > --- a/mm/slub.c
>> > +++ b/mm/slub.c
>> > @@ -3389,8 +3389,8 @@
x94
==
Signed-off-by: Alexander Potapenko
---
fs/mbcache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/mbcache.c b/fs/mbcache.c
index b19be429d655..fdfe8933ac6b 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -93,6 +93,7 @@ int mb_cache_entry_create(struct mb_cache *cache, gfp_t m
ons arch/x86/kernel/head64.c:196 [inline]
x86_64_start_kernel+0x6cc/0x700 arch/x86/kernel/head64.c:177
verify_cpu+0x0/0xfc
==
Signed-off-by: Alexander Potapenko
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
d
Hi all,
On Fri, Jul 7, 2017 at 10:34 AM, Alexander Potapenko wrote:
> According to KMSAN (see the report below) it's possible that
> unfreeze_partials() accesses >list_lock before it's being
> initialized. The initialization normally happens in
> init_kmem_cache_node() when i
On Fri, Jul 14, 2017 at 7:54 PM, David Miller wrote:
> From: Alexander Potapenko
> Date: Fri, 14 Jul 2017 19:33:54 +0200
>
>> On Fri, Jul 14, 2017 at 7:23 PM, David Miller wrote:
>>> From: Alexander Potapenko
>>> Date: Fri, 14 Jul 2017 18:33:01 +0200
>>
().
Signed-off-by: Alexander Potapenko
Fixes: 58d607d3e52f ("tcp: provide skb->hash to synack packets")
---
net/ipv4/syncookies.c | 1 +
net/ipv6/syncookies.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 0905cf04c2a4..03ad87
On Mon, Jul 17, 2017 at 12:35 PM, Alexander Potapenko wrote:
> KMSAN reported use of uninitialized memory in skb_set_hash_from_sk(),
> which originated from the TCP request socket created in
> cookie_v6_check():
>
> =
.c:292
==
Signed-off-by: Alexander Potapenko
---
net/sctp/ipv6.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 2a186b201ad2..a15d691829c6 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -513,6 +513,8 @@ stati
On Tue, Jul 18, 2017 at 4:55 PM, Alexander Potapenko wrote:
> KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and
> sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below).
> Make sure all fields of an IPv6 address are initialized, which
> guarantees th
memory). Therefore the loop condition is always true,
and the loops become infinite.
To work around this, introduce the member_address_is_nonnull() macro,
which casts object pointer to uintptr_t, thus letting the member pointer
to be NULL.
Signed-off-by: Alexander Potapenko
---
include/linux/llist.
KMSAN reported a use of uninitialized memory in dev_set_alias(),
which was caused by calling strlcpy() (which in turn called strlen())
on the user-supplied non-terminated string.
Signed-off-by: Alexander Potapenko
---
v3: removed the multi-line comment
v2: fixed an off-by-one error spotted
On Thu, Jun 1, 2017 at 3:47 PM, Yury Norov wrote:
> On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote:
>> KMSAN reported a use of uninitialized memory in dev_set_alias(),
>> which was caused by calling strlcpy() (which in turn called strlen())
>> on
On Thu, Jun 1, 2017 at 4:04 PM, Yury Norov wrote:
> On Thu, Jun 01, 2017 at 03:50:33PM +0200, Alexander Potapenko wrote:
>> On Thu, Jun 1, 2017 at 3:47 PM, Yury Norov wrote:
>> > On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote:
>> >> KMSAN r
s to the
> kernels memory model are resolved?" I would hope the two are
> orthogonal and that we'd take them and then test them even more
> extensively than the developer has in order to find out.
>
>> It would be good to get something similar to LKMM into KTSAN, for
>> examp
cc-param,asan-globals=1) \
> + $(call
> cc-param,asan-instrumentation-with-call-threshold=$(call_threshold)) \
> + $(call cc-param,asan-stack=1) \
> + $(call cc-param,asan-use-after-scope=1)
> + endif
> +
> endif
>
> CFLAGS_KASAN += $(call cc-opt
value.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Andrey Konovalov
Cc: Andrew Morton
Cc: Mark Rutland
Cc: Alexander Popov
Cc: Andrey Ryabinin
Cc: Kees Cook
Cc: Vegard Nossum
Cc: Quentin Casasnovas
Cc: syzkal...@googlegroups.com
Cc: linux
From: Victor Chibotaru
The updated documentation describes new KCOV mode for collecting
comparison operands.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Andrey Konovalov
Cc: Andrew Morton
Cc: Mark Rutland
Cc: Alexander Popov
Cc: Andrey
From: Victor Chibotaru
The flag enables Clang instrumentation of comparison operations
(currently not supported by GCC). This instrumentation is needed by the
new KCOV device to collect comparison operands.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
From: Victor Chibotaru
The flag enables Clang instrumentation of comparison operations
(currently not supported by GCC). This instrumentation is needed by the
new KCOV device to collect comparison operands.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
From: Victor Chibotaru
The updated documentation describes new KCOV mode for collecting
comparison operands.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Andrey Konovalov
Cc: Andrew Morton
Cc: Mark Rutland
Cc: Alexander Popov
Cc: Andrey
On Mon, Oct 9, 2017 at 8:53 AM, Andrey Ryabinin wrote:
>
>
> On 10/09/2017 06:05 PM, Alexander Potapenko wrote:
>
>> v2: - updated KCOV_ENABLE_COMPARISONS description
>> ---
>> Makefile | 5 +++--
>> lib/Kconfig.debug| 10 ++
>&g
On Mon, Oct 9, 2017 at 8:46 AM, Mark Rutland wrote:
> Hi,
>
> I look forward to using this! :)
>
> I just have afew comments below.
>
> On Mon, Oct 09, 2017 at 05:05:19PM +0200, Alexander Potapenko wrote:
>> +/*
>> + * Defines the format for the types of collec
value.
Signed-off-by: Victor Chibotaru
Signed-off-by: Alexander Potapenko
Cc: Dmitry Vyukov
Cc: Andrey Konovalov
Cc: Andrew Morton
Cc: Mark Rutland
Cc: Alexander Popov
Cc: Andrey Ryabinin
Cc: Kees Cook
Cc: Vegard Nossum
Cc: Quentin Casasnovas
Cc: syzkal...@googlegroups.com
Cc: linux
Thank you all for the comments!
Since concerns have been raised that another error reporting system
may quickly go out of control, we've decided to not pursue this
solution any further.
Instead, we will try to rely on existing ftrace mechanisms to deliver
notifications to the userspace, and
On Fri, Jan 15, 2021 at 2:09 PM Alexander Potapenko wrote:
>
> On Fri, Jan 15, 2021 at 2:06 PM Vlastimil Babka wrote:
> >
> > Should have CCd linux-api@, please do next time
> Thanks, will do!
> Shall I also CC the v2 ABI patch explicitly?
I'll be dropping the sysfs ch
On Wed, Jan 13, 2021 at 10:10 PM Steven Rostedt wrote:
>
> On Wed, 13 Jan 2021 10:16:54 +0100
> Alexander Potapenko wrote:
>
> > +DECLARE_EVENT_CLASS(error_report_template,
> > + TP_PROTO(const char *error_detector, unsigned long id),
>
> Ins
On Thu, Jan 14, 2021 at 1:06 AM Andrew Morton wrote:
>
> On Wed, 13 Jan 2021 10:16:55 +0100 Alexander Potapenko
> wrote:
>
> > With the introduction of various production error-detection tools, such as
> > MTE-based KASAN and KFENCE, the need arises to efficiently not
On Mon, Jan 18, 2021 at 11:54 PM Randy Dunlap wrote:
>
> On 1/18/21 1:56 AM, vji...@codeaurora.org wrote:
> > From: Yogesh Lal
> >
> > Use CONFIG_STACK_HASH_ORDER to configure STACK_HASH_SIZE.
> >
> > Aim is to have configurable value for STACK_HASH_SIZE,
> > so depend on use case one can
> Signed-off-by: Vijayanand Jitta
Reviewed-by: Alexander Potapenko
> ---
> lib/Kconfig | 9 +
> lib/stackdepot.c | 3 +--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index b46a9fd..96ee125 100644
> --- a/
On Mon, Jan 18, 2021 at 12:38 PM Petr Mladek wrote:
Thanks for your input! Some responses below.
>
> On Fri 2021-01-15 14:03:33, Alexander Potapenko wrote:
> > With the introduction of various production error-detection tools, such as
> > MTE-based KASAN and KFENC
58ef2804ff465d8eb07434a300bf36388d55
> Signed-off-by: Andrey Konovalov
Reviewed-by: Alexander Potapenko
> ---
> lib/test_kasan.c | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/lib/test_kasan.c b/lib/test_kasan.c
> index 283feda9882a..a1a35d75ee1e 100644
>
ros and use them.
> >
> > Link:
> > https://linux-review.googlesource.com/id/I237484a7fddfedf4a4aae9cc61ecbcdbe85a0a63
> > Suggested-by: Alexander Potapenko
> > Signed-off-by: Andrey Konovalov
>
> Nice!
>
> Reviewed-by: Marco Elver
Reviewed-by: Alexander Potapenko
On Wed, Dec 30, 2020 at 1:46 PM wrote:
>
> From: Yogesh Lal
>
> Use STACK_HASH_ORDER_SHIFT to configure STACK_HASH_SIZE.
I think "ORDER_SHIFT" is somewhat redundant, as "SMTH_ORDER" already
means this is a power of two we'll be using for shifting.
Leaving this up to you.
Alex
to use this new feature.
Alexander Potapenko (4):
tracing: add error_report trace points
lib: add error_report_notify to collect debugging tools' reports
kfence: use error_report_start and error_report_end tracepoints
kasan: use error_report_start and error_report_end tracepoints
include
-by: Alexander Potapenko
---
include/trace/events/error_report.h | 51 +
kernel/trace/Makefile | 1 +
kernel/trace/error_report-traces.c | 11 +++
3 files changed, 63 insertions(+)
create mode 100644 include/trace/events/error_report.h
create mode
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
mm/kasan/report.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index c0fb21797550..fd015dd5dd39 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
: Petr Mladek
Cc: Steven Rostedt
Cc: Sergey Senozhatsky
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
lib/Kconfig.debug | 14 ++
lib/Makefile | 2 +
lib/error_report_notify.c | 278 ++
3 files changed, 294 insertions
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
mm/kfence/report.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/kfence/report.c b/mm/kfence/report.c
index 4dedc2ff8f28..5c063b5b2227 100644
--- a/mm/kfence/report.c
+++ b/mm/kfence/report.c
@@ -9,6 +9,7 @@
#include
On Thu, Jan 14, 2021 at 10:51 AM Alexander Potapenko wrote:
>
> On Thu, Jan 14, 2021 at 1:06 AM Andrew Morton
> wrote:
> >
> > On Wed, 13 Jan 2021 10:16:55 +0100 Alexander Potapenko
> > wrote:
> >
> > > With the introduction of various production erro
On Thu, Jan 14, 2021 at 3:52 PM Steven Rostedt wrote:
>
> On Thu, 14 Jan 2021 08:49:57 +0100
> Alexander Potapenko wrote:
>
> > We'll need to explicitly list the enum values once again in
> > __print_symbolic(), right? E.g.:
> >
> > enum debug
to use this new feature.
v2:
- added ABI documentation for /sys/kernel/error_report/
- changed error_report_start and error_report end tracepoints to take
a fixed set of values for the error detector
Alexander Potapenko (5):
tracing: add error_report trace points
lib: add
: Petr Mladek
Cc: Steven Rostedt
Cc: Sergey Senozhatsky
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
v2:
- s/memory error reports/error reports from debugging tools/
(per Andrew Morton's comment)
- change error_report_start and error_report_end prototypes
to accept enum
-error_report
new file mode 100644
index ..666d039f93a9
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-error_report
@@ -0,0 +1,41 @@
+What: /sys/kernel/error_report/
+Date: January 2021
+Contact: Alexander Potapenko ,
+ Marco Elver
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
v2:
- change error_report_start and error_report_end prototypes
to accept enum error_detector instead of char*
(as suggested by Steven Rostedt)
---
mm/kfence/report.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm
Cc: linux...@kvack.org
Signed-off-by: Alexander Potapenko
---
v2:
- change error_report_start and error_report_end prototypes
to accept enum error_detector instead of char*
(as suggested by Steven Rostedt)
---
mm/kasan/report.c | 15 +--
1 file changed, 9 insertions(+), 6
-by: Alexander Potapenko
---
v2: - change error_report_start and error_report_end prototypes
to accept enum error_detector instead of char*
(as suggested by Steven Rostedt)
---
include/trace/events/error_report.h | 84 +
kernel/trace/Makefile
On Fri, Jan 15, 2021 at 2:06 PM Vlastimil Babka wrote:
>
> Should have CCd linux-api@, please do next time
Thanks, will do!
Shall I also CC the v2 ABI patch explicitly?
On Thu, Jan 14, 2021 at 8:36 PM Andrey Konovalov wrote:
>
> Clarify and update comments in KASAN tests.
>
> Link:
> https://linux-review.googlesource.com/id/I6c816c51fa1e0eb7aa3dead6bda1f339d2af46c8
> Reviewed-by: Marco Elver
> Signed-off-by: Andrey Konovalov
Reviewed-by: Alexander Potapenko
gt;
> Note, that test #3 causes a significant number (255) of KASAN reports
> to be printed during execution for the SW_TAGS mode.
>
> Link:
> https://linux-review.googlesource.com/id/I78f1375efafa162b37f3abcb2c5bc2f3955dfd8e
> Reviewed-by: Marco Elver
> Signed-off-by: Andrey Konovalov
Reviewed-by: Alexander Potapenko
s://linux-review.googlesource.com/id/I6447af436a69a94bfc35477f6bf4e2122948355e
> > Signed-off-by: Andrey Konovalov
>
> Reviewed-by: Marco Elver
Reviewed-by: Alexander Potapenko
ttps://linux-review.googlesource.com/id/I2a8bf797aecf81baeac61380c567308f319e263d
> > Signed-off-by: Andrey Konovalov
>
> Reviewed-by: Marco Elver
Reviewed-by: Alexander Potapenko
(see a nit below)
> > + cache = kmem_cache_create("test_cache", size, 0, 0, NULL)
_RET_IP_ to __kasan_check_byte().
> >
> > Also add a new ksize_uaf() test that checks that a use-after-free is
> > detected via ksize() itself, and via plain accesses that happen later.
> >
> > Link:
> > https://linux-review.googlesource.com/id/Iaabf771881d0f9ce1b969f2a62938e99d3308ec5
> > Signed-off-by: Andrey Konovalov
>
> Reviewed-by: Marco Elver
Reviewed-by: Alexander Potapenko
ooglesource.com/id/I8fb3c06d49671305ee184175a39591bc26647a67
> > Signed-off-by: Andrey Konovalov
>
> Much nicer!
>
> Reviewed-by: Marco Elver
Reviewed-by: Alexander Potapenko
gned-off-by: Andrey Konovalov
Reviewed-by: Alexander Potapenko
t
didn't change under their feet.
> Also, any reason you didn't cc: the sysfs maintainers?
Only my lack of common sense :)
I'll add them should the following patches rely on sysfs, thank you!
Alex
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 Mün
On Fri, Jan 15, 2021 at 2:50 PM Greg KH wrote:
>
> Minor comments, if in the future, you really do want to mess around in sysfs:
>
Thanks! Guess most of these comments apply even if I choose another FS
to mess around with.
> No copyright notice for the file? While acceptable, odds are your
>
On Mon, Jan 18, 2021 at 10:22 AM Marco Elver wrote:
>
> Add missing copyright and description header to KFENCE source file.
>
> Signed-off-by: Marco Elver
Reviewed-by: Alexander Potapenko
planning to do.
Also, shall I rename the library/config/etc. accordingly (to e.g.
CONFIG_KERNEL_WARN_NOTIFY)?
> Use the function in kernel/trace/trace.c: tracer_init_tracefs() to add that
> directory. That's for files in the tracefs directory that will not be
> duplicated by instances.
On Mon, Jan 18, 2021 at 10:22 AM Marco Elver wrote:
>
> Add missing copyright and description headers to KFENCE source files.
>
> Signed-off-by: Marco Elver
Reviewed-by: Alexander Potapenko
> ---
> If appropriate, to be squashed into:
>
> mm: add Kernel Elect
On Mon, Jan 18, 2021 at 10:22 AM Marco Elver wrote:
>
> Add missing copyright and description header to KFENCE source file.
>
> Signed-off-by: Marco Elver
Reviewed-by: Alexander Potapenko
On Mon, Jan 18, 2021 at 10:22 AM Marco Elver wrote:
>
> Add missing copyright header to KFENCE documentation.
>
> Signed-off-by: Marco Elver
Reviewed-by: Alexander Potapenko
> > > +
> > > + /* Pairs with acquire in last_report_show(). */
> > > + atomic_inc_return_release(_reports);
> > > + schedule_delayed_work(_done, 0);
> >
> > Why delayed work when it gets queued immediately?
>
> Because error reports may be sent from a place where waiting is
>
On Tue, Sep 29, 2020 at 5:06 PM Mark Rutland wrote:
>
> On Tue, Sep 29, 2020 at 04:51:29PM +0200, Marco Elver wrote:
> > On Tue, 29 Sep 2020 at 16:24, Mark Rutland wrote:
> > [...]
> > >
> > > From other sub-threads it sounds like these addresses are not part of
> > > the linear/direct map.
> > + p[i] = object;
> > + continue;
> > + }
> > +
> > + object = c->freelist;
> > if (unlikely(!object)) {
> > /*
> > * We may have
On Tue, Sep 29, 2020 at 2:21 PM Andrey Konovalov wrote:
>
> On Mon, Sep 21, 2020 at 3:26 PM Marco Elver wrote:
> >
> > From: Alexander Potapenko
> >
> > We make KFENCE compatible with KASAN for testing KFENCE itself. In
> > particular, KASAN helps to catch
On Tue, Sep 29, 2020 at 4:24 PM Mark Rutland wrote:
>
> On Mon, Sep 21, 2020 at 03:26:02PM +0200, Marco Elver wrote:
> > From: Alexander Potapenko
> >
> > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a
> > low-overhead sampling-based memory
> > On x86 we just do `char __kfence_pool[KFENCE_POOL_SIZE] ...;` to
> > statically allocate the pool. On arm64 this doesn't seem to work
> > because static memory doesn't have struct pages?
>
> Are you using virt_to_page() directly on that statically-allocated
> __kfence_pool? If so you'll need
> required interface in . Currently, the arm64 version does
> > not yet use a statically allocated memory pool, at the cost of a pointer
> > load for each is_kfence_address().
> >
> > Reviewed-by: Dmitry Vyukov
> > Co-developed-by: Alexander Potapenko
> > Signed
er Popov
Reviewed-by: Alexander Potapenko
> ---
> mm/slab.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 3160dff6fd76..5140203c5b76 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3414,6 +3414,9 @@ static vo
Mark,
> If you need virt_to_page() to work, the address has to be part of the
> linear/direct map.
>
> If you need to find the struct page for something that's part of the
> kernel image you can use virt_to_page(lm_alias(x)).
>
> > Looks like filling page table entries (similarly to what's being
using size classes, so e.g. when allocating 272 bytes the
object will be padded to 512.
As a result, placing that object at the end of the page won't really
help to detect out-of-bound accesses that are off by less than 270
bytes.
We probably need to better clarify this in the patch description.
-
.kernel.org/linux-arm-kernel/CAG_fn=XMc8NPZPFtUE=rdoR=xjh4f+txzs-w5n4vuawktjc...@mail.gmail.com/
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
> This series looks good to me.
Great!
Which tree do fault injection patches normally go to?
> Reviewed-by: Akinobu Mita
Reviewed-by: Alexander Potapenko
Hi Andrew,
On Mon, Aug 31, 2020 at 6:27 PM Akinobu Mita wrote:
>
> Andrew,
>
> Could you take a look at this series, and consider taking in -mm tree?
Please consider picking v3 patches that address Peter's comments instead.
>
> 2020年9月1日(火) 0:49 Alexander Potapenko :
>
On Mon, Sep 21, 2020 at 12:02 PM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:c5a13b33 kmsan: clang-format core
> git tree: https://github.com/google/kmsan.git master
> console output: https://syzkaller.appspot.com/x/log.txt?x=173525ab90
> kernel
> required interface in . Currently, the arm64 version does
> > not yet use a statically allocated memory pool, at the cost of a pointer
> > load for each is_kfence_address().
> >
> > Reviewed-by: Dmitry Vyukov
> > Co-developed-by: Alexander Potapenko
> > Signed
On Mon, Sep 21, 2020 at 4:58 PM Alexander Potapenko wrote:
>
> On Mon, Sep 21, 2020 at 4:31 PM Will Deacon wrote:
> >
> > On Mon, Sep 21, 2020 at 03:26:04PM +0200, Marco Elver wrote:
> > > Add architecture specific implementation details for KFENCE and enable
On Thu, Sep 10, 2020 at 5:43 PM Dmitry Vyukov wrote:
> > + /* Calculate address for this allocation. */
> > + if (right)
> > + meta->addr += PAGE_SIZE - size;
> > + meta->addr = ALIGN_DOWN(meta->addr, cache->align);
>
> I would move this ALIGN_DOWN under the
On Thu, Dec 10, 2020 at 6:01 AM wrote:
>
> From: Yogesh Lal
>
> Add a kernel parameter stack_hash_order to configure STACK_HASH_SIZE.
>
> Aim is to have configurable value for STACK_HASH_SIZE, so that one
> can configure it depending on usecase there by reducing the static
> memory overhead.
>
>
On Fri, Dec 11, 2020 at 1:45 PM Vijayanand Jitta wrote:
>
>
>
> On 12/11/2020 2:06 PM, Alexander Potapenko wrote:
> > On Thu, Dec 10, 2020 at 6:01 AM wrote:
> >>
> >> From: Yogesh Lal
> >>
> >> Add a kernel parameter stack_hash_order
On Mon, Dec 21, 2020 at 12:15 PM Vijayanand Jitta wrote:
>
>
>
> On 12/18/2020 2:10 PM, Vijayanand Jitta wrote:
> >
> >
> > On 12/17/2020 4:24 PM, Alexander Potapenko wrote:
> >>>> Can you provide an example of a use case in which the user wants to
401 - 500 of 1024 matches
Mail list logo