Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1272662ybl; Fri, 23 Aug 2019 16:40:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvOUxL9ous/1PPHJvyG/9H9duEXsT8HOmgVgGzwdhFnVUHihOHbjDKd7CVB6PEzpHoTUFb X-Received: by 2002:a63:e62:: with SMTP id 34mr6009768pgo.331.1566603601965; Fri, 23 Aug 2019 16:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566603601; cv=none; d=google.com; s=arc-20160816; b=YoucsfDZdoeIP/HSV/sARLTlnbmIFIR0FG4kG92TZLEmrm/4fpmQtPlabrN4ZCrlpV Z/kv5G3QRZzrUDKQ+frgLwZWn1iiPiQzCYp4d44qltf3sqEVtQR1HG8UrMilOgHkqesF TxvNUEW3kzLKRUSruxBlt652nk3uaypjKWn8sQuZsmvUR3T5Gg+iIn4O2RnR7yD8alpg 5hTuPiG3VYCrJYhdIyH2KvSMhaMGdKVmrIoN4cZhZVdaNyz6jrKJgQvQmDD+3DM0arqO FJSMYdNNNSjbuMoVcT+2kM/NextgVxijNmDXhgsgjbGMJOOvsrAWT5pIe6UjHg8tD9ZU 4xAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tHc2UDznI/uoDADxr2vQBdjC4lDElZPoW7dMZcPdM2Q=; b=GhNU5/1jiBJ5S0nxBFP6T/cKJWanMgvSLhQamXGPIyHbZxOADAZxI2z4hxC/sJrJY6 XmLirCK91GqGAbRvLYzUTGtK6pJdy1hSnWVgeW+J95uJ1yBrCWj8Bp35q1Cu7tm8dWqm 3ON0HQR5ARZ3irZsp9tL82XDO4C9/51rYkQl6hEI6XXfYOh93KMVAxdjSU7bia7PEQ/U roMEpEI3/bDqzMcomeocTikU95Iwfth6/iF1DkX/kH2HJPSGCALG6CahzbFBzTn+5AeV 2HKuGHh9Yvw/8mknSnP9B5KpVM9X9dDf78aTuSoAIYPj2B4qI5ZxMmjv3Bzf2Yb7t17C Fi4w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14si3805636pfc.134.2019.08.23.16.39.46; Fri, 23 Aug 2019 16:40:01 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406190AbfHWV3g (ORCPT + 99 others); Fri, 23 Aug 2019 17:29:36 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36104 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388346AbfHWV3g (ORCPT ); Fri, 23 Aug 2019 17:29:36 -0400 Received: by mail-pf1-f193.google.com with SMTP id w2so7311475pfi.3; Fri, 23 Aug 2019 14:29:35 -0700 (PDT) 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:user-agent; bh=tHc2UDznI/uoDADxr2vQBdjC4lDElZPoW7dMZcPdM2Q=; b=m2dginuydqnbCe8vxP0ntkIoZHFCc3EB2k3XGvkrRKngxa34uBnGCjRmOhBRW0uhZJ KoEIp7+xjseLZiMLy6xSmC2acDa8qX7kqQNgAZ+IPGXdWy/7zHDRKJXzL5gGu68itb9k 4o2aIEA4fC6dBIsf3BfgMbP6jQdCJnBFAyql3vj4UW3t3/Ld9Jn6ctpCC7liXOcQDreJ MoT9NVl/N0sgxePWMmqZPHw+u3HwERHeOTtJDFj67NHYW7Mo8D1M2dEm8p56xIik9iSr LlXQh7uz5+yc7Hs8gW3sZAwNgfBkV6HO5YDxYpncg4jctwrzpqLEEpqcGi4tHQfOZ66G p0+A== X-Gm-Message-State: APjAAAVmFk7MKjHw6+IxSuju98Ry9UjZhy9nLKjBoWWufffU2WujLl3H TSn9JSBBG2PmZpORZp/Szc7+7XfM X-Received: by 2002:a17:90a:1202:: with SMTP id f2mr7076664pja.39.1566595775063; Fri, 23 Aug 2019 14:29:35 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id d128sm3626577pfa.42.2019.08.23.14.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 14:29:34 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id A98D6404D5; Fri, 23 Aug 2019 21:29:32 +0000 (UTC) Date: Fri, 23 Aug 2019 21:29:32 +0000 From: Luis Chamberlain To: Scott Branden Cc: Takashi Iwai , 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, Mimi Zohar Subject: Re: [PATCH 1/7] fs: introduce kernel_pread_file* support Message-ID: <20190823212932.GY16384@42.do-not-panic.com> References: <20190822192451.5983-1-scott.branden@broadcom.com> <20190822192451.5983-2-scott.branden@broadcom.com> <5227a1bb-52e5-d547-2650-b06bee259012@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5227a1bb-52e5-d547-2650-b06bee259012@broadcom.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 23, 2019 at 12:55:30PM -0700, Scott Branden wrote: > Hi Takashi > > On 2019-08-23 5:29 a.m., Takashi Iwai wrote: > > On Thu, 22 Aug 2019 21:24:45 +0200, > > Scott Branden wrote: > > > Add kernel_pread_file* support to kernel to allow for partial read > > > of files with an offset into the file. Existing kernel_read_file > > > functions call new kernel_pread_file functions with offset=0 and > > > flags=KERNEL_PREAD_FLAG_WHOLE. > > Would this change passes the security check like ima? > > I thought security_kernel_post_read_file() checks the whole content > > for calculating the hash... > > It passes the fw_run_tests.sh.? How do you test the firmware loader passes > this security check? Its not a security check per code, its an audit of the code, to ensure that no new cases are not covered and its why I had CC'd Mimi. The question lies in *if* the approach exposes a new interface which cannot be attested. Its unclear to me if we can attest currently through security modules the fallback interface, as there are not APIs with a respective callback yet. Luis