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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Mar 2018 14:11:19 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Alexei Starovoitov <ast@...com>
Cc:     <davem@...emloft.net>, <daniel@...earbox.net>,
        <torvalds@...ux-foundation.org>, <peterz@...radead.org>,
        <netdev@...r.kernel.org>, <kernel-team@...com>,
        <linux-api@...r.kernel.org>
Subject: Re: [PATCH v3 bpf-next 01/10] treewide: remove struct-pass-by-value
 from tracepoints arguments

On Thu, 22 Mar 2018 11:01:48 -0700
Alexei Starovoitov <ast@...com> wrote:

> From: Alexei Starovoitov <ast@...nel.org>
> 
> Fix all tracepoint arguments to pass structures (large and small) by reference
> instead of by value.
> Avoiding passing large structs by value is a good coding style.
> Passing small structs sometimes is beneficial, but in all cases
> it makes no difference vs readability of the code.
> The subsequent patch enforces that all tracepoints args are either integers
> or pointers and fit into 64-bit.

But some of these structures are used to force type checking, and are
just the same size as a number. That's why they don't have "struct" in
front of them. Like pmd_t. Will the subsequent patches really break if
the structure itself has one element that is of size long? Just seems
to add extra code to pass in an address to something that fits into a
single register.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ