Skip to contentSkip to conversation

New: syslog(2): conflict between "The symbolic names [...] are not exported to user space" and "Definition of SYSLOG_* constants"?

Bug 220273 [email protected] 1 participant 2 messages Jun 26, 2025 – Aug 18, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=220273

Bug ID: 220273
Summary: syslog(2): conflict between "The symbolic names [...]
are not exported to user space" and "Definition of SYSLOG_* constants"?
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Over at syslog(2) we see both

```
#include <sys/klog.h>        /* Definition of SYSLOG_* constants */
```

and

```
The symbolic names
are defined in the kernel source, but are not exported to user
space; you will either need to use the numbers, or define the
names yourself.
```

Is there a conflict between these two? After reading the first one I spent a while trying to figure out why I wasn't able to use the constants in my code despite having the include; only much later did I notice the second one.

If there's no conflict between the two, what might I be misunderstanding about the first one?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 220273] syslog(2): conflict between "The symbolic names [...] are not exported to user space" and "Definition of SYSLOG_* constants"?

https://bugzilla.kernel.org/show_bug.cgi?id=220273

--- Comment #1 from Alejandro Colomar ([email protected]) --- Hi Nathaniel,

Quoted 15 lines · On Thu, Jun 26, 2025 at 02:54:59PM +0000, [email protected] wrote:

Over at syslog(2) we see both

```
#include <sys/klog.h>        /* Definition of SYSLOG_* constants */
```

and

```
The symbolic names
are defined in the kernel source, but are not exported to user
space; you will either need to use the numbers, or define the
names yourself.
```
Quoted 7 lines

Is there a conflict between these two? After reading the first one I spent a while trying to figure out why I wasn't able to use the constants in my code despite having the include; only much later did I notice the second one.

If there's no conflict between the two, what might I be misunderstanding about
the first one?

The first one is a mistake introduced by me. Sorry! I've fixed it with this commit:

commit 3d3ffae8774c89d9e0b099dba18441c459fec2c2
Author: Alejandro Colomar <[email protected]>
Date: Mon Aug 18 08:39:51 2025 +0200

man/man2/syslog.2: SYNOPSIS: Remove incorrect include

It doesn't provide any macros, as said later in the page. The programmer must either define the macros itself, or use the raw
values.

            Fixes: e5a173829179 (2021-06-20; "syslog.2: Use syscall(SYS_...);
for raw system calls")
            Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=220273>
            Reported-by: Nathaniel Manista <[email protected]>
            Signed-off-by: Alejandro Colomar <[email protected]>

        diff --git a/man/man2/syslog.2 b/man/man2/syslog.2
        index ad15f4942..1b3ba8926 100644
        --- a/man/man2/syslog.2
        +++ b/man/man2/syslog.2
        @@ -12,7 +12,6 @@ .SH LIBRARY
         .RI ( libc ,\~ \-lc )
         .SH SYNOPSIS
         .nf
        -.BR "#include <sys/klog.h>" "        /* Definition of " SYSLOG_* "

constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* "
constants */"
.B #include <unistd.h>
.P

Thanks for the report!

Have a lovely day!
Alex

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.