Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA365C636D3 for ; Fri, 10 Feb 2023 00:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjBJAQA (ORCPT ); Thu, 9 Feb 2023 19:16:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjBJAP5 (ORCPT ); Thu, 9 Feb 2023 19:15:57 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E12E5D3EE for ; Thu, 9 Feb 2023 16:15:56 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id bx22so3637314pjb.3 for ; Thu, 09 Feb 2023 16:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; t=1675988155; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tNPbNYoCct7d8eWLCTkz69o5QdTPIXkMuLL30IOxMRg=; b=f/XkvHql8tA6g9Cwp0u4jf8f7Qc7FIeFETTNtvSG78+1PpDL1dUGRltWrU0WGseC2f mDxL9UuS7jf0nQ5VXmX2WYUeMJX2fbUos36ISufxoZKygSb6hJZzBjnoRRV7OxXVyxyS M7zeWiG1IjpRvcHqDAm4O6OD4wpBHUKty7+4YHhYQ9TeLCBGbO00pUEPxKPHnPLEq5Tj 5yGd2jb/pIPponyzOm4vV8cOYitmD2Fb4fV30wo+wSI1bm5PFh6GSuqtZx8L2cGpMFxk qZ3MZJjgdq+ZhZsCQ5d34PmZeyi/8LfyVoIiJWWmJP2zmz8z6rvUXdqqhXhq/AGNhx/v nqgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1675988155; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tNPbNYoCct7d8eWLCTkz69o5QdTPIXkMuLL30IOxMRg=; b=nnPzs9IyysYGDMNmb4wjWu+D7+i3VYzwFFhgQ6sO+/w/hTAofJ7ozUQyXxNUkfv4Wd 9bcnkXx5Vj2uIetdMLB2XulV7zVefu/98UPEsqAx6kZtaXrpA9jpqsURRLBBz8GsAOdr 6bPhZO2xvAwRjsa1SCJ0ghc2XI3wg1V3dLQ/z1liWpPvKaB8lg7SDK5KDI1XKQbc4tQF 8szPX8UFp5aSWlNoduWc7H/p5s8RjnrxWQOsOEp4/sjgfHaXMwEbJDUpjKIea3yjq+8/ tHEjlCDzziiB6PsjPsGUYBuR3zrtWBzWaUmsZKZ9iP+td8xExecCzG9Lzv2XORXcwwlU pPfw== X-Gm-Message-State: AO0yUKWIslVKR4sO764kMmMZk/jmjRZ+BwlWyqjTCs6hnyH5Eny7LPis nTZZ9bKCysRmN4ERhZJ9Ifb1kg== X-Google-Smtp-Source: AK7set9i4GZy425eJQ60VEHt8ZyiMscBINILO96QjW9OdkxX3UWegtHHMx/XPbkaa3kfxkBKfne7wA== X-Received: by 2002:a17:903:32c3:b0:199:4362:93f6 with SMTP id i3-20020a17090332c300b00199436293f6mr9399565plr.4.1675988155556; Thu, 09 Feb 2023 16:15:55 -0800 (PST) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id jj5-20020a170903048500b00198d5c7cafasm2109067plb.156.2023.02.09.16.15.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Feb 2023 16:15:55 -0800 (PST) Message-ID: <6939adfb-ce2c-1911-19ee-af32f7d9a5ca@kernel.dk> Date: Thu, 9 Feb 2023 17:15:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2] io_uring,audit: don't log IORING_OP_MADVISE Content-Language: en-US To: Steve Grubb , Richard Guy Briggs , Paul Moore Cc: Linux-Audit Mailing List , LKML , io-uring@vger.kernel.org, Eric Paris , Christian Brauner , Stefan Roesch References: <13293926.uLZWGnKmhe@x2> From: Jens Axboe In-Reply-To: <13293926.uLZWGnKmhe@x2> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/9/23 3:54 PM, Steve Grubb wrote: > On Thursday, February 9, 2023 5:37:22 PM EST Paul Moore wrote: >> On Thu, Feb 9, 2023 at 4:53 PM Richard Guy Briggs wrote: >>> On 2023-02-01 16:18, Paul Moore wrote: >>>> On Wed, Feb 1, 2023 at 3:34 PM Richard Guy Briggs > wrote: >>>>> fadvise and madvise both provide hints for caching or access pattern >>>>> for file and memory respectively. Skip them. >>>> >>>> You forgot to update the first sentence in the commit description :/ >>> >>> I didn't forget. I updated that sentence to reflect the fact that the >>> two should be treated similarly rather than differently. >> >> Ooookay. Can we at least agree that the commit description should be >> rephrased to make it clear that the patch only adjusts madvise? Right >> now I read the commit description and it sounds like you are adjusting >> the behavior for both fadvise and madvise in this patch, which is not >> true. >> >>>> I'm still looking for some type of statement that you've done some >>>> homework on the IORING_OP_MADVISE case to ensure that it doesn't end >>>> up calling into the LSM, see my previous emails on this. I need more >>>> than "Steve told me to do this". >>>> >>>> I basically just want to see that some care and thought has gone into >>>> this patch to verify it is correct and good. >>> >>> Steve suggested I look into a number of iouring ops. I looked at the >>> description code and agreed that it wasn't necessary to audit madvise. >>> The rationale for fadvise was detemined to have been conflated with >>> fallocate and subsequently dropped. Steve also suggested a number of >>> others and after investigation I decided that their current state was >>> correct. *getxattr you've advised against, so it was dropped. It >>> appears fewer modifications were necessary than originally suspected. >> >> My concern is that three of the four changes you initially proposed >> were rejected, which gives me pause about the fourth. You mention >> that based on your reading of madvise's description you feel auditing >> isn't necessary - and you may be right - but based on our experience >> so far with this patchset I would like to hear that you have properly >> investigated all of the madvise code paths, and I would like that in >> the commit description. > > I think you're being unnecessarily hard on this. Yes, the commit message > might be touched up. But madvise is advisory in nature. It is not security > relevant. And a grep through the security directory doesn't turn up any > hooks. Agree, it's getting a bit anal... FWIW, patch looks fine to me. -- Jens Axboe