Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2181880imm; Thu, 18 Oct 2018 10:16:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV617/5iNeoOq5hyycVzv0ei9BOdb/i9+A3v1Y7s+G7gEJRXYgBhFU3X8DqL0l8QAIy2q3Fo/ X-Received: by 2002:a17:902:7b84:: with SMTP id w4-v6mr29814036pll.32.1539882987916; Thu, 18 Oct 2018 10:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539882987; cv=none; d=google.com; s=arc-20160816; b=rrVzm60zljTK2ejJoxhMtUGHA2P9BTGxVjvxWsreOdkHVyzrTer1/LtiV+3O1jztWj I0ZeqMSMg/UJUZEgVMBi7C+/nxIQ2QcHC8SGvsWS9hJlA4qHndTRweC5RDEZOTRITPYY 4tkNhm2HoQ9zmAk4JvuivbXlWYsZFCMdk7xtGtb8DoQ2oiX/cMr+3fiGsDavKcoUCUm1 AlQ1HtDuTqCM1K/3Uerjx3XcYPwewGsyNjWX9/QcCgUKgFwApnlSAtbENNijxz91peyw K1/6UQig4QvegOzuS6GsZh3bF6d4zk8R/64gVSn2SqCNoztmwlPT4UebB38EivXVNuCU vB/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=EKs4XJlsmR5EAHUCT/yfkYsucu519PmzS9aQibyZdaA=; b=T12bodjNqYdT2uJePNqg/SckyHDbaJtwKKA+2khtTsFDQifse3Ap2huEorDRVKeDgQ qBo4N4yDrWx4esujMPdMQlil2HN2kmkuOeWg0jBR3dfUTclBKq9Tuq8lEQ+xd4xYB1yj KX7JD/oAqbgHZInSxlO7a65DIfTN83QQV9t4OMavfeyA9kxc7nV6D/SCJfoITWNNE4C4 PT8gBOozl4bAfHKUo0PkaEUtVO0vebWaWdGc5V9pwf+zNFp+kYKiBg35kX5F3iN5gepb vo98geWF+B/OiBGdHZgRblayseLob2kmM3sabntRJ5rXpfdoV9lPlAX1LlgHIX+twduG xf3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 p13-v6si21957098pgj.399.2018.10.18.10.16.11; Thu, 18 Oct 2018 10:16:27 -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; 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 S1728651AbeJSBQR (ORCPT + 99 others); Thu, 18 Oct 2018 21:16:17 -0400 Received: from smtprelay0188.hostedemail.com ([216.40.44.188]:35741 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727567AbeJSBQR (ORCPT ); Thu, 18 Oct 2018 21:16:17 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id A2334100E86CB; Thu, 18 Oct 2018 17:14:21 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:273:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:1981:2194:2198:2199:2200:2393:2559:2562:2828:2899:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3872:3874:4250:4321:4605:5007:7903:8603:9040:10004:10400:10848:11026:11232:11658:11914:12740:12760:12895:13069:13095:13311:13357:13439:13972:14659:14721:21080:21433:21627:30029:30054:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: anger21_7d31c57346d5f X-Filterd-Recvd-Size: 1759 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Thu, 18 Oct 2018 17:14:20 +0000 (UTC) Message-ID: <10d9618bf794d6e07b537455344b30238d5f4e80.camel@perches.com> Subject: Re: [PATCH] pstore: Refactor compression initialization From: Joe Perches To: Kees Cook , Joel Fernandes , Sai Prakash Ranjan Cc: linux-kernel@vger.kernel.org Date: Thu, 18 Oct 2018 10:14:19 -0700 In-Reply-To: <20181017214124.GA8239@beast> References: <20181017214124.GA8239@beast> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-10-17 at 14:41 -0700, Kees Cook wrote: > With compression initialization now separated from pstore_register(), > there is no longer a good reason to do compression method selection > during fs init. Instead, merge everything together into the late init. > Additionally cleans up the reporting to be more clear. [] > diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c [] > @@ -274,36 +274,56 @@ static int pstore_decompress(void *in, void *out, [] > - big_oops_buf = kmalloc(big_oops_buf_sz, GFP_KERNEL); > - if (!big_oops_buf) { > - pr_err("allocate compression buffer error!\n"); > + buf = kmalloc(size, GFP_KERNEL); > + if (!buf) { > + pr_err("Failed %d byte compression buffer allocation for: %s\n", > + size, zbackend->name); Given that there is a generic OOM message emitted on kmalloc failures, rather than expanding the unnecessary alloc failure message, how about just deleting it instead?