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]
Date:	Sat, 4 Oct 2014 01:25:36 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Andi Kleen <ak@...ux.intel.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andi Kleen <andi@...stfloor.org>, dave@...1.net,
	linux-kernel@...r.kernel.org, eranian@...gle.com, x86@...nel.org,
	torvalds@...ux-foundation.org,
	Vitaly Mayatskikh <v.mayatskih@...il.com>
Subject: Re: [PATCH 2/2] x86: Only do a single page fault for
 copy_from_user_nmi

> There are cleaner ways to solve this problem - PeterZ offered 
> one, but there are other options as well, such as:
> 
>  - removing exact-bytes semantics explicitly from almost all 
>    cases and offering a separate (and more expensive, in the 
>    faulting case) memcpy variant for write() and other code that 
>    absolutely must know the number of copied bytes.

That would be a full tree audit of thousands of calls.
And any mistake would be a security hole.

>  - or adding a special no-bytes-copied memcpy variant that the 
>    NMI code could use.

That's the duplicated copy path I mentioned. If people really want that
I can implement it, although I personally think it's ugly and bloated
over engineering for this case.

> It might be more work for you, but it gives us a cleaner and more 
> maintainable kernel. The problem is that you should know this 
> general principle already, instead you are wasting maintainer 
> bandwidth via arguing in favor of ugly hacks again and again...

The duplicated path is unlikely to be more maintainable 
than the simple and obvious check.

-Andi
--
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