]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'proc-cmdline' (/proc/<pid>/cmdline fixes)
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Jul 2019 17:37:27 +0000 (10:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Jul 2019 17:37:27 +0000 (10:37 -0700)
commit294f9874fbb8689296adfed16902e0924a5f3177
treea53f1164306acb521bd57cfc5083962901828000
parenta96d747449875e14a352f091e655c47391158827
parent392ccf71e436ea31aac0382da5da3807e66bc02b
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/alpine.LNX.2.21.1904052326230.3249@kich.toxcorp.com/

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

      https://lore.kernel.org/lkml/20190712160913.17727-1-izbyshev@ispras.ru/

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
fs/proc/base.c