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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E6C86C433DF for ; Mon, 15 Jun 2020 16:57:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C306120663 for ; Mon, 15 Jun 2020 16:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592240242; bh=t+Gq9rDmIsS9imeSgEfOfwJ3RU8rVMc5vfiLN8LDl6g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=W+b66GS3f8qB4bxKg28ltG864888wUOYO6mboofhHpX8ODigCv2n/a9xsjTgrd2IC MLA10LTYDm7TaTPhvQf1LTgZcCuB5vYhvz9Q3LUo38k/keUVj9wWsq/X1++c8+ITnj +KhR9YEqR6YgqxosjI9+LTVV/wVImAMQE0Xm/gpo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731087AbgFOQ5V (ORCPT ); Mon, 15 Jun 2020 12:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728513AbgFOQ5U (ORCPT ); Mon, 15 Jun 2020 12:57:20 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B57C061A0E for ; Mon, 15 Jun 2020 09:57:20 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id y11so20087895ljm.9 for ; Mon, 15 Jun 2020 09:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eIkal8pUfONI4oNrGMEW7FJGnsyPgxFx6nFiYlCav8Q=; b=BOdfnS1nQ1loTAy3XfZG4v2ypfE6UrK/J+Zd6u9ARxAU0HozZqAjdnCtxoLxulSvq0 7PoDNtEz3pdUYnk9jHe+VKu0KTcBji19fekNHUB4EqiWzTIqAhfzI/qVn548WkWINsOo G2cfvtd1eBk/jMWvfGGb0/G2cdASiBLrgA7w0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eIkal8pUfONI4oNrGMEW7FJGnsyPgxFx6nFiYlCav8Q=; b=euZdNtEyuqcb5CfO4Rri8WYRU7KzQR/ERcBHjksdwDUeLo/1txhIKNrmRGIBRsCOIu 0DrT0e677gqfyeKJEFtXH5j4/RiCHBmVjGEDAKS/d4Bo1LRYj1x2A4AQGVKIcLDc2shR THYjodHa+rsNWOsDg55DLDiFfBhu0XzX8nA2Nb7fybecDVITFyjTLQl3ZqpjS2+Kr6yl 0zGkvfhxVGPiaelVQWisk7QHnUVzLaJPh6a1S7VsUpsiJuxVIAQgZwZxGDi9GimOYYwi EjLW4QmjBNUTqFDqQhCm1hLxlA0Q1bQJhDDSid7SgSU0isl2EY4T7fdpZG1lRhMY91TI FO7Q== X-Gm-Message-State: AOAM5309l1qdw43XnPkdIk9sk4c1P/bvfPAJXqYAXaGOaxORuyuz9KB8 xedfjO58XBDWWlF6FCQWP3Grj7N4aTo= X-Google-Smtp-Source: ABdhPJw2K7M06eqz/jHp23tt4fkBaFT/IDnA13h2F7mBSXR1PcAsB6fR73fJ6XCDOrvvLCPvCqu5Eg== X-Received: by 2002:a2e:9804:: with SMTP id a4mr14120229ljj.369.1592240237440; Mon, 15 Jun 2020 09:57:17 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id k1sm4674908lja.27.2020.06.15.09.57.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2020 09:57:16 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id 9so20037032ljv.5 for ; Mon, 15 Jun 2020 09:57:16 -0700 (PDT) X-Received: by 2002:a2e:b5d7:: with SMTP id g23mr12503482ljn.70.1592240235665; Mon, 15 Jun 2020 09:57:15 -0700 (PDT) MIME-Version: 1.0 References: <20200615121257.798894-1-hch@lst.de> <20200615121257.798894-11-hch@lst.de> In-Reply-To: From: Linus Torvalds Date: Mon, 15 Jun 2020 09:56:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/13] integrity/ima: switch to using __kernel_read To: Christoph Hellwig Cc: Al Viro , Ian Kent , David Howells , Linux Kernel Mailing List , linux-fsdevel , LSM List , NetFilter Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Jun 15, 2020 at 9:46 AM Linus Torvalds wrote: > > It worries me that you're making these kinds of transformations where > the comments imply it's a no-op, but the actual code doesn't agree. Note that it's not that I think the FMODE_READ check is necessarily _needed_. It's more the discrepancy between the commit message and the code change that I don't like. The commit message implies that __kernel_read() has _more_ checks than the checks done by integrity_kernel_read(). But it looks like they aren't so much "more" as they are just "different". Linus