From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 355BAC04A6B for ; Mon, 6 May 2019 23:39:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0727E205ED for ; Mon, 6 May 2019 23:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbfEFXj1 (ORCPT ); Mon, 6 May 2019 19:39:27 -0400 Received: from namei.org ([65.99.196.166]:37804 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfEFXj1 (ORCPT ); Mon, 6 May 2019 19:39:27 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x46NdKhJ013606; Mon, 6 May 2019 23:39:20 GMT Date: Tue, 7 May 2019 09:39:20 +1000 (AEST) From: James Morris To: Micah Morton cc: Kees Cook , Casey Schaufler , linux-security-module , Jann Horn Subject: Re: [PATCH 01/10] LSM: SafeSetID: fix pr_warn() to include newline In-Reply-To: Message-ID: References: <20190410165434.206579-1-mortonm@chromium.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Mon, 6 May 2019, Micah Morton wrote: > These 10 patches got buried, but Jann, Kees and myself are in > agreement on how they look. > > Could they get merged? Patches 8/10 and 9/10 have a v2 that should get > merged instead of the originals. I can respond on all the patches that > should get merged if that is helpful? Please do so. > > On Wed, Apr 10, 2019 at 10:09 AM Kees Cook wrote: > > > > On Wed, Apr 10, 2019 at 9:54 AM Micah Morton wrote: > > > > > > From: Jann Horn > > > > > > Fix the pr_warn() calls in the SafeSetID LSM to have newlines at the end. > > > Without this, denial messages will be buffered as incomplete lines in > > > log_output(), and will then only show up once something else prints into > > > dmesg. > > > > > > Signed-off-by: Jann Horn > > > Signed-off-by: Micah Morton > > > > Reviewed-by: Kees Cook > > > > -Kees > > > > > --- > > > security/safesetid/lsm.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c > > > index cecd38e2ac80..2daecab3a4c0 100644 > > > --- a/security/safesetid/lsm.c > > > +++ b/security/safesetid/lsm.c > > > @@ -91,7 +91,7 @@ static int safesetid_security_capable(const struct cred *cred, > > > * to functionality other than calling set*uid() (e.g. > > > * allowing user to set up userns uid mappings). > > > */ > > > - pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions", > > > + pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n", > > > __kuid_val(cred->uid)); > > > return -1; > > > } > > > @@ -103,7 +103,7 @@ static int check_uid_transition(kuid_t parent, kuid_t child) > > > { > > > if (check_setuid_policy_hashtable_key_value(parent, child)) > > > return 0; > > > - pr_warn("UID transition (%d -> %d) blocked", > > > + pr_warn("UID transition (%d -> %d) blocked\n", > > > __kuid_val(parent), > > > __kuid_val(child)); > > > /* > > > -- > > > 2.21.0.392.gf8f6787159e-goog > > > > > > > > > -- > > Kees Cook > -- James Morris