From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6970DC3A59F for ; Mon, 26 Aug 2019 15:21:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4987020828 for ; Mon, 26 Aug 2019 15:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729623AbfHZPUz (ORCPT ); Mon, 26 Aug 2019 11:20:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:45612 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727850AbfHZPUy (ORCPT ); Mon, 26 Aug 2019 11:20:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DE107B635; Mon, 26 Aug 2019 15:20:52 +0000 (UTC) Date: Mon, 26 Aug 2019 17:20:52 +0200 Message-ID: From: Takashi Iwai To: Scott Branden Cc: Luis Chamberlain , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "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 , linux-kselftest@vger.kernel.org Subject: Re: [PATCH 2/7] firmware: add offset to request_firmware_into_buf In-Reply-To: <10461fcf-9eca-32b6-0f9d-23c63b3f3442@broadcom.com> References: <20190822192451.5983-1-scott.branden@broadcom.com> <20190822192451.5983-3-scott.branden@broadcom.com> <10461fcf-9eca-32b6-0f9d-23c63b3f3442@broadcom.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, 23 Aug 2019 21:44:42 +0200, Scott Branden wrote: > > Hi Takashi, > > Thanks for review.  comments below. > > On 2019-08-23 3:05 a.m., Takashi Iwai wrote: > > On Thu, 22 Aug 2019 21:24:46 +0200, > > Scott Branden wrote: > >> Add offset to request_firmware_into_buf to allow for portions > >> of firmware file to be read into a buffer. Necessary where firmware > >> needs to be loaded in portions from file in memory constrained systems. > > AFAIU, this won't work with the fallback user helper, right? > Seems to work fine in the fw_run_tests.sh with fallbacks. But how? You patch doesn't change anything about the fallback loading mechanism. Or, if the expected behavior is to load the whole content and then copy a part, what's the merit of this API? > > Also it won't work for the compressed firmware files as-is. > Although unnecessary, seems to work fine in the fw_run_tests.sh with > "both" and "xzonly" options. This looks also suspicious. Loading a part of the file from the middle and decompression won't work together, from obvious reasons. If the test passes, it means that the test itself is more likely incorrect, I'm afraid. thanks, Takashi