Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp571540ybg; Tue, 9 Jun 2020 07:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvm+VBu/eduxDSPKE8lUGO5hD+sTP812phGsVQUjQq/pDZTv73KhyCgDYOlgaRcgFaL5Ad X-Received: by 2002:a05:6402:1ac1:: with SMTP id ba1mr26308288edb.91.1591713445507; Tue, 09 Jun 2020 07:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591713445; cv=none; d=google.com; s=arc-20160816; b=V2uequL4Kvbed2hBHL9kuuehzfToQHcI/L6EsOJHCYJJuteePRs36TLXc8jkqNoQF+ MIt95tMwlvUd+FS8Ah3CfddPHPVKRSNEH1EHXDxkL8JpLGUlRMv4x7d/3SxTf7wn6Rzu d9KaX5b24SLxyMGOq5N3EDYJ+RUsF9rBjoJ8oEZv6IuSVWKJy7L+aOzpphYGTu59iU13 5y/ztpymXfXGsxN9XZaGfHuu6yjOPKPApC7jPbUdDEOVOY9cVkDqW1Ur95p1uJbfO0D3 qbwoj4mtWnb1Sk4IyzU71sFdZ+hEbhqJ2HMOz84g6RGanz3ta4Nlmzxkv0utM2UTGa1+ jT+w== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BS61t3scD5rhsvldmGOJtyXVG6rDl8HEmiFZUjqsT1Q=; b=Bb3ljC1eMy4ldnfotIHnVfudyrsam3DRaIZjC9TqvtOkzp0TYQ7XXdzYk4jo6Bs2gp 0R7OjpzdnnOHCbWM13ko/e0b+e8oYCfWF0vgD78C9fO+JwXxj8cMRNE3FDSCG5cTvKqE xQYPi3uvoVe3IiENtoISUK1sATwP+JbjF2uVY3D0u615iPZCc0nbyDMsHGXzNlVnYsfT k2lU/Po/BNvxiFCEsI1zZ2tq8KHGPo8+tBSz+yJHDveIu4I/hPRCZMu2EY5zpMlxodWI IdR26W6BPyeW+jvXsoJwV2spVnkWJQiCCVo6HWwpHe2lNU6u6TN/JjRpbrkwQS9vNGZD Tzzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pFZbRjVu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si4971414edp.123.2020.06.09.07.37.01; Tue, 09 Jun 2020 07:37:25 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pFZbRjVu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730542AbgFIOew (ORCPT + 99 others); Tue, 9 Jun 2020 10:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbgFIOev (ORCPT ); Tue, 9 Jun 2020 10:34:51 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 240C7C05BD1E; Tue, 9 Jun 2020 07:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BS61t3scD5rhsvldmGOJtyXVG6rDl8HEmiFZUjqsT1Q=; b=pFZbRjVutesuWvEsLEcOIckCTU B3HEtPGVpCN39H/vjxliXrmai3D//DgWvJMqaAaECUbY+uGMZ6/JoDe8HSpPKCIOxjdSsdO01gL4k jOfpF4lX6pW0QRPLyuOg22AAoBgA/FbpiiAOEc6nvbB1s1puwqnevV0HVIEy8unMbIITqwStbo958 ORwKmICUrKdJ9Jpq/dlDO2GdCh36CSzheEAvMA4TxREBhMXFw8Dc31l+wFd++VFwgYc2Ytzeuu8FI 3Xhapr9ybl4wIdCXPbVFVt5XN4bcA0++9e/Y7RYBFDK6bTxa5Fju3SlXupYEV1qkJZRkRZmY0V66L gazISSMA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jifKv-0008Vl-NS; Tue, 09 Jun 2020 14:34:45 +0000 Date: Tue, 9 Jun 2020 07:34:45 -0700 From: Matthew Wilcox To: Scott Branden Cc: Luis Chamberlain , Wolfram Sang , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , Mimi Zohar , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v7 2/8] firmware: add offset to request_firmware_into_buf Message-ID: <20200609143445.GD19604@bombadil.infradead.org> References: <20200606050458.17281-1-scott.branden@broadcom.com> <20200606050458.17281-3-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200606050458.17281-3-scott.branden@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 05, 2020 at 10:04:52PM -0700, Scott Branden wrote: > static struct fw_priv *__allocate_fw_priv(const char *fw_name, > struct firmware_cache *fwc, > - void *dbuf, size_t size) > + void *dbuf, size_t size, > + size_t offset, > + enum kernel_pread_opt opt) > { Your types are screwed up. size_t is the size of something in memory. loff_t is an offset in a file. This should be an loff_t. One of the other patches has the opposite problem. (this is kind of a minor problem compared to all the complexity problems, but it's worth mentioning)