linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ryabinin.a.a@gmail.com (Andrey Ryabinin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/6] x86/kasan, mm: introduce generic kasan_populate_zero_shadow()
Date: Tue, 11 Aug 2015 19:30:42 +0300	[thread overview]
Message-ID: <55CA2332.7040206@gmail.com> (raw)
In-Reply-To: <20150811154117.GH23307@e104818-lin.cambridge.arm.com>



On 08/11/2015 06:41 PM, Catalin Marinas wrote:
> On Tue, Aug 11, 2015 at 05:18:15AM +0300, Andrey Ryabinin wrote:
>> --- /dev/null
>> +++ b/mm/kasan/kasan_init.c
> [...]
>> +#if CONFIG_PGTABLE_LEVELS > 3
>> +pud_t kasan_zero_pud[PTRS_PER_PUD] __page_aligned_bss;
>> +#endif
>> +#if CONFIG_PGTABLE_LEVELS > 2
>> +pmd_t kasan_zero_pmd[PTRS_PER_PMD] __page_aligned_bss;
>> +#endif
>> +pte_t kasan_zero_pte[PTRS_PER_PTE] __page_aligned_bss;
> 
> Is there any problem if you don't add the #ifs here? Wouldn't the linker
> remove them if they are not used?
> 

AFAIK such optimization is possible if we build with -fdata-sections flag and
use --gc-sections flag in linker, but we don't do this.

  parent reply	other threads:[~2015-08-11 16:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  2:18 [PATCH v5 0/6] KASAN for amr64 Andrey Ryabinin
2015-08-11  2:18 ` [PATCH v5 1/6] x86/kasan: define KASAN_SHADOW_OFFSET per architecture Andrey Ryabinin
2015-08-11  2:18 ` [PATCH v5 2/6] x86/kasan, mm: introduce generic kasan_populate_zero_shadow() Andrey Ryabinin
2015-08-11 15:41   ` Catalin Marinas
2015-08-11 16:25     ` Andrey Ryabinin
2015-08-11 16:40       ` Catalin Marinas
2015-08-12  9:30         ` Andrey Ryabinin
2015-08-12  9:37           ` Will Deacon
2015-08-12 12:19             ` Andrey Ryabinin
2015-08-12 13:41               ` Will Deacon
2015-08-11 16:30     ` Andrey Ryabinin [this message]
2015-08-11  2:18 ` [PATCH v5 3/6] arm64: introduce VA_START macro - the first kernel virtual address Andrey Ryabinin
2015-08-11  2:18 ` [PATCH v5 4/6] arm64: move PGD_SIZE definition to pgalloc.h Andrey Ryabinin
2015-08-11  2:18 ` [PATCH v5 5/6] arm64: add KASAN support Andrey Ryabinin
2015-08-11 16:37   ` Catalin Marinas
2015-08-11  2:18 ` [PATCH v5 6/6] ARM64: kasan: print memory assignment Andrey Ryabinin

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=55CA2332.7040206@gmail.com \
    --to=ryabinin.a.a@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).