Drop the one-page limit for /proc/[pid]/{cmdline,environ}.

It never actually should have applied to environ (the relevant change in
Linux 4.2 is c2c0bb44620d "proc: fix PAGE_SIZE limit of
/proc/$PID/cmdline"), and we claim to be Linux 4.4 now anyway.

PiperOrigin-RevId: 231250661
Change-Id: I37f9c4280a533d1bcb3eebb7803373ac3c7b9f15
This commit is contained in:
Jamie Liu
2019-01-28 11:00:23 -08:00
committed by Shentubot
parent a8b8e13154
commit 1cedccf8e9
-6
View File
@@ -101,12 +101,6 @@ func (f *execArgFile) Read(ctx context.Context, _ *fs.File, dst usermem.IOSequen
return 0, syserror.EINVAL
}
// N.B. Linux 4.2 eliminates the arbitrary one page limit.
if offset > usermem.PageSize {
return 0, io.EOF
}
dst = dst.TakeFirst64(usermem.PageSize - offset)
m, err := getTaskMM(f.t)
if err != nil {
return 0, err