Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2198497iof; Tue, 7 Jun 2022 22:58:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZuGsZR9TSggbcBktA6xclsS0ze7GCZFLYpTK8frwtMEedxh3Tigev2QYmUsgtKPLdproI X-Received: by 2002:a17:902:e851:b0:166:381f:633 with SMTP id t17-20020a170902e85100b00166381f0633mr32104013plg.163.1654667927882; Tue, 07 Jun 2022 22:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667927; cv=none; d=google.com; s=arc-20160816; b=g35+iwcJtSmJWFqEmrhE++M/Ur2fuSUcUxAtbRfAm26D4+fCyHrAzW9QynRH0GukDo YE8bk0mSYDNeoUh94UwZ9hDNZFJ5r5q99CFqnaJK9JqMFxHEDexUWpQGvkYqugJYBev9 qWoSppRJMkGTbE80yMFK1cxjYP+PI+aRh12Nm0tSdh0tHa4PaTrB/EudK1Wzo/1jOFyh X+yS3plCBsDi7JcypuJ78tLhsUoKqaH7mGM2u3xnLtHuWXG6KBBVgihxCRICPpzTinvc Pisxy1KZvtjG4d1SA2/Lz9C/tMoEv6ZmPYdF1TFQsZzaaEOZJGQuQ+iVsvcPJfnJpFWk hWSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8azzKNts/SLhsGGyBvYLC1ICczJfQWo5zKt8n2Zvjr8=; b=Yf3SAsf9MTFgJcRfsldwJfAVT7fXSqBKCYknu7WJVCpjxf+8YdR4dWkMe5lBvfMt4V JlilOBK8FhrL0bdWWag5iE6U5UA7pUjabpCiuSHo9xjuEfTMo2Q1cc7X4cAxWxH4HRHZ IPQkqKMP8o6lvEfu/aMF9r19Nwgd5edlZgXVVpkD+OucsW8XfYWqoFjqd4w1lQBjCaB6 lBiCK1h05/4vI6SdF1JA3y0EMJCLoga7AFDu4nGj0iwsaBiZzxcJziDGIsWLikO+NUqq uBU81+FCs46gLPzo2WtNMOitpqk33XKjzO1q5QPMgaxjJxUxed/3qMczSooQ6RztdWcg YDYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ynzRyZAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z17-20020a63c051000000b003fc886ae312si3457927pgi.42.2022.06.07.22.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:58:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ynzRyZAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 72CD225D83D; Tue, 7 Jun 2022 22:24:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443723AbiFHBHQ (ORCPT + 99 others); Tue, 7 Jun 2022 21:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385116AbiFGWVB (ORCPT ); Tue, 7 Jun 2022 18:21:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE8A265F98; Tue, 7 Jun 2022 12:21:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BDA38609FA; Tue, 7 Jun 2022 19:21:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6DA6C385A2; Tue, 7 Jun 2022 19:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629669; bh=Xj4t98qVdkLPZQTS7OXQAoSx8M/pu0ePvUGCBZ8pXgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ynzRyZABg5Op+lHFnC5U/78OoQMk7/TEgyP55hwvIarbtz4Vun3HkxSsrkiiaU7O5 L3nWXz7riDIxWp0A6roZkWgotI+WNKJA1K2MVoRe8BCl6CGXHrtS4rzZQA31sziwhR io628VIueKYwZOBjQxVHQeup+LInm6cDV9K8DgCQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= Subject: [PATCH 5.18 775/879] samples/landlock: Add clang-format exceptions Date: Tue, 7 Jun 2022 19:04:53 +0200 Message-Id: <20220607165025.355203392@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mickaël Salaün commit 9805a722db071e1772b80e6e0ff33f35355639ac upstream. In preparation to a following commit, add clang-format on and clang-format off stanzas around constant definitions. This enables to keep aligned values, which is much more readable than packed definitions. Link: https://lore.kernel.org/r/20220506160513.523257-7-mic@digikod.net Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün Signed-off-by: Greg Kroah-Hartman --- samples/landlock/sandboxer.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/samples/landlock/sandboxer.c +++ b/samples/landlock/sandboxer.c @@ -70,11 +70,15 @@ static int parse_path(char *env_path, co return num_paths; } +/* clang-format off */ + #define ACCESS_FILE ( \ LANDLOCK_ACCESS_FS_EXECUTE | \ LANDLOCK_ACCESS_FS_WRITE_FILE | \ LANDLOCK_ACCESS_FS_READ_FILE) +/* clang-format on */ + static int populate_ruleset( const char *const env_var, const int ruleset_fd, const __u64 allowed_access) @@ -139,6 +143,8 @@ out_free_name: return ret; } +/* clang-format off */ + #define ACCESS_FS_ROUGHLY_READ ( \ LANDLOCK_ACCESS_FS_EXECUTE | \ LANDLOCK_ACCESS_FS_READ_FILE | \ @@ -156,6 +162,8 @@ out_free_name: LANDLOCK_ACCESS_FS_MAKE_BLOCK | \ LANDLOCK_ACCESS_FS_MAKE_SYM) +/* clang-format on */ + int main(const int argc, char *const argv[], char *const *const envp) { const char *cmd_path;