From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751324AbdCYPpV (ORCPT ); Sat, 25 Mar 2017 11:45:21 -0400 Received: from mail-vk0-f54.google.com ([209.85.213.54]:34227 "EHLO mail-vk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbdCYPpS (ORCPT ); Sat, 25 Mar 2017 11:45:18 -0400 MIME-Version: 1.0 X-Originating-IP: [108.49.102.27] In-Reply-To: References: From: Paul Moore Date: Sat, 25 Mar 2017 11:44:45 -0400 Message-ID: Subject: Re: selinux: Delete an error message for a failed memory allocation in policydb_read() To: SF Markus Elfring Cc: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Eric Paris , James Morris , "Serge E. Hallyn" , Stephen Smalley , William Roberts , LKML , kernel-janitors@vger.kernel.org, Wolfram Sang Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2PFjUfl005452 On Fri, Mar 24, 2017 at 8:13 AM, SF Markus Elfring wrote: >>> Omit an extra message for a memory allocation failure in this function. >>> >>> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf >>> Signed-off-by: Markus Elfring >>> --- >>> security/selinux/ss/policydb.c | 5 +---- >>> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> I'm not going to remove an error message without some better reasoning >> in the patch description. Providing a link to slides is fine, but >> your commit message needs to convey the important information and I >> don't think that is the case here (what happens when that URL dies?). > > Do you need an explicit reminder there that the function “kmalloc” provides its own > error reporting already because the flag “__GFP_NOWARN” was not passed here? That is what I said by "better reasoning in the patch description", however, now that I'm looking at this again, I don't think I'm going to merge this. Yes, maybe in some cases it is a bit wasteful, but I like the error message. -- paul moore www.paul-moore.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Date: Sat, 25 Mar 2017 15:44:45 +0000 Subject: Re: selinux: Delete an error message for a failed memory allocation in policydb_read() Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-security-module@vger.kernel.org On Fri, Mar 24, 2017 at 8:13 AM, SF Markus Elfring wrote: >>> Omit an extra message for a memory allocation failure in this function. >>> >>> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf >>> Signed-off-by: Markus Elfring >>> --- >>> security/selinux/ss/policydb.c | 5 +---- >>> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> I'm not going to remove an error message without some better reasoning >> in the patch description. Providing a link to slides is fine, but >> your commit message needs to convey the important information and I >> don't think that is the case here (what happens when that URL dies?). > > Do you need an explicit reminder there that the function “kmalloc” provides its own > error reporting already because the flag “__GFP_NOWARN” was not passed here? That is what I said by "better reasoning in the patch description", however, now that I'm looking at this again, I don't think I'm going to merge this. Yes, maybe in some cases it is a bit wasteful, but I like the error message. -- paul moore www.paul-moore.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul@paul-moore.com (Paul Moore) Date: Sat, 25 Mar 2017 11:44:45 -0400 Subject: selinux: Delete an error message for a failed memory allocation in policydb_read() In-Reply-To: References: Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Fri, Mar 24, 2017 at 8:13 AM, SF Markus Elfring wrote: >>> Omit an extra message for a memory allocation failure in this function. >>> >>> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf >>> Signed-off-by: Markus Elfring >>> --- >>> security/selinux/ss/policydb.c | 5 +---- >>> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> I'm not going to remove an error message without some better reasoning >> in the patch description. Providing a link to slides is fine, but >> your commit message needs to convey the important information and I >> don't think that is the case here (what happens when that URL dies?). > > Do you need an explicit reminder there that the function ?kmalloc? provides its own > error reporting already because the flag ?__GFP_NOWARN? was not passed here? That is what I said by "better reasoning in the patch description", however, now that I'm looking at this again, I don't think I'm going to merge this. Yes, maybe in some cases it is a bit wasteful, but I like the error message. -- paul moore www.paul-moore.com -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html