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]
Message-ID: <CACVxJT_nkS9evtCd5x6GH3Fiyg+hO+bJCzvz3pgdxsUj+fwQVw@mail.gmail.com>
Date:	Mon, 1 Sep 2014 17:13:58 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Rob Jones <rob.jones@...ethink.co.uk>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs: replace int param with size_t for seq_open_private()

On Mon, Sep 1, 2014 at 4:54 PM, Rob Jones <rob.jones@...ethink.co.uk> wrote:
>
>
> On 01/09/14 14:43, Alexey Dobriyan wrote:
>>>
>>>   void *__seq_open_private(struct file *f, const struct seq_operations
>>> *ops,
>>> - int psize)
>>> + size_t psize)
>>
>>
>> It should be "unsigned int" at most.
>> As almost all in-kernel lengths.

> I don't agree. Ultimately this parameter ends up as a parameter to
> kmalloc where it is expected to be a size_t.

Which is a mistake too because allocations are never that large.

Save REX prefix, keep length unsigned int!

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