The patch titled
     Subject: lib/vsprintf.c: kptr_restrict: fix pK-error in SysRq 
show-all-timers(Q)
has been added to the -mm tree.  Its filename is
     lib-vsprintfc-kptr_restrict-fix-pk-error-in-sysrq-show-all-timersq.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Dan Rosenberg <[email protected]>
Subject: lib/vsprintf.c: kptr_restrict: fix pK-error in SysRq show-all-timers(Q)

When using ALT+SysRq+Q all the pointers are replaced with "pK-error" like
this:

        [23153.208033]   .base:               pK-error

with echo h > /proc/sysrq-trigger it works:

        [23107.776363]   .base:       ffff88023e60d540

The intent behind this behavior was to return "pK-error" in cases where
the %pK format specifier was used in interrupt context, because the
CAP_SYSLOG check wouldn't be meaningful.  Clearly this should only apply
when kptr_restrict is actually enabled though.

Reported-by: Stevie Trujillo <[email protected]>
Signed-off-by: Dan Rosenberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 lib/vsprintf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN 
lib/vsprintf.c~lib-vsprintfc-kptr_restrict-fix-pk-error-in-sysrq-show-all-timersq
 lib/vsprintf.c
--- 
a/lib/vsprintf.c~lib-vsprintfc-kptr_restrict-fix-pk-error-in-sysrq-show-all-timersq
+++ a/lib/vsprintf.c
@@ -1045,7 +1045,8 @@ char *pointer(const char *fmt, char *buf
                 * %pK cannot be used in IRQ context because its test
                 * for CAP_SYSLOG would be meaningless.
                 */
-               if (in_irq() || in_serving_softirq() || in_nmi()) {
+               if (kptr_restrict && (in_irq() || in_serving_softirq() ||
+                                     in_nmi())) {
                        if (spec.field_width == -1)
                                spec.field_width = default_width;
                        return string(buf, end, "pK-error", spec);
_
Subject: Subject: lib/vsprintf.c: kptr_restrict: fix pK-error in SysRq 
show-all-timers(Q)

Patches currently in -mm which might be from [email protected] are

lib-vsprintfc-kptr_restrict-fix-pk-error-in-sysrq-show-all-timersq.patch

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to