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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c911e7f5-32ba-fed7-c464-7e91584b0e55@linux.intel.com>
Date:   Fri, 23 Mar 2018 12:38:07 -0700
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Nadav Amit <namit@...are.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        "luto@...nel.org" <luto@...nel.org>,
        "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
        "keescook@...gle.com" <keescook@...gle.com>,
        "hughd@...gle.com" <hughd@...gle.com>,
        "jgross@...e.com" <jgross@...e.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 05/11] x86/mm: do not auto-massage page protections

On 03/23/2018 12:34 PM, Nadav Amit wrote:
>>>> +	/* mmdebug.h can not be included here because of dependencies */
>>>> +#ifdef CONFIG_DEBUG_VM
>>>> +	WARN_ONCE(pgprot_val(pgprot) != massaged_val,
>>>> +		  "attempted to set unsupported pgprot: %016lx "
>>>> +		  "bits: %016lx supported: %016lx\n",
>>>> +		  pgprot_val(pgprot),
>>>> +		  pgprot_val(pgprot) ^ massaged_val,
>>>> +		  __supported_pte_mask);
>>>> +#endif
>>> Why not to use VM_WARN_ON_ONCE() and avoid the ifdef?
>> I wanted a message.  VM_WARN_ON_ONCE() doesn't let you give a message.
> Right (my bad). But VM_WARN_ONCE() lets you.

I put a comment in up there about this ^^.  #including mmdebug.h caused
dependency problems, so I basically just reimplemented it using
WARN_ONCE() and an #ifdef.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ