Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp534222pxb; Tue, 19 Oct 2021 07:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2CL2SDzBTPbPhSRuQYa3h6xDNvk46+FmyXHd6EAHGmWUukR7zQrenDF+Wcs3Agt2ch5vZ X-Received: by 2002:a17:906:ae53:: with SMTP id lf19mr38607361ejb.97.1634655416997; Tue, 19 Oct 2021 07:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634655416; cv=none; d=google.com; s=arc-20160816; b=M7mqLzIyJjvQZzwWUDlw+iMHU5Mx1939etPhiH+/xdGAJ1Q7lmVygCcdYI6mjDveB0 Y2UzbUjQ6cBck49TqxUPMo4epgFFtHL3Froha2cM8cfaqOeQDXWf94aCxuGwo/+8BmPT Vg+njCvdl6hlo+qjdiUi5meDIE5LkX2kWK/2zBgYNSw4TCdtSrAyVDmcP5VDl48O/Q6Q Z46XB8q4G5+QhLxfCPVPKkPeQOTz9y5PZp52VmOLNMAEQYedGTNBpR+XrG1PRV3DZKIB ExUmpmLaQJnT5emjcsufpQ5tRN0BJ8ns5IRLVUKv8l1wMPmJUukr/ndij21ywrQIMc/q X7VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p8WCCnGWa29x2/KunWHwcjm82Vw3dcAhuVE+3OJhddw=; b=PYWssEgrTuxk/o+qwsaqMsJtJVN9xLQzjUrwKK1u42Op45UP+z8dsfdwrNota6DL4+ xs3o3qvjKnbaZ/2U1rfOsiN1LnIHM83r4DwnZrv8mi7GI3yHfLVJ/tYQJC8fF7ieI9CN u9FkI0USxvL2G4n/yWKylUjA9IWXnNKCs7PCT1QBR6Ks808s4GaKvAptTtt9ImlRV7cb nB1smFqkkzwXeAA/wbw/62ZUzQ3vSKN8Ja3mSkL2OZsjwha8cdh/cj5k6Z4xZ7wdvia3 cmhzlIuwFdm2zWKhdB6BzVlJgdmMcZjgx7zoWnhaTwtQE7AsFsUkaJ+G4qu0HrPaZ7Xs cWhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=rU5vioG1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi15si23369665edb.457.2021.10.19.07.56.33; Tue, 19 Oct 2021 07:56:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=rU5vioG1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbhJSO44 (ORCPT + 99 others); Tue, 19 Oct 2021 10:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbhJSO4z (ORCPT ); Tue, 19 Oct 2021 10:56:55 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64275C06161C for ; Tue, 19 Oct 2021 07:54:41 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id y12so15020694eda.4 for ; Tue, 19 Oct 2021 07:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p8WCCnGWa29x2/KunWHwcjm82Vw3dcAhuVE+3OJhddw=; b=rU5vioG1bMFpSpuNxlfrRNAmnyB/zWyFYgYnrVbDtevPy/kYno3fOlryVFFCm17/ah ctHSyOqJg4vN14m3j0VjK+xfznSAc6PFHb66PthDVifzsJ7m3gH16wZOj/2OAx2V9Adg UAiK0PSV3AL/IBDlh1I0vMStcfLxnKW2TJXNI/DPVmMvkVcMFSK8q9gTOuxlabGVESFK ScrSNYsKA9fpN4RfTB/7PsDUtiMJ6kTz2Gm85mH3CjFXTTUD9edEhRJFq6QZGvEbV21x wpWQN1CavsjWqK9GP4aMwcpuxggAOa1SetoXyu1qMBvStvdZm1DmeO+kot7xoxPDKZmD HqwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p8WCCnGWa29x2/KunWHwcjm82Vw3dcAhuVE+3OJhddw=; b=6zopLpWcFXmD9H35rn+j4GTfNBSoZbrm/MERwKMw1WLovXoI5vlUQJqM8a5kSxkwBB rWmTu1h0NTc3Ih8C+ZEmOkT7Hv4R8yrL4oYvKQ+O9GMHvEd4+Eg0rKjPIsxnT7XjU5uI +dFJC/MTwxdvH/f7OrFpSmOxF5lEh7eQ21w48ANMpEk8Q2T+h8H2hsoSnscuaSgs6p7g LKab0ZlBZil8100uP8eZH9tT8dfO2bGcucF+5WQfi2GIzVZohUAi4k+H7SbMamaE6Yxy SItASwGyQ1wFs2tR9HDO+VV/aT0DgIzMvx9VBM66d+de6hmU4YWudcNKseSd5dlqMhDE Ca8A== X-Gm-Message-State: AOAM530kqzBfLypqpaLU1fNw1XSqYaRK2BWJKOosBuerN+aMSVYf95b0 SobDZETzK7LvxAcAmuhBzxC6fAZ/ui5Q31/j2Gk6 X-Received: by 2002:a17:907:629b:: with SMTP id nd27mr37148924ejc.24.1634655210383; Tue, 19 Oct 2021 07:53:30 -0700 (PDT) MIME-Version: 1.0 References: <20211016072351.237745-1-cuigaosheng1@huawei.com> <20211016072351.237745-3-cuigaosheng1@huawei.com> <5543735.DvuYhMxLoT@x2> In-Reply-To: <5543735.DvuYhMxLoT@x2> From: Paul Moore Date: Tue, 19 Oct 2021 10:53:19 -0400 Message-ID: Subject: Re: [PATCH -next, v3 2/2] audit: return early if the rule has a lower priority To: Steve Grubb Cc: Eric Paris , rgb@redhat.com, linux-audit@redhat.com, wangweiyang2@huawei.com, linux-kernel@vger.kernel.org, Gaosheng Cui Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 10:51 AM Steve Grubb wrote: > Just wondering something... If the first thing we do is to decide to return, > should we have called the function in the first place? I wonder if this test > should be used to break out of the rule iteration loops so that we don't keep > calling only to return ? Patches are welcome ... ;) -- paul moore www.paul-moore.com