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] [day] [month] [year] [list]
Date:	Fri, 21 Sep 2007 14:47:34 +0100
From:	James Pearson <james-p@...ing-picture.com>
To:	Arvin Moezzi <moezzia@...il.com>
CC:	linux-kernel@...r.kernel.org, aarapov@...hat.com,
	akpm@...ux-foundation.org, hpa@...or.com
Subject: Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters

Arvin Moezzi wrote:

> I think that's not true. 'count' is changing through the iteration.
> The difference in the mem_read():
> 
> * while (count > 0) {
> *     int this_len, retval;
> *
> *      this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
> *      retval = access_process_vm(task, src, page, this_len, 0);
> *
> *      ...
> * }
> 
> is the fact, that this_len = min(PAGE_SIZE, count) is in the
> iteration block, hence retval <= this_len <= count in each iteration
> step. So this is ok. But IMHO in your code 'retval' may be bigger than
> 'count' in the last iteration of the block, because 'max_len' is fix
> through your iteration but 'count' is changing. Or am i missing
> something?

Yes, you are correct ...

Thanks

James Pearson
-
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