| /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/fs/xfs/ |
| H A D | xfs_extent_busy.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. 34 xfs_extlen_t len, in xfs_extent_busy_insert_list() argument 38 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_insert_list() 46 new->group = xfs_group_hold(xg); in xfs_extent_busy_insert_list() 47 new->bno = bno; in xfs_extent_busy_insert_list() 48 new->length = len; in xfs_extent_busy_insert_list() 49 INIT_LIST_HEAD(&new->list); in xfs_extent_busy_insert_list() 50 new->flags = flags; in xfs_extent_busy_insert_list() 53 trace_xfs_extent_busy(xg, bno, len); in xfs_extent_busy_insert_list() [all …]
|
| /linux/Documentation/netlink/specs/ |
| H A D | ovpn.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 5 # Copyright (c) 2024-2025, OpenVPN Inc. 7 --- 15 - 17 name: nonce-tail-size 19 - 21 name: cipher-alg 22 entries: [none, aes-gcm, chacha20-poly1305] 23 - 25 name: del-peer-reason [all …]
|
| /linux/drivers/net/ethernet/netronome/nfp/flower/ |
| H A D | action.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 /* Copyright (C) 2017-2018 Netronome Systems, Inc. */ 39 push_mpls->head.jump_id = NFP_FL_ACTION_OPCODE_PUSH_MPLS; in nfp_fl_push_mpls() 40 push_mpls->head.len_lw = act_size >> NFP_FL_LW_SIZ; in nfp_fl_push_mpls() 43 if (act->mpls_push.bos != ACT_MPLS_BOS_NOT_SET) { in nfp_fl_push_mpls() 44 mpls_lse |= act->mpls_push.bos << MPLS_LS_S_SHIFT; in nfp_fl_push_mpls() 47 return -EOPNOTSUPP; in nfp_fl_push_mpls() 51 if (act->mpls_push.tc != ACT_MPLS_TC_NOT_SET) in nfp_fl_push_mpls() 52 mpls_lse |= act->mpls_push.tc << MPLS_LS_TC_SHIFT; in nfp_fl_push_mpls() 55 mpls_lse |= act->mpls_push.label << MPLS_LS_LABEL_SHIFT; in nfp_fl_push_mpls() [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 | 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)?$ 27 required: [ name, doc, attribute-sets, operations ] [all …]
|
| /linux/fs/ubifs/ |
| H A D | tnc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2006-2008 Nokia Corporation. 13 * the UBIFS B-tree. 53 p = &c->old_idx.rb_node; in do_insert_old_idx() 57 if (old_idx->lnum < o->lnum) in do_insert_old_idx() 58 p = &(*p)->rb_left; in do_insert_old_idx() 59 else if (old_idx->lnum > o->lnum) in do_insert_old_idx() 60 p = &(*p)->rb_right; in do_insert_old_idx() 61 else if (old_idx->offs < o->offs) in do_insert_old_idx() 62 p = &(*p)->rb_left; in do_insert_old_idx() [all …]
|
| 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/fs/xfs/libxfs/ |
| H A D | xfs_rmap.c | 1 // SPDX-License-Identifier: GPL-2.0 34 * Lookup the first record less than or equal to [bno, len, owner, offset] 50 cur->bc_rec.r.rm_startblock = bno; in xfs_rmap_lookup_le() 51 cur->bc_rec.r.rm_blockcount = 0; in xfs_rmap_lookup_le() 52 cur->bc_rec.r.rm_owner = owner; in xfs_rmap_lookup_le() 53 cur->bc_rec.r.rm_offset = offset; in xfs_rmap_lookup_le() 54 cur->bc_rec.r.rm_flags = flags; in xfs_rmap_lookup_le() 65 return -EFSCORRUPTED; in xfs_rmap_lookup_le() 72 * Lookup the record exactly matching [bno, len, owner, offset] 79 xfs_extlen_t len, in xfs_rmap_lookup_eq() argument [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) 20 return name.upper().replace('-', '_') 24 return name.lower().replace('-', '_') 29 Turn a string limit like u32-max or s64-min into its numerical value 31 if name[0] == 'u' and name.endswith('-min'): 33 width = int(name[1:-4]) 35 width -= 1 36 value = (1 << width) - 1 37 if name[0] == 's' and name.endswith('-min'): 38 value = -value - 1 [all …]
|
| /linux/rust/kernel/alloc/ |
| H A D | kvec.rs | 1 // SPDX-License-Identifier: GPL-2.0 73 /// For non-zero-sized values, a [`Vec`] will use the given allocator `A` for its allocation. For 76 /// For zero-sized types the [`Vec`]'s pointer must be `dangling_mut::<T>`; no memory is allocated. 83 /// A [`Vec`] can be deconstructed into and (re-)constructed from its previously named raw parts 86 /// [`Vec`]'s backing buffer gets, if required, automatically increased (re-allocated) when elements 91 /// - `self.ptr` is always properly aligned and either points to memory allocated with `A` or, for 92 /// zero-sized types, is a dangling, well aligned pointer. 94 /// - `self.len` always represents the exact number of elements stored in the vector. 96 /// - `self.layout` represents the absolute number of elements that can be stored within the vector 97 /// without re-allocation. For ZSTs `self.layout`'s capacity is zero. However, it is legal for the [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/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/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/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 …]
|
| /linux/block/ |
| H A D | badblocks.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * - Heavily based on MD badblocks code from Neil Brown 45 * +--------+ 47 * +--------+ 48 * +-------------+ +-------------+ 50 * +-------------+ +-------------+ 54 * +-------------+ +--------+ +-------------+ 56 * +-------------+ +--------+ +-------------+ 60 * +--------+ 62 * +--------+ [all …]
|