linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: fix core_pattern max length
@ 2019-03-18 17:34 Jakub Wilk
  2019-03-25 15:51 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Wilk @ 2019-03-18 17:34 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, Alexander Viro

The buffer size for core_pattern is 128, but one character is used for
terminating null byte, so the actual limit is 127:

    # printf '%0999d' > /proc/sys/kernel/core_pattern
    # tr -d '\n' < /proc/sys/kernel/core_pattern | wc -c
    127

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
 Documentation/sysctl/kernel.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index aa058aa7bf28..f0c86fbb3b48 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -196,7 +196,7 @@ CAP_LAST_CAP from the kernel.
 core_pattern:
 
 core_pattern is used to specify a core dumpfile pattern name.
-. max length 128 characters; default value is "core"
+. max length 127 characters; default value is "core"
 . core_pattern is used as a pattern template for the output filename;
   certain string patterns (beginning with '%') are substituted with
   their actual values.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Documentation: fix core_pattern max length
  2019-03-18 17:34 [PATCH] Documentation: fix core_pattern max length Jakub Wilk
@ 2019-03-25 15:51 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2019-03-25 15:51 UTC (permalink / raw)
  To: Jakub Wilk; +Cc: linux-doc, Alexander Viro

On Mon, 18 Mar 2019 18:34:21 +0100
Jakub Wilk <jwilk@jwilk.net> wrote:

> The buffer size for core_pattern is 128, but one character is used for
> terminating null byte, so the actual limit is 127:
> 
>     # printf '%0999d' > /proc/sys/kernel/core_pattern
>     # tr -d '\n' < /proc/sys/kernel/core_pattern | wc -c
>     127
> 
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-25 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18 17:34 [PATCH] Documentation: fix core_pattern max length Jakub Wilk
2019-03-25 15:51 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).