lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPcyv4hi9tEdRborvfV19MhRPM-pch=mCaLD0To1N_sZejJZ2g@mail.gmail.com>
Date:	Mon, 8 Jun 2015 12:39:33 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Juergen Gross <jgross@...e.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"Kani, Toshimitsu" <toshi.kani@...com>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Luis Rodriguez <mcgrof@...e.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Stefan Bader <stefan.bader@...onical.com>,
	Andy Lutomirski <luto@...capital.net>, linux-mm@...ck.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	mpe@...erman.id.au, Tejun Heo <tj@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v3 5/6] arch: introduce memremap_cache() and memremap_wt()

On Mon, Jun 8, 2015 at 12:04 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Mon, Jun 8, 2015 at 9:25 PM, Dan Williams <dan.j.williams@...el.com> wrote:
>
>>>> +       if (region_is_ram(offset, size) != 0) {
>>>> +               WARN_ONCE(1, "memremap attempted on ram %pa size: %zd\n",
>>>
>>> %zu
>>
>> Sure, thanks for taking a look Andy!
>
> One more thing, can we do
> WARN_ONCE(region_is_ram(offset, size), …); ?
>

We still want to return false in this case so it would become
"if(WARN_ONCE(...)) return false;".  Neil once made the argument to me
that we should be able to compile all of the asserts out of the
kernel, also "if (WARN_ONCE(...))" is a bit harder to read as you need
to go check the macro to make sure it returns the right status, and
more than once.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ