All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-mm@kvack.org, Mark Rutland <mark.rutland@arm.com>,
	x86@kernel.org, Kees Cook <keescook@chromium.org>,
	Sri Krishna chowdary <schowdary@nvidia.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Dave Hansen <dave.hansen@intel.com>,
	linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Mark Brown <Mark.Brown@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Price <Steven.Price@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers
Date: Fri, 26 Jul 2019 09:58:56 +0530	[thread overview]
Message-ID: <066e69dc-6ecc-6aba-0226-ba1d61ca0fa8@arm.com> (raw)
In-Reply-To: <20190725170720.GB11545@arrakis.emea.arm.com>


On 07/25/2019 10:37 PM, Catalin Marinas wrote:
> On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote:
>> +#if !defined(__PAGETABLE_PMD_FOLDED) && !defined(__ARCH_HAS_4LEVEL_HACK)
>> +static void pud_clear_tests(void)
>> +{
>> +	pud_t pud;
>> +
>> +	pud_clear(&pud);
>> +	WARN_ON(!pud_none(pud));
>> +}
> 
> For the clear tests, I think you should initialise the local variable to
> something non-zero rather than rely on whatever was on the stack. In
> case it fails, you have a more deterministic behaviour.

Sure, it makes sense, will change.

WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Kees Cook <keescook@chromium.org>,
	Sri Krishna chowdary <schowdary@nvidia.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	x86@kernel.org, Dave Hansen <dave.hansen@intel.com>,
	linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@kernel.org>,
	linux-mm@kvack.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Mark Brown <Mark.Brown@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Price <Steven.Price@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers
Date: Fri, 26 Jul 2019 09:58:56 +0530	[thread overview]
Message-ID: <066e69dc-6ecc-6aba-0226-ba1d61ca0fa8@arm.com> (raw)
In-Reply-To: <20190725170720.GB11545@arrakis.emea.arm.com>


On 07/25/2019 10:37 PM, Catalin Marinas wrote:
> On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote:
>> +#if !defined(__PAGETABLE_PMD_FOLDED) && !defined(__ARCH_HAS_4LEVEL_HACK)
>> +static void pud_clear_tests(void)
>> +{
>> +	pud_t pud;
>> +
>> +	pud_clear(&pud);
>> +	WARN_ON(!pud_none(pud));
>> +}
> 
> For the clear tests, I think you should initialise the local variable to
> something non-zero rather than rely on whatever was on the stack. In
> case it fails, you have a more deterministic behaviour.

Sure, it makes sense, will change.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-07-26  4:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  6:55 [RFC] mm/debug: Add tests for architecture exported page table helpers Anshuman Khandual
2019-07-25  6:55 ` Anshuman Khandual
2019-07-25  6:55 ` [RFC] mm/pgtable/debug: Add test validating architecture " Anshuman Khandual
2019-07-25  6:55   ` Anshuman Khandual
2019-07-25 14:39   ` Matthew Wilcox
2019-07-25 14:39     ` Matthew Wilcox
2019-07-25 21:38     ` Russell King - ARM Linux admin
2019-07-25 21:38       ` Russell King - ARM Linux admin
2019-07-25 21:42       ` Matthew Wilcox
2019-07-25 21:42         ` Matthew Wilcox
2019-07-25 21:58         ` Russell King - ARM Linux admin
2019-07-25 21:58           ` Russell King - ARM Linux admin
2019-07-25 22:56           ` Matthew Wilcox
2019-07-25 22:56             ` Matthew Wilcox
2019-07-26  4:47     ` Anshuman Khandual
2019-07-26  4:47       ` Anshuman Khandual
2019-07-26 19:54       ` Matthew Wilcox
2019-07-26 19:54         ` Matthew Wilcox
2019-07-29  8:32         ` Anshuman Khandual
2019-07-29  8:32           ` Anshuman Khandual
2019-07-30 17:03           ` Matthew Wilcox
2019-07-30 17:03             ` Matthew Wilcox
2019-08-05  4:35             ` Anshuman Khandual
2019-08-05  4:35               ` Anshuman Khandual
2019-07-25 17:07   ` Catalin Marinas
2019-07-25 17:07     ` Catalin Marinas
2019-07-26  4:28     ` Anshuman Khandual [this message]
2019-07-26  4:28       ` Anshuman Khandual
2019-07-25 21:54   ` Russell King - ARM Linux admin
2019-07-25 21:54     ` Russell King - ARM Linux admin
2019-07-26  5:10     ` Anshuman Khandual
2019-07-26  5:10       ` Anshuman Khandual

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=066e69dc-6ecc-6aba-0226-ba1d61ca0fa8@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=Mark.Brown@arm.com \
    --cc=Steven.Price@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mhocko@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=schowdary@nvidia.com \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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.