Home
last modified time | relevance | path

Searched +full:clang +full:- +full:format (Results 1 – 25 of 94) sorted by relevance

1234

/linux/Documentation/dev-tools/
H A Dclang-format.rst3 clang-format title
6 ``clang-format`` is a tool to format C/C++/... code according to
10 ``clang-format`` can be used for several purposes:
12 - Quickly reformat a block of code to the kernel style. Specially useful
15 - Spot style mistakes, typos and possible improvements in files
18 - Help you follow the coding style rules, specially useful for those
22 Its configuration file is ``.clang-format`` in the root of the kernel tree.
24 coding style. They also try to follow :ref:`Documentation/process/coding-style.rst <codingstyle>`
28 another ``.clang-format`` file in a subfolder.
31 Linux distributions for a long time. Search for ``clang-format`` in
[all …]
H A Dpropeller.rst1 .. SPDX-License-Identifier: GPL-2.0
7 This enables Propeller build support for the kernel when using Clang
8 compiler. Propeller is a profile-guided optimization (PGO) method used
24 "build-afdo - train-afdo - build-propeller - train-propeller -
25 build-optimized".
27 #. Propeller requires LLVM 19 release or later for Clang/Clang++
37 you would normally do, but with a set of compile-time / link-time
54 binary as you would normally do, but with a compile-time /
55 link-time flag to pick up the Propeller compile time and link time
56 profiles. This build step uses 3 profiles - the AutoFDO profile,
[all …]
H A Dautofdo.rst1 .. SPDX-License-Identifier: GPL-2.0
8 the Clang compiler. AutoFDO (Auto-Feedback-Directed Optimization)
9 is a type of profile-guided optimization (PGO) used to enhance the
16 for workloads affected by front-end stalls.
18 For AutoFDO builds, unlike non-FDO builds, the user must supply a
28 performance-critical codes are architecture-independent, the profile
63 The support requires a Clang compiler LLVM 17 or later.
80 - For enabling a single file (e.g. foo.o) ::
84 - For enabling all files in one directory ::
88 - For disabling one file ::
[all …]
/linux/tools/testing/selftests/landlock/
H A Dscoped_base_variants.h1 /* SPDX-License-Identifier: GPL-2.0 */
7 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
8 * Copyright © 2019-2020 ANSSI
12 /* clang-format on */
23 * P1-. P1 -> P2 : allow
24 * \ P2 -> P1 : allow
27 /* clang-format off */
29 /* clang-format on */ in FIXTURE_VARIANT_ADD()
38 * P1--. P1 -> P2 : allow
39 * \ P2 -> P1 : deny
[all …]
H A Dscoped_multiple_domain_variants.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 /* clang-format on */
26 * .-----------------.
27 * | ####### | P3 -> P2 : allow
28 * | P1----# P2 # | P3 -> P1 : deny
32 * '-----------------'
34 /* clang-format off */
41 /* clang-format on */ in FIXTURE_VARIANT_ADD()
46 * # ####### # P3 -> P2 : allow
47 * # P1----# P2 # # P3 -> P1 : deny
[all …]
H A Dnet_test.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Landlock tests - Network
5 * Copyright © 2022-2023 Huawei Tech. Co., Ltd.
49 srv->protocol = prot; in set_service()
54 srv->port = sock_port_start << (2 * index); in set_service()
59 srv->ipv4_addr.sin_family = prot.domain; in set_service()
60 srv->ipv4_addr.sin_port = htons(srv->port); in set_service()
61 srv->ipv4_addr.sin_addr.s_addr = inet_addr(loopback_ipv4); in set_service()
65 srv->ipv6_addr.sin6_family = prot.domain; in set_service()
66 srv->ipv6_addr.sin6_port = htons(srv->port); in set_service()
[all …]
H A Dscoped_signal_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * Landlock tests - Signal Scoping
25 /* clang-format off */
27 /* clang-format on */
34 /* clang-format off */
36 /* clang-format on */ in FIXTURE_VARIANT_ADD()
40 /* clang-format off */
42 /* clang-format on */ in FIXTURE_VARIANT_ADD()
46 /* clang-format off */
48 /* clang-format on */ in FIXTURE_VARIANT_ADD()
[all …]
H A Dptrace_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * Landlock tests - Ptrace
5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
6 * Copyright © 2019-2020 ANSSI
78 return -1; in get_yama_ptrace_scope()
86 /* clang-format off */
88 /* clang-format on */
109 * P1-. P1 -> P2 : allow
110 * \ P2 -> P1 : allow
113 /* clang-format off */
[all …]
H A Dscoped_abstract_unix_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * Landlock tests - Abstract UNIX socket
58 memset(&self->stream_address, 0, sizeof(self->stream_address)); in FIXTURE_SETUP()
59 memset(&self->dgram_address, 0, sizeof(self->dgram_address)); in FIXTURE_SETUP()
60 set_unix_address(&self->stream_address, 0); in FIXTURE_SETUP()
61 set_unix_address(&self->dgram_address, 1); in FIXTURE_SETUP()
85 can_connect_to_parent = !variant->domain_child; in TEST_F()
88 if (variant->domain_both) { in TEST_F()
103 if (variant->domain_child) in TEST_F()
115 err = connect(stream_client, &self->stream_address.unix_addr, in TEST_F()
[all …]
/linux/scripts/
H A DMakefile.extrawarn1 # SPDX-License-Identifier: GPL-2.0
10 KBUILD_CFLAGS += -Wall
11 KBUILD_CFLAGS += -Wundef
12 KBUILD_CFLAGS += -Werror=implicit-function-declaration
13 KBUILD_CFLAGS += -Werror=implicit-int
14 KBUILD_CFLAGS += -Werror=return-type
15 KBUILD_CFLAGS += -Werror=strict-prototypes
16 KBUILD_CFLAGS += -Wno-format-security
17 KBUILD_CFLAGS += -Wno-trigraphs
18 KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
[all …]
/linux/include/uapi/linux/
H A Dlandlock.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Landlock - User space API
5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
6 * Copyright © 2018-2020 ANSSI
15 * struct landlock_ruleset_attr - Ruleset definition.
58 * - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
61 /* clang-format off */
63 /* clang-format on */
66 * enum landlock_rule_type - Landlock rule type
84 * struct landlock_path_beneath_attr - Path hierarchy definition
[all …]
/linux/include/linux/
H A Dcompiler_attributes.h1 /* SPDX-License-Identifier: GPL-2.0 */
13 * should be defined elsewhere (e.g. compiler_types.h or compiler-*.h).
15 * compiler- and version-agnostic (e.g. avoiding GCC_VERSION checks).
24 …* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alias-function-a…
29 …* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-aligned-function
30 …* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-aligned-type-attribu…
31 …* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-aligned-variable
39 * in compiler-gcc.h, due to misbehaviors.
41 … gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-fun…
42 * clang: https://clang.llvm.org/docs/AttributeReference.html#alloc-size
[all …]
/linux/samples/landlock/
H A Dsandboxer.c1 // SPDX-License-Identifier: BSD-3-Clause
4 * user-defined file system and network access control policies.
6 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
95 return -1; in parse_path()
103 /* clang-format off */
112 /* clang-format on */
121 .parent_fd = -1, in populate_ruleset_fs()
235 if (!(ruleset_attr->scoped & in check_ruleset_scope()
266 ruleset_attr->scoped &= ~LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET; in check_ruleset_scope()
268 ruleset_attr->scoped &= ~LANDLOCK_SCOPE_SIGNAL; in check_ruleset_scope()
[all …]
/linux/security/landlock/
H A Dlimits.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Landlock LSM - Limits for different components
5 * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net>
6 * Copyright © 2018-2020 ANSSI
16 /* clang-format off */
22 #define LANDLOCK_MASK_ACCESS_FS ((LANDLOCK_LAST_ACCESS_FS << 1) - 1)
26 #define LANDLOCK_MASK_ACCESS_NET ((LANDLOCK_LAST_ACCESS_NET << 1) - 1)
30 #define LANDLOCK_MASK_SCOPE ((LANDLOCK_LAST_SCOPE << 1) - 1)
32 /* clang-format on */
H A Daccess.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Landlock LSM - Access types and helpers
5 * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net>
6 * Copyright © 2018-2020 ANSSI
7 * Copyright © 2024-2025 Microsoft Corporation
22 * by a ruleset/layer. This must be ORed with all ruleset->access_masks[]
26 /* clang-format off */
29 /* clang-format on */
/linux/
H A D.clang-format1 # SPDX-License-Identifier: GPL-2.0
3 # clang-format configuration file. Intended for clang-format >= 11.
7 # Documentation/dev-tools/clang-format.rst
8 # https://clang.llvm.org/docs/ClangFormat.html
9 # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
11 ---
12 AccessModifierOffset: -4
68 # git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
69 # | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
70 # | LC_ALL=C sort -u
[all …]
/linux/fs/ntfs3/
H A Ddebug.h1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
10 // clang-format off
19 #define PtrOffset(B, O) ((size_t)((size_t)(O) - (size_t)(B)))
55 // clang-format on
/linux/samples/hid/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0
9 tprogs-y += hid_mouse
10 tprogs-y += hid_surface_dial
21 hid_mouse-objs := hid_mouse.o
22 hid_surface_dial-objs := hid_surface_dial.o
25 always-y := $(tprogs-y)
28 # Strip all except -D__LINUX_ARM_ARCH__ option needed to handle linux
30 ARM_ARCH_SELECTOR := $(filter -D__LINUX_ARM_ARCH__%, $(KBUILD_CFLAGS))
36 TPROGS_CFLAGS += -D__SANE_USERSPACE_TYPES__
38 BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-loongson64
[all …]
/linux/Documentation/bpf/
H A Ds390.rst12 2. One-time setup
19 * Clang with BPF support
27 --variant=minbase \
28 --include=sudo \
30 ./s390-toolchain
31 sudo mount --rbind /dev ./s390-toolchain/dev
32 sudo mount --rbind /proc ./s390-toolchain/proc
33 sudo mount --rbind /sys ./s390-toolchain/sys
34 sudo chroot ./s390-toolchain
38 sudo dpkg --add-architecture s390x
[all …]
/linux/tools/sched_ext/
H A DREADME.md11 Some of the examples are performant, production-ready schedulers. That is, for
29 1. clang >= 16.0.0
31 The schedulers are BPF programs, and therefore must be compiled with clang. gcc
47 non-trivial ones.
79 This is a large, auto-generated header file that contains all of the types
81 [BTF](https://docs.kernel.org/bpf/btf.html) (i.e. with the BTF-related Kconfig
88 $ bpftool btf dump file /path/to/vmlinux format c > vmlinux.h
108 bpf_printk("Task %s enabled in example scheduler", p->comm);
129 4. `/boot/vmlinux-$(uname -r)`
137 ### Aside on CO-RE
[all …]
/linux/drivers/hid/bpf/progs/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0
5 CLANG ?= clang macro
7 LLVM_STRIP ?= llvm-strip
21 INCLUDES := -I$(OUTPUT) -I$(LIBBPF_INCLUDE) -I$(TOOLS_PATH)/include/uapi
22 CFLAGS := -g -Wall
28 /boot/vmlinux-$(shell uname -r)
39 msg = @printf ' %-8s %s%s\n' "$(1)" "$(notdir $(2))" "$(if $(3), $(3))";
40 MAKEFLAGS += --no-print-directory
55 $(Q)rm -rf $(OUTPUT) $(TARGETS)
59 $(Q)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(INCLUDES) \
[all …]
/linux/Documentation/
H A DChanges32 GNU C 5.1 gcc --version
33 Clang/LLVM (optional) 13.0.1 clang --version
34 Rust (optional) 1.78.0 rustc --version
35 bindgen (optional) 0.65.1 bindgen --versio
[all...]
/linux/Documentation/translations/zh_CN/process/
H A D4.Coding.rst1 .. include:: ../disclaimer-zh_CN.rst
26 ----
32 :ref:`Documentation/translations/zh_CN/process/coding-style.rst <cn_codingstyle>`
54 注意您还可以使用 ``clang-format`` 工具来帮助您处理这些规则,快速自动重新格式
57 信息,请参阅文档 :ref:`Documentation/dev-tools/clang-format.rst <clangformat>`
161 ------------
173 请注意,并非所有编译器警告都默认启用。使用“make KCFLAGS=-W”构建内核以
180 - FRAME_WARN 获取大于给定数量的堆栈帧的警告。
183 - DEBUG_OBJECTS 将添加代码以跟踪内核创建的各种对象的生命周期,并在出现问题
187 - DEBUG_SLAB 可以发现各种内存分配和使用错误;它应该用于大多数开发内核。
[all …]
/linux/Documentation/translations/zh_TW/process/
H A D4.Coding.rst1 .. SPDX-License-Identifier: GPL-2.0
3 .. include:: ../disclaimer-zh_TW.rst
29 ----
35 :ref:`Documentation/translations/zh_CN/process/coding-style.rst <tw_codingstyle>`
57 注意您還可以使用 ``clang-format`` 工具來幫助您處理這些規則,快速自動重新格式
60 信息,請參閱文檔 :ref:`Documentation/dev-tools/clang-format.rst <clangformat>`
164 ------------
176 請注意,並非所有編譯器警告都默認啓用。使用“make KCFLAGS=-W”構建內核以
183 - FRAME_WARN 獲取大於給定數量的堆棧幀的警告。
186 - DEBUG_OBJECTS 將添加代碼以跟蹤內核創建的各種對象的生命週期,並在出現問題
[all …]
/linux/drivers/gpu/drm/imagination/
H A Dpvr_free_list.c1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
18 ((ROGUE_BIF_PM_FREELIST_BASE_ADDR_ALIGNSIZE / FREE_LIST_ENTRY_SIZE) - 1)
25 * pvr_get_free_list_min_pages() - Get minimum free list size for this device
58 if (args->grow_threshold > 100 || in free_list_create_kernel_structure()
59 args->initial_num_pages > args->max_num_pages || in free_list_create_kernel_structure()
60 args->grow_num_pages > args->max_num_pages || in free_list_create_kernel_structure()
61 args->max_num_pages == 0 || in free_list_create_kernel_structure()
62 (args->initial_num_pages < args->max_num_pages && !args->grow_num_pages) || in free_list_create_kernel_structure()
63 (args->initial_num_pages == args->max_num_pages && args->grow_num_pages)) in free_list_create_kernel_structure()
64 return -EINVAL; in free_list_create_kernel_structure()
[all …]

1234