Re: 4096 byte limit to /proc/PID/environ ?

James Pearson
2007-09-06T09:31:20Z

Alexey Dobriyan wrote:
> On Wed, Sep 05, 2007 at 06:00:57PM +0100, James Pearson wrote:
>
>>H. Peter Anvin wrote:
>>
>>>Anton Arapov wrote:
>>>
>>>
>>>> Hey guys, the future of this patch is important for me. What do you
>>>>think, has this patch any chances to be committed to upstream?
>>>>
>>>>James Pearson <james-p@moving-picture.com> writes:
>>>>
>>>>
>>>>>H. Peter Anvin wrote:
>>>>>There isn't that much that is duplicated - and there are also bits of
>>>>>the /proc/PID/mem code that are not needed in this case, so I'm not
>>>>>really sure if it is worth doing.
>>>>>
>>>>>I did submit a patch a few months ago - see:
>>>>>
>>>>><http://marc.info/?l=linux-kernel&m=117862109623007&w=2>
>>>>
>>>>
>>>Looks reasonable to me, except for the one overlong line.
>>>
>>
>>OK, here is the patch (without the long line) against 2.6.23-rc5 - what
>>else needs to be done to get it committed?
>
>
> Remove duplicate ptrace_may_attach() checks, unecessary (), {} and
> spaces before pointer names -- char *buf.

environ_read() in the patch uses ptrace_may_attach() in a similar way as
does mem_read(). Given that environ_read() is based on mem_read(), does
this mean that duplicate ptrace_may_attach() checks need to be removed
from mem_read() as well? Which ptrace_may_attach() needs to be removed?

Thanks

James Pearson