Quantcast
Viewing all articles
Browse latest Browse all 864

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

Linus Torvalds writes: (Summary) So we have offset = pos - arg_end +1 (from the above initialization of offset), but we also know that pos + count <= end_end and since we've limited end_end to "arg_end + PAGE_SIZE -1" we have pos + count <= arg_end + PAGE_SIZE -1 agreed? equation as pos = arg_end + offset - 1 And the same time we can take that "pos + count" inequality, and replacing "pos", we get arg_end + offset - 1 + count <= arg_end + PAGE_SIZE -1 and then we can remove "arg_end - 1" from both sides, and get offset+count <= PAGE_SIZE agreed?

Viewing all articles
Browse latest Browse all 864

Trending Articles