| /linux/tools/testing/selftests/exec/ |
| H A D | binfmt_script.py | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test that truncation of bprm->buf doesn't cause unexpected execs paths, along 33 # test - produce a binfmt_script hashbang line for testing 35 # @size: bytes for bprm->buf line, including hashbang but not newline 54 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg) 57 middle += fill * (NAME_MAX - 1) 59 remaining -= NAME_MAX 64 if len(target): 70 if len(newline) > 0: 73 script = "binfmt_script-%s" % (name) [all …]
|
| /linux/crypto/asymmetric_keys/ |
| H A D | asymmetric_type.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Asymmetric public-key cryptography key type 4 * See Documentation/crypto/asymmetric-keys.rst 9 #include <keys/asymmetric-subtype.h> 10 #include <keys/asymmetric-parser.h> 19 #include <keys/user-type.h> 27 * find_asymmetric_key - Find a key by ID. 34 * @partial: Use partial match for @id_0 and @id_1 if true, exact if false. 53 int len; in find_asymmetric_key() local 56 lookup = id_0->data; in find_asymmetric_key() [all …]
|
| /linux/Documentation/netlink/specs/ |
| H A D | fou.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2 --- 5 protocol: genetlink-legacy 8 Foo-over-UDP. 10 c-family-name: fou-genl-name 11 c-version-name: fou-genl-version 12 max-by-define: true 13 kernel-policy: global 16 - 18 name: encap-type [all …]
|
| /linux/arch/arm64/kernel/ |
| H A D | hw_breakpoint.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, 10 #define pr_fmt(fmt) "hw-breakpoint: " fmt 23 #include <asm/debug-monitors.h> 37 /* Currently stepping a per-CPU kernel breakpoint. */ 151 return -EINVAL; in debug_exception_level() 164 struct task_struct *tsk = bp->hw.target; in is_compat_bp() 167 * tsk can be NULL for per-cpu (non-ptrace) breakpoints. in is_compat_bp() 177 * hw_breakpoint_slot_setup - Find and setup a perf slot according to 187 * -ENOSPC if no slot is available/matches [all …]
|
| /linux/Documentation/netlink/ |
| H A D | genetlink.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml# 5 $schema: https://json-schema.org/draft-07/schema 11 pattern: ^[0-9a-z-]+$ 15 len-or-define: 17 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 19 len-or-limit: 20 # literal int, const name, or limit based on fixed-width type 21 # e.g. u8-min, u16-max, etc. [all …]
|
| H A D | genetlink-c.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-c.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 16 len-or-limit: 17 # literal int, const name, or limit based on fixed-width type 18 # e.g. u8-min, u16-max, etc. 20 pattern: ^[0-9A-Za-z_-]+$ [all …]
|
| H A D | genetlink-legacy.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml# 5 $schema: https://json-schema.org/draft-07/schema 11 pattern: ^[0-9a-z-]+$ 15 len-or-define: 17 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 19 len-or-limit: 20 # literal int, const name, or limit based on fixed-width type 21 # e.g. u8-min, u16-max, etc. [all …]
|
| H A D | netlink-raw.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/netlink-raw.yaml# 5 $schema: https://json-schema.org/draft-07/schema 11 pattern: ^[0-9a-z-]+$ 12 name-cap: 14 pattern: ^[0-9a-zA-Z-]+$ 18 len-or-define: 20 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 22 len-or-limit: [all …]
|
| /linux/crypto/ |
| H A D | api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 45 return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; in crypto_mod_get() 51 struct module *module = alg->cra_module; in crypto_mod_put() 63 int best = -2; in __crypto_alg_lookup() 66 int exact, fuzzy; in __crypto_alg_lookup() local 71 if ((q->cra_flags ^ type) & mask) in __crypto_alg_lookup() 74 exact = !strcmp(q->cra_driver_name, name); in __crypto_alg_lookup() 75 fuzzy = !strcmp(q->cra_name, name); in __crypto_alg_lookup() 76 if (!exact && !(fuzzy && q->cra_priority > best)) in __crypto_alg_lookup() 82 best = q->cra_priority; in __crypto_alg_lookup() [all …]
|
| /linux/arch/x86/lib/ |
| H A D | csum-partial_64.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * arch/x86_64/lib/csum-partial.c 6 * in an architecture-specific manner due to speed. 12 #include <asm/word-at-a-time.h> 42 * it's best to have buff aligned on a 64-bit boundary 44 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument 48 /* Do two 40-byte chunks in parallel to get better ILP */ in csum_partial() 49 if (likely(len >= 80)) { in csum_partial() 55 len -= 80; in csum_partial() 56 } while (len >= 80); in csum_partial() [all …]
|
| /linux/include/linux/ |
| H A D | bch.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 12 * Bose-Chaudhuri-Hocquenghem (BCH) codes. 20 * struct bch_control - BCH control structure 22 * @n: maximum codeword size in bits (= 2^m-1) 24 * @ecc_bits: ecc exact size in bits, i.e. generator polynomial degree (<=m*t) 33 * @cache: log-based polynomial representation buffer 64 unsigned int len, uint8_t *ecc); 66 int bch_decode(struct bch_control *bch, const uint8_t *data, unsigned int len,
|
| /linux/drivers/pci/pcie/ |
| H A D | tlp.c | 1 // SPDX-License-Identifier: GPL-2.0 17 * aer_tlp_log_len - Calculate AER Capability TLP Header/Prefix Log length 30 dev->eetlp_prefix_max : 0); in aer_tlp_log_len() 35 * dpc_tlp_log_len - Calculate DPC RP PIO TLP Header/Prefix Log length 43 if (dev->dpc_rp_log_size >= PCIE_STD_NUM_TLP_HEADERLOG + 1) in dpc_tlp_log_len() 44 return dev->dpc_rp_log_size - 1; in dpc_tlp_log_len() 46 return dev->dpc_rp_log_size; in dpc_tlp_log_len() 51 * pcie_read_tlp_log - read TLP Header Log 69 if (tlp_len > ARRAY_SIZE(log->dw)) in pcie_read_tlp_log() 70 tlp_len = ARRAY_SIZE(log->dw); in pcie_read_tlp_log() [all …]
|
| /linux/arch/s390/include/uapi/asm/ |
| H A D | pkey.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 97 __u32 len; /* bytes actually stored in protkey[] */ member 113 __u16 len; /* total length in bytes (including this header) */ member 116 __u16 bitlen; /* clear key bit len, 0 for unknown */ 244 * All apqns in the list need to be exact apqns, 0xFFFF as ANY card or domain 249 * (return -1 with errno ENODEV). You may use the PKEY_APQNS4KT ioctl to 278 * All apqns in the list need to be exact apqns, 0xFFFF as ANY card or domain 283 * (return -1 with errno ENODEV). You may use the PKEY_APQNS4KT ioctl to 331 * apqn does not match or there is no such apqn found, -1 with errno 349 * All apqns in the list need to be exact apqns, 0xFFFF as ANY card or domain [all …]
|
| /linux/arch/arm/kernel/ |
| H A D | hw_breakpoint.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, 13 #define pr_fmt(fmt) "hw-breakpoint: " fmt 151 /* We don't support the memory-mapped interface. */ in debug_arch_supported() 216 return core_has_mismatch_brps() ? brps - 1 : brps; in get_num_brps() 257 return -ENODEV; in enable_monitor_mode() 265 return -EPERM; in enable_monitor_mode() 293 * Check if 8-bit byte-address select is available. 306 ctrl.len = ARM_BREAKPOINT_LEN_8; in get_max_wp_len() 333 addr = info->address; in arch_install_hw_breakpoint() [all …]
|
| /linux/drivers/media/rc/img-ir/ |
| H A D | img-ir-sony.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2012-2014 Imagination Technologies Ltd. 8 #include "img-ir-hw.h" 11 static int img_ir_sony_scancode(int len, u64 raw, u64 enabled_protocols, in img_ir_sony_scancode() argument 16 switch (len) { in img_ir_sony_scancode() 19 return -EINVAL; in img_ir_sony_scancode() 24 request->protocol = RC_PROTO_SONY12; in img_ir_sony_scancode() 28 return -EINVAL; in img_ir_sony_scancode() 33 request->protocol = RC_PROTO_SONY15; in img_ir_sony_scancode() 37 return -EINVAL; in img_ir_sony_scancode() [all …]
|
| H A D | img-ir-nec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2010-2014 Imagination Technologies Ltd. 8 #include "img-ir-hw.h" 13 static int img_ir_nec_scancode(int len, u64 raw, u64 enabled_protocols, in img_ir_nec_scancode() argument 18 if (!len) in img_ir_nec_scancode() 20 if (len != 32) in img_ir_nec_scancode() 21 return -EINVAL; in img_ir_nec_scancode() 28 /* 32-bit NEC (used by Apple and TiVo remotes) */ in img_ir_nec_scancode() 30 request->scancode = bitrev8(addr) << 24 | in img_ir_nec_scancode() 34 request->protocol = RC_PROTO_NEC32; in img_ir_nec_scancode() [all …]
|
| /linux/arch/loongarch/include/asm/ |
| H A D | hw_breakpoint.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (C) 2022-2023 Loongson Technology Corporation Limited 21 len : 2, member 73 /* Exact number */ 89 return (ctrl.len << 10) | (ctrl.type << 8); in encode_ctrl_reg() 95 ctrl->type = reg & MWPnCFG3_Type_mask; in decode_ctrl_reg() 97 ctrl->len = reg & MWPnCFG3_Size_mask; in decode_ctrl_reg()
|
| /linux/tools/net/ynl/pyynl/ |
| H A D | ynl_gen_c.py | 2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 4 # pylint: disable=line-too-long, missing-class-docstring, missing-function-docstring 5 # pylint: disable=too-many-positional-arguments, too-many-arguments, too-many-statements 6 # pylint: disable=too-many-branches, too-many-locals, too-many-instance-attributes 7 # pylint: disable=too-many-nested-blocks, too-many-lines, too-few-public-methods 8 # pylint: disable=broad-exception-raised, broad-exception-caught, protected-access 26 # pylint: disable=no-name-in-module,wrong-import-position 33 return name.upper().replace('-', '_') 37 return name.lower().replace('-', '_') 42 Turn a string limit like u32-max or s64-min into its numerical value [all …]
|
| /linux/fs/ubifs/ |
| H A D | tnc_misc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2006-2008 Nokia Corporation. 12 * This file contains miscelanious TNC-related functions shared betweend 14 * sub-system. The file was created because there is a lot of TNC code and 21 * ubifs_tnc_levelorder_next - next TNC tree element in levelorder traversal. 22 * @c: UBIFS file-system description object 42 if (znode->level == 0) in ubifs_tnc_levelorder_next() 47 level = znode->level; in ubifs_tnc_levelorder_next() 49 iip = znode->iip; in ubifs_tnc_levelorder_next() 51 ubifs_assert(c, znode->level <= zr->level); in ubifs_tnc_levelorder_next() [all …]
|
| /linux/drivers/macintosh/ |
| H A D | windfarm_mpu.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 22 u8 signature; /* 0x00 - EEPROM sig. */ 23 u8 bytes_used; /* 0x01 - Bytes used in eeprom (160 ?) */ 24 u8 size; /* 0x02 - EEPROM size (256 ?) */ 25 u8 version; /* 0x03 - EEPROM version */ 26 u32 data_revision; /* 0x04 - Dataset revision */ 27 u8 processor_bin_code[3]; /* 0x08 - Processor BIN code */ 28 u8 bin_code_expansion; /* 0x0b - ??? (padding ?) */ 29 u8 processor_num; /* 0x0c - Number of CPUs on this MPU */ 30 u8 input_mul_bus_div; /* 0x0d - Clock input multiplier/bus divider */ [all …]
|
| /linux/drivers/pwm/ |
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2011-2012 Avionic Design GmbH 24 #include <dt-bindings/pwm/pwm.h> 40 if (chip->atomic) in pwmchip_lock() 41 spin_lock(&chip->atomic_lock); in pwmchip_lock() 43 mutex_lock(&chip->nonatomic_lock); in pwmchip_lock() 48 if (chip->atomic) in pwmchip_unlock() 49 spin_unlock(&chip->atomic_lock); in pwmchip_unlock() 51 mutex_unlock(&chip->nonatomic_lock); in pwmchip_unlock() 64 if (wf->period_length_ns > S64_MAX) in DEFINE_GUARD() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4vf/ |
| H A D | t4vf_hw.c | 2 * This file is part of the Chelsio T4 PCI-E SR-IOV Virtual Function Ethernet 5 * Copyright (c) 2009-2010 Chelsio Communications, Inc. All rights reserved. 17 * - Redistributions of source code must retain the above 21 * - Redistributions in binary form must reproduce the above 66 return -EIO; in t4vf_wait_dev_ready() 70 * Get the reply to a mailbox command and store it in @rpl in big-endian order 71 * (since the firmware data structures are specified in a big-endian layout). 76 for ( ; size; size -= 8, mbox_data += 8) in get_mbox_rpl() 81 * t4vf_record_mbox - record a Firmware Mailbox Command/Reply in the log 91 struct mbox_cmd_log *log = adapter->mbox_log; in t4vf_record_mbox() [all …]
|
| /linux/lib/ |
| H A D | bitmap-str.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * bitmap_parse_user - convert an ASCII hex string in a user buffer into a bitmap 43 * bitmap_print_to_pagebuf - convert bitmap to list or hex format ASCII string 49 * Output format is a comma-separated list of decimal numbers and 50 * ranges if list is specified or hex digits grouped into comma-separated 53 * It is assumed that @buf is a pointer into a PAGE_SIZE, page-aligned 61 ptrdiff_t len = PAGE_SIZE - offset_in_page(buf); in bitmap_print_to_pagebuf() local 63 return list ? scnprintf(buf, len, "%*pbl\n", nmaskbits, maskp) : in bitmap_print_to_pagebuf() 64 scnprintf(buf, len, "%*pb\n", nmaskbits, maskp); in bitmap_print_to_pagebuf() 69 * bitmap_print_to_buf - convert bitmap to list or hex format ASCII string [all …]
|
| /linux/rust/kernel/alloc/ |
| H A D | kvec.rs | 1 // SPDX-License-Identifier: GPL-2.0 76 /// For non-zero-sized values, a [`Vec`] will use the given allocator `A` for its allocation. For 79 /// For zero-sized types the [`Vec`]'s pointer must be `dangling_mut::<T>`; no memory is allocated. 86 /// A [`Vec`] can be deconstructed into and (re-)constructed from its previously named raw parts 89 /// [`Vec`]'s backing buffer gets, if required, automatically increased (re-allocated) when elements 94 /// - `self.ptr` is always properly aligned and either points to memory allocated with `A` or, for 95 /// zero-sized types, is a dangling, well aligned pointer. 97 /// - `self.len` always represents the exact number of elements stored in the vector. 99 /// - `self.layout` represents the absolute number of elements that can be stored within the vector 100 /// without re-allocation. For ZSTs `self.layout`'s capacity is zero. However, it is legal for the [all …]
|
| /linux/arch/m68k/fpsp040/ |
| H A D | bindec.S | 12 | value in memory; d0 contains the k-factor sign-extended 13 | to 32-bits. The input may be either normalized, 18 | Saves and Modifies: D2-D7,A2,FP2 23 | The k-factor is saved for use in d7. Clear the 43 | A6. Calculate LEN. 44 | LEN is the number of digits to be displayed. The 45 | k-factor can dictate either the total number of digits, 49 | If LEN is computed to be greater than 17, set OPERR in 50 | USER_FPSR. LEN is stored in d4. 54 | of decimal places needed to insure LEN integer digits [all …]
|