Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-12 Thread Rob Jones
On 12/09/14 15:16, Richard Weinberger wrote: On Thu, Sep 11, 2014 at 6:25 PM, Rob Jones wrote: On 01/09/14 16:36, Al Viro wrote: On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote: void *__seq_open_private(struct file *f, const struct seq_operations *ops, - int p

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-12 Thread Richard Weinberger
On Thu, Sep 11, 2014 at 6:25 PM, Rob Jones wrote: > > > On 01/09/14 16:36, Al Viro wrote: >> >> On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote: >> >>> void *__seq_open_private(struct file *f, const struct seq_operations >>> *ops, >>> - int psize) >>> + size

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-11 Thread Rob Jones
On 01/09/14 16:36, Al Viro wrote: On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote: void *__seq_open_private(struct file *f, const struct seq_operations *ops, - int psize) + size_t psize) It is a horrible limitation to impose, indeed. Why, a lousy 2

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-02 Thread Rob Jones
On 01/09/14 22:22, Al Viro wrote: On Mon, Sep 01, 2014 at 03:38:51PM +0100, Rob Jones wrote: kmalloc where it is expected to be a size_t. Which is a mistake too because allocations are never that large. Yet. *raised eyebrow* You do realize that kmalloc() gives physically contiguous allo

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Al Viro
On Mon, Sep 01, 2014 at 03:38:51PM +0100, Rob Jones wrote: > >>kmalloc where it is expected to be a size_t. > > > >Which is a mistake too because allocations are never that large. > > Yet. *raised eyebrow* You do realize that kmalloc() gives physically contiguous allocation, right? And refuses t

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
On 01/09/14 16:36, Al Viro wrote: On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote: void *__seq_open_private(struct file *f, const struct seq_operations *ops, - int psize) + size_t psize) It is a horrible limitation to impose, indeed. Why, a lousy 2

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Al Viro
On Mon, Sep 01, 2014 at 02:17:08PM +0100, Rob Jones wrote: > void *__seq_open_private(struct file *f, const struct seq_operations *ops, > - int psize) > + size_t psize) It is a horrible limitation to impose, indeed. Why, a lousy 2 gigabytes per line in procfs file - tha

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
On 01/09/14 15:13, Alexey Dobriyan wrote: On Mon, Sep 1, 2014 at 4:54 PM, Rob Jones 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

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Alexey Dobriyan
On Mon, Sep 1, 2014 at 4:54 PM, Rob Jones 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 le

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
I don't agree. Ultimately this parameter ends up as a parameter to kmalloc where it is expected to be a size_t. 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 mos

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Alexey Dobriyan
> 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. Alexey -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to ma

[PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
also for __seq_open_private() Resubmitted due to email address typo. Signed-off-by: Rob Jones --- fs/seq_file.c|4 ++-- include/linux/seq_file.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/seq_file.c b/fs/seq_file.c index 1d641bb..dc2dfec 10064

Re: [PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
Resubmitting - mistranscribed Alexander Viro's email address. On 01/09/14 14:13, Rob Jones wrote: also for __seq_open_private() Signed-off-by: Rob Jones --- fs/seq_file.c|4 ++-- include/linux/seq_file.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --

[PATCH] fs: replace int param with size_t for seq_open_private()

2014-09-01 Thread Rob Jones
also for __seq_open_private() Signed-off-by: Rob Jones --- fs/seq_file.c|4 ++-- include/linux/seq_file.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/seq_file.c b/fs/seq_file.c index 1d641bb..dc2dfec 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.