Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp5059462pjb; Mon, 27 Jul 2020 11:52:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3bGbOxUwnbepuFlrU1nLFOh9Pga6d/ZFLu5ff20KyIAg1aN4KEZNM0n003ovT8nIr3IwJ X-Received: by 2002:a17:906:1e83:: with SMTP id e3mr22947868ejj.7.1595875943704; Mon, 27 Jul 2020 11:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595875943; cv=none; d=google.com; s=arc-20160816; b=rxH2DD7s71bmWGWigGkoZh+9447IH5eJvt90CT4fuXUfQ9nHgbhw2CrP9iwCIrqX9Z tMuWahFFT8ies68Uy0b3MOECt8ACVHKkuUfnW75SDwZWQuWObFj8oF+zWJ26q1YBulpc W7TqtMJAupHTUUHInSCD64AClX2Vr/OodTWi1D12xVGNk33A+i2uirm3ga0yqzeW5Em6 1saE3PILIWxgjv59RCIACmECCT0nIS04bZnad+GQNJNflcuMZ5LmX+b/9A30ZTY5F6q8 e8LKuVfTVkX69LMbD7bRx26mCDgkiMdndD3gmqmqbPMi4QYnMrMbEhZtzOqoLJ+/SJFv hAog== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=ZmWpjGd+O6iH//oTsnru7zsibm/cJQ+0mKFWm5v3ttU=; b=AVEcnqypeDcz5V9e4M5ktx8LGYt//vhYeAw/ijUXTmpuaoxi68pLtNX1HREo1zZaI6 K6Q2zwlidMScdbNeVfoGfIZ/FKmxAK/EN0tHhRfVBfrgzkf5u0Go1CjlWCVe5+vxb22i ilJOPjfphKpBDk5+mrR5tM0MuRUgJ9zU55XK2KmgysVZd26PG7ptO0VgJLKYHB2hzNwU OVjIk8J+VigZsHU/b6ZT6Yxs1+wBrArDITKs9EUcDQW14Ti+GWEnuO3qDisqLkNQxr+n XaWpAl4kMDE/4habJCuAowKToIh6TLdvR/EynBv7VqXrrLLVxchFvVPjv/ERy7W+t6Qq oRWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ngDbKbTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si6151411edx.137.2020.07.27.11.52.01; Mon, 27 Jul 2020 11:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ngDbKbTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731943AbgG0Q3T (ORCPT + 99 others); Mon, 27 Jul 2020 12:29:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbgG0Q3T (ORCPT ); Mon, 27 Jul 2020 12:29:19 -0400 Received: from localhost.localdomain (pool-96-246-152-186.nycmny.fios.verizon.net [96.246.152.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0896A20719; Mon, 27 Jul 2020 16:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595867358; bh=wVYeaaXiXzUaFNPG+whAj3/nPc4VyY++YQ4OxyWyDH0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ngDbKbTENJLhs/GPlmvy4pP78KGL7NZ38+x8rytOXFcs7gJNeoBT85FCm35m9PKEV ulb8jIW+cwa8buMo4M0O/PxoZywEt0e7/CUcvKzuzbGfW/CsAksMuGPZ5V8SMwwEKM UiNoFjjyjpgYxMb+QACMp6QjAe06aKn1apn7Klhc= Message-ID: <1595867355.4841.134.camel@kernel.org> Subject: Re: [PATCH v3 08/19] fs/kernel_read_file: Remove redundant size argument From: Mimi Zohar To: Kees Cook , Greg Kroah-Hartman Cc: Scott Branden , Luis Chamberlain , Jessica Yu , SeongJae Park , KP Singh , linux-efi@vger.kernel.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 27 Jul 2020 12:29:15 -0400 In-Reply-To: <20200724213640.389191-9-keescook@chromium.org> References: <20200724213640.389191-1-keescook@chromium.org> <20200724213640.389191-9-keescook@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) 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 Fri, 2020-07-24 at 14:36 -0700, Kees Cook wrote: > In preparation for refactoring kernel_read_file*(), remove the redundant > "size" argument which is not needed: it can be included in the return > code, with callers adjusted. (VFS reads already cannot be larger than > INT_MAX.) > > Acked-by: Scott Branden > Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar