10

Merge branch 'proc-cmdline' (/proc/<pid>/cmdline fixes) · torvalds/linux@2...

 9 months ago
source link: https://github.com/torvalds/linux/commit/2954152298c37804dab49d630aa959625b50cf64
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Commit

Permalink

Browse files Browse the repository at this point in the history
Merge branch 'proc-cmdline' (/proc/<pid>/cmdline fixes)
This fixes two problems reported with the cmdline simplification and
cleanup last year:

 - the setproctitle() special cases didn't quite match the original
   semantics, and it can be noticeable:

      https://lore.kernel.org/lkml/[email protected]/

 - it could leak an uninitialized byte from the temporary buffer under
   the right (wrong) circustances:

      https://lore.kernel.org/lkml/[email protected]/

It rewrites the logic entirely, splitting it into two separate commits
(and two separate functions) for the two different cases ("unedited
cmdline" vs "setproctitle() has been used to change the command line").

* proc-cmdline:
  /proc/<pid>/cmdline: add back the setproctitle() special case
  /proc/<pid>/cmdline: remove all the special cases
torvalds committed Jul 16, 2019
2 parents 5095062 + d26d0cd commit 2954152
Showing 1 changed file with 75 additions and 57 deletions.

132 changes: 75 additions & 57 deletions 132

fs/proc/base.c

0 comments on commit 2954152

Please sign in to comment.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK