From: Kees Cook <keescook@chromium.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>
Subject: slab_ksize() and friends size_t -> unsigned int?
Date: Fri, 6 Apr 2018 22:06:31 -0700 [thread overview]
Message-ID: <CAGXu5j+Ljf03iYAZY9A2YURJVB_0WvpyhDZHf1Sw_Fec-AfpOw@mail.gmail.com> (raw)
Hi,
I saw all the other int and size_t conversions to unsigned int. What
about ksize(), slab_ksize() and related functions too? It looks like
many callers are already expecting unsigned int anyway...
net/core/skbuff.c: unsigned int size = frag_size ? : ksize(data);
Though some are "int", ew:
int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
gfp_t gfp_mask)
{
int i, osize = skb_end_offset(skb);
int size = osize + nhead + ntail;
...
size = SKB_WITH_OVERHEAD(ksize(data));
-Kees
--
Kees Cook
Pixel Security
next reply other threads:[~2018-04-07 5:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-07 5:06 Kees Cook [this message]
2018-04-07 10:23 ` Alexey Dobriyan
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=CAGXu5j+Ljf03iYAZY9A2YURJVB_0WvpyhDZHf1Sw_Fec-AfpOw@mail.gmail.com \
--to=keescook@chromium.org \
--cc=adobriyan@gmail.com \
--cc=linux-mm@kvack.org \
/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