Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2314151ybh; Fri, 17 Jul 2020 15:12:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAn5ca3tuQpwu01ETVTKEpEfrSdDYRIiZz401kvctVL6Lv86yE2je8DY/GLf/BJWFY9gB7 X-Received: by 2002:aa7:c909:: with SMTP id b9mr11118888edt.111.1595023978837; Fri, 17 Jul 2020 15:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595023978; cv=none; d=google.com; s=arc-20160816; b=RYTAKmKPjO/2DECEqcII3TBfUuZ0UAoqe/8MYamZBhNHnTkbWtoLrVHICRq3Oc7mfg 1TRjp0FkD9x+DLos8nvmpuS0X4q81NuIQhYwn59bh+7KCUzrox+0H9v0Z/Ky/lYZLhJu xYz+gw/crDw+UvdMijBQH+dGijR9b5uckxbFXA5MjeMRbHzN1ZsV4Fthd21eTTzLnoJD 0UMCEMwJd7c4GEvHEpISH1gFe+AeLFWeCjgIalRytfk14UQvaiauTUbFJLfMNHvEYiUp 9nVz9QUbtKZHz6D+jVWLTF+vMcr0+/it4QhxO9UENFmHjk3veaG3XsEYwIh7ZTasyRDe z9MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kXPLjDrHtFXbNmet3AnHCGh48BJAIHJk8m3fZv071oc=; b=mol6hA90ut3DBLzE9dSBOCwBjGygHhFnJlkGSH8MD8Kk/v/21+yKj0TCoQDGkaIJF6 G0wLx+yM3T8n4y02PGVNdvc31PSojb3RduDrZQEfeC7fzxbb6Qilu8zK5xmzRPMlPcoa 0ufQMtSUr9KGq2LL9YjbL3q/58FaQZ7HFYN2pnJQQhOktJ/9NP3zkAVQVqO+MZiGuZY+ UbcQOd2Iqklva/yGJrIH8E5JZcmzBHMPXdP+8JngWY5f5fXltoAAwPqfHKkL2y5qVHxS jHyCpOowptfMyTd+8hjCiqfKAnQP9MLF5sK0ssNkkJHHhkpG3TnKRGWaYCiVnlFQa297 8HmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PpAc1HNY; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si6023536eju.231.2020.07.17.15.12.34; Fri, 17 Jul 2020 15:12:58 -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=@chromium.org header.s=google header.b=PpAc1HNY; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727847AbgGQWKb (ORCPT + 99 others); Fri, 17 Jul 2020 18:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727840AbgGQWKb (ORCPT ); Fri, 17 Jul 2020 18:10:31 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C27DC0619D3 for ; Fri, 17 Jul 2020 15:10:31 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id k71so7144346pje.0 for ; Fri, 17 Jul 2020 15:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=kXPLjDrHtFXbNmet3AnHCGh48BJAIHJk8m3fZv071oc=; b=PpAc1HNYIT+QLMKhWHW1jl69NR1BoJnESjDZGrSJSD8rmjkUEt+Wtl439d/aUbqRFQ FQi3HlJUBrRonE9RjdfjP+55VLF3PgOo7bjCzzwuvZNhV9QGuaV3KdgQexhmz0n06eze dLlPv+vO46p4W2lZrmOGc+zuXZml1lcIQ8UeM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=kXPLjDrHtFXbNmet3AnHCGh48BJAIHJk8m3fZv071oc=; b=tl3S1Qnj7qQPQsUgUnw7s06Lvu1LJKVuGXCjNzvgixLFjjNXWrqKSHVn9RMJMdXn0C TPwj7Y6MznmxWuLIigoa09LSVp69TNMyz3P1APE5MnnSFn6rWPNSc8qenuLA7WL5dsOo MwEbObr2m4dNjzj5+HlJhMTab7wOR8NgCnQ3qFjiUkbyniF+2jQIE9WMnevo1DwCG4M9 gVreAg2JsUVuQBS3G2ls57cywhwIAMxa4/tkyXXYk1xgvWAYn53mX0entSWhakEi+Y+L d6t1RN9nSpk9Uh9YkhKXwOrmxo0Sq4uXc8MUECIW1EeRDEB9ITZTmcDFJC9wifcPygf7 eBjA== X-Gm-Message-State: AOAM530rHr75v1n6vqQmYEB5sxMti7PnevLoaC0IFllboYnY0VbzHCso z/PVKI38FfEUJxajlxdzFhhgUQ== X-Received: by 2002:a17:90a:17e4:: with SMTP id q91mr11673037pja.61.1595023830564; Fri, 17 Jul 2020 15:10:30 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n11sm8353780pgm.1.2020.07.17.15.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 15:10:29 -0700 (PDT) Date: Fri, 17 Jul 2020 15:10:28 -0700 From: Kees Cook To: Scott Branden Cc: Mimi Zohar , Matthew Wilcox , James Morris , Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alexander Viro , Jessica Yu , Dmitry Kasatkin , "Serge E. Hallyn" , Casey Schaufler , "Eric W. Biederman" , Peter Zijlstra , Matthew Garrett , David Howells , Mauro Carvalho Chehab , Randy Dunlap , "Joel Fernandes (Google)" , KP Singh , Dave Olsthoorn , Hans de Goede , Peter Jones , Andrew Morton , Stephen Boyd , Paul Moore , Stephen Smalley , linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/13] Introduce partial kernel_read_file() support Message-ID: <202007171506.CCE3902A9@keescook> References: <20200717174309.1164575-1-keescook@chromium.org> <8de85fc3-9f31-fc59-abc1-29f43fb90988@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8de85fc3-9f31-fc59-abc1-29f43fb90988@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2020 at 12:17:02PM -0700, Scott Branden wrote: > Thanks for sending out.? This looks different than your other patch series. Yes, it mutated in my head as I considered how all of this should hang together, which is why I wanted to get it sent before the weekend. I'm still trying to figure out why the fireware testsuite fails for me, etc. > We should get the first 5 patches accepted now though as they are > simple cleanups and fixes.? That will reduce the number of outstanding > patches in the series. Agreed. I'd like to get some more eyes on it, but I can get it ready for -next. > At first glance the issue with the changes after that is the existing > API assumes it has read the whole file and failed if it did not. > Now, if the file is larger than the amount requested there is no indication? The intention is to have old API users unchanged and new users can use a pre-allocated buf (with buf_size) along with file_size to examine their partial read progress. If I broke the old API, that's a bug and I need to fix it, but that's why I wanted to start with the firmware test suite (basic things like module loading work fine after this series, but I wanted to really exercise the corners that the firmware suite pokes at). -- Kees Cook