Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4320188ybl; Mon, 26 Aug 2019 08:42:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8OUvAAXQLsNqs8uJuW11dIg6skSnQkFseRDFAU8YIaUxoxWyNK0u4Tk6ntl9ymgze2WMC X-Received: by 2002:a17:902:100c:: with SMTP id b12mr19748198pla.40.1566834156784; Mon, 26 Aug 2019 08:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566834156; cv=none; d=google.com; s=arc-20160816; b=twtVgqnxBY/W4l8q94VWqiyU/qmVsS4hFEMrKr8iGe/X6YcsPPe7oQOgoj7oQwkSd5 6jXPVlXBCVsxYtYuvewz5D0jQJ9exb3aJogpyUu/ZyoOgdXP4YI1N/WROHunqhtlzAl8 OhpUIlZNvyM2eu+XrM+hlyu6VkcJ8pNNJe088ftZfRRC9W9dn9d5BNzc146Mzrb+Xns/ BPM7AYIghLStCDjniLIpl8JEYi+E7W0y6V56qN7h9WAxWxxI0UM/QPCvtG32zMHqC9K1 iGxx/dvanr2pXYwmUvGpRQQThpaO/6d34upLJ4qVKkXv1Iz1jHZQ85LRrTwYcl5KOs21 +jrg== 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 :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date; bh=mCREs4Dd19yITElfAEqCURgM1DdS9mb4LeaVuJKAcrk=; b=YEb65lTQCJ5CrmsXdjz5U6zSI9PcWAmQ+WBB/hlnmoB1cjepwxQAApxrcxB/g4wioR 88N2B7a0RznN7Z65sv3037v3ILwaM8s74cUg/2S/EqWK10AadNvgyzLDz+3KIwhjNnGg OetY1/mHAiBmfMrjyIVQ6FIHL6HV/zVMJVxVr9oJ+sS3PSsfVgLCukwf8sGXVsVHDcr4 LOJ7tHZYcb1lieTvFPF8Gxb3I75iweg8JIYCNxeEiQhHJn/AXZcBb662+VB7ovVhRoGC jlUofDzOPDsc0PaFXibWx0c7KIOP+fqttkmZvDcIEpvOVVuSYDUgxu3NnhBESwxiFofP rL+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si9301468pgv.86.2019.08.26.08.42.21; Mon, 26 Aug 2019 08:42:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733025AbfHZPU4 (ORCPT + 99 others); Mon, 26 Aug 2019 11:20:56 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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