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]
Date:	Sun, 4 May 2008 16:30:56 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Bryan Wu <cooloney@...nel.org>
Cc:	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] [vfs/proc] task_nommu: fix compile failing bug
	because of spilt file.h

On Sun, May 04, 2008 at 11:12:55PM +0800, Bryan Wu wrote:
> diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
> index 6cba820..987bc69 100644
> --- a/fs/proc/task_nommu.c
> +++ b/fs/proc/task_nommu.c
> @@ -1,6 +1,7 @@
>  
>  #include <linux/mm.h>
>  #include <linux/file.h>
> +#include <linux/fdtable.h>
>  #include <linux/mount.h>
>  #include <linux/ptrace.h>
>  #include <linux/seq_file.h>

Well...  I see what it's trying to do, but it's a bullshit.  Look: it's from
        if (current->files && atomic_read(&current->files->count) > 1)
                sbytes += kobjsize(current->files);
        else
                bytes += kobjsize(current->files);
Now, what we really have is size of current->files (fixed and not too large)
+ if descriptor table is too large to be embedded,
	size of current->files->fdt
	size of current->files->fdt->fd
	size of current->files->fdt->open_fds/->close_on_exec
And the second term there can be *large*, so if we are really serious about
taking descriptor table footprint into account, we'd better take care of
that too.  I'm not sure that we want to, though - note that we do that only
on nommu targets...

So what's that code really trying to achieve?
--
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