From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Daniel Axtens <dja@axtens.net>
Cc: gor@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
dvyukov@google.com, mark.rutland@arm.com,
linux-kernel@vger.kernel.org, luto@kernel.org, glider@google.com,
aryabinin@virtuozzo.com, x86@kernel.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com, Uladzislau Rezki <urezki@gmail.com>
Subject: Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory
Date: Wed, 02 Oct 2019 09:13:04 +0200 [thread overview]
Message-ID: <20191002091304.Horde.44CFpqD3KN1HHZOT0U8wSQ7@messagerie.si.c-s.fr> (raw)
In-Reply-To: <87zhik2b5x.fsf@dja-thinkpad.axtens.net>
Daniel Axtens <dja@axtens.net> a écrit :
> Hi,
>
>>> /*
>>> * Find a place in the tree where VA potentially will be
>>> * inserted, unless it is merged with its sibling/siblings.
>>> @@ -741,6 +752,10 @@ merge_or_add_vmap_area(struct vmap_area *va,
>>> if (sibling->va_end == va->va_start) {
>>> sibling->va_end = va->va_end;
>>>
>>> + kasan_release_vmalloc(orig_start, orig_end,
>>> + sibling->va_start,
>>> + sibling->va_end);
>>> +
>> The same.
>
> The call to kasan_release_vmalloc() is a static inline no-op if
> CONFIG_KASAN_VMALLOC is not defined, which I thought was the preferred
> way to do things rather than sprinkling the code with ifdefs?
>
> The complier should be smart enough to eliminate all the
> orig_state/orig_end stuff at compile time because it can see that it's
> not used, so there's no cost in the binary.
>
Daniel,
You are entirely right in your way to do i, that's fully in line with
Linux kernel codying style
https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation
Christophe
WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Daniel Axtens <dja@axtens.net>
Cc: mark.rutland@arm.com, gor@linux.ibm.com, x86@kernel.org,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
linux-mm@kvack.org, Uladzislau Rezki <urezki@gmail.com>,
glider@google.com, luto@kernel.org, aryabinin@virtuozzo.com,
linuxppc-dev@lists.ozlabs.org, dvyukov@google.com
Subject: Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory
Date: Wed, 02 Oct 2019 09:13:04 +0200 [thread overview]
Message-ID: <20191002091304.Horde.44CFpqD3KN1HHZOT0U8wSQ7@messagerie.si.c-s.fr> (raw)
In-Reply-To: <87zhik2b5x.fsf@dja-thinkpad.axtens.net>
Daniel Axtens <dja@axtens.net> a écrit :
> Hi,
>
>>> /*
>>> * Find a place in the tree where VA potentially will be
>>> * inserted, unless it is merged with its sibling/siblings.
>>> @@ -741,6 +752,10 @@ merge_or_add_vmap_area(struct vmap_area *va,
>>> if (sibling->va_end == va->va_start) {
>>> sibling->va_end = va->va_end;
>>>
>>> + kasan_release_vmalloc(orig_start, orig_end,
>>> + sibling->va_start,
>>> + sibling->va_end);
>>> +
>> The same.
>
> The call to kasan_release_vmalloc() is a static inline no-op if
> CONFIG_KASAN_VMALLOC is not defined, which I thought was the preferred
> way to do things rather than sprinkling the code with ifdefs?
>
> The complier should be smart enough to eliminate all the
> orig_state/orig_end stuff at compile time because it can see that it's
> not used, so there's no cost in the binary.
>
Daniel,
You are entirely right in your way to do i, that's fully in line with
Linux kernel codying style
https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation
Christophe
next prev parent reply other threads:[~2019-10-02 7:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 6:58 [PATCH v8 0/5] kasan: support backing vmalloc space with real shadow memory Daniel Axtens
2019-10-01 6:58 ` [PATCH v8 1/5] " Daniel Axtens
2019-10-01 10:17 ` Uladzislau Rezki
2019-10-01 10:17 ` Uladzislau Rezki
2019-10-02 1:23 ` Daniel Axtens
2019-10-02 1:23 ` Daniel Axtens
2019-10-02 7:13 ` Christophe Leroy [this message]
2019-10-02 7:13 ` Christophe Leroy
2019-10-02 11:49 ` Uladzislau Rezki
2019-10-02 11:49 ` Uladzislau Rezki
2019-10-07 8:02 ` Uladzislau Rezki
2019-10-07 8:02 ` Uladzislau Rezki
2019-10-11 5:15 ` Daniel Axtens
2019-10-11 5:15 ` Daniel Axtens
2019-10-11 19:57 ` Andrey Ryabinin
2019-10-14 13:57 ` Daniel Axtens
2019-10-14 15:27 ` Mark Rutland
2019-10-14 15:27 ` Mark Rutland
2019-10-15 6:32 ` Daniel Axtens
2019-10-15 6:32 ` Daniel Axtens
2019-10-15 6:29 ` Daniel Axtens
2019-10-16 12:19 ` Andrey Ryabinin
2019-10-16 13:22 ` Mark Rutland
2019-10-16 13:22 ` Mark Rutland
2019-10-18 10:43 ` Andrey Ryabinin
2019-10-18 10:43 ` Andrey Ryabinin
2019-10-28 7:39 ` Daniel Axtens
2019-10-28 7:39 ` Daniel Axtens
2019-10-28 1:26 ` Daniel Axtens
2019-10-28 1:26 ` Daniel Axtens
2019-10-14 15:43 ` Mark Rutland
2019-10-14 15:43 ` Mark Rutland
2019-10-15 6:27 ` Daniel Axtens
2019-10-15 6:27 ` Daniel Axtens
2019-10-01 6:58 ` [PATCH v8 2/5] kasan: add test for vmalloc Daniel Axtens
2019-10-01 6:58 ` [PATCH v8 3/5] fork: support VMAP_STACK with KASAN_VMALLOC Daniel Axtens
2019-10-01 6:58 ` [PATCH v8 4/5] x86/kasan: support KASAN_VMALLOC Daniel Axtens
2019-10-01 6:58 ` [PATCH v8 5/5] kasan debug: track pages allocated for vmalloc shadow Daniel Axtens
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=20191002091304.Horde.44CFpqD3KN1HHZOT0U8wSQ7@messagerie.si.c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=aryabinin@virtuozzo.com \
--cc=dja@axtens.net \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=gor@linux.ibm.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=urezki@gmail.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: link
Be 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.