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: <5166E4CB.2060700@sr71.net>
Date:	Thu, 11 Apr 2013 09:28:59 -0700
From:	Dave Hansen <dave@...1.net>
To:	Borislav Petkov <bp@...en8.de>
CC:	hpa@...ux.intel.com, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 4/5] break up slow_virt_to_phys()

On 04/11/2013 05:29 AM, Borislav Petkov wrote:
> On Wed, Apr 10, 2013 at 04:32:54PM -0700, Dave Hansen wrote:
>> +phys_addr_t slow_virt_to_phys(void *virt_addr)
>> +{
>> +	phys_addr_t result;
>> +	int ret;
>> +
>> +	ret = kernel_lookup_vaddr(virt_addr, &result);
>> +	BUG_ON(ret);
> 
> Isn't that BUG_ON still too harsh though? How about WARN_ON instead?
> It would still create a lot of noise so that it gets fixed without
> bringing down the system.

It's harsh for the cases where __pa()'s result never gets used directly,
like for checking against 'high_memory'.  If it gets used (like in
/dev/mem's case) the kernel really is doing something it does not intend
to do.  It's essentially reading or writing garbage.

On the other hand, I guess if we've been letting it do that bad thing
for years, we might as well continue.  We're not causing any _more_ damage.

I'm leaning toward making it a WARN_ON() at the moment. :)
--
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