From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martijn Coenen <maco@android.com>
Cc: gregkh@linuxfoundation.org, tkjos@google.com, arve@android.com,
amit.pundir@linaro.org, devel@driverdev.osuosl.org,
smoreland@google.com, linux-kernel@vger.kernel.org,
robenea@google.com, maco@google.com, john.stultz@linaro.org,
peskal@google.com
Subject: Re: [PATCH] ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.
Date: Wed, 5 Sep 2018 12:09:25 +0300 [thread overview]
Message-ID: <20180905090925.474dugeix3ssykcz@mwanda> (raw)
In-Reply-To: <20180905073346.157318-1-maco@android.com>
On Wed, Sep 05, 2018 at 09:33:46AM +0200, Martijn Coenen wrote:
> diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
> index bfaec6903b8bc..a54a680ff2936 100644
> --- a/include/uapi/linux/android/binder.h
> +++ b/include/uapi/linux/android/binder.h
> @@ -200,6 +200,13 @@ struct binder_node_debug_info {
> __u32 has_weak_ref;
> };
>
> +struct binder_node_info_for_ref {
> + __u32 handle;
> + __u32 strong_count;
> + __u32 weak_count;
> + __u64 reserved;
> +};
What's the reserved for? On 64 bit systems there is a 4 byte struct
hole between weak_count and reserved. Why not just make reserved a
__u32 and get rid of the hole? (Not rhetorical, I have no idea).
Btw, people sometimes complain about that we don't check that user input
is zeroed in ioctls. Like for example maybe they're passing random data
in the the strong_count field and then later we decide that actually
that field should mean something but we can't make it mean anything
because we've been letting the user put whatever they want there. These
are just random thoughts in my head, not necessarily important.
regards,
dan carpenter
next prev parent reply other threads:[~2018-09-05 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 7:33 Martijn Coenen
2018-09-05 9:09 ` Dan Carpenter [this message]
2018-09-05 11:30 ` Martijn Coenen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180905090925.474dugeix3ssykcz@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amit.pundir@linaro.org \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=maco@google.com \
--cc=peskal@google.com \
--cc=robenea@google.com \
--cc=smoreland@google.com \
--cc=tkjos@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®