From patchwork Fri Jun 2 13:51:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 101252 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp204830obc; Fri, 2 Jun 2017 06:54:52 -0700 (PDT) X-Received: by 10.101.90.78 with SMTP id z14mr7377165pgs.44.1496411692321; Fri, 02 Jun 2017 06:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496411692; cv=none; d=google.com; s=arc-20160816; b=EqBym+l91A+0tzrMAArmCCsg36kjMth7Ji2ANA1dvx7RXCl6O9TtlpKkLKAynqvu8E Nm6ae2NucHxplkHf6n9tR/+RwHGMMXaeRUfzxsiUXWPujlFfJb3QnWmN2aH33y88Pvs2 8ddxkuzJey2LfhQhET2XK9mI1unZDpvRCVCWE+CeN7QEOZV58TGWCY4t/AuZSwp0YG2y I8tSsFjy5/ghZjvJmxIYAXGA15WEg+vDSfx5+hLiJMp7VVcuRuj5va6rXt79cn0rFdyS ZPHKDCI3ZTU41mGCo9E4daku4/0MXXiowTnplUjiaEUAncbx0iFKoE5h1B4+OjssgHyc 2unA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=AcpeyAbkCIzbBTjd6Yajy98umXnFMVF5ZR/jjIsbPxA=; b=fV1sV8hy9P3suW9lkOLyzH6nsinKFatqSFX3svxd3Ce1chEpR1sLuLfRAQCv1JPqfy BTQVCTGGEJLPx12UUa8mJKdKRzrwOs4Nw5TwxY6Xx8XjsTJY+90b7wTIPcYDq9ZKDwdm vxDlsO+AvUQtOc0OLsXo6amoHicTHJtBWjju9Ejj0/Vs7vEFMFETmIDRstWZpT2xCMGl HykILogbQGqHozxMtRlMRHsuWF2URHB5rsFRm2guk2vaibCPYcDBwTcosO9TN5hD/h1g 24x+pjIb60nZM9+ggSTdBYYNDzYHphZ1XAugBCAARLuDIyAhJlXM3WM7TcJ21S9Z8QBL PYXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s80si23734996pfi.388.2017.06.02.06.54.52; Fri, 02 Jun 2017 06:54:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495AbdFBNyu (ORCPT + 2 others); Fri, 2 Jun 2017 09:54:50 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36987 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbdFBNyt (ORCPT ); Fri, 2 Jun 2017 09:54:49 -0400 Received: by mail-wm0-f45.google.com with SMTP id d127so27561673wmf.0 for ; Fri, 02 Jun 2017 06:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gQxKtWUKPg1ezXArF4TB0cLzuI7CK0EQGCTavdYwkew=; b=eb4oR1NG0H7JRRe+m5AwbTp4dK4oaT1NWDH9OiBTEhKSvnHIyvw8zF3uYLVLBBYVNr zGlcyZjTkc5XcTqAk6o+uSIsesqGTYprazNlGV0IbhW3XBX41XO20pX7aqB0B6pmRI1v OFb43ni7eTKiy6eqreVdJxosJYVmwpmuW0HdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gQxKtWUKPg1ezXArF4TB0cLzuI7CK0EQGCTavdYwkew=; b=qlpMz/tWc6BL6UIXducyYh4Gn+u05kq71uPGXVGyLzkj/zTZouATng2xmiTLe63mOD /Oxh/I4sPSBVNzf2a6/GjbLzzoeJrxzxZ6vbZCH5RG00+L9bePa+r4pYmfZv0AV0pmYk y7GjqkEhmmXebbiljAS2nUSXUDptxK6YWV3RzvjzCY8m9CEFIbfZ4sCNm75AOpcJ2p9C JDez6645rLVtZkJ50rAI8cAiDWzJjBi9aSLekdgQsZdKUaU/hgYJPXy9OuWiGVf5/PUV Ua/Hn5DZBVqvlLBBbCvXH0snYpNq95HFcwZThEB+cTgk823KJGMKYA3JAb11yITr+TY6 4ETg== X-Gm-Message-State: AODbwcCR1OR/5y2nEyeNm1mTbNMUdd/NRvzIditqa9ns1PT6jwIsgeZO wQtwV8RKzqAcLujgUYisyw== X-Received: by 10.80.184.129 with SMTP id l1mr6064000ede.88.1496411687944; Fri, 02 Jun 2017 06:54:47 -0700 (PDT) Received: from localhost.localdomain ([105.151.155.95]) by smtp.gmail.com with ESMTPSA id g48sm9756076edc.8.2017.06.02.06.54.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 06:54:47 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Jan Kiszka , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: [PATCH 03/13] efi/capsule: Remove pr_debug on ENOMEM or EFAULT Date: Fri, 2 Jun 2017 13:51:57 +0000 Message-Id: <20170602135207.21708-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170602135207.21708-1-ard.biesheuvel@linaro.org> References: <20170602135207.21708-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Jan Kiszka Both cases are not worth a debug log message - the error code is telling enough. Signed-off-by: Jan Kiszka Reviewed-by: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/capsule-loader.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c index 91e91f7a8807..7b57dda2417d 100644 --- a/drivers/firmware/efi/capsule-loader.c +++ b/drivers/firmware/efi/capsule-loader.c @@ -88,10 +88,8 @@ static ssize_t efi_capsule_setup_info(struct capsule_info *cap_info, temp_page = krealloc(cap_info->pages, pages_needed * sizeof(void *), GFP_KERNEL | __GFP_ZERO); - if (!temp_page) { - pr_debug("%s: krealloc() failed\n", __func__); + if (!temp_page) return -ENOMEM; - } cap_info->pages = temp_page; cap_info->header_obtained = true; @@ -111,10 +109,8 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info) cap_hdr_temp = vmap(cap_info->pages, cap_info->index, VM_MAP, PAGE_KERNEL); - if (!cap_hdr_temp) { - pr_debug("%s: vmap() failed\n", __func__); + if (!cap_hdr_temp) return -ENOMEM; - } ret = efi_capsule_update(cap_hdr_temp, cap_info->pages); vunmap(cap_hdr_temp); @@ -171,7 +167,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff, if (!cap_info->page_bytes_remain) { page = alloc_page(GFP_KERNEL); if (!page) { - pr_debug("%s: alloc_page() failed\n", __func__); ret = -ENOMEM; goto failed; } @@ -184,7 +179,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff, kbuff = kmap(page); if (!kbuff) { - pr_debug("%s: kmap() failed\n", __func__); ret = -ENOMEM; goto failed; } @@ -193,7 +187,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff, /* Copy capsule binary data from user space to kernel space buffer */ write_byte = min_t(size_t, count, cap_info->page_bytes_remain); if (copy_from_user(kbuff, buff, write_byte)) { - pr_debug("%s: copy_from_user() failed\n", __func__); ret = -EFAULT; goto fail_unmap; }