Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5339136imm; Tue, 19 Jun 2018 08:51:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIBCSN9f1ySBS0XRMbZ4XifGXFs823itXhxViaS2EvYORHvgIxBATKRkB2J30yS3ixzWZt0 X-Received: by 2002:a17:902:5991:: with SMTP id p17-v6mr19137111pli.191.1529423496470; Tue, 19 Jun 2018 08:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529423496; cv=none; d=google.com; s=arc-20160816; b=kwpcLlOLbL12CvBQOd4kohG7VIIDEvvESFyBX4xYGzJJVOmymcG805/E3FzOTQK4ME 41I31V5/oRSLbRz/uz28RULZs/FXhWmYK1dO6ru/PsMciIdZ5JWmBGLHvG1o42dN8p7H w7SA9fd4cW37nzALfbk8kzfLHpc0gUVmLgQKbZa9lyRW0Wx3hacVYgMZ1gGi3Qr6Lsuh KpInLOkb6FPJ2OpqklpVjq8w/sai9+4FOY6NbYQzZD4TDHnIUfkIO3Y1FN2nxb2CLZyM eaXYhQiWJeFiW71rgWlYdbUM1TZAQbLx6MYzWbQcV6HinGqxH3T1DT3AjZqRKNVf9bjR /TnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=PYkioP9HWK9UXany/VJq8BSZNE8uC7ACgeTcxVaxsE8=; b=LBC7HkoHPoaMfTGNnaUps+awspzOTU7xwbxbbHu8qv+bVYOKUYcdnsGxuJAJc+wnTw 6RwvUL3ie1oRnajWjPbuk5C1JVmrR4DUOEhc0M2TqrFuwMuPpco0gYuMmcdLOhnK2neb cuWps+jdDk50Apfpca0pytqJJHmUAh7wp5FW04ud0FJi5IOA4wz2Bpiis4MH5MHqrbdT NYxRXoD5ntLbZxD4slSw+oU/mPYwYQMLfKcw1s7R5OvD8vIp35CpFyIv9S1OtitWjFEI 8WNK/ZxrGWdlR9XoSxzMw0uJmad1JniOkel7sBkXdSn40mF1XH7QNNyIWRwN+2bzZ4Jg L9fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Pf4IDyTk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22-v6si3800pll.416.2018.06.19.08.51.22; Tue, 19 Jun 2018 08:51:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Pf4IDyTk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966916AbeFSPtY (ORCPT + 99 others); Tue, 19 Jun 2018 11:49:24 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33863 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966597AbeFSPtW (ORCPT ); Tue, 19 Jun 2018 11:49:22 -0400 Received: by mail-lf0-f65.google.com with SMTP id v84-v6so268017lfa.1 for ; Tue, 19 Jun 2018 08:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PYkioP9HWK9UXany/VJq8BSZNE8uC7ACgeTcxVaxsE8=; b=Pf4IDyTkZfrGoC8+IMhKDTdrguzrx6iSe+Trt9fhopmkclT2r3+gdx8DQKZKsPR39U V4voMKOrExnROGu0tCXd1Pk9YE2mB3yvOtXwS+kTmHmkX45+LXwhzA/WFWiuwBTdKH1x 04Gs+IhXBK99/ayhPhlaLJWi0+TF1Ks8Jne6ZZvQt6ey9vKBZQA58IN9sfQH76FD1fQc QHRIcxvxLuznJwviEJt3vS9vGWX+XKJcKU9D66XC9k3yx80fRVAoTEuQ4wHsGNcGleTU U/X+MjyUIsTAnTEmxI/lymrOOgBB0qYQlVz1Wo4cPP3JQ/JUvSUcdQs3ET4ZljUf1z5o BtXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PYkioP9HWK9UXany/VJq8BSZNE8uC7ACgeTcxVaxsE8=; b=KY0T0pBA/ZyK0BJ51RLAkfsaxPUX3Ve0uEP38wTIddZAIPSi/mxbx0ymsNZgU7yt+b KeGEWd8uqKRbFY0OFZamVzOjIHNr9TRFmNteUKJQ/4rv6znQzjeBQODtcWfm8sII2vXC PmRVLDwMQ3OvHk6INaFB+bVv352SOukXTOrq1TlEpBIu2VwMf+qXBEt+Plrx/18RLj/v Z823FUx4knfwUGCXMjhDVnWqeltumiXMkQaaaxiQIOWnagNk/9o/VIJLyDGLpf08E1IJ GS4CWOnSFZmrcB8tktfHdCkFpJz7KggTZ2ZFownJJmJ5o9px8YsttRn+v6bed3ejjCsB QlZQ== X-Gm-Message-State: APt69E3GmJFVyWwFdtEvYC6LpprUC+Qy4ABW5/10kD5GNbdxI5uHGFCl ymPs1OJM1GB7falEMvdN26YCAL3nzqiyBTR+ZjOs0bM= X-Received: by 2002:a19:d5c7:: with SMTP id m190-v6mr1056772lfg.12.1529423361355; Tue, 19 Jun 2018 08:49:21 -0700 (PDT) MIME-Version: 1.0 References: <20180612080912.7827-1-peter.enderborg@sony.com> <20180612080912.7827-3-peter.enderborg@sony.com> In-Reply-To: <20180612080912.7827-3-peter.enderborg@sony.com> From: Paul Moore Date: Tue, 19 Jun 2018 11:49:10 -0400 Message-ID: Subject: Re: [PATCH 02/13] selinux: Cleanup printk logging in ebitmap To: peter.enderborg@sony.com Cc: Stephen Smalley , Eric Paris , James Morris , danielj@mellanox.com, dledford@redhat.com, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, serge@hallyn.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2018 at 4:09 AM Peter Enderborg wrote: > > Replace printk with pr_* to avoid checkpatch warnings. > > Signed-off-by: Peter Enderborg > --- > security/selinux/ss/ebitmap.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) Merged, thanks. > diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c > index 5ae8c61b75bf..8f624f80055b 100644 > --- a/security/selinux/ss/ebitmap.c > +++ b/security/selinux/ss/ebitmap.c > @@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) > count = le32_to_cpu(buf[2]); > > if (mapunit != BITS_PER_U64) { > - printk(KERN_ERR "SELinux: ebitmap: map size %u does not " > + pr_err("SELinux: ebitmap: map size %u does not " > "match my size %zd (high bit was %d)\n", > mapunit, BITS_PER_U64, e->highbit); > goto bad; > @@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp) > for (i = 0; i < count; i++) { > rc = next_entry(&startbit, fp, sizeof(u32)); > if (rc < 0) { > - printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); > + pr_err("SELinux: ebitmap: truncated map\n"); > goto bad; > } > startbit = le32_to_cpu(startbit); > > if (startbit & (mapunit - 1)) { > - printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " > + pr_err("SELinux: ebitmap start bit (%d) is " > "not a multiple of the map unit size (%u)\n", > startbit, mapunit); > goto bad; > } > if (startbit > e->highbit - mapunit) { > - printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " > + pr_err("SELinux: ebitmap start bit (%d) is " > "beyond the end of the bitmap (%u)\n", > startbit, (e->highbit - mapunit)); > goto bad; > @@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) > struct ebitmap_node *tmp; > tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL); > if (!tmp) { > - printk(KERN_ERR > - "SELinux: ebitmap: out of memory\n"); > + pr_err("SELinux: ebitmap: out of memory\n"); > rc = -ENOMEM; > goto bad; > } > @@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) > e->node = tmp; > n = tmp; > } else if (startbit <= n->startbit) { > - printk(KERN_ERR "SELinux: ebitmap: start bit %d" > + pr_err("SELinux: ebitmap: start bit %d" > " comes after start bit %d\n", > startbit, n->startbit); > goto bad; > @@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) > > rc = next_entry(&map, fp, sizeof(u64)); > if (rc < 0) { > - printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); > + pr_err("SELinux: ebitmap: truncated map\n"); > goto bad; > } > map = le64_to_cpu(map); > -- > 2.15.1 > -- paul moore www.paul-moore.com