BACKPORT: 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>
(cherry picked from commit f38c85f1ba6902e4e2e2bf1b84edf065a904cdeb)

  - backport: Fix conflicts in Documentation/admin-guide/sysctl/kernel.rst
BUG=chromium:1115730
TEST=CQ

Change-Id: I33570ba3ee8212ac9aa674899baef3fc9e4fd5f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2353671
Commit-Queue: Lepton Wu <lepton@chromium.org>
Commit-Queue: Guenter Roeck <groeck@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Auto-Submit: Lepton Wu <lepton@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from commit 69f4ee11887c8449a103f3b3fec6ca8c90f2d2e8)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2354865
Reviewed-by: Micah Morton <mortonm@chromium.org>
2 files changed