]> git.baikalelectronics.ru Git - kernel.git/commit
coredump: add %f for executable filename
authorLepton Wu <ytht.net@gmail.com>
Wed, 12 Aug 2020 01:36:20 +0000 (18:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Aug 2020 17:58:01 +0000 (10:58 -0700)
commitaf51fa02fcf3c01132b2c57743fc038ab75fc676
treeda822d6d9b11a6f56d2f28cb23509bcdb4918d7d
parentca82edf7f490e736a57ca24d0503650d72cac2d1
coredump: add %f for executable filename

The document reads "%e" should be "executable filename" while actually it
could be changed by things like pr_ctl PR_SET_NAME.  People who uses "%e"
in core_pattern get surprised when they find out they get thread name
instead of executable filename.

This is either a bug of document or a bug of code.  Since the behavior of
"%e" is there for long time, it could bring another surprise for users if
we "fix" the code.

So we just "fix" the document.  And more, for users who really need the
"executable filename" in core_pattern, we introduce a new "%f" for the
real executable filename.  We already have "%E" for executable path in
kernel, so just reuse most of its code for the new added "%f" format.

Signed-off-by: Lepton Wu <ytht.net@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200701031432.2978761-1-ytht.net@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/admin-guide/sysctl/kernel.rst
fs/coredump.c