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]
Date:   Wed, 4 Jul 2018 15:43:39 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Chris von Recklinghausen <crecklin@...hat.com>,
        keescook@...omium.org, labbott@...hat.com, pabeni@...hat.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH v7] add param that allows bootline control of hardened
 usercopy

On 07/03/2018 09:43 PM, Chris von Recklinghausen wrote:

Subject: [PATCH v7] add param that allows bootline control of hardened
usercopy

s/bootline/boot time/ ?

> v1->v2:
> 	remove CONFIG_HUC_DEFAULT_OFF
> 	default is now enabled, boot param disables
> 	move check to __check_object_size so as to not break optimization of
> 		__builtin_constant_p()

Sorry for late and drive-by suggestion, but I think the change above is
kind of a waste because there's a function call overhead only to return
immediately.

Something like this should work and keep benefits of both the built-in
check and avoiding function call?

static __always_inline void check_object_size(const void *ptr, unsigned
long n, bool to_user)
{
        if (!__builtin_constant_p(n) &&
			static_branch_likely(&bypass_usercopy_checks))
                __check_object_size(ptr, n, to_user);
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ