login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
20
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [author]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Arvin Moezzi <moezzia@...>
To: James Pearson <james-p@...>, <linux-kernel@...>
Cc: <aarapov@...>, <akpm@...>, <hpa@...>
Subject:
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters
Date: Thursday, September 20, 2007 - 9:56 pm
2007/9/19, James Pearson <james-p@moving-picture.com>:
quoted text
> + while (count > 0) { > + int this_len, retval; > + > + this_len = mm->env_end - (mm->env_start + src); > + > + if (this_len <= 0) > + break; > + > + if (this_len > max_len) > + this_len = max_len; > + > + retval = access_process_vm(task, (mm->env_start + src), > + page, this_len, 0); > + > + if (retval <= 0) { > + ret = retval; > + break; > + } > + > + if (copy_to_user(buf, page, retval)) {
^^^^ shouldn't you only copy min(count,retval) bytes? otherwise you could write beyond the users buffer "buf", right? Arvin -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [author]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH -mm] Don't truncate /proc/PID/environ at 4096 charact...
, James Pearson
, (Wed Sep 19, 9:35 am)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, Arvin Moezzi
, (Thu Sep 20, 9:56 pm)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, James Pearson
, (Fri Sep 21, 5:47 am)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, Arvin Moezzi
, (Fri Sep 21, 8:47 am)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, James Pearson
, (Fri Sep 21, 9:47 am)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, Andrew Morton
, (Thu Sep 20, 7:46 pm)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, Mel Gorman
, (Fri Sep 21, 6:00 am)
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 cha...
, James Pearson
, (Fri Sep 21, 5:41 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Heiko Carstens
Re: -mm merge plans for 2.6.23 -- sys_fallocate
Linus Torvalds
Linux 2.6.21-rc4
Michael Kerrisk
nanosleep() uses CLOCK_MONOTONIC, should be CLOCK_REALTIME?
Linus Torvalds
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
git
:
linux-netdev
:
Gary Thomas
Marvell 88E609x switch?
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
[GIT]: Networking
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
906 guests
online.
Online users
zeekec
lwdumeno
Nelson
Syndicate