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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72FDDC6787B for ; Fri, 25 Aug 2023 18:59:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbjHYS7W (ORCPT ); Fri, 25 Aug 2023 14:59:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbjHYS7A (ORCPT ); Fri, 25 Aug 2023 14:59:00 -0400 Received: from smtp-bc0c.mail.infomaniak.ch (smtp-bc0c.mail.infomaniak.ch [45.157.188.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41EA82127 for ; Fri, 25 Aug 2023 11:58:56 -0700 (PDT) Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4RXTkk46QwzMq2xq; Fri, 25 Aug 2023 18:58:54 +0000 (UTC) Received: from unknown by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4RXTkh6ZYLzMppKV; Fri, 25 Aug 2023 20:58:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1692989934; bh=9t9z0AWfKvu8cmYtluHWW8vh3FOqoGb0HQ1F5uA1RdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kIsvixOWC6Vjz3deh4q1Kn0GMFc8uDMkLy6yZsDQGuW7OOgFvH3HwnlTwYkJVcgU2 /GnsSFIcAZeV8IJehrZEQusi3lM05J+kNEJVeNuA3Vby+RD2WOLdkcpkc54WZHuJgf uj9xDxg2HNHq0eDiWSp+Vjjf+gSKR0b2jikhZjhc= Date: Fri, 25 Aug 2023 20:58:49 +0200 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Casey Schaufler Cc: paul@paul-moore.com, linux-security-module@vger.kernel.org, jmorris@namei.org, serge@hallyn.com, keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v13 11/11] LSM: selftests for Linux Security Module syscalls Message-ID: <20230825.Oun6quaengoM@digikod.net> References: <20230802174435.11928-1-casey@schaufler-ca.com> <20230802174435.11928-12-casey@schaufler-ca.com> <20230825.OokahF6aezae@digikod.net> <9537cf00-575c-b57e-29ca-0b49be6617b9@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9537cf00-575c-b57e-29ca-0b49be6617b9@schaufler-ca.com> X-Infomaniak-Routing: alpha Precedence: bulk List-ID: On Fri, Aug 25, 2023 at 11:14:15AM -0700, Casey Schaufler wrote: > On 8/25/2023 8:01 AM, Mickaël Salaün wrote: > > These tests look good! > > > > I suggested other tests to add in my previous emails. > > Some of the tests you've suggested will be very difficult to implement > in the face of varying LSM configurations. I need to defer them until a > later date. Sure, some might be difficult, but some bound checks (e.g. extra flags) should be doable. > > > I'd suggest to re-run clang-format -i on them though. > > I assume you're recommending a set of options to clang-format > beyond just "-i". The result of clang-format -i by itself is > horrific. I just ran clang -i (with the default kernel configuration, which is taken into account by default). This just add four changes: the PROCATTR define and three ASSERT*() calls, which are not too uggly IMO.