diff --git a/lib/docs/main.js b/lib/docs/main.js
index 71a14516cb..a9bf4a745e 100644
--- a/lib/docs/main.js
+++ b/lib/docs/main.js
@@ -50,6 +50,7 @@
const domSectTypes = document.getElementById("sectTypes");
const domSectValues = document.getElementById("sectValues");
const domSourceText = document.getElementById("sourceText");
+ const domSourceLineNumbers = document.getElementById("sourceLineNumbers");
const domStatus = document.getElementById("status");
const domTableFnErrors = document.getElementById("tableFnErrors");
const domTldDocs = document.getElementById("tldDocs");
@@ -238,6 +239,7 @@
href: location.hash,
}]);
+ domSourceLineNumbers.innerHTML = declLineNumbersHtml(decl_index);
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
@@ -389,6 +391,7 @@
if (members.length !== 0 || fields.length !== 0) {
renderNamespace(decl_index, members, fields);
} else {
+ domSourceLineNumbers.innerHTML = declLineNumbersHtml(decl_index);
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
@@ -419,6 +422,7 @@
renderErrorSet(base_decl, errorSetNodeList(decl_index, errorSetNode));
}
+ domSourceLineNumbers.innerHTML = declLineNumbersHtml(decl_index);
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
@@ -433,6 +437,7 @@
domTldDocs.classList.remove("hidden");
}
+ domSourceLineNumbers.innerHTML = declLineNumbersHtml(decl_index);
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
@@ -918,6 +923,10 @@
return unwrapString(wasm_exports.decl_source_html(decl_index));
}
+ function declLineNumbersHtml(decl_index) {
+ return unwrapString(wasm_exports.decl_line_numbers_html(decl_index));
+ }
+
function declDoctestHtml(decl_index) {
return unwrapString(wasm_exports.decl_doctest_html(decl_index));
}
diff --git a/lib/docs/wasm/html_render.zig b/lib/docs/wasm/html_render.zig
index 13d2ec05c5..f88e6eb1dd 100644
--- a/lib/docs/wasm/html_render.zig
+++ b/lib/docs/wasm/html_render.zig
@@ -30,6 +30,19 @@ pub const Annotation = struct {
dom_id: u32,
};
+pub fn fileSourceLineNumbersHtml(
+ file_index: Walk.File.Index,
+ out: *std.ArrayListUnmanaged(u8),
+ root_node: Ast.Node.Index,
+) !void {
+ const ast = file_index.get_ast();
+ const first_token_line = ast.tokenLocation(0, ast.firstToken(root_node)).line;
+ const last_token_line = ast.tokenLocation(0, ast.lastToken(root_node)).line;
+ for (first_token_line..last_token_line + 1) |i| {
+ try out.print(gpa, "
{d}\n", .{i + 1});
+ }
+}
+
pub fn fileSourceHtml(
file_index: Walk.File.Index,
out: *ArrayList(u8),
diff --git a/lib/docs/wasm/main.zig b/lib/docs/wasm/main.zig
index 2a093886f5..bee3e4acbc 100644
--- a/lib/docs/wasm/main.zig
+++ b/lib/docs/wasm/main.zig
@@ -9,6 +9,7 @@ const ArrayList = std.ArrayList;
const Writer = std.Io.Writer;
const fileSourceHtml = @import("html_render.zig").fileSourceHtml;
+const fileSourceLineNumbersHtml = @import("html_render.zig").fileSourceLineNumbersHtml;
const appendEscaped = @import("html_render.zig").appendEscaped;
const resolveDeclLink = @import("html_render.zig").resolveDeclLink;
const missing_feature_url_escape = @import("html_render.zig").missing_feature_url_escape;
@@ -543,6 +544,16 @@ export fn decl_fn_proto_html(decl_index: Decl.Index, linkify_fn_name: bool) Stri
return String.init(string_result.items);
}
+export fn decl_line_numbers_html(decl_index: Decl.Index) String {
+ const decl = decl_index.get();
+
+ string_result.clearRetainingCapacity();
+ fileSourceLineNumbersHtml(decl.file, &string_result, decl.ast_node) catch |err| {
+ std.debug.panic("unable to render source line numbers: {s}", .{@errorName(err)});
+ };
+ return String.init(string_result.items);
+}
+
export fn decl_source_html(decl_index: Decl.Index) String {
const decl = decl_index.get();
diff --git a/lib/fuzzer.zig b/lib/fuzzer.zig
index 1030128d48..c97aeea4e8 100644
--- a/lib/fuzzer.zig
+++ b/lib/fuzzer.zig
@@ -1,21 +1,19 @@
const builtin = @import("builtin");
-const native_endian = builtin.cpu.arch.endian();
const std = @import("std");
const Io = std.Io;
-const fatal = std.process.fatal;
const mem = std.mem;
const math = std.math;
-const Allocator = std.mem.Allocator;
const assert = std.debug.assert;
const panic = std.debug.panic;
const abi = std.Build.abi.fuzz;
+const Uid = abi.Uid;
pub const std_options = std.Options{
.logFn = logOverride,
};
-const io = std.Io.Threaded.global_single_threaded.ioBasic();
+const io = std.Io.Threaded.global_single_threaded.io();
fn logOverride(
comptime level: std.log.Level,
@@ -23,8 +21,7 @@ fn logOverride(
comptime format: []const u8,
args: anytype,
) void {
- const f = log_f orelse
- panic("attempt to use log before initialization, message:\n" ++ format, args);
+ const f = log_f orelse panic("log before initialization, message:\n" ++ format, args);
f.lock(io, .exclusive) catch |e| panic("failed to lock logging file: {t}", .{e});
defer f.unlock(io);
@@ -48,10 +45,9 @@ const gpa = switch (builtin.mode) {
.ReleaseFast, .ReleaseSmall, .ReleaseSafe => std.heap.smp_allocator,
};
-/// Part of `exec`, however seperate to allow it to be set before `exec` is.
+// Seperate from `exec` to allow initialization before `exec` is.
var log_f: ?Io.File = null;
-var exec: Executable = .preinit;
-var inst: Instrumentation = .preinit;
+var exec: Executable = undefined;
var fuzzer: Fuzzer = undefined;
var current_test_name: ?[]const u8 = null;
@@ -60,36 +56,28 @@ fn bitsetUsizes(elems: usize) usize {
}
const Executable = struct {
- /// Tracks the hit count for each pc as updated by the process's instrumentation.
+ /// Tracks the hit count for each pc as updated by the test's instrumentation.
pc_counters: []u8,
cache_f: Io.Dir,
/// Shared copy of all pcs that have been hit stored in a memory-mapped file that can viewed
/// while the fuzzer is running.
- shared_seen_pcs: MemoryMappedList,
+ shared_seen_pcs: []align(std.heap.page_size_min) volatile u8,
/// Hash of pcs used to uniquely identify the shared coverage file
pc_digest: u64,
- /// A minimal state for this struct which instrumentation can function on.
- /// Used before this structure is initialized to avoid illegal behavior
- /// from instrumentation functions being called and using undefined values.
- pub const preinit: Executable = .{
- .pc_counters = undefined, // instrumentation works off the __sancov_cntrs section
- .cache_f = undefined,
- .shared_seen_pcs = undefined,
- .pc_digest = undefined,
- };
-
- fn getCoverageFile(cache_dir: Io.Dir, pcs: []const usize, pc_digest: u64) MemoryMappedList {
- const pc_bitset_usizes = bitsetUsizes(pcs.len);
- const coverage_file_name = std.fmt.hex(pc_digest);
- comptime assert(abi.SeenPcsHeader.trailing[0] == .pc_bits_usize);
- comptime assert(abi.SeenPcsHeader.trailing[1] == .pc_addr);
+ fn getCoverageMap(
+ cache_dir: Io.Dir,
+ pcs: []const usize,
+ pc_digest: u64,
+ ) []align(std.heap.page_size_min) volatile u8 {
+ const file_name = std.fmt.hex(pc_digest);
var v = cache_dir.createDirPathOpen(io, "v", .{}) catch |e|
panic("failed to create directory 'v': {t}", .{e});
defer v.close(io);
- const coverage_file, const populate = if (v.createFile(io, &coverage_file_name, .{
+
+ const coverage_file, const populate = if (v.createFile(io, &file_name, .{
.read = true,
// If we create the file, we want to block other processes while we populate it
.lock = .exclusive,
@@ -97,71 +85,76 @@ const Executable = struct {
})) |f|
.{ f, true }
else |e| switch (e) {
- error.PathAlreadyExists => .{ v.openFile(io, &coverage_file_name, .{
+ error.PathAlreadyExists => .{ v.openFile(io, &file_name, .{
.mode = .read_write,
.lock = .shared,
}) catch |e2| panic(
"failed to open existing coverage file '{s}': {t}",
- .{ &coverage_file_name, e2 },
+ .{ &file_name, e2 },
), false },
- else => panic("failed to create coverage file '{s}': {t}", .{ &coverage_file_name, e }),
+ else => panic("failed to create coverage file '{s}': {t}", .{ &file_name, e }),
};
+ comptime assert(abi.SeenPcsHeader.trailing[0] == .pc_bits_usize);
+ comptime assert(abi.SeenPcsHeader.trailing[1] == .pc_addr);
+ const pc_bitset_usizes = bitsetUsizes(pcs.len);
const coverage_file_len = @sizeOf(abi.SeenPcsHeader) +
pc_bitset_usizes * @sizeOf(usize) +
pcs.len * @sizeOf(usize);
if (populate) {
- defer coverage_file.lock(io, .shared) catch |e| panic(
- "failed to demote lock for coverage file '{s}': {t}",
- .{ &coverage_file_name, e },
+ coverage_file.setLength(io, coverage_file_len) catch |e|
+ panic("failed to resize new coverage file '{s}': {t}", .{ &file_name, e });
+ } else {
+ const size = coverage_file.length(io) catch |e|
+ panic("failed to stat coverage file '{s}': {t}", .{ &file_name, e });
+ if (size != coverage_file_len) panic(
+ "incompatible existing coverage file '{s}' (differing lengths: {} != {})",
+ .{ &file_name, size, coverage_file_len },
);
- var map = MemoryMappedList.create(coverage_file, 0, coverage_file_len) catch |e| panic(
- "failed to init memory map for coverage file '{s}': {t}",
- .{ &coverage_file_name, e },
- );
- map.appendSliceAssumeCapacity(@ptrCast(&abi.SeenPcsHeader{
+ }
+
+ var io_map = coverage_file.createMemoryMap(io, .{ .len = coverage_file_len }) catch |e|
+ panic("failed to memmap coverage file '{s}': {t}", .{ &file_name, e });
+ const map = io_map.memory;
+
+ const header: *abi.SeenPcsHeader = @ptrCast(map[0..@sizeOf(abi.SeenPcsHeader)]);
+ const trailing = map[@sizeOf(abi.SeenPcsHeader)..];
+ const trailing_bitset_end = pc_bitset_usizes * @sizeOf(usize);
+ const trailing_bitset: []usize = @ptrCast(@alignCast(trailing[0..trailing_bitset_end]));
+ const trailing_addresses: []usize = @ptrCast(@alignCast(trailing[trailing_bitset_end..]));
+
+ if (populate) {
+ header.* = .{
.n_runs = 0,
.unique_runs = 0,
.pcs_len = pcs.len,
- }));
- map.appendNTimesAssumeCapacity(0, pc_bitset_usizes * @sizeOf(usize));
- // Relocations have been applied to `pcs` so it contains runtime addresses (with slide
- // applied). We need to translate these to the virtual addresses as on disk.
- for (pcs) |pc| {
- const pc_vaddr = fuzzer_unslide_address(pc);
- map.appendSliceAssumeCapacity(@ptrCast(&pc_vaddr));
+ };
+ @memset(trailing_bitset, 0);
+ for (trailing_addresses, pcs) |*cov_pc, slided_pc| {
+ cov_pc.* = fuzzer_unslide_address(slided_pc);
}
- return map;
- } else {
- const size = coverage_file.length(io) catch |e|
- panic("failed to stat coverage file '{s}': {t}", .{ &coverage_file_name, e });
- if (size != coverage_file_len) panic(
- "incompatible existing coverage file '{s}' (differing lengths: {} != {})",
- .{ &coverage_file_name, size, coverage_file_len },
- );
+ io_map.write(io) catch |e|
+ panic("failed to write memory map of '{s}': {t}", .{ &file_name, e });
- const map = MemoryMappedList.init(
- coverage_file,
- coverage_file_len,
- coverage_file_len,
- ) catch |e| panic(
- "failed to init memory map for coverage file '{s}': {t}",
- .{ &coverage_file_name, e },
+ coverage_file.lock(io, .shared) catch |e| panic(
+ "failed to demote lock for coverage file '{s}': {t}",
+ .{ &file_name, e },
);
-
- const seen_pcs_header: *const abi.SeenPcsHeader = @ptrCast(@volatileCast(map.items));
- if (seen_pcs_header.pcs_len != pcs.len) panic(
+ } else { // Check expected contents
+ if (header.pcs_len != pcs.len) panic(
"incompatible existing coverage file '{s}' (differing pcs length: {} != {})",
- .{ &coverage_file_name, seen_pcs_header.pcs_len, pcs.len },
+ .{ &file_name, header.pcs_len, pcs.len },
);
- if (mem.indexOfDiff(usize, seen_pcs_header.pcAddrs(), pcs)) |i| panic(
- "incompatible existing coverage file '{s}' (differing pc at index {d}: {x} != {x})",
- .{ &coverage_file_name, i, seen_pcs_header.pcAddrs()[i], pcs[i] },
- );
-
- return map;
+ for (0.., header.pcAddrs(), pcs) |i, cov_pc, slided_pc| {
+ const pc = fuzzer_unslide_address(slided_pc);
+ if (cov_pc != pc) panic(
+ "incompatible existing coverage file '{s}' (differing pc at index {d}: {x} != {x})",
+ .{ &file_name, i, cov_pc, pc },
+ );
+ }
}
+ return map;
}
pub fn init(cache_dir_path: []const u8) Executable {
@@ -230,7 +223,7 @@ const Executable = struct {
}
break :digest h.final();
};
- self.shared_seen_pcs = getCoverageFile(cache_dir, pcs, self.pc_digest);
+ self.shared_seen_pcs = getCoverageMap(cache_dir, pcs, self.pc_digest);
return self;
}
@@ -244,14 +237,14 @@ const Executable = struct {
index: usize = 0,
pc_counters: []u8,
- pub fn next(self: *PcBitsetIterator) usize {
- const rest = self.pc_counters[self.index..];
+ pub fn next(i: *PcBitsetIterator) usize {
+ const rest = i.pc_counters[i.index..];
if (rest.len >= @bitSizeOf(usize)) {
- defer self.index += @bitSizeOf(usize);
+ defer i.index += @bitSizeOf(usize);
const V = @Vector(@bitSizeOf(usize), u8);
return @as(usize, @bitCast(@as(V, @splat(0)) != rest[0..@bitSizeOf(usize)].*));
} else if (rest.len != 0) {
- defer self.index += rest.len;
+ defer i.index += rest.len;
var res: usize = 0;
for (0.., rest) |bit_index, byte| {
res |= @shlExact(@as(usize, @intFromBool(byte != 0)), @intCast(bit_index));
@@ -260,155 +253,414 @@ const Executable = struct {
} else unreachable;
}
};
-};
-/// Data gathered from instrumentation functions.
-/// Seperate from Executable since its state is resetable and changes.
-/// Seperate from Fuzzer since it may be needed before fuzzing starts.
-const Instrumentation = struct {
- /// Bitset of seen pcs across all runs excluding fresh pcs.
- /// This is seperate then shared_seen_pcs because multiple fuzzing processes are likely using
- /// it which causes contention and unrelated pcs to our campaign being set.
- seen_pcs: []usize,
-
- /// Stores a fresh input's new pcs
- fresh_pcs: []usize,
-
- /// Pcs which __sanitizer_cov_trace_switch and __sanitizer_cov_trace_const_cmpx
- /// have been called from and have had their already been added to const_x_vals
- const_pcs: std.AutoArrayHashMapUnmanaged(usize, void) = .empty,
- /// Values that have been constant operands in comparisons and switch cases.
- /// There may be duplicates in this array if they came from different addresses, which is
- /// fine as they are likely more important and hence more likely to be selected.
- const_vals2: std.ArrayList(u16) = .empty,
- const_vals4: std.ArrayList(u32) = .empty,
- const_vals8: std.ArrayList(u64) = .empty,
- const_vals16: std.ArrayList(u128) = .empty,
-
- /// A minimal state for this struct which instrumentation can function on.
- /// Used before this structure is initialized to avoid illegal behavior
- /// from instrumentation functions being called and using undefined values.
- pub const preinit: Instrumentation = .{
- .seen_pcs = undefined, // currently only updated by `Fuzzer`
- .fresh_pcs = undefined,
- };
-
- pub fn depreinit(self: *Instrumentation) void {
- self.const_vals2.deinit(gpa);
- self.const_vals4.deinit(gpa);
- self.const_vals8.deinit(gpa);
- self.const_vals16.deinit(gpa);
- self.* = undefined;
- }
-
- pub fn init() Instrumentation {
- const pc_bitset_usizes = bitsetUsizes(exec.pc_counters.len);
- const alloc_usizes = pc_bitset_usizes * 2;
- const buf = gpa.alloc(u8, alloc_usizes * @sizeOf(usize)) catch @panic("OOM");
- var fba_ctx: std.heap.FixedBufferAllocator = .init(buf);
- const fba = fba_ctx.allocator();
-
- var self: Instrumentation = .{
- .seen_pcs = fba.alloc(usize, pc_bitset_usizes) catch unreachable,
- .fresh_pcs = fba.alloc(usize, pc_bitset_usizes) catch unreachable,
- };
- self.reset();
- return self;
- }
-
- pub fn reset(self: *Instrumentation) void {
- @memset(self.seen_pcs, 0);
- @memset(self.fresh_pcs, 0);
- self.const_pcs.clearRetainingCapacity();
- self.const_vals2.clearRetainingCapacity();
- self.const_vals4.clearRetainingCapacity();
- self.const_vals8.clearRetainingCapacity();
- self.const_vals16.clearRetainingCapacity();
- }
-
- /// If false is returned, then the pc is marked as seen
- pub fn constPcSeen(self: *Instrumentation, pc: usize) bool {
- return (self.const_pcs.getOrPut(gpa, pc) catch @panic("OOM")).found_existing;
- }
-
- pub fn isFresh(self: *Instrumentation) bool {
- var hit_pcs = exec.pcBitsetIterator();
- for (self.seen_pcs) |seen_pcs| {
- if (hit_pcs.next() & ~seen_pcs != 0) return true;
- }
-
- return false;
- }
-
- /// Updates `fresh_pcs`
- pub fn setFresh(self: *Instrumentation) void {
- var hit_pcs = exec.pcBitsetIterator();
- for (self.seen_pcs, self.fresh_pcs) |seen_pcs, *fresh_pcs| {
- fresh_pcs.* = hit_pcs.next() & ~seen_pcs;
- }
- }
-
- /// Returns if `exec.pc_counters` is a superset of `fresh_pcs`.
- pub fn atleastFresh(self: *Instrumentation) bool {
- var hit_pcs = exec.pcBitsetIterator();
- for (self.fresh_pcs) |fresh_pcs| {
- if (fresh_pcs & hit_pcs.next() != fresh_pcs) return false;
- }
- return true;
- }
-
- /// Updates based off `fresh_pcs`
- fn updateSeen(self: *Instrumentation) void {
- comptime assert(abi.SeenPcsHeader.trailing[0] == .pc_bits_usize);
- const shared_seen_pcs: [*]volatile usize = @ptrCast(
- exec.shared_seen_pcs.items[@sizeOf(abi.SeenPcsHeader)..].ptr,
+ pub fn seenPcsHeader(e: Executable) *align(std.heap.page_size_min) volatile abi.SeenPcsHeader {
+ return mem.bytesAsValue(
+ abi.SeenPcsHeader,
+ e.shared_seen_pcs[0..@sizeOf(abi.SeenPcsHeader)],
);
-
- for (self.seen_pcs, shared_seen_pcs, self.fresh_pcs) |*seen, *shared_seen, fresh| {
- seen.* |= fresh;
- if (fresh != 0)
- _ = @atomicRmw(usize, shared_seen, .Or, fresh, .monotonic);
- }
}
};
const Fuzzer = struct {
- arena_ctx: std.heap.ArenaAllocator = .init(gpa),
- rng: std.Random.DefaultPrng = .init(0),
+ // The default PRNG is not used here since going through `Random` can be very expensive
+ // since LLVM often fails to devirtualize and inline `fill`. Additionally, optimization
+ // is simpler since integers are not serialized then deserialized in the random stream.
+ //
+ // This acounts for a 30% performance improvement with LLVM 21.
+ xoshiro: std.Random.Xoshiro256,
test_one: abi.TestOne,
- /// The next input that will be given to the testOne function. When the
- /// current process crashes, this memory-mapped file is used to recover the
- /// input.
- input: MemoryMappedList,
- /// Minimized past inputs leading to new pc hits.
- /// These are randomly mutated in round-robin fashion
- /// Element zero is always an empty input. It is gauraunteed no other elements are empty.
- corpus: std.ArrayList([]const u8),
- corpus_pos: usize,
- /// List of past mutations that have led to new inputs. This way, the mutations that are the
- /// most effective are the most likely to be selected again. Starts with one of each mutation.
- mutations: std.ArrayList(Mutation) = .empty,
+ seen_pcs: []usize,
+ bests: struct {
+ len: u32,
+ quality_buf: []Input.Best,
+ input_buf: []Input.Best.Map,
+ },
+ seen_uids: std.ArrayHashMapUnmanaged(Uid, struct {
+ slices: union {
+ ints: std.ArrayList([]u64),
+ bytes: std.ArrayList(Input.Data.Bytes),
+ },
+ }, Uid.hashmap_ctx, false),
+ /// Past inputs leading to new pc or uid hits.
+ /// These are randomly mutated in round-robin fashion.
+ corpus: std.MultiArrayList(Input),
+ corpus_pos: Input.Index,
+
+ bytes_input: std.testing.Smith,
+ input_builder: Input.Builder,
+ /// Number of data calls the current run has made.
+ req_values: u32,
+ /// Number of bytes provided to the current run.
+ req_bytes: u32,
+ /// Index into the uid slices the current run is at.
+ /// `uid_data_i[i]` corresponds to `corpus[corpus_pos].data.uid_slices.values()[i]`.
+ uid_data_i: std.ArrayList(u32),
+ mut_data: struct {
+ /// Untyped indexes of `corpus[corpus_pos].data` that should be mutated.
+ ///
+ /// If an index appears multiple times, the first should be prioritized.
+ i: [4]u32,
+ /// For mutations which are a sequential mutation, the state is stored here.
+ seq: [4]struct {
+ kind: packed struct {
+ class: enum(u1) { replace, insert },
+ copy: bool,
+ /// If set then `.copy = true` and `.class = .replace`
+ ordered_mutate: bool,
+ /// If set then all other bits are undefined
+ none: bool,
+ },
+ len: u32,
+ copy: SeqCopy,
+ },
+ },
+
+ /// As values are provided to the Smith, they are appended to this. If the test
+ /// crashes, this can be recovered and used to obtain the crashing values.
+ mmap_input: MemoryMappedInput,
/// Filesystem directory containing found inputs for future runs
corpus_dir: Io.Dir,
- corpus_dir_idx: usize = 0,
+ /// The values in `corpus` past this point directly correspond to what is found
+ /// in `corpus_dir`.
+ start_corpus_dir: u32,
- pub fn init(test_one: abi.TestOne, unit_test_name: []const u8) Fuzzer {
- var self: Fuzzer = .{
- .test_one = test_one,
- .input = undefined,
- .corpus = .empty,
- .corpus_pos = 0,
- .mutations = .empty,
- .corpus_dir = undefined,
+ const SeqCopy = union {
+ order_i: u32,
+ ints: []u64,
+ bytes: Input.Data.Bytes,
+ };
+
+ const Input = struct {
+ /// Untyped indexes into this are formed as follows: If the index is less than `ints.len`
+ /// it indexes into `ints`, otherwise it indexes into `bytes` subtracted by `ints.len`.
+ /// `math.maxInt(u32)` is reserved and impossible normally.
+ data: Data,
+ /// Corresponds with `data.uid_slices`.
+ /// Values are the indexes of `seen_uids` with the same uid.
+ seen_uid_i: []u32,
+ /// Used to select a random uid to mutate from.
+ ///
+ /// The number of times a uid is present in this array is logarithmic
+ /// to its data length in order to avoid long inputs from only being
+ /// selected while still having some bias towards longer ones.
+ weighted_uid_slice_i: []u32,
+
+ ref: struct {
+ /// Values are indexes of `Fuzzer.bests`.
+ best_i_buf: []u32,
+ best_i_len: u32,
+ },
+
+ pub const Data = struct {
+ uid_slices: Data.UidSlices,
+ ints: []u64,
+ bytes: Bytes,
+ /// Contains untyped indexes in the order they were requested.
+ order: []u32,
+
+ pub const Bytes = struct {
+ entries: []Entry,
+ table: []u8,
+
+ pub const Entry = struct {
+ off: u32,
+ len: u32,
+ };
+
+ pub fn deinit(b: Bytes) void {
+ gpa.free(b.entries);
+ gpa.free(b.table);
+ }
+ };
+
+ pub const UidSlices = std.ArrayHashMapUnmanaged(Uid, struct {
+ base: u32,
+ len: u32,
+ }, Uid.hashmap_ctx, false);
};
- const arena = self.arena_ctx.allocator();
- self.corpus_dir = exec.cache_f.createDirPathOpen(io, unit_test_name, .{}) catch |e|
+ pub fn deinit(i: *Input) void {
+ i.data.uid_slices.deinit(gpa);
+ gpa.free(i.data.ints);
+ i.data.bytes.deinit();
+ gpa.free(i.data.order);
+ gpa.free(i.seen_uid_i);
+ gpa.free(i.weighted_uid_slice_i);
+ gpa.free(i.ref.best_i_buf);
+ i.* = undefined;
+ }
+
+ pub const none: Input = .{
+ .data = .{
+ .uid_slices = .empty,
+ .ints = &.{},
+ .bytes = .{
+ .entries = &.{},
+ .table = undefined,
+ },
+ .order = &.{},
+ },
+ .seen_uid_i = &.{},
+ .weighted_uid_slice_i = &.{},
+
+ // Empty input is not referenced by `Fuzzer`
+ .ref = undefined,
+ };
+
+ pub const Index = enum(u32) {
+ pub const reserved_start: Index = .bytes_dry;
+ /// Only touches `Fuzzer.smith`.
+ bytes_dry = math.maxInt(u32) - 1,
+ /// Only touches `Fuzzer.smith` and `Fuzzer.input_builder`.
+ bytes_fresh = math.maxInt(u32),
+ _,
+ };
+
+ pub const Best = struct {
+ pc: u32,
+ min: Quality,
+ max: Quality,
+
+ /// Order of significance:
+ /// * n_pcs
+ /// * req.values
+ /// * req.bytes
+ pub const Quality = struct {
+ n_pcs: u32,
+ req: packed struct(u64) {
+ bytes: u32,
+ values: u32,
+
+ pub fn int(r: @This()) u64 {
+ return @bitCast(r);
+ }
+ },
+
+ pub fn betterLess(a: Quality, b: Quality) bool {
+ return (a.n_pcs < b.n_pcs) | ((a.n_pcs == b.n_pcs) & (a.req.int() < b.req.int()));
+ }
+
+ pub fn betterMore(a: Quality, b: Quality) bool {
+ return (a.n_pcs > b.n_pcs) | ((a.n_pcs == b.n_pcs) & (a.req.int() < b.req.int()));
+ }
+ };
+
+ pub const Map = struct {
+ min: Input.Index,
+ max: Input.Index,
+ };
+ };
+
+ pub const Builder = struct {
+ uid_slices: std.ArrayHashMapUnmanaged(Uid, union {
+ ints: std.MultiArrayList(struct {
+ value: u64,
+ order_i: u32,
+ }),
+ bytes: std.MultiArrayList(struct {
+ value: Data.Bytes.Entry,
+ order_i: u32,
+ }),
+ }, Uid.hashmap_ctx, false),
+ bytes_table: std.ArrayList(u8),
+ // These will not overflow due to the 32-bit constraint on `MemoryMappedInput`
+ total_ints: u32,
+ total_bytes: u32,
+ weighted_len: u32,
+ /// Used to ensure that the 32-bit constraint in
+ /// `MemoryMappedInput` applies to this run.
+ smithed_len: u32,
+
+ pub const init: Builder = .{
+ .uid_slices = .empty,
+ .bytes_table = .empty,
+ .total_ints = 0,
+ .total_bytes = 0,
+ .weighted_len = 0,
+ .smithed_len = 4,
+ };
+
+ pub fn addInt(b: *Builder, uid: Uid, int: u64) void {
+ const u = &b.uid_slices;
+ const gop = u.getOrPutValue(gpa, uid, .{ .ints = .empty }) catch @panic("OOM");
+ gop.value_ptr.ints.append(gpa, .{
+ .value = int,
+ .order_i = b.total_ints + b.total_bytes,
+ }) catch @panic("OOM");
+ b.total_ints += 1;
+ b.weighted_len += @intFromBool(math.isPowerOfTwo(gop.value_ptr.ints.len));
+ }
+
+ pub fn addBytes(b: *Builder, uid: Uid, bytes: []const u8) void {
+ const u = &b.uid_slices;
+ const gop = u.getOrPutValue(gpa, uid, .{ .bytes = .empty }) catch @panic("OOM");
+ gop.value_ptr.bytes.append(gpa, .{
+ .value = .{
+ .off = @intCast(b.bytes_table.items.len),
+ .len = @intCast(bytes.len),
+ },
+ .order_i = b.total_ints + b.total_bytes,
+ }) catch @panic("OOM");
+ b.bytes_table.appendSlice(gpa, bytes) catch @panic("OOM");
+ b.total_bytes += 1;
+ b.weighted_len += @intFromBool(math.isPowerOfTwo(gop.value_ptr.bytes.len));
+ }
+
+ pub fn checkSmithedLen(b: *Builder, n: usize) void {
+ const n32 = @min(n, math.maxInt(u32)); // second will overflow
+ b.smithed_len, const ov = @addWithOverflow(b.smithed_len, n32);
+ if (ov == 1) @panic("too much smith data requested (non-deterministic)");
+ }
+
+ /// Additionally resets the state of this structure.
+ ///
+ /// The callee must populate
+ /// * `.seen_uid_i`
+ /// * `.ref`
+ pub fn build(b: *Builder) Input {
+ const uid_slices = b.uid_slices.entries.slice();
+ var input: Input = .{
+ .data = .{
+ .uid_slices = Data.UidSlices.init(gpa, uid_slices.items(.key), &.{}) catch
+ @panic("OOM"),
+ .ints = gpa.alloc(u64, b.total_ints) catch @panic("OOM"),
+ .bytes = .{
+ .entries = gpa.alloc(Data.Bytes.Entry, b.total_bytes) catch @panic("OOM"),
+ .table = b.bytes_table.toOwnedSlice(gpa) catch @panic("OOM"),
+ },
+ .order = gpa.alloc(u32, b.total_ints + b.total_bytes) catch @panic("OOM"),
+ },
+ .seen_uid_i = gpa.alloc(u32, uid_slices.len) catch @panic("OOM"),
+ .weighted_uid_slice_i = gpa.alloc(u32, b.weighted_len) catch @panic("OOM"),
+ .ref = undefined,
+ };
+ var ints_pos: u32 = 0;
+ var bytes_pos: u32 = 0;
+ var weighted_pos: u32 = 0;
+
+ assert(mem.eql(Uid, uid_slices.items(.key), input.data.uid_slices.keys()));
+ for (
+ 0..,
+ uid_slices.items(.key),
+ uid_slices.items(.value),
+ input.data.uid_slices.values(),
+ ) |uid_i, uid, *uid_data, *slice| {
+ const weighted_len = 1 + math.log2_int(u32, len: switch (uid.kind) {
+ .int => {
+ const ints = uid_data.ints.slice();
+ @memcpy(input.data.ints[ints_pos..][0..ints.len], ints.items(.value));
+ for (ints.items(.order_i), ints_pos..) |order_i, data_i| {
+ input.data.order[order_i] = @intCast(data_i);
+ }
+ uid_data.ints.deinit(gpa);
+ slice.* = .{ .base = ints_pos, .len = @intCast(ints.len) };
+ ints_pos += @intCast(ints.len);
+ break :len @intCast(ints.len);
+ },
+ .bytes => {
+ const bytes = uid_data.bytes.slice();
+ @memcpy(
+ input.data.bytes.entries[bytes_pos..][0..bytes.len],
+ bytes.items(.value),
+ );
+ for (
+ bytes.items(.order_i),
+ b.total_ints + bytes_pos..,
+ ) |order_i, data_i| {
+ input.data.order[order_i] = @intCast(data_i);
+ }
+ uid_data.bytes.deinit(gpa);
+ slice.* = .{ .base = bytes_pos, .len = @intCast(bytes.len) };
+ bytes_pos += @intCast(bytes.len);
+ break :len @intCast(bytes.len);
+ },
+ });
+ const weighted = input.weighted_uid_slice_i[weighted_pos..][0..weighted_len];
+ @memset(weighted, @intCast(uid_i));
+ weighted_pos += weighted_len;
+ }
+
+ assert(ints_pos == b.total_ints);
+ assert(bytes_pos == b.total_bytes);
+ assert(weighted_pos == b.weighted_len);
+
+ b.uid_slices.clearRetainingCapacity();
+ b.total_ints = 0;
+ b.total_bytes = 0;
+ b.weighted_len = 0;
+ b.smithed_len = 4;
+ return input;
+ }
+ };
+ };
+
+ pub fn init() Fuzzer {
+ if (exec.pc_counters.len > math.maxInt(u32)) @panic("too many pcs");
+ const f: Fuzzer = .{
+ .xoshiro = .init(0),
+ .test_one = undefined,
+
+ .seen_pcs = gpa.alloc(usize, bitsetUsizes(exec.pc_counters.len)) catch @panic("OOM"),
+ .bests = .{
+ .len = 0,
+ .quality_buf = gpa.alloc(Input.Best, exec.pc_counters.len) catch @panic("OOM"),
+ .input_buf = gpa.alloc(Input.Best.Map, exec.pc_counters.len) catch @panic("OOM"),
+ },
+ .seen_uids = .empty,
+
+ .corpus = .empty,
+ .corpus_pos = undefined,
+
+ .bytes_input = undefined,
+ .input_builder = .init,
+ .req_values = undefined,
+ .req_bytes = undefined,
+ .uid_data_i = .empty,
+ .mut_data = undefined,
+
+ .mmap_input = undefined,
+ .corpus_dir = undefined,
+ .start_corpus_dir = undefined,
+ };
+ @memset(f.seen_pcs, 0);
+ return f;
+ }
+
+ /// May only be called after `f.setTest` has been called
+ pub fn reset(f: *Fuzzer) void {
+ f.test_one = undefined;
+
+ @memset(f.seen_pcs, 0);
+ f.bests.len = 0;
+ @memset(f.bests.quality_buf, undefined);
+ @memset(f.bests.input_buf, undefined);
+ for (f.seen_uids.keys(), f.seen_uids.values()) |uid, *u| {
+ switch (uid.kind) {
+ .int => u.slices.ints.deinit(gpa),
+ .bytes => u.slices.bytes.deinit(gpa),
+ }
+ }
+ f.seen_uids.clearRetainingCapacity();
+
+ f.corpus.clearRetainingCapacity();
+ f.corpus_pos = undefined;
+
+ f.uid_data_i.clearRetainingCapacity();
+
+ f.mmap_input.deinit();
+ f.corpus_dir.close(io);
+ f.start_corpus_dir = undefined;
+ }
+
+ pub fn setTest(f: *Fuzzer, test_one: abi.TestOne, unit_test_name: []const u8) void {
+ f.test_one = test_one;
+ f.corpus_dir = exec.cache_f.createDirPathOpen(io, unit_test_name, .{}) catch |e|
panic("failed to open directory '{s}': {t}", .{ unit_test_name, e });
- self.input = in: {
- const f = self.corpus_dir.createFile(io, "in", .{
+ f.mmap_input = map: {
+ const input = f.corpus_dir.createFile(io, "in", .{
.read = true,
.truncate = false,
// In case any other fuzz tests are running under the same test name,
@@ -419,181 +671,979 @@ const Fuzzer = struct {
error.WouldBlock => @panic("input file 'in' is in use by another fuzzing process"),
else => panic("failed to create input file 'in': {t}", .{e}),
};
- const size = f.length(io) catch |e| panic("failed to stat input file 'in': {t}", .{e});
- const map = (if (size < std.heap.page_size_max)
- MemoryMappedList.create(f, 8, std.heap.page_size_max)
- else
- MemoryMappedList.init(f, size, size)) catch |e|
- panic("failed to memory map input file 'in': {t}", .{e});
- // Perform a dry-run of the stored input if there was one in case it might reproduce a
- // crash.
- const old_in_len = mem.littleToNative(usize, mem.bytesAsValue(usize, map.items[0..8]).*);
- if (size >= 8 and old_in_len != 0 and map.items.len - 8 < old_in_len) {
- test_one(.fromSlice(@volatileCast(map.items[8..][0..old_in_len])));
+ var size = input.length(io) catch |e| panic("failed to stat input file 'in': {t}", .{e});
+ if (size < std.heap.page_size_max) {
+ size = std.heap.page_size_max;
+ input.setLength(io, size) catch |e| panic("failed to resize input file 'in': {t}", .{e});
}
- break :in map;
+ break :map MemoryMappedInput.init(input, size) catch |e|
+ panic("failed to memmap input file 'in': {t}", .{e});
};
- inst.reset();
- self.mutations.appendSlice(gpa, std.meta.tags(Mutation)) catch @panic("OOM");
- // Ensure there is never an empty corpus. Additionally, an empty input usually leads to
- // new inputs.
- self.addInput(&.{});
+ // Perform a dry-run of the stored input in case it might reproduce a crash.
+ const len = mem.readInt(u32, f.mmap_input.mmap.memory[0..4], .little);
+ if (len < f.mmap_input.mmap.memory[4..].len) {
+ f.mmap_input.len = len;
+ f.runBytes(f.mmap_input.inputSlice(), .bytes_dry);
+ f.mmap_input.clearRetainingCapacity();
+ }
+ }
+ pub fn loadCorpus(f: *Fuzzer) void {
+ f.corpus_pos = @enumFromInt(f.corpus.len);
+ f.corpus.append(gpa, .none) catch @panic("OOM"); // Also ensures the corpus is not empty
+ f.start_corpus_dir = @intCast(f.corpus.len);
while (true) {
- var name_buf: [@sizeOf(usize) * 2]u8 = undefined;
- const bytes = self.corpus_dir.readFileAlloc(
- io,
- std.fmt.bufPrint(&name_buf, "{x}", .{self.corpus_dir_idx}) catch unreachable,
- arena,
- .unlimited,
- ) catch |e| switch (e) {
+ var name_buf: [8]u8 = undefined;
+ const name = f.corpusFileName(&name_buf, @enumFromInt(f.corpus.len));
+ const bytes = f.corpus_dir.readFileAlloc(io, name, gpa, .unlimited) catch |e| switch (e) {
error.FileNotFound => break,
- else => panic("failed to read corpus file '{x}': {t}", .{ self.corpus_dir_idx, e }),
+ else => panic("failed to read corpus file '{s}': {t}", .{ name, e }),
};
- // No corpus file of length zero will ever be created
- if (bytes.len == 0)
- panic("corrupt corpus file '{x}' (len of zero)", .{self.corpus_dir_idx});
- self.addInput(bytes);
- self.corpus_dir_idx += 1;
+ defer gpa.free(bytes);
+ f.newInput(bytes, false);
+ }
+ f.corpus_pos = @enumFromInt(0);
+ }
+
+ fn corpusFileName(f: *Fuzzer, buf: *[8]u8, i: Input.Index) []u8 {
+ const dir_i = @intFromEnum(i) - f.start_corpus_dir;
+ return std.fmt.bufPrint(buf, "{x}", .{dir_i}) catch unreachable;
+ }
+
+ fn rngInt(f: *Fuzzer, T: type) T {
+ comptime assert(@bitSizeOf(T) <= 64);
+ const Unsigned = @Int(.unsigned, @bitSizeOf(T));
+ return @bitCast(@as(Unsigned, @truncate(f.xoshiro.next())));
+ }
+
+ fn rngLessThan(f: *Fuzzer, T: type, limit: T) T {
+ return std.Random.limitRangeBiased(T, f.rngInt(T), limit);
+ }
+
+ /// Used for generating small values rather than making many calls into the prng.
+ const SmallEntronopy = struct {
+ bits: u64,
+
+ pub fn take(e: *SmallEntronopy, T: type) T {
+ defer e.bits >>= @bitSizeOf(T);
+ return @truncate(e.bits);
+ }
+ };
+
+ fn isFresh(f: *Fuzzer) bool {
+ // Store as a bool instead of returning immediately to aid optimizations
+ // by reducing branching since a fresh input is the unlikely case.
+ var fresh: bool = false;
+
+ var n_pcs: u32 = 0;
+ var hit_pcs = exec.pcBitsetIterator();
+ for (f.seen_pcs) |seen| {
+ const hits = hit_pcs.next();
+ fresh |= hits & ~seen != 0;
+ n_pcs += @popCount(hits);
}
- return self;
+ const quality: Input.Best.Quality = .{
+ .n_pcs = n_pcs,
+ .req = .{
+ .values = f.req_values,
+ .bytes = f.req_bytes,
+ },
+ };
+ for (f.bests.quality_buf[0..f.bests.len]) |best| {
+ if (exec.pc_counters[best.pc] == 0) continue;
+ fresh |= quality.betterLess(best.min) | quality.betterMore(best.max);
+ }
+
+ return fresh;
}
- pub fn deinit(self: *Fuzzer) void {
- self.input.deinit();
- self.corpus.deinit(gpa);
- self.mutations.deinit(gpa);
- self.corpus_dir.close(io);
- self.arena_ctx.deinit();
- self.* = undefined;
+ fn runBytes(f: *Fuzzer, bytes: []const u8, mode: Input.Index) void {
+ assert(mode == .bytes_dry or mode == .bytes_fresh);
+
+ f.bytes_input = .{ .in = bytes };
+ f.corpus_pos = mode;
+ f.run(0); // 0 since `f.uid_data` is unused
}
- pub fn addInput(self: *Fuzzer, bytes: []const u8) void {
- self.corpus.append(gpa, bytes) catch @panic("OOM");
- self.input.clearRetainingCapacity();
- self.input.ensureTotalCapacity(8 + bytes.len) catch |e|
- panic("could not resize shared input file: {t}", .{e});
- self.input.items.len = 8;
- self.input.appendSliceAssumeCapacity(bytes);
- self.run();
- inst.setFresh();
- inst.updateSeen();
- }
+ fn updateSeenPcs(f: *Fuzzer) void {
+ comptime assert(abi.SeenPcsHeader.trailing[0] == .pc_bits_usize);
+ const shared_seen_pcs: [*]volatile usize = @ptrCast(
+ exec.shared_seen_pcs[@sizeOf(abi.SeenPcsHeader)..].ptr,
+ );
- /// Assumes `fresh_pcs` correspond to the input
- fn minimizeInput(self: *Fuzzer) void {
- // The minimization technique is kept relatively simple, we sequentially try to remove each
- // byte and check that the new pcs and memory loads are still hit.
- var i = self.input.items.len;
- while (i != 8) {
- i -= 1;
- const old = self.input.orderedRemove(i);
-
- @memset(exec.pc_counters, 0);
- self.run();
-
- if (!inst.atleastFresh()) {
- self.input.insertAssumeCapacity(i, old);
- } else {
- // This removal may have led to new pcs or memory loads being hit, so we need to
- // update them to avoid duplicates.
- inst.setFresh();
+ var hit_pcs = exec.pcBitsetIterator();
+ for (f.seen_pcs, shared_seen_pcs) |*seen, *shared_seen| {
+ const new = hit_pcs.next() & ~seen.*;
+ if (new != 0) {
+ seen.* |= new;
+ _ = @atomicRmw(usize, shared_seen, .Or, new, .monotonic);
}
}
}
- fn run(self: *Fuzzer) void {
- // `pc_counters` is not cleared since only new hits are relevant.
+ fn removeBest(f: *Fuzzer, i: Input.Index, best_i: u32, modify_fs_corpus: bool) void {
+ const ref = &f.corpus.items(.ref)[@intFromEnum(i)];
+ const list_i = mem.indexOfScalar(u32, ref.best_i_buf[0..ref.best_i_len], best_i).?;
+ ref.best_i_len -= 1;
+ ref.best_i_buf[list_i] = ref.best_i_buf[ref.best_i_len];
- mem.bytesAsValue(usize, self.input.items[0..8]).* =
- mem.nativeToLittle(usize, self.input.items.len - 8);
- self.test_one(.fromSlice(@volatileCast(self.input.items[8..])));
+ if (ref.best_i_len == 0 and @intFromEnum(i) >= f.start_corpus_dir and modify_fs_corpus) {
+ // The input is no longer valuable, so remove it.
+ var removed_input = f.corpus.get(@intFromEnum(i));
+ for (
+ removed_input.data.uid_slices.keys(),
+ removed_input.data.uid_slices.values(),
+ removed_input.seen_uid_i,
+ ) |uid, slice, seen_uid_i| {
+ switch (uid.kind) {
+ .int => {
+ const seen_ints = &f.seen_uids.values()[seen_uid_i].slices.ints;
+ const removed_ints = removed_input.data.ints[slice.base..][0..slice.len];
+ _ = seen_ints.swapRemove(for (0.., seen_ints.items) |idx, ints| {
+ if (removed_ints.ptr == ints.ptr) {
+ assert(removed_ints.len == ints.len);
+ break idx;
+ }
+ } else unreachable);
+ },
+ .bytes => {
+ const seen_bytes = &f.seen_uids.values()[seen_uid_i].slices.bytes;
+ const removed_bytes: Input.Data.Bytes = .{
+ .entries = removed_input.data.bytes.entries[slice.base..][0..slice.len],
+ .table = removed_input.data.bytes.table,
+ };
+ _ = seen_bytes.swapRemove(for (0.., seen_bytes.items) |idx, bytes| {
+ if (removed_bytes.entries.ptr == bytes.entries.ptr) {
+ assert(removed_bytes.entries.len == bytes.entries.len);
+ assert(removed_bytes.table.ptr == bytes.table.ptr);
+ assert(removed_bytes.table.len == bytes.table.len);
+ break idx;
+ }
+ } else unreachable);
+ },
+ }
+ }
+ removed_input.deinit();
+ f.corpus.swapRemove(@intFromEnum(i));
- const header = mem.bytesAsValue(
- abi.SeenPcsHeader,
- exec.shared_seen_pcs.items[0..@sizeOf(abi.SeenPcsHeader)],
- );
- _ = @atomicRmw(usize, &header.n_runs, .Add, 1, .monotonic);
+ var removed_name_buf: [8]u8 = undefined;
+ const removed_name = f.corpusFileName(&removed_name_buf, i);
+
+ if (@intFromEnum(i) == f.corpus.len) {
+ f.corpus_dir.deleteFile(io, removed_name) catch |e| panic(
+ "failed to remove corpus file '{s}': {t}",
+ .{ removed_name, e },
+ );
+ return; // No item moved so no refs to update
+ }
+
+ var swapped_name_buf: [8]u8 = undefined;
+ const swapped_name = f.corpusFileName(&swapped_name_buf, @enumFromInt(f.corpus.len));
+
+ f.corpus_dir.rename(swapped_name, f.corpus_dir, removed_name, io) catch |e| panic(
+ "failed to rename corpus file '{s}' to '{s}': {t}",
+ .{ swapped_name, removed_name, e },
+ );
+
+ // Update refrences. `ref` can be reused since it was a swap remove
+ for (ref.best_i_buf[0..ref.best_i_len]) |update_pc_i| {
+ const best = &f.bests.input_buf[update_pc_i];
+ assert(@intFromEnum(best.min) == f.corpus.len or
+ @intFromEnum(best.max) == f.corpus.len);
+
+ if (@intFromEnum(best.min) == f.corpus.len) best.min = i;
+ if (@intFromEnum(best.max) == f.corpus.len) best.max = i;
+ }
+ }
}
- pub fn cycle(self: *Fuzzer) void {
- const input = self.corpus.items[self.corpus_pos];
- self.corpus_pos += 1;
- if (self.corpus_pos == self.corpus.items.len)
- self.corpus_pos = 0;
+ pub fn newInput(f: *Fuzzer, bytes: []const u8, modify_fs_corpus: bool) void {
+ f.runBytes(bytes, .bytes_fresh);
+ f.req_values = f.input_builder.total_ints + f.input_builder.total_bytes;
+ f.req_bytes = @intCast(f.input_builder.bytes_table.items.len);
+ var input = f.input_builder.build();
- const rng = self.rng.random();
- const m = while (true) {
- const m = self.mutations.items[rng.uintLessThanBiased(usize, self.mutations.items.len)];
- if (!m.mutate(
- rng,
- input,
- &self.input,
- self.corpus.items,
- inst.const_vals2.items,
- inst.const_vals4.items,
- inst.const_vals8.items,
- inst.const_vals16.items,
- )) continue;
- break m;
+ f.uid_data_i.ensureTotalCapacity(gpa, input.data.uid_slices.entries.len) catch @panic("OOM");
+ for (
+ input.seen_uid_i,
+ input.data.uid_slices.keys(),
+ input.data.uid_slices.values(),
+ ) |*i, uid, slice| {
+ const gop = f.seen_uids.getOrPutValue(gpa, uid, switch (uid.kind) {
+ .int => .{ .slices = .{ .ints = .empty } },
+ .bytes => .{ .slices = .{ .bytes = .empty } },
+ }) catch @panic("OOM");
+ switch (uid.kind) {
+ .int => f.seen_uids.values()[gop.index].slices.ints.append(
+ gpa,
+ input.data.ints[slice.base..][0..slice.len],
+ ) catch @panic("OOM"),
+ .bytes => f.seen_uids.values()[gop.index].slices.bytes.append(gpa, .{
+ .entries = input.data.bytes.entries[slice.base..][0..slice.len],
+ .table = input.data.bytes.table,
+ }) catch @panic("OOM"),
+ }
+ i.* = @intCast(gop.index);
+ }
+
+ const quality: Input.Best.Quality = .{
+ .n_pcs = n_pcs: {
+ @setRuntimeSafety(builtin.mode == .Debug); // Necessary for vectorization
+ var n: u32 = 0;
+ for (exec.pc_counters) |c| {
+ n += @intFromBool(c != 0);
+ }
+ break :n_pcs n;
+ },
+ .req = .{
+ .values = f.req_values,
+ .bytes = f.req_bytes,
+ },
};
- self.run();
+ var best_i_list: std.ArrayList(u32) = .empty;
+ for (0.., f.bests.quality_buf[0..f.bests.len]) |best_i, best| {
+ if (exec.pc_counters[best.pc] == 0) continue;
- if (inst.isFresh()) {
+ const better_min = quality.betterLess(best.min);
+ const better_max = quality.betterMore(best.max);
+ if (!better_min and !better_max) {
+ @branchHint(.likely);
+ continue;
+ }
+ best_i_list.append(gpa, @intCast(best_i)) catch @panic("OOM");
+
+ const map = &f.bests.input_buf[best_i];
+ if (map.min != map.max) {
+ if (better_min) {
+ f.removeBest(map.min, @intCast(best_i), modify_fs_corpus);
+ }
+ if (better_max) {
+ f.removeBest(map.max, @intCast(best_i), modify_fs_corpus);
+ }
+ } else {
+ if (better_min and better_max) {
+ f.removeBest(map.min, @intCast(best_i), modify_fs_corpus);
+ }
+ }
+ }
+
+ // Must come after the above since some inputs may be removed
+ const input_i: Input.Index = @enumFromInt(f.corpus.len);
+ if (input_i == Input.Index.reserved_start) {
+ @panic("corpus size limit exceeded");
+ }
+
+ for (best_i_list.items) |i| {
+ const best_qual = &f.bests.quality_buf[i];
+ const best_map = &f.bests.input_buf[i];
+
+ if (quality.betterLess(best_qual.min)) {
+ best_qual.min = quality;
+ best_map.min = input_i;
+ }
+ if (quality.betterMore(best_qual.max)) {
+ best_qual.max = quality;
+ best_map.max = input_i;
+ }
+ }
+
+ for (0.., exec.pc_counters) |i, hits| {
+ if (hits == 0) {
+ @branchHint(.likely);
+ continue;
+ }
+
+ if ((f.seen_pcs[i / @bitSizeOf(usize)] >> @intCast(i % @bitSizeOf(usize))) & 1 == 0) {
+ @branchHint(.unlikely);
+ best_i_list.append(gpa, f.bests.len) catch @panic("OOM");
+ f.bests.quality_buf[f.bests.len] = .{
+ .pc = @intCast(i),
+ .min = quality,
+ .max = quality,
+ };
+ f.bests.input_buf[f.bests.len] = .{ .min = input_i, .max = input_i };
+ f.bests.len += 1;
+ }
+ }
+
+ if (best_i_list.items.len == 0 and
+ modify_fs_corpus // Found by freshness; otherwise, it does not need to be better
+ ) {
+ @branchHint(.cold); // Nondeterministic test
+ std.log.warn("nondeterministic rerun", .{});
+ return;
+ }
+
+ input.ref.best_i_buf = best_i_list.toOwnedSlice(gpa) catch @panic("OOM");
+ input.ref.best_i_len = @intCast(input.ref.best_i_buf.len);
+ f.corpus.append(gpa, input) catch @panic("OOM");
+ f.corpus_pos = input_i;
+
+ // Must come after the above since `seen_pcs` is used
+ f.updateSeenPcs();
+
+ if (!modify_fs_corpus) return;
+
+ // Write new input to cache
+ var name_buf: [8]u8 = undefined;
+ const name = f.corpusFileName(&name_buf, input_i);
+ f.corpus_dir.writeFile(io, .{ .sub_path = name, .data = bytes }) catch |e|
+ panic("failed to write corpus file '{s}': {t}", .{ name, e });
+ }
+
+ fn run(f: *Fuzzer, input_uids: usize) void {
+ @memset(exec.pc_counters, 0);
+ f.uid_data_i.items.len = input_uids;
+ @memset(f.uid_data_i.items, 0);
+ f.req_values = 0;
+ f.req_bytes = 0;
+
+ f.test_one();
+ _ = @atomicRmw(usize, &exec.seenPcsHeader().n_runs, .Add, 1, .monotonic);
+ }
+
+ /// Returns a number of mutations to perform from 1-4
+ /// with smaller values exponentially more likely.
+ pub fn mutCount(rng: u16) u8 {
+ // The below provides the following distribution
+ // @clz(@clz( range mapped percentage ratio
+ // 0 -> 0 -> 4 1 = 93.750% (15 / 16 )
+ // 1 -> 1 - 255 -> 3 2 = 5.859% (15 / 256 )
+ // 2 -> 256 - 4095 -> 2 3 = .391% (<1 / 256 )
+ // 3 -> 4096 - 16383 -> 1 4 = .002% ( 1 / 65536)
+ // 4 -> 16384 - 32767 -> 1
+ // 5 -> 32768 - 65535 -> 1
+ return @as(u8, 4) - @min(@clz(@clz(rng)), 3);
+ }
+
+ pub fn cycle(f: *Fuzzer) void {
+ assert(f.mmap_input.len == 0);
+ const corpus = f.corpus.slice();
+ const corpus_i = @intFromEnum(f.corpus_pos);
+
+ var small_entronopy: SmallEntronopy = .{ .bits = f.rngInt(u64) };
+ var n_mutate = mutCount(small_entronopy.take(u16));
+ const data = &corpus.items(.data)[corpus_i];
+ const weighted_uid_slice_i = corpus.items(.weighted_uid_slice_i)[corpus_i];
+ n_mutate *= @intFromBool(weighted_uid_slice_i.len != 0); // No static mutations on empty
+
+ f.mut_data = .{
+ .i = @splat(math.maxInt(u32)),
+ .seq = @splat(.{
+ .kind = .{
+ .class = undefined,
+ .copy = undefined,
+ .ordered_mutate = undefined,
+ .none = true,
+ },
+ .len = undefined,
+ .copy = undefined,
+ }),
+ };
+
+ const uid_slices = data.uid_slices.entries.slice();
+ for (
+ f.mut_data.i[0..n_mutate],
+ f.mut_data.seq[0..n_mutate],
+ ) |*i, *s| if ((data.order.len < 2) | (small_entronopy.take(u3) != 0)) {
+ // Mutation on uid
+ const uid_slice_wi = f.rngLessThan(u32, @intCast(weighted_uid_slice_i.len));
+ const uid_slice_i = weighted_uid_slice_i[uid_slice_wi];
+
+ const is_bytes = uid_slices.items(.key)[uid_slice_i].kind == .bytes;
+ const data_slice = uid_slices.items(.value)[uid_slice_i];
+ i.* = @as(u32, @intCast(data.ints.len)) * @intFromBool(is_bytes) +
+ data_slice.base + f.rngLessThan(u32, data_slice.len);
+ } else {
+ // Sequence mutation on order
+ const order_len: u32 = @intCast(data.order.len);
+ const order_i = f.rngLessThan(u32, order_len - 1);
+ s.* = .{
+ .kind = .{
+ .class = .replace,
+ .copy = true,
+ .ordered_mutate = true,
+ .none = false,
+ },
+ .len = @min(@clz(f.rngInt(u16)) + 1, order_len - order_i),
+ .copy = .{ .order_i = order_i },
+ };
+ i.* = data.order[order_i];
+ };
+
+ f.run(data.uid_slices.entries.len);
+ if (f.isFresh()) {
@branchHint(.unlikely);
- const header = mem.bytesAsValue(
- abi.SeenPcsHeader,
- exec.shared_seen_pcs.items[0..@sizeOf(abi.SeenPcsHeader)],
- );
- _ = @atomicRmw(usize, &header.unique_runs, .Add, 1, .monotonic);
+ _ = @atomicRmw(usize, &exec.seenPcsHeader().unique_runs, .Add, 1, .monotonic);
+ f.newInput(f.mmap_input.inputSlice(), true);
+ }
+ f.mmap_input.clearRetainingCapacity();
- inst.setFresh();
- self.minimizeInput();
- inst.updateSeen();
+ assert(@intFromEnum(f.corpus_pos) < f.corpus.len);
+ f.corpus_pos = @enumFromInt((@intFromEnum(f.corpus_pos) + 1) % f.corpus.len);
+ }
- // An empty-input has always been tried, so if an empty input is fresh then the
- // test has to be non-deterministic. This has to be checked as duplicate empty
- // entries are not allowed.
- if (self.input.items.len - 8 == 0) {
- std.log.warn("non-deterministic test (empty input produces different hits)", .{});
- _ = @atomicRmw(usize, &header.unique_runs, .Sub, 1, .monotonic);
- return;
+ fn weightsContain(int: u64, weights: []const abi.Weight) bool {
+ var contains: bool = false;
+ for (weights) |w| {
+ contains |= w.min <= int and int <= w.max;
+ }
+ return contains;
+ }
+
+ fn weightsContainBytes(bytes: []const u8, weights: []const abi.Weight) bool {
+ if (weights[0].min == 0 and weights[0].max == 0xff) {
+ // Fast path: all bytes are valid
+ return true;
+ }
+
+ var contains: bool = true;
+ for (bytes) |b| {
+ contains &= weightsContain(b, weights);
+ }
+ return contains;
+ }
+
+ fn sumWeightsInclusive(weights: []const abi.Weight) u64 {
+ var sum: u64 = math.maxInt(u64);
+ for (weights) |w| {
+ sum +%= (w.max - w.min +% 1) *% w.weight;
+ }
+ return sum;
+ }
+
+ fn weightedValue(f: *Fuzzer, weights: []const abi.Weight, incl_sum: u64) u64 {
+ var incl_n: u64 = f.rngInt(u64);
+ const limit = incl_sum +% 1;
+ if (limit != 0) incl_n = std.Random.limitRangeBiased(u64, incl_n, limit);
+
+ for (weights) |w| {
+ // (w.max - w.min + 1) * w.weight - 1
+ const incl_vals = (w.max - w.min) * w.weight + (w.weight - 1);
+ if (incl_n > incl_vals) {
+ incl_n -= incl_vals + 1;
+ } else {
+ const val = w.min + incl_n / w.weight;
+ assert(val <= w.max);
+ return val;
+ }
+ } else unreachable;
+ }
+
+ const Untyped = union {
+ int: u64,
+ bytes: []u8,
+ };
+
+ fn nextUntyped(f: *Fuzzer, uid: Uid, weights: []const abi.Weight) union(enum) {
+ copy: Untyped,
+ mutate: Untyped,
+ fresh: void,
+ } {
+ const corpus = f.corpus.slice();
+ const corpus_i = @intFromEnum(f.corpus_pos);
+ const data = &corpus.items(.data)[corpus_i];
+ var small_entronopy: SmallEntronopy = .{ .bits = f.rngInt(u64) };
+
+ const uid_i = data.uid_slices.getIndex(uid) orelse {
+ @branchHint(.unlikely);
+ return .fresh;
+ };
+ const data_slice = data.uid_slices.values()[uid_i];
+ var slice_i = f.uid_data_i.items[uid_i];
+ var data_i = data_slice.base + slice_i;
+
+ new_data: while (true) {
+ assert(slice_i == f.uid_data_i.items[uid_i] and data_i == data_slice.base + slice_i);
+ if (slice_i == data_slice.len) break :new_data;
+ assert(slice_i < data_slice.len);
+
+ f.uid_data_i.items[uid_i] += 1;
+ const mut_i = std.simd.firstIndexOfValue(
+ @as(@Vector(4, u32), f.mut_data.i),
+ data_i + @as(u32, @intCast(data.ints.len)) * @intFromEnum(uid.kind),
+ ) orelse {
+ @branchHint(.likely);
+ switch (uid.kind) {
+ .int => {
+ const int = data.ints[data_i];
+ if (weightsContain(int, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .int = int } };
+ }
+ },
+ .bytes => {
+ const entry = data.bytes.entries[data_i];
+ const bytes = data.bytes.table[entry.off..][0..entry.len];
+ if (weightsContainBytes(bytes, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .bytes = bytes } };
+ }
+ },
+ }
+ break :new_data;
+ };
+
+ const seq = &f.mut_data.seq[mut_i];
+ new_seq: {
+ if (!seq.kind.none) break :new_seq;
+
+ var opts: packed struct(u6) {
+ // Matches layout as `mut_data.seq.kind`
+ insert: bool,
+ copy: bool,
+
+ seq: u2,
+ delete: bool,
+ splice: bool,
+ } = @bitCast(small_entronopy.take(u6));
+ if (opts.seq != 0) break :new_data;
+
+ const max_consume = data_slice.len - slice_i; // inclusive
+ if (opts.delete) {
+ f.uid_data_i.items[uid_i] += f.rngLessThan(u32, max_consume);
+ slice_i = f.uid_data_i.items[uid_i];
+ data_i = data_slice.base + slice_i;
+ continue;
+ }
+ opts.insert |= max_consume == 0;
+ seq.kind = .{
+ .class = if (opts.insert) .replace else .insert,
+ .copy = opts.copy,
+ .ordered_mutate = false,
+ .none = false,
+ };
+
+ if (!seq.kind.copy) {
+ seq.len = switch (seq.kind.class) {
+ .replace => f.rngLessThan(u32, max_consume) + 1,
+ .insert => @clz(f.rngInt(u16)) + 1,
+ };
+ seq.copy = undefined;
+ } else {
+ const src: SeqCopy, const src_len: u32 = if (!opts.splice) .{
+ switch (uid.kind) {
+ .int => .{ .ints = data.ints[data_slice.base..][0..data_slice.len] },
+ .bytes => .{ .bytes = .{
+ .entries = data.bytes.entries[data_slice.base..][0..data_slice.len],
+ .table = data.bytes.table,
+ } },
+ },
+ data_slice.len,
+ } else src: {
+ const seen_uid_i = corpus.items(.seen_uid_i)[corpus_i][uid_i];
+ const untyped_slices = f.seen_uids.values()[seen_uid_i].slices;
+ switch (uid.kind) {
+ .int => {
+ const slices = untyped_slices.ints.items;
+ const i = f.rngLessThan(u32, @intCast(slices.len));
+ break :src .{
+ .{ .ints = slices[i] },
+ @intCast(slices[i].len),
+ };
+ },
+ .bytes => {
+ const slices = untyped_slices.bytes.items;
+ const i = f.rngLessThan(u32, @intCast(slices.len));
+ break :src .{
+ .{ .bytes = slices[i] },
+ @intCast(slices[i].entries.len),
+ };
+ },
+ }
+ };
+
+ const off = f.rngLessThan(u32, src_len);
+ seq.len = f.rngLessThan(u32, src_len - off) + 1;
+ if (seq.kind.class == .replace) seq.len = @min(seq.len, max_consume);
+ seq.copy = switch (uid.kind) {
+ .int => .{ .ints = src.ints[off..][0..seq.len] },
+ .bytes => .{ .bytes = .{
+ .entries = src.bytes.entries[off..][0..seq.len],
+ .table = src.bytes.table,
+ } },
+ };
+ }
}
- const arena = self.arena_ctx.allocator();
- const bytes = arena.dupe(u8, @volatileCast(self.input.items[8..])) catch @panic("OOM");
+ assert(!seq.kind.none);
+ f.uid_data_i.items[uid_i] -= @intFromBool(seq.kind.class == .insert);
+ seq.len -= 1;
+ seq.kind.none |= seq.len == 0;
+ f.mut_data.i[mut_i] += @intFromBool(seq.kind.class == .replace and seq.len != 0);
- self.corpus.append(gpa, bytes) catch @panic("OOM");
- self.mutations.appendNTimes(gpa, m, 6) catch @panic("OOM");
-
- // Write new corpus to cache
- var name_buf: [@sizeOf(usize) * 2]u8 = undefined;
- self.corpus_dir.writeFile(io, .{
- .sub_path = std.fmt.bufPrint(&name_buf, "{x}", .{self.corpus_dir_idx}) catch unreachable,
- .data = bytes,
- }) catch |e| panic("failed to write corpus file '{x}': {t}", .{ self.corpus_dir_idx, e });
- self.corpus_dir_idx += 1;
+ if (!seq.kind.copy) {
+ assert(!seq.kind.ordered_mutate);
+ break :new_data;
+ }
+ if (seq.kind.ordered_mutate) {
+ assert(seq.kind.class == .replace);
+ seq.copy.order_i += @intFromBool(seq.len != 0);
+ f.mut_data.i[mut_i] = data.order[seq.copy.order_i];
+ break :new_data;
+ }
+ switch (uid.kind) {
+ .int => {
+ const int = seq.copy.ints[0];
+ seq.copy.ints = seq.copy.ints[1..];
+ if (weightsContain(int, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .int = int } };
+ }
+ },
+ .bytes => {
+ const entry = seq.copy.bytes.entries[0];
+ const bytes = seq.copy.bytes.table[entry.off..][0..entry.len];
+ seq.copy.bytes.entries = seq.copy.bytes.entries[1..];
+ if (weightsContainBytes(bytes, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .bytes = bytes } };
+ }
+ },
+ }
+ break;
}
+
+ const opts: packed struct(u10) {
+ copy: u2,
+ fresh: u2,
+ splice: bool,
+ local_far: bool,
+ local_off: i4,
+ } = @bitCast(small_entronopy.take(u10));
+
+ if (opts.copy != 0) {
+ if (opts.fresh == 0 or slice_i == data_slice.len) return .fresh;
+ return .{ .mutate = switch (uid.kind) {
+ .int => .{ .int = data.ints[data_i] },
+ .bytes => .{ .bytes = b: {
+ const entry = data.bytes.entries[data_i];
+ break :b data.bytes.table[entry.off..][0..entry.len];
+ } },
+ } };
+ }
+
+ if (!opts.splice) {
+ const src_data_i = data_slice.base + if (!opts.local_far) i: {
+ const off = opts.local_off;
+ break :i if (off >= 0) @min(
+ f.uid_data_i.items[uid_i] +| @as(u4, @intCast(off)),
+ data_slice.len - 1,
+ ) else f.uid_data_i.items[uid_i] -| @abs(off);
+ } else f.rngLessThan(u32, data_slice.len);
+ switch (uid.kind) {
+ .int => {
+ const int = data.ints[src_data_i];
+ if (weightsContain(int, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .int = int } };
+ }
+ },
+ .bytes => {
+ const entry = data.bytes.entries[src_data_i];
+ const bytes = data.bytes.table[entry.off..][0..entry.len];
+ if (weightsContainBytes(bytes, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .bytes = bytes } };
+ }
+ },
+ }
+ } else {
+ const seen_uid_i = corpus.items(.seen_uid_i)[corpus_i][uid_i];
+ const untyped_slices = f.seen_uids.values()[seen_uid_i].slices;
+ switch (uid.kind) {
+ .int => {
+ const slices = untyped_slices.ints.items;
+ const from = slices[f.rngLessThan(u32, @intCast(slices.len))];
+ const int = from[f.rngLessThan(u32, @intCast(from.len))];
+ if (weightsContain(int, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .int = int } };
+ }
+ },
+ .bytes => {
+ const slices = untyped_slices.bytes.items;
+ const from = slices[f.rngLessThan(u32, @intCast(slices.len))];
+ const entry_i = f.rngLessThan(u32, @intCast(from.entries.len));
+ const entry = from.entries[entry_i];
+ const bytes = from.table[entry.off..][0..entry.len];
+ if (weightsContainBytes(bytes, weights)) {
+ @branchHint(.likely);
+ return .{ .copy = .{ .bytes = bytes } };
+ }
+ },
+ }
+ }
+ return .fresh;
+ }
+
+ pub fn nextInt(f: *Fuzzer, uid: Uid, weights: []const abi.Weight) u64 {
+ f.req_values += 1;
+ if (@intFromEnum(f.corpus_pos) >= @intFromEnum(Input.Index.reserved_start)) {
+ @branchHint(.unlikely);
+ const int = f.bytes_input.valueWeightedWithHash(u64, weights, undefined);
+ if (f.corpus_pos == .bytes_fresh) {
+ f.input_builder.checkSmithedLen(8);
+ f.input_builder.addInt(uid, int);
+ }
+ return int;
+ }
+ const int = f.nextIntInner(uid, weights);
+ f.mmap_input.appendLittleInt(u64, int);
+ return int;
+ }
+
+ fn nextIntInner(f: *Fuzzer, uid: Uid, weights: []const abi.Weight) u64 {
+ return switch (f.nextUntyped(uid, weights)) {
+ .copy => |u| u.int,
+ .mutate, .fresh => f.weightedValue(weights, sumWeightsInclusive(weights)),
+ };
+ }
+
+ pub fn nextEos(f: *Fuzzer, uid: Uid, weights: []const abi.Weight) bool {
+ f.req_values += 1;
+ if (@intFromEnum(f.corpus_pos) >= @intFromEnum(Input.Index.reserved_start)) {
+ @branchHint(.unlikely);
+ const eos = f.bytes_input.eosWeightedWithHash(weights, undefined);
+ if (f.corpus_pos == .bytes_fresh) {
+ f.input_builder.checkSmithedLen(1);
+ f.input_builder.addInt(uid, @intFromBool(eos));
+ }
+ return eos;
+ }
+ // `nextIntInner` is already gauraunteed to eventually return `1`
+ const eos = @as(u1, @intCast(f.nextIntInner(uid, weights))) != 0;
+ f.mmap_input.appendLittleInt(u8, @intFromBool(eos));
+ return eos;
+ }
+
+ fn mutateBytes(f: *Fuzzer, in: []u8, out: []u8, weights: []const abi.Weight) void {
+ assert(in.len != 0);
+ const weights_incl_sum = sumWeightsInclusive(weights);
+
+ var small_entronopy: SmallEntronopy = .{ .bits = f.rngInt(u64) };
+ var muts = mutCount(small_entronopy.take(u16));
+ var rem_out = out;
+ var rem_copy = in;
+ while (rem_out.len != 0 and muts != 0) {
+ muts -= 1;
+ const opts: packed struct(u4) {
+ kind: enum(u2) {
+ random,
+ stream_copy,
+ stream_discard,
+ absolute_copy,
+ },
+ small: u2,
+
+ pub fn limitSmall(o: @This(), n: usize) u32 {
+ return @min(
+ @as(u32, @intCast(n)),
+ @as(u32, if (o.small != 0) 8 else math.maxInt(u32)),
+ );
+ }
+ } = @bitCast(small_entronopy.take(u4));
+ s: switch (opts.kind) {
+ .random => {
+ const n = f.rngLessThan(u32, opts.limitSmall(rem_out.len)) + 1;
+ for (rem_out[0..n]) |*o| {
+ o.* = @intCast(f.weightedValue(weights, weights_incl_sum));
+ }
+ rem_out = rem_out[n..];
+ },
+ .stream_copy => {
+ if (rem_copy.len == 0) continue :s .random;
+ const n = @min(
+ f.rngLessThan(u32, opts.limitSmall(rem_copy.len)) + 1,
+ rem_out.len,
+ );
+ @memcpy(rem_out[0..n], rem_copy[0..n]);
+ rem_out = rem_out[n..];
+ rem_copy = rem_copy[n..];
+ },
+ .stream_discard => {
+ if (rem_copy.len == 0) continue :s .random;
+ const n = f.rngLessThan(u32, opts.limitSmall(rem_copy.len)) + 1;
+ rem_copy = rem_copy[n..];
+ },
+ .absolute_copy => {
+ const in_len: u32 = @intCast(in.len);
+ const off = f.rngLessThan(u32, in_len);
+ const len = @min(
+ f.rngLessThan(u32, in_len - off) + 1,
+ opts.limitSmall(rem_out.len),
+ );
+ @memcpy(rem_out[0..len], in[off..][0..len]);
+ rem_out = rem_out[len..];
+ },
+ }
+ }
+
+ const copy = @min(rem_out.len, rem_copy.len);
+ @memcpy(rem_out[0..copy], rem_copy[0..copy]);
+ for (rem_out[copy..]) |*o| {
+ o.* = @intCast(f.weightedValue(weights, weights_incl_sum));
+ }
+ }
+
+ fn nextBytesInner(f: *Fuzzer, uid: Uid, out: []u8, weights: []const abi.Weight) void {
+ so: switch (f.nextUntyped(uid, weights)) {
+ .copy => |u| {
+ if (u.bytes.len >= out.len) {
+ @branchHint(.likely);
+ @memcpy(out, u.bytes[0..out.len]);
+ return;
+ }
+
+ @memcpy(out[0..u.bytes.len], u.bytes);
+ const weights_incl_sum = sumWeightsInclusive(weights);
+ for (out[u.bytes.len..]) |*o| {
+ o.* = @intCast(f.weightedValue(weights, weights_incl_sum));
+ }
+ },
+ .mutate => |u| {
+ if (u.bytes.len == 0) continue :so .fresh;
+ f.mutateBytes(u.bytes, out, weights);
+ },
+ .fresh => {
+ const weights_incl_sum = sumWeightsInclusive(weights);
+ for (out) |*o| {
+ o.* = @intCast(f.weightedValue(weights, weights_incl_sum));
+ }
+ },
+ }
+ }
+
+ pub fn nextBytes(f: *Fuzzer, uid: Uid, out: []u8, weights: []const abi.Weight) void {
+ f.req_values += 1;
+ f.req_bytes +%= @truncate(out.len); // This function should panic since the 32-bit
+ // data limit is exceeded, so wrapping is fine.
+ if (@intFromEnum(f.corpus_pos) >= @intFromEnum(Input.Index.reserved_start)) {
+ @branchHint(.unlikely);
+ f.bytes_input.bytesWeightedWithHash(out, weights, undefined);
+ if (f.corpus_pos == .bytes_fresh) {
+ f.input_builder.checkSmithedLen(out.len);
+ f.input_builder.addBytes(uid, out);
+ }
+ return;
+ }
+
+ f.nextBytesInner(uid, out, weights);
+ f.mmap_input.appendSlice(out);
+ }
+
+ fn nextSliceInner(
+ f: *Fuzzer,
+ uid: Uid,
+ buf: []u8,
+ len_weights: []const abi.Weight,
+ byte_weights: []const abi.Weight,
+ ) u32 {
+ so: switch (f.nextUntyped(uid, byte_weights)) {
+ .copy => |u| {
+ var len: u32 = @intCast(u.bytes.len);
+ if (!weightsContain(len, len_weights)) {
+ @branchHint(.unlikely);
+ len = @intCast(f.weightedValue(len_weights, sumWeightsInclusive(len_weights)));
+ }
+
+ if (u.bytes.len >= len) {
+ @branchHint(.likely);
+ @memcpy(buf[0..len], u.bytes[0..len]);
+ return len;
+ }
+
+ @memcpy(buf[0..u.bytes.len], u.bytes);
+ const weights_incl_sum = sumWeightsInclusive(byte_weights);
+ for (buf[u.bytes.len..len]) |*o| {
+ o.* = @intCast(f.weightedValue(byte_weights, weights_incl_sum));
+ }
+ return len;
+ },
+ .mutate => |u| {
+ if (u.bytes.len == 0) continue :so .fresh;
+ const len: u32 = len: {
+ const offseted: packed struct {
+ is: u3,
+ sub: bool,
+ by: u3,
+ } = @bitCast(f.rngInt(u7));
+ if (offseted.is != 0) {
+ const len = if (offseted.sub)
+ @as(u32, @intCast(u.bytes.len)) -| offseted.by
+ else
+ @min(u.bytes.len + offseted.by, @as(u32, @intCast(buf.len)));
+ if (weightsContain(len, len_weights)) {
+ break :len len;
+ }
+ }
+ break :len @intCast(f.weightedValue(
+ len_weights,
+ sumWeightsInclusive(len_weights),
+ ));
+ };
+ f.mutateBytes(u.bytes, buf[0..len], byte_weights);
+ return len;
+ },
+ .fresh => {
+ const len: u32 = @intCast(f.weightedValue(
+ len_weights,
+ sumWeightsInclusive(len_weights),
+ ));
+ const weights_incl_sum = sumWeightsInclusive(byte_weights);
+ for (buf[0..len]) |*o| {
+ o.* = @intCast(f.weightedValue(byte_weights, weights_incl_sum));
+ }
+ return len;
+ },
+ }
+ }
+
+ pub fn nextSlice(
+ f: *Fuzzer,
+ uid: Uid,
+ buf: []u8,
+ len_weights: []const abi.Weight,
+ byte_weights: []const abi.Weight,
+ ) u32 {
+ f.req_values += 1;
+ if (@intFromEnum(f.corpus_pos) >= @intFromEnum(Input.Index.reserved_start)) {
+ @branchHint(.unlikely);
+ const n = f.bytes_input.sliceWeightedWithHash(
+ buf,
+ len_weights,
+ byte_weights,
+ undefined,
+ );
+ if (f.corpus_pos == .bytes_fresh) {
+ f.input_builder.checkSmithedLen(@as(usize, 4) + n);
+ f.input_builder.addBytes(uid, buf[0..n]);
+ }
+ return n;
+ }
+
+ const n = f.nextSliceInner(uid, buf, len_weights, byte_weights);
+ f.mmap_input.appendLittleInt(u32, n);
+ f.mmap_input.appendSlice(buf[0..n]);
+ f.req_bytes += n;
+ return n;
}
};
-/// Instrumentation must not be triggered before this function is called
export fn fuzzer_init(cache_dir_path: abi.Slice) void {
- inst.depreinit();
exec = .init(cache_dir_path.toSlice());
- inst = .init();
+ fuzzer = .init();
}
-/// Invalid until `fuzzer_init` is called.
export fn fuzzer_coverage() abi.Coverage {
const coverage_id = exec.pc_digest;
- const header: *const abi.SeenPcsHeader = @ptrCast(@volatileCast(exec.shared_seen_pcs.items.ptr));
+ const header = @volatileCast(exec.seenPcsHeader());
var seen_count: usize = 0;
for (header.seenBits()) |chunk| {
@@ -608,32 +1658,56 @@ export fn fuzzer_coverage() abi.Coverage {
};
}
-/// fuzzer_init must be called beforehand
-export fn fuzzer_init_test(test_one: abi.TestOne, unit_test_name: abi.Slice) void {
+export fn fuzzer_set_test(test_one: abi.TestOne, unit_test_name: abi.Slice) void {
current_test_name = unit_test_name.toSlice();
- fuzzer = .init(test_one, unit_test_name.toSlice());
+ fuzzer.setTest(test_one, unit_test_name.toSlice());
}
-/// fuzzer_init_test must be called beforehand
-/// The callee owns the memory of bytes and must not free it until the fuzzer is finished.
export fn fuzzer_new_input(bytes: abi.Slice) void {
- // An entry of length zero is always added and duplicates of it are not allowed.
- if (bytes.len != 0)
- fuzzer.addInput(bytes.toSlice());
+ if (bytes.len == 0) return; // An entry of length zero is always present
+ fuzzer.newInput(bytes.toSlice(), false);
}
-/// fuzzer_init_test must be called first
export fn fuzzer_main(limit_kind: abi.LimitKind, amount: u64) void {
+ fuzzer.loadCorpus();
switch (limit_kind) {
.forever => while (true) fuzzer.cycle(),
.iterations => for (0..amount) |_| fuzzer.cycle(),
}
+ fuzzer.reset();
+}
+
+export fn fuzzer_int(uid: Uid, weights: abi.Weights) u64 {
+ assert(uid.kind == .int);
+ return fuzzer.nextInt(uid, weights.toSlice());
+}
+
+export fn fuzzer_eos(uid: Uid, weights: abi.Weights) bool {
+ assert(uid.kind == .int);
+ return fuzzer.nextEos(uid, weights.toSlice());
+}
+
+export fn fuzzer_bytes(uid: Uid, out: abi.MutSlice, weights: abi.Weights) void {
+ assert(uid.kind == .bytes);
+ return fuzzer.nextBytes(uid, out.toSlice(), weights.toSlice());
+}
+
+export fn fuzzer_slice(
+ uid: Uid,
+ buf: abi.MutSlice,
+ len_weights: abi.Weights,
+ byte_weights: abi.Weights,
+) u32 {
+ assert(uid.kind == .bytes);
+ return fuzzer.nextSlice(uid, buf.toSlice(), len_weights.toSlice(), byte_weights.toSlice());
}
export fn fuzzer_unslide_address(addr: usize) usize {
const si = std.debug.getSelfDebugInfo() catch @compileError("unsupported");
- const slide = si.getModuleSlide(std.debug.getDebugInfoAllocator(), addr) catch |err| {
- std.debug.panic("failed to find virtual address slide: {t}", .{err});
+ const slide = si.getModuleSlide(io, addr) catch |err| {
+ // The LLVM backend seems to insert placeholder values of `1` in __sancov_pcs1
+ if (addr == 1) return 1;
+ panic("failed to find virtual address slide for address 0x{x}: {t}", .{ addr, err });
};
return addr - slide;
}
@@ -642,74 +1716,6 @@ export fn fuzzer_unslide_address(addr: usize) usize {
/// Currently not used by the fuzzer.
export threadlocal var __sancov_lowest_stack: usize = 0;
-/// Inline since the return address of the callee is required
-inline fn genericConstCmp(T: anytype, val: T, comptime const_vals_field: []const u8) void {
- if (!inst.constPcSeen(@returnAddress())) {
- @branchHint(.unlikely);
- @field(inst, const_vals_field).append(gpa, val) catch @panic("OOM");
- }
-}
-
-export fn __sanitizer_cov_trace_const_cmp1(const_arg: u8, arg: u8) void {
- _ = const_arg;
- _ = arg;
-}
-
-export fn __sanitizer_cov_trace_const_cmp2(const_arg: u16, arg: u16) void {
- _ = arg;
- genericConstCmp(u16, const_arg, "const_vals2");
-}
-
-export fn __sanitizer_cov_trace_const_cmp4(const_arg: u32, arg: u32) void {
- _ = arg;
- genericConstCmp(u32, const_arg, "const_vals4");
-}
-
-export fn __sanitizer_cov_trace_const_cmp8(const_arg: u64, arg: u64) void {
- _ = arg;
- genericConstCmp(u64, const_arg, "const_vals8");
-}
-
-export fn __sanitizer_cov_trace_switch(val: u64, cases: [*]const u64) void {
- _ = val;
- if (!inst.constPcSeen(@returnAddress())) {
- @branchHint(.unlikely);
- const case_bits = cases[1];
- const cases_slice = cases[2..][0..cases[0]];
- switch (case_bits) {
- // 8-bit cases are ignored because they are likely to be randomly generated
- 0...8 => {},
- 9...16 => for (cases_slice) |c|
- inst.const_vals2.append(gpa, @truncate(c)) catch @panic("OOM"),
- 17...32 => for (cases_slice) |c|
- inst.const_vals4.append(gpa, @truncate(c)) catch @panic("OOM"),
- 33...64 => for (cases_slice) |c|
- inst.const_vals8.append(gpa, @truncate(c)) catch @panic("OOM"),
- else => {}, // Should be impossible
- }
- }
-}
-
-export fn __sanitizer_cov_trace_cmp1(arg1: u8, arg2: u8) void {
- _ = arg1;
- _ = arg2;
-}
-
-export fn __sanitizer_cov_trace_cmp2(arg1: u16, arg2: u16) void {
- _ = arg1;
- _ = arg2;
-}
-
-export fn __sanitizer_cov_trace_cmp4(arg1: u32, arg2: u32) void {
- _ = arg1;
- _ = arg2;
-}
-
-export fn __sanitizer_cov_trace_cmp8(arg1: u64, arg2: u64) void {
- _ = arg1;
- _ = arg2;
-}
-
export fn __sanitizer_cov_trace_pc_indir(callee: usize) void {
// Not valuable because we already have pc tracing via 8bit counters.
_ = callee;
@@ -729,723 +1735,117 @@ export fn __sanitizer_cov_pcs_init(start: usize, end: usize) void {
_ = end;
}
-/// Copy all of source into dest at position 0.
-/// If the slices overlap, dest.ptr must be <= src.ptr.
-fn volatileCopyForwards(comptime T: type, dest: []volatile T, source: []const volatile T) void {
- for (dest, source) |*d, s| d.* = s;
-}
-
-/// Copy all of source into dest at position 0.
-/// If the slices overlap, dest.ptr must be >= src.ptr.
-fn volatileCopyBackwards(comptime T: type, dest: []volatile T, source: []const volatile T) void {
- var i = source.len;
- while (i > 0) {
- i -= 1;
- dest[i] = source[i];
- }
-}
-
-const Mutation = enum {
- /// Applies .insert_*_span, .push_*_span
- /// For wtf-8, this limits code units, not code points
- const max_insert_len = 12;
- /// Applies to .insert_large_*_span and .push_large_*_span
- /// 4096 is used as it is a common sector size
- const max_large_insert_len = 4096;
- /// Applies to .delete_span and .pop_span
- const max_delete_len = 16;
- /// Applies to .set_*span, .move_span, .set_existing_span
- const max_set_len = 12;
- const max_replicate_len = 64;
- const AddValue = i6;
- const SmallValue = i10;
-
- delete_byte,
- delete_span,
- /// Removes the last byte from the input
- pop_byte,
- pop_span,
- /// Inserts a group of bytes which is already in the input and removes the original copy.
- move_span,
- /// Replaces a group of bytes in the input with another group of bytes in the input
- set_existing_span,
- insert_existing_span,
- push_existing_span,
- set_rng_byte,
- set_rng_span,
- insert_rng_byte,
- insert_rng_span,
- /// Adds a byte to the end of the input
- push_rng_byte,
- push_rng_span,
- set_zero_byte,
- set_zero_span,
- insert_zero_byte,
- insert_zero_span,
- push_zero_byte,
- push_zero_span,
- /// Inserts a lot of zeros to the end of the input
- /// This is intended to work with fuzz tests that require data in (large) blocks
- push_large_zero_span,
- /// Inserts a group of ascii printable character
- insert_print_span,
- /// Inserts a group of character from a...z, A...Z, 0...9, _, and ' '
- insert_common_span,
- /// Inserts a group of ascii digits possibly preceded by a `-`
- insert_integer,
- /// Code units are evenly distributed between one to four
- insert_wtf8_char,
- insert_wtf8_span,
- /// Inserts a group of bytes from another input
- insert_splice_span,
- // utf16 is not yet included since insertion of random bytes should adaquetly check
- // BMP character, surrogate handling, and occasionally chacters outside of the BMP.
- set_print_span,
- set_common_span,
- set_splice_span,
- /// Similar to set_splice_span, but the bytes are copied to the same index instead of a random
- replicate_splice_span,
- push_print_span,
- push_common_span,
- push_integer,
- push_wtf8_char,
- push_wtf8_span,
- push_splice_span,
- /// Clears a random amount of high bits of a byte
- truncate_8,
- truncate_16le,
- truncate_16be,
- truncate_32le,
- truncate_32be,
- truncate_64le,
- truncate_64be,
- /// Flips a random bit
- xor_1,
- /// Swaps up to three bits of a byte biased to less bits
- xor_few_8,
- /// Swaps up to six bits of a 16-bit value biased to less bits
- xor_few_16,
- /// Swaps up to nine bits of a 32-bit value biased to less bits
- xor_few_32,
- /// Swaps up to twelve bits of 64-bit value biased to less bits
- xor_few_64,
- /// Adds to a byte a value of type AddValue
- add_8,
- add_16le,
- add_16be,
- add_32le,
- add_32be,
- add_64le,
- add_64be,
- /// Sets a 16-bit little-endian value to a value of type SmallValue
- set_small_16le,
- set_small_16be,
- set_small_32le,
- set_small_32be,
- set_small_64le,
- set_small_64be,
- insert_small_16le,
- insert_small_16be,
- insert_small_32le,
- insert_small_32be,
- insert_small_64le,
- insert_small_64be,
- push_small_16le,
- push_small_16be,
- push_small_32le,
- push_small_32be,
- push_small_64le,
- push_small_64be,
- set_const_16,
- set_const_32,
- set_const_64,
- set_const_128,
- insert_const_16,
- insert_const_32,
- insert_const_64,
- insert_const_128,
- push_const_16,
- push_const_32,
- push_const_64,
- push_const_128,
- /// Sets a byte with up to three bits set biased to less bits
- set_few_8,
- /// Sets a 16-bit value with up to six bits set biased to less bits
- set_few_16,
- /// Sets a 32-bit value with up to nine bits set biased to less bits
- set_few_32,
- /// Sets a 64-bit value with up to twelve bits set biased to less bits
- set_few_64,
- insert_few_8,
- insert_few_16,
- insert_few_32,
- insert_few_64,
- push_few_8,
- push_few_16,
- push_few_32,
- push_few_64,
- /// Randomizes a random contigous group of bits in a byte
- packed_set_rng_8,
- packed_set_rng_16le,
- packed_set_rng_16be,
- packed_set_rng_32le,
- packed_set_rng_32be,
- packed_set_rng_64le,
- packed_set_rng_64be,
-
- fn fewValue(rng: std.Random, T: type, comptime bits: u16) T {
- var result: T = 0;
- var remaining_bits = rng.intRangeAtMostBiased(u16, 1, bits);
- while (remaining_bits > 0) {
- result |= @shlExact(@as(T, 1), rng.int(math.Log2Int(T)));
- remaining_bits -= 1;
- }
- return result;
- }
-
- /// Returns if the mutation was applicable to the input
- pub fn mutate(
- mutation: Mutation,
- rng: std.Random,
- in: []const u8,
- out: *MemoryMappedList,
- corpus: []const []const u8,
- const_vals2: []const u16,
- const_vals4: []const u32,
- const_vals8: []const u64,
- const_vals16: []const u128,
- ) bool {
- out.clearRetainingCapacity();
- const new_capacity = 8 + in.len + @max(
- 16, // builtin 128 value
- Mutation.max_insert_len,
- Mutation.max_large_insert_len,
- );
- out.ensureTotalCapacity(new_capacity) catch |e|
- panic("could not resize shared input file: {t}", .{e});
- out.items.len = 8; // Length field
-
- const applied = switch (mutation) {
- inline else => |m| m.comptimeMutate(
- rng,
- in,
- out,
- corpus,
- const_vals2,
- const_vals4,
- const_vals8,
- const_vals16,
- ),
- };
- if (!applied)
- assert(out.items.len == 8)
- else
- assert(out.items.len <= new_capacity);
- return applied;
- }
-
- /// Assumes out has already been cleared
- fn comptimeMutate(
- comptime mutation: Mutation,
- rng: std.Random,
- in: []const u8,
- out: *MemoryMappedList,
- corpus: []const []const u8,
- const_vals2: []const u16,
- const_vals4: []const u32,
- const_vals8: []const u64,
- const_vals16: []const u128,
- ) bool {
- const Class = enum { new, remove, rmw, move_span, replicate_splice_span };
- const class: Class, const class_ctx = switch (mutation) {
- // zig fmt: off
- .move_span => .{ .move_span, null },
- .replicate_splice_span => .{ .replicate_splice_span, null },
-
- .delete_byte => .{ .remove, .{ .delete, 1 } },
- .delete_span => .{ .remove, .{ .delete, max_delete_len } },
-
- .pop_byte => .{ .remove, .{ .pop, 1 } },
- .pop_span => .{ .remove, .{ .pop, max_delete_len } },
-
- .set_rng_byte => .{ .new, .{ .set , 1, .rng , .one } },
- .set_zero_byte => .{ .new, .{ .set , 1, .zero , .one } },
- .set_rng_span => .{ .new, .{ .set , 1, .rng , .many } },
- .set_zero_span => .{ .new, .{ .set , 1, .zero , .many } },
- .set_common_span => .{ .new, .{ .set , 1, .common , .many } },
- .set_print_span => .{ .new, .{ .set , 1, .print , .many } },
- .set_existing_span => .{ .new, .{ .set , 2, .existing, .many } },
- .set_splice_span => .{ .new, .{ .set , 1, .splice , .many } },
- .set_const_16 => .{ .new, .{ .set , 2, .@"const", const_vals2 } },
- .set_const_32 => .{ .new, .{ .set , 4, .@"const", const_vals4 } },
- .set_const_64 => .{ .new, .{ .set , 8, .@"const", const_vals8 } },
- .set_const_128 => .{ .new, .{ .set , 16, .@"const", const_vals16 } },
- .set_small_16le => .{ .new, .{ .set , 2, .small , .{ i16, .little } } },
- .set_small_32le => .{ .new, .{ .set , 4, .small , .{ i32, .little } } },
- .set_small_64le => .{ .new, .{ .set , 8, .small , .{ i64, .little } } },
- .set_small_16be => .{ .new, .{ .set , 2, .small , .{ i16, .big } } },
- .set_small_32be => .{ .new, .{ .set , 4, .small , .{ i32, .big } } },
- .set_small_64be => .{ .new, .{ .set , 8, .small , .{ i64, .big } } },
- .set_few_8 => .{ .new, .{ .set , 1, .few , .{ u8 , 3 } } },
- .set_few_16 => .{ .new, .{ .set , 2, .few , .{ u16, 6 } } },
- .set_few_32 => .{ .new, .{ .set , 4, .few , .{ u32, 9 } } },
- .set_few_64 => .{ .new, .{ .set , 8, .few , .{ u64, 12 } } },
-
- .insert_rng_byte => .{ .new, .{ .insert, 0, .rng , .one } },
- .insert_zero_byte => .{ .new, .{ .insert, 0, .zero , .one } },
- .insert_rng_span => .{ .new, .{ .insert, 0, .rng , .many } },
- .insert_zero_span => .{ .new, .{ .insert, 0, .zero , .many } },
- .insert_print_span => .{ .new, .{ .insert, 0, .print , .many } },
- .insert_common_span => .{ .new, .{ .insert, 0, .common , .many } },
- .insert_integer => .{ .new, .{ .insert, 0, .integer , .many } },
- .insert_wtf8_char => .{ .new, .{ .insert, 0, .wtf8 , .one } },
- .insert_wtf8_span => .{ .new, .{ .insert, 0, .wtf8 , .many } },
- .insert_existing_span => .{ .new, .{ .insert, 1, .existing, .many } },
- .insert_splice_span => .{ .new, .{ .insert, 0, .splice , .many } },
- .insert_const_16 => .{ .new, .{ .insert, 0, .@"const", const_vals2 } },
- .insert_const_32 => .{ .new, .{ .insert, 0, .@"const", const_vals4 } },
- .insert_const_64 => .{ .new, .{ .insert, 0, .@"const", const_vals8 } },
- .insert_const_128 => .{ .new, .{ .insert, 0, .@"const", const_vals16 } },
- .insert_small_16le => .{ .new, .{ .insert, 0, .small , .{ i16, .little } } },
- .insert_small_32le => .{ .new, .{ .insert, 0, .small , .{ i32, .little } } },
- .insert_small_64le => .{ .new, .{ .insert, 0, .small , .{ i64, .little } } },
- .insert_small_16be => .{ .new, .{ .insert, 0, .small , .{ i16, .big } } },
- .insert_small_32be => .{ .new, .{ .insert, 0, .small , .{ i32, .big } } },
- .insert_small_64be => .{ .new, .{ .insert, 0, .small , .{ i64, .big } } },
- .insert_few_8 => .{ .new, .{ .insert, 0, .few , .{ u8 , 3 } } },
- .insert_few_16 => .{ .new, .{ .insert, 0, .few , .{ u16, 6 } } },
- .insert_few_32 => .{ .new, .{ .insert, 0, .few , .{ u32, 9 } } },
- .insert_few_64 => .{ .new, .{ .insert, 0, .few , .{ u64, 12 } } },
-
- .push_rng_byte => .{ .new, .{ .push , 0, .rng , .one } },
- .push_zero_byte => .{ .new, .{ .push , 0, .zero , .one } },
- .push_rng_span => .{ .new, .{ .push , 0, .rng , .many } },
- .push_zero_span => .{ .new, .{ .push , 0, .zero , .many } },
- .push_print_span => .{ .new, .{ .push , 0, .print , .many } },
- .push_common_span => .{ .new, .{ .push , 0, .common , .many } },
- .push_integer => .{ .new, .{ .push , 0, .integer , .many } },
- .push_large_zero_span => .{ .new, .{ .push , 0, .zero , .large } },
- .push_wtf8_char => .{ .new, .{ .push , 0, .wtf8 , .one } },
- .push_wtf8_span => .{ .new, .{ .push , 0, .wtf8 , .many } },
- .push_existing_span => .{ .new, .{ .push , 1, .existing, .many } },
- .push_splice_span => .{ .new, .{ .push , 0, .splice , .many } },
- .push_const_16 => .{ .new, .{ .push , 0, .@"const", const_vals2 } },
- .push_const_32 => .{ .new, .{ .push , 0, .@"const", const_vals4 } },
- .push_const_64 => .{ .new, .{ .push , 0, .@"const", const_vals8 } },
- .push_const_128 => .{ .new, .{ .push , 0, .@"const", const_vals16 } },
- .push_small_16le => .{ .new, .{ .push , 0, .small , .{ i16, .little } } },
- .push_small_32le => .{ .new, .{ .push , 0, .small , .{ i32, .little } } },
- .push_small_64le => .{ .new, .{ .push , 0, .small , .{ i64, .little } } },
- .push_small_16be => .{ .new, .{ .push , 0, .small , .{ i16, .big } } },
- .push_small_32be => .{ .new, .{ .push , 0, .small , .{ i32, .big } } },
- .push_small_64be => .{ .new, .{ .push , 0, .small , .{ i64, .big } } },
- .push_few_8 => .{ .new, .{ .push , 0, .few , .{ u8 , 3 } } },
- .push_few_16 => .{ .new, .{ .push , 0, .few , .{ u16, 6 } } },
- .push_few_32 => .{ .new, .{ .push , 0, .few , .{ u32, 9 } } },
- .push_few_64 => .{ .new, .{ .push , 0, .few , .{ u64, 12 } } },
-
- .xor_1 => .{ .rmw, .{ .xor , u8 , native_endian, 1 } },
- .xor_few_8 => .{ .rmw, .{ .xor , u8 , native_endian, 3 } },
- .xor_few_16 => .{ .rmw, .{ .xor , u16, native_endian, 6 } },
- .xor_few_32 => .{ .rmw, .{ .xor , u32, native_endian, 9 } },
- .xor_few_64 => .{ .rmw, .{ .xor , u64, native_endian, 12 } },
-
- .truncate_8 => .{ .rmw, .{ .truncate , u8 , native_endian, {} } },
- .truncate_16le => .{ .rmw, .{ .truncate , u16, .little , {} } },
- .truncate_32le => .{ .rmw, .{ .truncate , u32, .little , {} } },
- .truncate_64le => .{ .rmw, .{ .truncate , u64, .little , {} } },
- .truncate_16be => .{ .rmw, .{ .truncate , u16, .big , {} } },
- .truncate_32be => .{ .rmw, .{ .truncate , u32, .big , {} } },
- .truncate_64be => .{ .rmw, .{ .truncate , u64, .big , {} } },
-
- .add_8 => .{ .rmw, .{ .add , i8 , native_endian, {} } },
- .add_16le => .{ .rmw, .{ .add , i16, .little , {} } },
- .add_32le => .{ .rmw, .{ .add , i32, .little , {} } },
- .add_64le => .{ .rmw, .{ .add , i64, .little , {} } },
- .add_16be => .{ .rmw, .{ .add , i16, .big , {} } },
- .add_32be => .{ .rmw, .{ .add , i32, .big , {} } },
- .add_64be => .{ .rmw, .{ .add , i64, .big , {} } },
-
- .packed_set_rng_8 => .{ .rmw, .{ .packed_rng, u8 , native_endian, {} } },
- .packed_set_rng_16le => .{ .rmw, .{ .packed_rng, u16, .little , {} } },
- .packed_set_rng_32le => .{ .rmw, .{ .packed_rng, u32, .little , {} } },
- .packed_set_rng_64le => .{ .rmw, .{ .packed_rng, u64, .little , {} } },
- .packed_set_rng_16be => .{ .rmw, .{ .packed_rng, u16, .big , {} } },
- .packed_set_rng_32be => .{ .rmw, .{ .packed_rng, u32, .big , {} } },
- .packed_set_rng_64be => .{ .rmw, .{ .packed_rng, u64, .big , {} } },
- // zig fmt: on
- };
-
- switch (class) {
- .new => {
- const op: enum {
- set,
- insert,
- push,
-
- pub fn maxLen(comptime op: @This(), in_len: usize) usize {
- return switch (op) {
- .set => @min(in_len, max_set_len),
- .insert, .push => max_insert_len,
- };
- }
- }, const min_in_len, const data: enum {
- rng,
- zero,
- common,
- print,
- integer,
- wtf8,
- existing,
- splice,
- @"const",
- small,
- few,
- }, const data_ctx = class_ctx;
- const Size = enum { one, many, large };
- if (in.len < min_in_len) return false;
- if (data == .@"const" and data_ctx.len == 0) return false;
-
- const splice_i = if (data == .splice) blk: {
- // Element zero always holds an empty input, so we do not select it
- if (corpus.len == 1) return false;
- break :blk rng.intRangeLessThanBiased(usize, 1, corpus.len);
- } else undefined;
-
- // Only needs to be followed for set
- const len = switch (data) {
- else => switch (@as(Size, data_ctx)) {
- .one => 1,
- .many => rng.intRangeAtMostBiased(usize, 1, op.maxLen(in.len)),
- .large => rng.intRangeAtMostBiased(usize, 1, max_large_insert_len),
- },
- .wtf8 => undefined, // varies by size of each code unit
- .splice => rng.intRangeAtMostBiased(usize, 1, @min(
- corpus[splice_i].len,
- op.maxLen(in.len),
- )),
- .existing => rng.intRangeAtMostBiased(usize, 1, @min(
- in.len,
- op.maxLen(in.len),
- )),
- .@"const" => @sizeOf(@typeInfo(@TypeOf(data_ctx)).pointer.child),
- .small, .few => @sizeOf(data_ctx[0]),
- };
-
- const i = switch (op) {
- .set => rng.uintAtMostBiased(usize, in.len - len),
- .insert => rng.uintAtMostBiased(usize, in.len),
- .push => in.len,
- };
-
- out.appendSliceAssumeCapacity(in[0..i]);
- switch (data) {
- .rng => {
- var bytes: [@max(max_insert_len, max_set_len)]u8 = undefined;
- rng.bytes(bytes[0..len]);
- out.appendSliceAssumeCapacity(bytes[0..len]);
- },
- .zero => out.appendNTimesAssumeCapacity(0, len),
- .common => for (out.addManyAsSliceAssumeCapacity(len)) |*c| {
- c.* = switch (rng.int(u6)) {
- 0 => ' ',
- 1...10 => |x| '0' + (@as(u8, x) - 1),
- 11...36 => |x| 'A' + (@as(u8, x) - 11),
- 37 => '_',
- 38...63 => |x| 'a' + (@as(u8, x) - 38),
- };
- },
- .print => for (out.addManyAsSliceAssumeCapacity(len)) |*c| {
- c.* = rng.intRangeAtMostBiased(u8, 0x20, 0x7E);
- },
- .integer => {
- const negative = len != 0 and rng.boolean();
- if (negative) {
- out.appendAssumeCapacity('-');
- }
-
- for (out.addManyAsSliceAssumeCapacity(len - @intFromBool(negative))) |*c| {
- c.* = rng.intRangeAtMostBiased(u8, '0', '9');
- }
- },
- .wtf8 => {
- comptime assert(op != .set);
- var codepoints: usize = if (data_ctx == .one)
- 1
- else
- rng.intRangeAtMostBiased(usize, 1, Mutation.max_insert_len / 4);
-
- while (true) {
- const units1 = rng.int(u2);
- const value = switch (units1) {
- 0 => rng.int(u7),
- 1 => rng.intRangeAtMostBiased(u11, 0x000080, 0x0007FF),
- 2 => rng.intRangeAtMostBiased(u16, 0x000800, 0x00FFFF),
- 3 => rng.intRangeAtMostBiased(u21, 0x010000, 0x10FFFF),
- };
- const units = @as(u3, units1) + 1;
-
- var buf: [4]u8 = undefined;
- assert(std.unicode.wtf8Encode(value, &buf) catch unreachable == units);
- out.appendSliceAssumeCapacity(buf[0..units]);
-
- codepoints -= 1;
- if (codepoints == 0) break;
- }
- },
- .existing => {
- const j = rng.uintAtMostBiased(usize, in.len - len);
- out.appendSliceAssumeCapacity(in[j..][0..len]);
- },
- .splice => {
- const j = rng.uintAtMostBiased(usize, corpus[splice_i].len - len);
- out.appendSliceAssumeCapacity(corpus[splice_i][j..][0..len]);
- },
- .@"const" => out.appendSliceAssumeCapacity(@ptrCast(
- &data_ctx[rng.uintLessThanBiased(usize, data_ctx.len)],
- )),
- .small => out.appendSliceAssumeCapacity(@ptrCast(
- &mem.nativeTo(data_ctx[0], rng.int(SmallValue), data_ctx[1]),
- )),
- .few => out.appendSliceAssumeCapacity(@ptrCast(
- &fewValue(rng, data_ctx[0], data_ctx[1]),
- )),
- }
- switch (op) {
- .set => out.appendSliceAssumeCapacity(in[i + len ..]),
- .insert => out.appendSliceAssumeCapacity(in[i..]),
- .push => {},
- }
- },
- .remove => {
- if (in.len == 0) return false;
- const Op = enum { delete, pop };
- const op: Op, const max_len = class_ctx;
- // LessThan is used so we don't delete the entire span (which is unproductive since
- // an empty input has always been tried)
- const len = if (max_len == 1) 1 else rng.uintLessThanBiased(
- usize,
- @min(max_len + 1, in.len),
- );
- switch (op) {
- .delete => {
- const i = rng.uintAtMostBiased(usize, in.len - len);
- out.appendSliceAssumeCapacity(in[0..i]);
- out.appendSliceAssumeCapacity(in[i + len ..]);
- },
- .pop => out.appendSliceAssumeCapacity(in[0 .. in.len - len]),
- }
- },
- .rmw => {
- const Op = enum { xor, truncate, add, packed_rng };
- const op: Op, const T, const endian, const xor_bits = class_ctx;
- if (in.len < @sizeOf(T)) return false;
- const Log2T = math.Log2Int(T);
-
- const idx = rng.uintAtMostBiased(usize, in.len - @sizeOf(T));
- const old = mem.readInt(T, in[idx..][0..@sizeOf(T)], endian);
- const new = switch (op) {
- .xor => old ^ fewValue(rng, T, xor_bits),
- .truncate => old & (@as(T, math.maxInt(T)) >> rng.int(Log2T)),
- .add => old +% addend: {
- const val = rng.int(Mutation.AddValue);
- break :addend if (val == 0) 1 else val;
- },
- .packed_rng => blk: {
- const bits = rng.int(math.Log2Int(T)) +| 1;
- break :blk old ^ (rng.int(T) >> bits << rng.uintAtMostBiased(Log2T, bits));
- },
- };
- out.appendSliceAssumeCapacity(in);
- mem.bytesAsValue(T, out.items[8..][idx..][0..@sizeOf(T)]).* =
- mem.nativeTo(T, new, endian);
- },
- .move_span => {
- if (in.len < 2) return false;
- // One less since moving whole output will never change anything
- const len = rng.intRangeAtMostBiased(usize, 1, @min(
- in.len - 1,
- Mutation.max_set_len,
- ));
-
- const src = rng.uintAtMostBiased(usize, in.len - len);
- // This indexes into the final input
- const dst = blk: {
- const res = rng.uintAtMostBiased(usize, in.len - len - 1);
- break :blk res + @intFromBool(res >= src);
- };
-
- if (src < dst) {
- out.appendSliceAssumeCapacity(in[0..src]);
- out.appendSliceAssumeCapacity(in[src + len .. dst + len]);
- out.appendSliceAssumeCapacity(in[src..][0..len]);
- out.appendSliceAssumeCapacity(in[dst + len ..]);
- } else {
- out.appendSliceAssumeCapacity(in[0..dst]);
- out.appendSliceAssumeCapacity(in[src..][0..len]);
- out.appendSliceAssumeCapacity(in[dst..src]);
- out.appendSliceAssumeCapacity(in[src + len ..]);
- }
- },
- .replicate_splice_span => {
- if (in.len == 0) return false;
- if (corpus.len == 1) return false;
- const from = corpus[rng.intRangeLessThanBiased(usize, 1, corpus.len)];
- const len = rng.uintLessThanBiased(usize, @min(in.len, from.len, max_replicate_len));
- const i = rng.uintAtMostBiased(usize, @min(in.len, from.len) - len);
- out.appendSliceAssumeCapacity(in[0..i]);
- out.appendSliceAssumeCapacity(from[i..][0..len]);
- out.appendSliceAssumeCapacity(in[i + len ..]);
- },
- }
- return true;
- }
-};
-
-/// Like `std.ArrayList(u8)` but backed by memory mapping.
-pub const MemoryMappedList = struct {
- /// Contents of the list.
+/// Reusable and recoverable input.
+///
+/// Has a 32-bit limit on the input length. This has the nice side effect that `u32`
+/// can be used in most placed in `fuzzer` with the last four values reserved.
+const MemoryMappedInput = struct {
+ len: u32,
+ /// Directly accessing `memory` is unsafe, use either `inputSlice` or `writeSlice`.
///
- /// Pointers to elements in this slice are invalidated by various functions
- /// of this ArrayList in accordance with the respective documentation. In
- /// all cases, "invalidated" means that the memory has been passed to this
- /// allocator's resize or free function.
- items: []align(std.heap.page_size_min) volatile u8,
- /// How many bytes this list can hold without allocating additional memory.
- capacity: usize,
- /// The file is kept open so that it can be resized.
- file: Io.File,
+ /// `memory` starts with the length of the input as a little-endian 32-bit integer.
+ mmap: Io.File.MemoryMap,
- pub fn init(file: Io.File, length: usize, capacity: usize) !MemoryMappedList {
- const ptr = try std.posix.mmap(
- null,
- capacity,
- .{ .READ = true, .WRITE = true },
- .{ .TYPE = .SHARED },
- file.handle,
- 0,
- );
+ /// `file` becomes owned by the returned `MemoryMappedInput`
+ pub fn init(file: Io.File, size: usize) !MemoryMappedInput {
+ assert(size >= 4);
return .{
- .file = file,
- .items = ptr[0..length],
- .capacity = capacity,
+ .len = 0,
+ .mmap = try file.createMemoryMap(io, .{ .len = size }),
};
}
- pub fn create(file: Io.File, length: usize, capacity: usize) !MemoryMappedList {
- try file.setLength(io, capacity);
- return init(file, length, capacity);
- }
-
- pub fn deinit(l: *MemoryMappedList) void {
- l.file.close(io);
- std.posix.munmap(@volatileCast(l.items.ptr[0..l.capacity]));
+ pub fn deinit(l: *MemoryMappedInput) void {
+ const f = l.mmap.file;
+ l.mmap.write(io) catch |e| panic("failed to write memory map of 'in': {t}", .{e});
+ l.mmap.destroy(io);
+ f.close(io);
l.* = undefined;
}
/// Modify the array so that it can hold at least `additional_count` **more** items.
+ ///
/// Invalidates element pointers if additional memory is needed.
- pub fn ensureUnusedCapacity(l: *MemoryMappedList, additional_count: usize) !void {
- return l.ensureTotalCapacity(l.items.len + additional_count);
+ pub fn ensureUnusedCapacity(l: *MemoryMappedInput, additional_count: usize) void {
+ return l.ensureTotalCapacity(4 + l.len + additional_count);
}
- /// If the current capacity is less than `new_capacity`, this function will
- /// modify the array so that it can hold at least `new_capacity` items.
+ /// If the current capacity is less than `min_capacity`, this function will
+ /// modify the array so that it can hold at least `min_capacity` items.
+ ///
/// Invalidates element pointers if additional memory is needed.
- pub fn ensureTotalCapacity(l: *MemoryMappedList, new_capacity: usize) !void {
- if (l.capacity >= new_capacity) return;
+ pub fn ensureTotalCapacity(l: *MemoryMappedInput, min_capacity: usize) void {
+ if (l.mmap.memory.len < min_capacity) {
+ @branchHint(.unlikely);
- const better_capacity = growCapacity(l.capacity, new_capacity);
- return l.ensureTotalCapacityPrecise(better_capacity);
+ const max_capacity = 1 << 32; // The size of the length header is not added
+ // in order to keep the capacity page aligned and to allow those values to
+ // reserved for other places.
+ if (min_capacity > max_capacity) @panic("too much smith data requested");
+
+ const new_capacity = @min(growCapacity(min_capacity), max_capacity);
+ l.mmap.file.setLength(io, new_capacity) catch |e|
+ panic("failed to resize 'in': {t}", .{e});
+ l.mmap.setLength(io, new_capacity) catch |se| switch (se) {
+ error.OperationUnsupported => {
+ const f = l.mmap.file;
+ l.mmap.destroy(io);
+ l.mmap = f.createMemoryMap(io, .{ .len = new_capacity }) catch |e|
+ panic("failed to memory map 'in': {t}", .{e});
+ },
+ else => panic("failed to resize memory map of 'in': {t}", .{se}),
+ };
+ }
}
- pub fn ensureTotalCapacityPrecise(l: *MemoryMappedList, new_capacity: usize) !void {
- if (l.capacity >= new_capacity) return;
+ // Only writing has side effects, so volatile is not needed
+ pub fn inputSlice(l: *MemoryMappedInput) []const u8 {
+ return l.mmap.memory[4..][0..l.len];
+ }
- std.posix.munmap(@volatileCast(l.items.ptr[0..l.capacity]));
- try l.file.setLength(io, new_capacity);
- l.* = try init(l.file, l.items.len, new_capacity);
+ // Writing has side effectsd, so volatile is necessary
+ pub fn writeSlice(l: *MemoryMappedInput) []volatile u8 {
+ return l.mmap.memory;
+ }
+
+ fn writeLen(l: *MemoryMappedInput) void {
+ l.writeSlice()[0..4].* = @bitCast(mem.nativeToLittle(u32, l.len));
}
/// Invalidates all element pointers.
- pub fn clearRetainingCapacity(l: *MemoryMappedList) void {
- l.items.len = 0;
+ pub fn clearRetainingCapacity(l: *MemoryMappedInput) void {
+ l.len = 0;
+ l.writeLen();
}
/// Append the slice of items to the list.
- /// Asserts that the list can hold the additional items.
- pub fn appendSliceAssumeCapacity(l: *MemoryMappedList, items: []const u8) void {
- const old_len = l.items.len;
- const new_len = old_len + items.len;
- assert(new_len <= l.capacity);
- l.items.len = new_len;
- @memcpy(l.items[old_len..][0..items.len], items);
+ ///
+ /// Invalidates item pointers if more space is required.
+ pub fn appendSlice(l: *MemoryMappedInput, items: []const u8) void {
+ l.ensureUnusedCapacity(items.len);
+ @memcpy(l.writeSlice()[4 + l.len ..][0..items.len], items);
+ l.len += @as(u32, @intCast(items.len));
+ l.writeLen();
}
- /// Extends the list by 1 element.
- /// Never invalidates element pointers.
- /// Asserts that the list can hold one additional item.
- pub fn appendAssumeCapacity(l: *MemoryMappedList, item: u8) void {
- const new_item_ptr = l.addOneAssumeCapacity();
- new_item_ptr.* = item;
- }
-
- /// Increase length by 1, returning pointer to the new item.
- /// The returned pointer becomes invalid when the list is resized.
- /// Never invalidates element pointers.
- /// Asserts that the list can hold one additional item.
- pub fn addOneAssumeCapacity(l: *MemoryMappedList) *volatile u8 {
- assert(l.items.len < l.capacity);
- l.items.len += 1;
- return &l.items[l.items.len - 1];
- }
-
- /// Append a value to the list `n` times.
- /// Never invalidates element pointers.
- /// The function is inline so that a comptime-known `value` parameter will
- /// have better memset codegen in case it has a repeated byte pattern.
- /// Asserts that the list can hold the additional items.
- pub inline fn appendNTimesAssumeCapacity(l: *MemoryMappedList, value: u8, n: usize) void {
- const new_len = l.items.len + n;
- assert(new_len <= l.capacity);
- @memset(l.items.ptr[l.items.len..new_len], value);
- l.items.len = new_len;
- }
-
- /// Resize the array, adding `n` new elements, which have `undefined` values.
- /// The return value is a slice pointing to the newly allocated elements.
- /// Never invalidates element pointers.
- /// The returned pointer becomes invalid when the list is resized.
- /// Asserts that the list can hold the additional items.
- pub fn addManyAsSliceAssumeCapacity(l: *MemoryMappedList, n: usize) []volatile u8 {
- assert(l.items.len + n <= l.capacity);
- const prev_len = l.items.len;
- l.items.len += n;
- return l.items[prev_len..][0..n];
+ /// Append the little-endian integer to the list.
+ ///
+ /// Invalidates item pointers if more space is required.
+ pub fn appendLittleInt(l: *MemoryMappedInput, T: type, x: T) void {
+ l.ensureUnusedCapacity(@sizeOf(T));
+ //std.log.debug("{} {} {}", .{ l.writeSlice().len, l.len, @sizeOf(T) });
+ l.writeSlice()[4 + l.len ..][0..@sizeOf(T)].* = @bitCast(mem.nativeToLittle(T, x));
+ l.len += @sizeOf(T);
+ l.writeLen();
}
/// Called when memory growth is necessary. Returns a capacity larger than
/// minimum that grows super-linearly.
- fn growCapacity(current: usize, minimum: usize) usize {
- var new = current;
- while (true) {
- new = mem.alignForward(usize, new + new / 2, std.heap.page_size_max);
- if (new >= minimum) return new;
- }
- }
-
- pub fn insertAssumeCapacity(l: *MemoryMappedList, i: usize, item: u8) void {
- assert(l.items.len + 1 <= l.capacity);
- l.items.len += 1;
- volatileCopyBackwards(u8, l.items[i + 1 ..], l.items[i .. l.items.len - 1]);
- l.items[i] = item;
- }
-
- pub fn orderedRemove(l: *MemoryMappedList, i: usize) u8 {
- assert(l.items.len + 1 <= l.capacity);
- const old = l.items[i];
- volatileCopyForwards(u8, l.items[i .. l.items.len - 1], l.items[i + 1 ..]);
- l.items.len -= 1;
- return old;
+ fn growCapacity(minimum: usize) usize {
+ return mem.alignForward(
+ usize,
+ minimum +| (minimum / 2 + std.heap.page_size_max),
+ std.heap.page_size_max,
+ );
}
};
diff --git a/lib/init/src/main.zig b/lib/init/src/main.zig
index 2c6df25be5..0ce4b9110e 100644
--- a/lib/init/src/main.zig
+++ b/lib/init/src/main.zig
@@ -40,12 +40,32 @@ test "simple test" {
}
test "fuzz example" {
- const Context = struct {
- fn testOne(context: @This(), input: []const u8) anyerror!void {
- _ = context;
- // Try passing `--fuzz` to `zig build test` and see if it manages to fail this test case!
- try std.testing.expect(!std.mem.eql(u8, "canyoufindme", input));
- }
- };
- try std.testing.fuzz(Context{}, Context.testOne, .{});
+ try std.testing.fuzz({}, testOne, .{});
+}
+
+fn testOne(context: void, smith: *std.testing.Smith) !void {
+ _ = context;
+ // Try passing `--fuzz` to `zig build test` and see if it manages to fail this test case!
+
+ const gpa = std.testing.allocator;
+ var list: std.ArrayList(u8) = .empty;
+ defer list.deinit(gpa);
+ while (!smith.eos()) switch (smith.value(enum { add_data, dup_data })) {
+ .add_data => {
+ const slice = try list.addManyAsSlice(gpa, smith.value(u4));
+ smith.bytes(slice);
+ },
+ .dup_data => {
+ if (list.items.len == 0) continue;
+ if (list.items.len > std.math.maxInt(u32)) return error.SkipZigTest;
+ const len = smith.valueRangeAtMost(u32, 1, @min(32, list.items.len));
+ const off = smith.valueRangeAtMost(u32, 0, @intCast(list.items.len - len));
+ try list.appendSlice(gpa, list.items[off..][0..len]);
+ try std.testing.expectEqualSlices(
+ u8,
+ list.items[off..][0..len],
+ list.items[list.items.len - len ..],
+ );
+ },
+ };
}
diff --git a/lib/libc/glibc/abilists b/lib/libc/glibc/abilists
index be8d67ebfb..3dec0a31a5 100644
Binary files a/lib/libc/glibc/abilists and b/lib/libc/glibc/abilists differ
diff --git a/lib/libc/glibc/bits/byteswap.h b/lib/libc/glibc/bits/byteswap.h
index c0841a3574..34533ffd5a 100644
--- a/lib/libc/glibc/bits/byteswap.h
+++ b/lib/libc/glibc/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros and inline functions to swap the order of bytes in integer values.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/floatn-common.h b/lib/libc/glibc/bits/floatn-common.h
index 01a579687e..4c79094828 100644
--- a/lib/libc/glibc/bits/floatn-common.h
+++ b/lib/libc/glibc/bits/floatn-common.h
@@ -1,6 +1,6 @@
/* Macros to control TS 18661-3 glibc features where the same
definitions are appropriate for all platforms.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/libc-header-start.h b/lib/libc/glibc/bits/libc-header-start.h
index e8477f972a..45897cd663 100644
--- a/lib/libc/glibc/bits/libc-header-start.h
+++ b/lib/libc/glibc/bits/libc-header-start.h
@@ -1,5 +1,5 @@
/* Handle feature test macros at the start of a header.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/long-double.h b/lib/libc/glibc/bits/long-double.h
index 77421347b5..4ff6c03eb1 100644
--- a/lib/libc/glibc/bits/long-double.h
+++ b/lib/libc/glibc/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/select.h b/lib/libc/glibc/bits/select.h
index 065e1d1dde..5edc32dbbf 100644
--- a/lib/libc/glibc/bits/select.h
+++ b/lib/libc/glibc/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/signum-generic.h b/lib/libc/glibc/bits/signum-generic.h
index 31dc2cd395..12cbe6678f 100644
--- a/lib/libc/glibc/bits/signum-generic.h
+++ b/lib/libc/glibc/bits/signum-generic.h
@@ -1,5 +1,5 @@
/* Signal number constants. Generic template.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/stat.h b/lib/libc/glibc/bits/stat.h
index 9dae670f67..10fa5aa8a8 100644
--- a/lib/libc/glibc/bits/stat.h
+++ b/lib/libc/glibc/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/stdint-intn.h b/lib/libc/glibc/bits/stdint-intn.h
index a7fde320e1..cbe07dff85 100644
--- a/lib/libc/glibc/bits/stdint-intn.h
+++ b/lib/libc/glibc/bits/stdint-intn.h
@@ -1,5 +1,5 @@
/* Define intN_t types.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/stdlib-bsearch.h b/lib/libc/glibc/bits/stdlib-bsearch.h
index 5ca67857e5..0ee8cdb8c6 100644
--- a/lib/libc/glibc/bits/stdlib-bsearch.h
+++ b/lib/libc/glibc/bits/stdlib-bsearch.h
@@ -1,5 +1,5 @@
/* Perform binary search - inline version.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/time64.h b/lib/libc/glibc/bits/time64.h
index e858cefdff..3fd9941f99 100644
--- a/lib/libc/glibc/bits/time64.h
+++ b/lib/libc/glibc/bits/time64.h
@@ -1,5 +1,5 @@
/* bits/time64.h -- underlying types for __time64_t. Generic version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/timesize.h b/lib/libc/glibc/bits/timesize.h
index 9accad9658..e3ba2b52fa 100644
--- a/lib/libc/glibc/bits/timesize.h
+++ b/lib/libc/glibc/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/types/struct_sched_param.h b/lib/libc/glibc/bits/types/struct_sched_param.h
index 7a2e06b834..dce2e5772b 100644
--- a/lib/libc/glibc/bits/types/struct_sched_param.h
+++ b/lib/libc/glibc/bits/types/struct_sched_param.h
@@ -1,5 +1,5 @@
/* Sched parameter structure. Generic version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/typesizes.h b/lib/libc/glibc/bits/typesizes.h
index b6db5c3637..466dd36681 100644
--- a/lib/libc/glibc/bits/typesizes.h
+++ b/lib/libc/glibc/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Generic version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/uintn-identity.h b/lib/libc/glibc/bits/uintn-identity.h
index 96c58abe65..d78bda636b 100644
--- a/lib/libc/glibc/bits/uintn-identity.h
+++ b/lib/libc/glibc/bits/uintn-identity.h
@@ -1,5 +1,5 @@
/* Inline functions to return unsigned integer values unchanged.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/waitflags.h b/lib/libc/glibc/bits/waitflags.h
index 5e7c0f506d..b36e2d0fad 100644
--- a/lib/libc/glibc/bits/waitflags.h
+++ b/lib/libc/glibc/bits/waitflags.h
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/bits/waitstatus.h b/lib/libc/glibc/bits/waitstatus.h
index ccc2239473..8a8dd04784 100644
--- a/lib/libc/glibc/bits/waitstatus.h
+++ b/lib/libc/glibc/bits/waitstatus.h
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/csu/errno.c b/lib/libc/glibc/csu/errno.c
index 558315365f..efdf6545c9 100644
--- a/lib/libc/glibc/csu/errno.c
+++ b/lib/libc/glibc/csu/errno.c
@@ -1,5 +1,5 @@
/* Definition of `errno' variable. Canonical version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/csu/init.c b/lib/libc/glibc/csu/init.c
index 92a22de162..7fe1b38781 100644
--- a/lib/libc/glibc/csu/init.c
+++ b/lib/libc/glibc/csu/init.c
@@ -1,5 +1,5 @@
/* Special startup support.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/debug/stack_chk_fail_local.c b/lib/libc/glibc/debug/stack_chk_fail_local.c
index 4ba407637f..7feccea23e 100644
--- a/lib/libc/glibc/debug/stack_chk_fail_local.c
+++ b/lib/libc/glibc/debug/stack_chk_fail_local.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/elf/elf.h b/lib/libc/glibc/elf/elf.h
index 2f29a47c0b..46a01281cb 100644
--- a/lib/libc/glibc/elf/elf.h
+++ b/lib/libc/glibc/elf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -924,7 +924,7 @@ typedef struct
#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */
#define DT_RELRSZ 35 /* Total size of RELR relative relocations */
#define DT_RELR 36 /* Address of RELR relative relocations */
-#define DT_RELRENT 37 /* Size of one RELR relative relocaction */
+#define DT_RELRENT 37 /* Size of one RELR relative relocation */
#define DT_NUM 38 /* Number used */
#define DT_LOOS 0x6000000d /* Start of OS-specific */
#define DT_HIOS 0x6ffff000 /* End of OS-specific */
diff --git a/lib/libc/glibc/include/alloca.h b/lib/libc/glibc/include/alloca.h
index c0b8395443..5f2df32b46 100644
--- a/lib/libc/glibc/include/alloca.h
+++ b/lib/libc/glibc/include/alloca.h
@@ -4,7 +4,7 @@
# ifndef _ISOMAC
-#include
+#include
#undef __alloca
diff --git a/lib/libc/glibc/include/libc-diag.h b/lib/libc/glibc/include/libc-diag.h
new file mode 100644
index 0000000000..b2f7fb5de0
--- /dev/null
+++ b/lib/libc/glibc/include/libc-diag.h
@@ -0,0 +1,99 @@
+/* Macros for controlling diagnostic output from the compiler.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+#ifndef _LIBC_DIAG_H
+#define _LIBC_DIAG_H 1
+
+/* Ignore the value of an expression when a cast to void does not
+ suffice (in particular, for a call to a function declared with
+ attribute warn_unused_result). */
+#define ignore_value(x) \
+ ({ __typeof__ (x) __ignored_value = (x); (void) __ignored_value; })
+
+/* The macros to control diagnostics are structured like this, rather
+ than a single macro that both pushes and pops diagnostic state and
+ takes the affected code as an argument, because the GCC pragmas
+ work by disabling the diagnostic for a range of source locations
+ and do not work when all the pragmas and the affected code are in a
+ single macro expansion. */
+
+/* Push diagnostic state. */
+#define DIAG_PUSH_NEEDS_COMMENT _Pragma ("GCC diagnostic push")
+
+/* Pop diagnostic state. */
+#define DIAG_POP_NEEDS_COMMENT _Pragma ("GCC diagnostic pop")
+
+/* These macros are used to push/pop diagnostic states for warnings only
+ supported by clang. */
+#ifdef __clang__
+# define DIAG_PUSH_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic push")
+# define DIAG_POP_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic pop")
+#else
+# define DIAG_PUSH_NEEDS_COMMENT_CLANG
+# define DIAG_POP_NEEDS_COMMENT_CLANG
+#endif
+
+#define _DIAG_STR1(s) #s
+#define _DIAG_STR(s) _DIAG_STR1(s)
+
+/* Ignore the diagnostic OPTION. VERSION is the most recent GCC
+ version for which the diagnostic has been confirmed to appear in
+ the absence of the pragma (in the form MAJOR.MINOR for GCC 4.x,
+ just MAJOR for GCC 5 and later). Uses of this pragma should be
+ reviewed when the GCC version given is no longer supported for
+ building glibc; the version number should always be on the same
+ source line as the macro name, so such uses can be found with grep.
+ Uses should come with a comment giving more details of the
+ diagnostic, and an architecture on which it is seen if possibly
+ optimization-related and not in architecture-specific code. This
+ macro should only be used if the diagnostic seems hard to fix (for
+ example, optimization-related false positives). */
+#define DIAG_IGNORE_NEEDS_COMMENT(version, option) \
+ _Pragma (_DIAG_STR (GCC diagnostic ignored option))
+
+/* Similar to DIAG_IGNORE_NEEDS_COMMENT the following macro ignores the
+ diagnostic OPTION but only if optimizations for size are enabled.
+ This is required because different warnings may be generated for
+ different optimization levels. For example a key piece of code may
+ only generate a warning when compiled at -Os, but at -O2 you could
+ still want the warning to be enabled to catch errors. In this case
+ you would use DIAG_IGNORE_Os_NEEDS_COMMENT to disable the warning
+ only for -Os. */
+#ifdef __OPTIMIZE_SIZE__
+# define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option) \
+ _Pragma (_DIAG_STR (GCC diagnostic ignored option))
+#else
+# define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option)
+#endif
+
+/* Similar to DIAG_IGNORE_NEEDS_COMMENT, these macros should be used
+ to suppress warning supported by the specific compiler. */
+#ifndef __clang__
+# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING) \
+ DIAG_IGNORE_NEEDS_COMMENT (VERSION, WARNING)
+# define DIAG_IGNORE_Os_NEEDS_COMMENT_GCC(VERSION, WARNING) \
+ DIAG_IGNORE_Os_NEEDS_COMMENT (VERSION, WARNING)
+# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option)
+#else
+# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING)
+# define DIAG_IGNORE_Os_NEEDS_COMMENT_GCC(VERSION, WARNING)
+# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option) \
+ _Pragma (_DIAG_STR (clang diagnostic ignored option))
+#endif
+
+#endif /* libc-diag.h */
diff --git a/lib/libc/glibc/include/libc-misc.h b/lib/libc/glibc/include/libc-misc.h
index e76a8097d8..01984398a3 100644
--- a/lib/libc/glibc/include/libc-misc.h
+++ b/lib/libc/glibc/include/libc-misc.h
@@ -1,5 +1,5 @@
/* Miscellaneous definitions for both glibc build and test.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/include/libc-pointer-arith.h b/lib/libc/glibc/include/libc-pointer-arith.h
index 815ba65ec9..e5b9748559 100644
--- a/lib/libc/glibc/include/libc-pointer-arith.h
+++ b/lib/libc/glibc/include/libc-pointer-arith.h
@@ -1,5 +1,5 @@
/* Helper macros for pointer arithmetic.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/include/libc-symbols.h b/lib/libc/glibc/include/libc-symbols.h
index 7f2c8938b6..bebfc67cec 100644
--- a/lib/libc/glibc/include/libc-symbols.h
+++ b/lib/libc/glibc/include/libc-symbols.h
@@ -1,6 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,6 +86,7 @@
/* Obtain the definition of symbol_version_reference. */
#include
+#include
/* When PIC is defined and SHARED isn't defined, we are building PIE
by default. */
@@ -167,6 +168,16 @@
__attribute_copy__ (name);
#endif
+/* Define a strong_alias for SHARED, or weak_alias otherwise. It is used to
+ avoid potential compiler warnings for weak alias indirection (when a weak
+ alias is always resolved to a symbol even if a weak definition also
+ exists). */
+# ifdef SHARED
+# define static_weak_alias(name, aliasname) strong_alias (name, aliasname)
+# else
+# define static_weak_alias(name, aliasname) weak_alias (name, aliasname)
+# endif
+
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
# define weak_extern(symbol) _weak_extern (weak symbol)
# define _weak_extern(expr) _Pragma (#expr)
@@ -280,7 +291,7 @@ for linking")
/*
-
+
*/
#ifdef HAVE_GNU_RETAIN
@@ -683,7 +694,10 @@ for linking")
# define __ifunc_args(type_name, name, expr, init, ...) \
extern __typeof (type_name) name __attribute__ \
((ifunc (#name "_ifunc"))); \
- __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__)
+ DIAG_PUSH_NEEDS_COMMENT_CLANG; \
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunused-function"); \
+ __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__); \
+ DIAG_POP_NEEDS_COMMENT_CLANG;
# define __ifunc_args_hidden(type_name, name, expr, init, ...) \
__ifunc_args (type_name, name, expr, init, __VA_ARGS__)
@@ -807,7 +821,7 @@ for linking")
#define libm_ifunc_init()
#define libm_ifunc(name, expr) \
__ifunc (name, name, expr, void, libm_ifunc_init)
-
+
/* These macros facilitate sharing source files with gnulib.
They are here instead of sys/cdefs.h because they should not be
diff --git a/lib/libc/glibc/include/pthread.h b/lib/libc/glibc/include/pthread.h
index 819bf3f235..9e31b74916 100644
--- a/lib/libc/glibc/include/pthread.h
+++ b/lib/libc/glibc/include/pthread.h
@@ -8,14 +8,10 @@ extern int __pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
const pthread_barrierattr_t *__restrict
__attr, unsigned int __count)
__THROW __nonnull ((1));
-#if PTHREAD_IN_LIBC
libc_hidden_proto (__pthread_barrier_init)
-#endif
extern int __pthread_barrier_wait (pthread_barrier_t *__barrier)
__THROWNL __nonnull ((1));
-#if PTHREAD_IN_LIBC
libc_hidden_proto (__pthread_barrier_wait)
-#endif
/* This function is called to initialize the pthread library. */
extern void __pthread_initialize (void) __attribute__ ((weak));
diff --git a/lib/libc/glibc/include/stap-probe.h b/lib/libc/glibc/include/stap-probe.h
index 9ff4ca83e5..32e4e77f2a 100644
--- a/lib/libc/glibc/include/stap-probe.h
+++ b/lib/libc/glibc/include/stap-probe.h
@@ -1,5 +1,5 @@
/* Macros for defining Systemtap static probe points.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/io/bits/statx.h b/lib/libc/glibc/io/bits/statx.h
index 5c1228c3bf..ec94398bdc 100644
--- a/lib/libc/glibc/io/bits/statx.h
+++ b/lib/libc/glibc/io/bits/statx.h
@@ -1,5 +1,5 @@
/* statx-related definitions and declarations. Generic version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/io/fcntl.h b/lib/libc/glibc/io/fcntl.h
index d99dc68a88..7bbccf0572 100644
--- a/lib/libc/glibc/io/fcntl.h
+++ b/lib/libc/glibc/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/io/mknod.c b/lib/libc/glibc/io/mknod.c
index 66020d58ca..bd2a4a1268 100644
--- a/lib/libc/glibc/io/mknod.c
+++ b/lib/libc/glibc/io/mknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/io/sys/stat.h b/lib/libc/glibc/io/sys/stat.h
index 4bea9e9a77..3069e187b0 100644
--- a/lib/libc/glibc/io/sys/stat.h
+++ b/lib/libc/glibc/io/sys/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/locale/bits/types/__locale_t.h b/lib/libc/glibc/locale/bits/types/__locale_t.h
index 746b1209f1..c59a107941 100644
--- a/lib/libc/glibc/locale/bits/types/__locale_t.h
+++ b/lib/libc/glibc/locale/bits/types/__locale_t.h
@@ -1,5 +1,5 @@
/* Definition of struct __locale_struct and __locale_t.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/locale/bits/types/locale_t.h b/lib/libc/glibc/locale/bits/types/locale_t.h
index fe8864ca6b..a825f11fdf 100644
--- a/lib/libc/glibc/locale/bits/types/locale_t.h
+++ b/lib/libc/glibc/locale/bits/types/locale_t.h
@@ -1,5 +1,5 @@
/* Definition of locale_t.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/misc/sys/cdefs.h b/lib/libc/glibc/misc/sys/cdefs.h
index 215ff937ee..8d27f26da8 100644
--- a/lib/libc/glibc/misc/sys/cdefs.h
+++ b/lib/libc/glibc/misc/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -438,10 +438,10 @@
*/
#endif
-/* GCC and clang have various useful declarations that can be made with
- the '__attribute__' syntax. All of the ways we use this do fine if
- they are omitted for compilers that don't understand it. */
-#if !(defined __GNUC__ || defined __clang__)
+/* GCC, clang, and compatible compilers have various useful declarations
+ that can be made with the '__attribute__' syntax. All of the ways we use
+ this do fine if they are omitted for compilers that don't understand it. */
+#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__)
# define __attribute__(xyz) /* Ignore */
#endif
@@ -606,14 +606,14 @@
# define __attribute_artificial__ /* Ignore */
#endif
-/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
- inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
- or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline
+ semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or
+ __GNUC_GNU_INLINE__ is not a good enough check for gcc because gcc versions
older than 4.3 may define these macros and still not guarantee GNU inlining
semantics.
clang++ identifies itself as gcc-4.2, but has support for GNU inlining
- semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+ semantics, that can be checked for by using the __GNUC_STDC_INLINE__ and
__GNUC_GNU_INLINE__ macro definitions. */
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
|| (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
@@ -828,6 +828,18 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
# define __HAVE_GENERIC_SELECTION 0
#endif
+#if __HAVE_GENERIC_SELECTION
+/* If PTR is a pointer to const, return CALL cast to type CTYPE,
+ otherwise return CALL. Pointers to types with non-const qualifiers
+ are not valid. This should not be defined for C++, as macros are
+ not an appropriate way of implementing such qualifier-generic
+ operations for C++. */
+# define __glibc_const_generic(PTR, CTYPE, CALL) \
+ _Generic (0 ? (PTR) : (void *) 1, \
+ const void *: (CTYPE) (CALL), \
+ default: CALL)
+#endif
+
#if __GNUC_PREREQ (10, 0)
/* Designates a 1-based positional argument ref-index of pointer type
that can be used to access size-index elements of the pointed-to
diff --git a/lib/libc/glibc/misc/sys/select.h b/lib/libc/glibc/misc/sys/select.h
index d2cdc0f1cd..fdc3c89ce6 100644
--- a/lib/libc/glibc/misc/sys/select.h
+++ b/lib/libc/glibc/misc/sys/select.h
@@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/posix/bits/cpu-set.h b/lib/libc/glibc/posix/bits/cpu-set.h
index 9dc2d31fa7..ddb79cefc2 100644
--- a/lib/libc/glibc/posix/bits/cpu-set.h
+++ b/lib/libc/glibc/posix/bits/cpu-set.h
@@ -1,6 +1,6 @@
/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/posix/bits/types.h b/lib/libc/glibc/posix/bits/types.h
index a6638467c8..fdef71b4c2 100644
--- a/lib/libc/glibc/posix/bits/types.h
+++ b/lib/libc/glibc/posix/bits/types.h
@@ -1,5 +1,5 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/posix/sys/types.h b/lib/libc/glibc/posix/sys/types.h
index ab3037a9da..2b52476174 100644
--- a/lib/libc/glibc/posix/sys/types.h
+++ b/lib/libc/glibc/posix/sys/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/signal/signal.h b/lib/libc/glibc/signal/signal.h
index 413b4fd23f..0cfcdd6217 100644
--- a/lib/libc/glibc/signal/signal.h
+++ b/lib/libc/glibc/signal/signal.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/stdlib/alloca.h b/lib/libc/glibc/stdlib/alloca.h
index ec36f825ad..5700dd7123 100644
--- a/lib/libc/glibc/stdlib/alloca.h
+++ b/lib/libc/glibc/stdlib/alloca.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/stdlib/bits/stdlib-float.h b/lib/libc/glibc/stdlib/bits/stdlib-float.h
index 5f2902949e..d75221470b 100644
--- a/lib/libc/glibc/stdlib/bits/stdlib-float.h
+++ b/lib/libc/glibc/stdlib/bits/stdlib-float.h
@@ -1,5 +1,5 @@
/* Floating-point inline functions for stdlib.h.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/stdlib/errno.h b/lib/libc/glibc/stdlib/errno.h
index 64517aa2fb..f7828f0e6a 100644
--- a/lib/libc/glibc/stdlib/errno.h
+++ b/lib/libc/glibc/stdlib/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/stdlib/exit.h b/lib/libc/glibc/stdlib/exit.h
index bbe80292e4..841f64f2d3 100644
--- a/lib/libc/glibc/stdlib/exit.h
+++ b/lib/libc/glibc/stdlib/exit.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/stdlib/stdlib.h b/lib/libc/glibc/stdlib/stdlib.h
index cd4503c761..1c67d8e13f 100644
--- a/lib/libc/glibc/stdlib/stdlib.h
+++ b/lib/libc/glibc/stdlib/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -35,6 +35,10 @@ __BEGIN_DECLS
#define _STDLIB_H 1
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_STDLIB_H__ 202311L
+#endif
+
#if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
/* XPG requires a few symbols from being defined. */
# include
@@ -686,6 +690,24 @@ extern void *realloc (void *__ptr, size_t __size)
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
+#if __GLIBC_USE(ISOC23)
+/* Free a block allocated by `malloc', `realloc' or `calloc' but not
+ `aligned_alloc', `memalign', `posix_memalign', `valloc' or
+ `pvalloc'. SIZE must be equal to the original requested size
+ provided to `malloc', `realloc' or `calloc'. For `calloc' SIZE is
+ NMEMB elements * SIZE bytes. It is forbidden to call `free_sized'
+ for allocations which the caller did not directly allocate but
+ must still deallocate, such as `strdup' or `strndup'. Instead
+ continue using `free` for these cases. */
+extern void free_sized (void *__ptr, size_t __size) __THROW;
+
+/* Free a block allocated by `aligned_alloc', `memalign' or
+ `posix_memalign'. ALIGNMENT and SIZE must be the same as the values
+ provided to `aligned_alloc', `memalign' or `posix_memalign'. */
+extern void free_aligned_sized (void *__ptr, size_t __alignment, size_t __size)
+ __THROW;
+#endif
+
#ifdef __USE_MISC
/* Re-allocate the previously allocated block in PTR, making the new
block large enough for NMEMB elements of SIZE bytes each. */
@@ -965,6 +987,12 @@ extern void *bsearch (const void *__key, const void *__base,
# include
#endif
+#if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \
+ __glibc_const_generic (BASE, const void *, \
+ bsearch (KEY, BASE, NMEMB, SIZE, COMPAR))
+#endif
+
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
extern void qsort (void *__base, size_t __nmemb, size_t __size,
@@ -1158,6 +1186,19 @@ extern int getloadavg (double __loadavg[], int __nelem)
extern int ttyslot (void) __THROW;
#endif
+#if __GLIBC_USE (ISOC23)
+# ifndef __cplusplus
+# include
+
+/* Call function __FUNC exactly once, even if invoked from several threads.
+ All calls must be made with the same __FLAGS object. */
+extern void call_once (once_flag *__flag, void (*__func)(void));
+# endif /* !__cplusplus */
+
+/* Return the alignment of P. */
+extern size_t memalignment (const void *__p);
+#endif
+
#include
/* Define some macros helping to catch buffer overflows. */
diff --git a/lib/libc/glibc/string/bits/endian.h b/lib/libc/glibc/string/bits/endian.h
index e267b2b513..d60ddfdc12 100644
--- a/lib/libc/glibc/string/bits/endian.h
+++ b/lib/libc/glibc/string/bits/endian.h
@@ -1,5 +1,5 @@
/* Endian macros for string.h functions
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/string/endian.h b/lib/libc/glibc/string/endian.h
index 6b5d65f967..5b732541d3 100644
--- a/lib/libc/glibc/string/endian.h
+++ b/lib/libc/glibc/string/endian.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
index c282560335..4dc5245e06 100644
--- a/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/aarch64/start.S b/lib/libc/glibc/sysdeps/aarch64/start.S
index 694c338c8b..52a1d3bb83 100644
--- a/lib/libc/glibc/sysdeps/aarch64/start.S
+++ b/lib/libc/glibc/sysdeps/aarch64/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/aarch64/sysdep.h b/lib/libc/glibc/sysdeps/aarch64/sysdep.h
index f5e28cb242..da4b7f3fd3 100644
--- a/lib/libc/glibc/sysdeps/aarch64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/aarch64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/arc/start.S b/lib/libc/glibc/sysdeps/arc/start.S
index 372dd3e299..57fe4a15f9 100644
--- a/lib/libc/glibc/sysdeps/arc/start.S
+++ b/lib/libc/glibc/sysdeps/arc/start.S
@@ -1,5 +1,5 @@
/* Startup code for ARC.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/arc/sysdep.h b/lib/libc/glibc/sysdeps/arc/sysdep.h
index b831b5f79b..1e244b040d 100644
--- a/lib/libc/glibc/sysdeps/arc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/arc/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for ARC.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/arm/arm-features.h b/lib/libc/glibc/sysdeps/arm/arm-features.h
index 04adcc90a8..b2504ccebb 100644
--- a/lib/libc/glibc/sysdeps/arm/arm-features.h
+++ b/lib/libc/glibc/sysdeps/arm/arm-features.h
@@ -1,5 +1,5 @@
/* Macros to test for CPU features on ARM. Generic ARM version.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/arm/start.S b/lib/libc/glibc/sysdeps/arm/start.S
index 64eead31d5..a7e62b3934 100644
--- a/lib/libc/glibc/sysdeps/arm/start.S
+++ b/lib/libc/glibc/sysdeps/arm/start.S
@@ -1,5 +1,5 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/arm/sysdep.h b/lib/libc/glibc/sysdeps/arm/sysdep.h
index 8e66fa5666..7f9d740772 100644
--- a/lib/libc/glibc/sysdeps/arm/sysdep.h
+++ b/lib/libc/glibc/sysdeps/arm/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for ARM.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/csky/abiv2/start.S b/lib/libc/glibc/sysdeps/csky/abiv2/start.S
index ce1d7d56f6..973b79693c 100644
--- a/lib/libc/glibc/sysdeps/csky/abiv2/start.S
+++ b/lib/libc/glibc/sysdeps/csky/abiv2/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF C-SKY ABIV2.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/csky/sysdep.h b/lib/libc/glibc/sysdeps/csky/sysdep.h
index 8ca062b06d..a2436632c9 100644
--- a/lib/libc/glibc/sysdeps/csky/sysdep.h
+++ b/lib/libc/glibc/sysdeps/csky/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for C-SKY.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h
index 8cf83a3725..0d3a43d176 100644
--- a/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h
+++ b/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h
@@ -1,5 +1,5 @@
/* Configuration of lookup functions.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/dl-sysdep.h b/lib/libc/glibc/sysdeps/generic/dl-sysdep.h
index d7a90f23d5..9aac6e7bc7 100644
--- a/lib/libc/glibc/sysdeps/generic/dl-sysdep.h
+++ b/lib/libc/glibc/sysdeps/generic/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. Generic version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/dwarf2.h b/lib/libc/glibc/sysdeps/generic/dwarf2.h
index cdd0f96102..6dfa3c562c 100644
--- a/lib/libc/glibc/sysdeps/generic/dwarf2.h
+++ b/lib/libc/glibc/sysdeps/generic/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/generic/libc-lock.h b/lib/libc/glibc/sysdeps/generic/libc-lock.h
index fafaf8c932..4dbd0bed63 100644
--- a/lib/libc/glibc/sysdeps/generic/libc-lock.h
+++ b/lib/libc/glibc/sysdeps/generic/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Stub version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/libc-symver.h b/lib/libc/glibc/sysdeps/generic/libc-symver.h
index 0725e0c8e3..dd0425117c 100644
--- a/lib/libc/glibc/sysdeps/generic/libc-symver.h
+++ b/lib/libc/glibc/sysdeps/generic/libc-symver.h
@@ -1,5 +1,5 @@
/* Symbol version management.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/single-thread.h b/lib/libc/glibc/sysdeps/generic/single-thread.h
index 6a37563e5f..3f576308a1 100644
--- a/lib/libc/glibc/sysdeps/generic/single-thread.h
+++ b/lib/libc/glibc/sysdeps/generic/single-thread.h
@@ -1,5 +1,5 @@
/* Single thread optimization, generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/symbol-hacks.h b/lib/libc/glibc/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..0d728cce91 100644
--- a/lib/libc/glibc/sysdeps/generic/symbol-hacks.h
+++ b/lib/libc/glibc/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,22 @@ asm ("memmove = __GI_memmove");
asm ("memset = __GI_memset");
asm ("memcpy = __GI_memcpy");
+/* clang might generate the internal fortfify calls when it is enabled,
+ through the buitintin. */
+asm ("__vfprintf_chk = __GI___vfprintf_chk");
+asm ("__vsprintf_chk = __GI___vsprintf_chk");
+asm ("__vsyslog_chk = __GI___vsyslog_chk");
+asm ("__memcpy_chk = __GI___memcpy_chk");
+asm ("__memmove_chk = __GI___memmove_chk");
+asm ("__memset_chk = __GI___memset_chk");
+asm ("__mempcpy_chk = __GI___mempcpy_chk");
+asm ("__stpcpy_chk = __GI___stpcpy_chk");
+asm ("__strcpy_chk = __GI___strcpy_chk");
+asm ("strcpy = __GI_strcpy");
+asm ("strncpy = __GI_strncpy");
+asm ("strcat = __GI_strcat");
+asm ("strlen = __GI_strlen");
+
/* Some targets do not use __stack_chk_fail_local. In libc.so,
redirect __stack_chk_fail to a hidden reference
__stack_chk_fail_local, to avoid the PLT reference.
diff --git a/lib/libc/glibc/sysdeps/generic/sysdep.h b/lib/libc/glibc/sysdeps/generic/sysdep.h
index ef5eba2c87..fb07f6747c 100644
--- a/lib/libc/glibc/sysdeps/generic/sysdep.h
+++ b/lib/libc/glibc/sysdeps/generic/sysdep.h
@@ -1,5 +1,5 @@
/* Generic asm macros used on many machines.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/generic/tls.h b/lib/libc/glibc/sysdeps/generic/tls.h
index f6155b5ba6..a569d074ca 100644
--- a/lib/libc/glibc/sysdeps/generic/tls.h
+++ b/lib/libc/glibc/sysdeps/generic/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. Generic version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/htl/bits/pthread.h b/lib/libc/glibc/sysdeps/htl/bits/pthread.h
index c0ec3932ae..2209c51e01 100644
--- a/lib/libc/glibc/sysdeps/htl/bits/pthread.h
+++ b/lib/libc/glibc/sysdeps/htl/bits/pthread.h
@@ -1,5 +1,5 @@
/* Pthread data structures. Generic version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h b/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h
index 32a545014c..52a01426b0 100644
--- a/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h
+++ b/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h
@@ -1,5 +1,5 @@
/* Common threading primitives definitions for both POSIX and C11.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/htl/libc-lockP.h b/lib/libc/glibc/sysdeps/htl/libc-lockP.h
index e9977e46a1..a88eea4344 100644
--- a/lib/libc/glibc/sysdeps/htl/libc-lockP.h
+++ b/lib/libc/glibc/sysdeps/htl/libc-lockP.h
@@ -1,5 +1,5 @@
/* Private libc-internal interface for mutex locks.
- Copyright (C) 2015-2025 Free Software Foundation, Inc.
+ Copyright (C) 2015-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,6 @@
#define _BITS_LIBC_LOCKP_H 1
#include
-#include
/* If we check for a weakly referenced symbol and then perform a
normal jump to it te code generated for some platforms in case of
@@ -36,40 +35,6 @@
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
-/* Call thread functions through the function pointer table. */
-#if defined SHARED && IS_IN (libc)
-# define PTFAVAIL(NAME) __libc_pthread_functions_init
-# define __libc_ptf_call(FUNC, ARGS, ELSE) \
- (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE)
-# define __libc_ptf_call_always(FUNC, ARGS) \
- PTHFCT_CALL (ptr_##FUNC, ARGS)
-#elif IS_IN (libpthread)
-# define PTFAVAIL(NAME) 1
-# define __libc_ptf_call(FUNC, ARGS, ELSE) \
- FUNC ARGS
-# define __libc_ptf_call_always(FUNC, ARGS) \
- FUNC ARGS
-#else
-# define PTFAVAIL(NAME) (NAME != NULL)
-# define __libc_ptf_call(FUNC, ARGS, ELSE) \
- __libc_maybe_call (FUNC, ARGS, ELSE)
-# define __libc_ptf_call_always(FUNC, ARGS) \
- FUNC ARGS
-#endif
-
-/* Create thread-specific key. */
-#define __libc_key_create(KEY, DESTRUCTOR) \
- __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
-
-/* Get thread-specific data. */
-#define __libc_getspecific(KEY) \
- __libc_ptf_call (__pthread_getspecific, (KEY), NULL)
-
-/* Set thread-specific data. */
-#define __libc_setspecific(KEY, VALUE) \
- __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0)
-
-
/* Functions that are used by this file and are internal to the GNU C
library. */
diff --git a/lib/libc/glibc/sysdeps/htl/pthread.h b/lib/libc/glibc/sysdeps/htl/pthread.h
index a299fec278..0db8fef7c3 100644
--- a/lib/libc/glibc/sysdeps/htl/pthread.h
+++ b/lib/libc/glibc/sysdeps/htl/pthread.h
@@ -1,5 +1,5 @@
/* Posix threads. Hurd version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h
index 4aed38fc63..44c051fc48 100644
--- a/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Hurd i386 version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/i386/start.S b/lib/libc/glibc/sysdeps/i386/start.S
index 01f8098b58..135fb06527 100644
--- a/lib/libc/glibc/sysdeps/i386/start.S
+++ b/lib/libc/glibc/sysdeps/i386/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF i386 ABI.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/i386/symbol-hacks.h b/lib/libc/glibc/sysdeps/i386/symbol-hacks.h
index f263d736a6..da59cb8928 100644
--- a/lib/libc/glibc/sysdeps/i386/symbol-hacks.h
+++ b/lib/libc/glibc/sysdeps/i386/symbol-hacks.h
@@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. i386 version.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/i386/sysdep.h b/lib/libc/glibc/sysdeps/i386/sysdep.h
index 3aefe7af1e..d01115d0d6 100644
--- a/lib/libc/glibc/sysdeps/i386/sysdep.h
+++ b/lib/libc/glibc/sysdeps/i386/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for i386.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/loongarch/start.S b/lib/libc/glibc/sysdeps/loongarch/start.S
index 754c08dc1f..72452f5307 100644
--- a/lib/libc/glibc/sysdeps/loongarch/start.S
+++ b/lib/libc/glibc/sysdeps/loongarch/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF LoongArch ABI.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/loongarch/sys/regdef.h b/lib/libc/glibc/sysdeps/loongarch/sys/regdef.h
index c65a2c4662..49ac57477a 100644
--- a/lib/libc/glibc/sysdeps/loongarch/sys/regdef.h
+++ b/lib/libc/glibc/sysdeps/loongarch/sys/regdef.h
@@ -1,5 +1,5 @@
/* Register Macro definitions
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h b/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h
index 563a67266e..353112cc3f 100644
--- a/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h
+++ b/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for Coldfire.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h b/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h
index 7faceb35dc..2139eccce2 100644
--- a/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h
+++ b/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for m680x0.
- Copyright (C) 2010-2025 Free Software Foundation, Inc.
+ Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
index 56beb0ed19..bda8c53eef 100644
--- a/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/m68k/start.S b/lib/libc/glibc/sysdeps/m68k/start.S
index 9b2ea124ba..b091caea4a 100644
--- a/lib/libc/glibc/sysdeps/m68k/start.S
+++ b/lib/libc/glibc/sysdeps/m68k/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF m68k ABI.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h b/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h
index d9c1f96c2e..d072b08425 100644
--- a/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h
+++ b/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h
@@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. m68k version.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/m68k/sysdep.h b/lib/libc/glibc/sysdeps/m68k/sysdep.h
index 26448d26c5..0851d0bc5e 100644
--- a/lib/libc/glibc/sysdeps/m68k/sysdep.h
+++ b/lib/libc/glibc/sysdeps/m68k/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for m68k.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/mach/libc-lock.h b/lib/libc/glibc/sysdeps/mach/libc-lock.h
index 41fd1c6b85..236a24ad80 100644
--- a/lib/libc/glibc/sysdeps/mach/libc-lock.h
+++ b/lib/libc/glibc/sysdeps/mach/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Mach cthreads version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/mach/sysdep.h b/lib/libc/glibc/sysdeps/mach/sysdep.h
index 581bdcd54d..06ca34db55 100644
--- a/lib/libc/glibc/sysdeps/mach/sysdep.h
+++ b/lib/libc/glibc/sysdeps/mach/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h
index 801f8b71f1..caa6240990 100644
--- a/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h
+++ b/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h
@@ -1,5 +1,5 @@
/* Configuration of lookup functions. MIPS version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/mips/isarev.h b/lib/libc/glibc/sysdeps/mips/isarev.h
new file mode 100644
index 0000000000..d3da6a9cb3
--- /dev/null
+++ b/lib/libc/glibc/sysdeps/mips/isarev.h
@@ -0,0 +1,8 @@
+#ifndef _ISAREV_H
+#define _ISAREV_H
+
+#ifndef __mips_isa_rev
+# define __mips_isa_rev 0
+#endif
+
+#endif
diff --git a/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h
index ab3cdfb794..d6e8325456 100644
--- a/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. MIPS version.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/mips/start.S b/lib/libc/glibc/sysdeps/mips/start.S
index c58915c134..409154dd22 100644
--- a/lib/libc/glibc/sysdeps/mips/start.S
+++ b/lib/libc/glibc/sysdeps/mips/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h b/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h
index 1afb017bec..6f4c5c4171 100644
--- a/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h
+++ b/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Declaration of common pthread types for all architectures.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h b/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h
index e614c7f3c9..624d616fdc 100644
--- a/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h
+++ b/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h
@@ -1,5 +1,5 @@
/* Common threading primitives definitions for both POSIX and C11.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -75,7 +75,7 @@ typedef struct __pthread_internal_slist
#include
-/* Arch-sepecific read-write lock definitions. A generic implementation is
+/* Arch-specific read-write lock definitions. A generic implementation is
provided by struct_rwlock.h. If required, an architecture can override it
by defining:
diff --git a/lib/libc/glibc/sysdeps/nptl/libc-lock.h b/lib/libc/glibc/sysdeps/nptl/libc-lock.h
index 3775547994..28bc23c36f 100644
--- a/lib/libc/glibc/sysdeps/nptl/libc-lock.h
+++ b/lib/libc/glibc/sysdeps/nptl/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. NPTL version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/nptl/libc-lockP.h b/lib/libc/glibc/sysdeps/nptl/libc-lockP.h
index 1be3dd1ec1..9c45c5ce88 100644
--- a/lib/libc/glibc/sysdeps/nptl/libc-lockP.h
+++ b/lib/libc/glibc/sysdeps/nptl/libc-lockP.h
@@ -1,5 +1,5 @@
/* Private libc-internal interface for mutex locks. NPTL version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -90,13 +90,6 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0");
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
-/* All previously forwarded functions are now called directly (either
- via local call in libc, or through a __export), but __libc_ptf_call
- is still used in generic code shared with Hurd. */
-#define PTFAVAIL(NAME) 1
-#define __libc_ptf_call(FUNC, ARGS, ELSE) FUNC ARGS
-#define __libc_ptf_call_always(FUNC, ARGS) FUNC ARGS
-
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER))
diff --git a/lib/libc/glibc/sysdeps/nptl/pthread.h b/lib/libc/glibc/sysdeps/nptl/pthread.h
index 92957a620d..95c0eb7e03 100644
--- a/lib/libc/glibc/sysdeps/nptl/pthread.h
+++ b/lib/libc/glibc/sysdeps/nptl/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S b/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S
index d1a7c54859..7832fbc5c7 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S
@@ -1,5 +1,5 @@
/* Startup code for programs linked with GNU libc.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h b/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h
index 898495ac00..1faf282601 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h
@@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation. powerpc version.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h
index 863b011764..ef7b62029d 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h
@@ -1,5 +1,5 @@
/* Assembly macros for 32-bit PowerPC.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h
index 452e3b82b5..842ffcd3cd 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h
@@ -1,5 +1,5 @@
/* Configuration of lookup functions. PowerPC64 version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S b/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S
index b9a5205edb..14e145b4e9 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S
@@ -1,5 +1,5 @@
/* Startup code for programs linked with GNU libc. PowerPC64 version.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h
index f05dae71f6..26cccbf269 100644
--- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h
@@ -1,5 +1,5 @@
/* Assembly macros for 64-bit PowerPC.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/powerpc/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/sysdep.h
index 8ce71565b1..ebbc2d68cd 100644
--- a/lib/libc/glibc/sysdeps/powerpc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/powerpc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
index ec246b4f3f..6fe9d1cc1f 100644
--- a/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. RISC-V version.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/riscv/start.S b/lib/libc/glibc/sysdeps/riscv/start.S
index 2db79c0ae6..bc3bc04219 100644
--- a/lib/libc/glibc/sysdeps/riscv/start.S
+++ b/lib/libc/glibc/sysdeps/riscv/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF RISC-V ABI.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/start.S b/lib/libc/glibc/sysdeps/s390/s390-64/start.S
index ab40519307..b555503811 100644
--- a/lib/libc/glibc/sysdeps/s390/s390-64/start.S
+++ b/lib/libc/glibc/sysdeps/s390/s390-64/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the 64 bit S/390 ELF ABI.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h b/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h
index cb5e432fc5..18ed5f1b03 100644
--- a/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for 64 bit S/390.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h
index fca73324af..2e573d8915 100644
--- a/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h
+++ b/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h
@@ -1,5 +1,5 @@
/* Configuration of lookup functions. SPARC version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/sparc/sparc32/start.S b/lib/libc/glibc/sysdeps/sparc/sparc32/start.S
index 8393760da6..89be42dcb0 100644
--- a/lib/libc/glibc/sysdeps/sparc/sparc32/start.S
+++ b/lib/libc/glibc/sysdeps/sparc/sparc32/start.S
@@ -1,5 +1,5 @@
/* Startup code for elf32-sparc
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/sparc/sparc64/start.S b/lib/libc/glibc/sysdeps/sparc/sparc64/start.S
index 08e1e77210..5e85fa8aa4 100644
--- a/lib/libc/glibc/sysdeps/sparc/sparc64/start.S
+++ b/lib/libc/glibc/sysdeps/sparc/sparc64/start.S
@@ -1,5 +1,5 @@
/* Startup code for elf64-sparc
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/sparc/sysdep.h b/lib/libc/glibc/sysdeps/sparc/sysdep.h
index 8381b0570d..bac213b470 100644
--- a/lib/libc/glibc/sysdeps/sparc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/arm/sysdep.h b/lib/libc/glibc/sysdeps/unix/arm/sysdep.h
index 814d16fbad..96614a5df9 100644
--- a/lib/libc/glibc/sysdeps/unix/arm/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/i386/sysdep.h b/lib/libc/glibc/sysdeps/unix/i386/sysdep.h
index e58f841f8b..8a9d35ef08 100644
--- a/lib/libc/glibc/sysdeps/unix/i386/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/i386/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h
index e09e4be5b0..4ea03efb4a 100644
--- a/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h
index 206569357a..1304a1752d 100644
--- a/lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/mips/mips64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/mips/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/sysdep.h
index bb2794bd71..6ff6da13d1 100644
--- a/lib/libc/glibc/sysdeps/unix/mips/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,12 +15,10 @@
License along with the GNU C Library. If not, see
. */
+#include
#include
#include
-#ifndef __mips_isa_rev
-# define __mips_isa_rev 0
-#endif
#ifdef __ASSEMBLER__
diff --git a/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h b/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h
index a580834872..0eacbdce1f 100644
--- a/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sh/sysdep.h b/lib/libc/glibc/sysdeps/unix/sh/sysdep.h
index 28cb75ba1a..9c05baa7ac 100644
--- a/lib/libc/glibc/sysdeps/unix/sh/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sh/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysdep.h
index 2cc98725c3..a6ce5348ec 100644
--- a/lib/libc/glibc/sysdeps/unix/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -138,7 +138,7 @@
#include
/* Adjust both the __syscall_cancel and the SYSCALL_CANCEL macro to support
- 7 arguments instead of default 6 (curently only mip32). It avoid add
+ 7 arguments instead of default 6 (currently only mip32). It avoid add
the requirement to each architecture to support 7 argument macros
{INTERNAL,INLINE}_SYSCALL. */
#ifdef HAVE_CANCELABLE_SYSCALL_WITH_7_ARGS
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
index 8cdd6ed112..fee03ac76b 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. AArch64 version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h
index 7ccf9a2588..354928e0e1 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index f0e8d64eef..16f5a917b3 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -150,6 +150,19 @@
mov x8, SYS_ify (syscall_name); \
svc 0
+/* Clear ZA state of SME (ASM version). */
+/* The __libc_arm_za_disable function has special calling convention
+ that allows to call it without stack manipulation and preserving
+ most of the registers. */
+ .macro CALL_LIBC_ARM_ZA_DISABLE
+ cfi_remember_state
+ mov x13, x30
+ cfi_register(x30, x13)
+ bl __libc_arm_za_disable
+ mov x30, x13
+ cfi_restore_state
+ .endm
+
#else /* not __ASSEMBLER__ */
# define VDSO_NAME "LINUX_2.6.39"
@@ -230,6 +243,32 @@
#undef HAVE_INTERNAL_BRK_ADDR_SYMBOL
#define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1
+/* Clear ZA state of SME (C version). */
+/* The __libc_arm_za_disable function has special calling convention
+ that allows to call it without stack manipulation and preserving
+ most of the registers. */
+#define CALL_LIBC_ARM_ZA_DISABLE() \
+({ \
+ unsigned long int __tmp; \
+ asm volatile ( \
+ " .cfi_remember_state\n" \
+ " mov %0, x30\n" \
+ " .cfi_register x30, %0\n" \
+ " bl __libc_arm_za_disable\n" \
+ " mov x30, %0\n" \
+ " .cfi_restore_state\n" \
+ : "=r" (__tmp) \
+ : \
+ : "x14", "x15", "x16", "x17", "x18", "memory" ); \
+})
+
+/* Do clear ZA state of SME before making normal clone syscall. */
+#define INLINE_CLONE_SYSCALL(a0, a1, a2, a3, a4) \
+({ \
+ CALL_LIBC_ARM_ZA_DISABLE (); \
+ INLINE_SYSCALL_CALL (clone, a0, a1, a2, a3, a4); \
+})
+
#endif /* __ASSEMBLER__ */
#endif /* linux/aarch64/sysdep.h */
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h
index 06e31404ec..90cea3f840 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arc/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for ARC.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 10caae8b91..d169bf5894 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h
index 9acb39e5ea..779f7c4e09 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h
index 6a477068ba..e45b8acac2 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h
index e42a305829..a689929291 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h
index 56ba6c25bf..f32cf2b1c0 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h
index f39c7c1dec..be7a2fefff 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel_stat.h
@@ -1,5 +1,5 @@
/* Internal definitions for stat functions. Linux/csky.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h
index 6ef105d330..305474b873 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h
@@ -1,5 +1,5 @@
/* Assembly macros for C-SKY.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h
index 6381243a48..32f17cc221 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. Linux version.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c
index 0df9da3222..0c5b1357a5 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c
index 8da9be35e4..b48d5ca66f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstat64.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c
index f7c13dba0c..893958a3f4 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c
index 0c27744b79..0ba58c7349 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/fstatat64.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
index 60f6d4dc39..35f92ed162 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. i386 version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h
index d21e3bae46..e922a501f3 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. i386 version.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h
index 87806a7a97..c6ff041736 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h
index 8af305d410..0b32ed7809 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h
@@ -1,5 +1,5 @@
/* Internal declarations for sys/timex.h.
- Copyright (C) 2014-2025 Free Software Foundation, Inc.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h
index a49a9159cf..42318b0a6f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -261,4 +261,9 @@
# define __ASSUME_FCHMODAT2 0
#endif
+/* The mseal system call was introduced across all architectures in Linux 6.10
+ (although only supported on 64-bit CPUs). */
+/* zig patch: don't assume kernel version */
+#define __ASSUME_MSEAL 0
+
#endif /* kernel-features.h */
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h
index a861c94a80..db1bb1b7d5 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel_stat.h
@@ -1,5 +1,5 @@
/* Internal definitions for stat functions.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/loongarch/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/loongarch/sysdep.h
index b9835d8391..ac5b36f8c0 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/loongarch/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/loongarch/sysdep.h
@@ -1,5 +1,5 @@
/* Assembly macros for LoongArch.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c
index 5b441718a4..6f4fd5d63e 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c
index 3d70ef8c00..4909911343 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/lstat64.c
@@ -1,5 +1,5 @@
/* Get file status.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
index 30b182fe1c..5b060bc45b 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 3515b20433..d66fe16fa8 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
index 02bde90490..36b70aa26e 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 6f6b46e026..342b0bfc90 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h
index d86ac92352..7790f0d14b 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 83ccfb08af..4314fc990e 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h
index 6e8375d54b..b20a629788 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/kstat_cp.h
@@ -1,5 +1,5 @@
/* Struct stat/stat64 to stat/stat64 conversion for Linux.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
index 78044d669d..3ee86888d6 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h
index 76e121a11f..6434bd6b84 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -1,5 +1,5 @@
/* Syscall definitions, Linux MIPS generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c
index 291b5bc658..d6fc150dfd 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mknodat.c
@@ -1,5 +1,5 @@
/* Create a special or ordinary file. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
index 6e5adb97b3..40538d8909 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. PowerPC version.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
index 40b5163ae9..6596c5bdb2 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
@@ -1,5 +1,5 @@
/* Definition of `struct stat' used in the kernel.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index 4018c3079e..469cca0f18 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h
index 929784df55..855a10d7e8 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/sysdep.h
@@ -1,5 +1,5 @@
/* Syscall definitions, Linux PowerPC generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h
index dce50835d1..32087c0602 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. RISC-V version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h
index 05e0e0523d..7f0eb07045 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -355,7 +355,14 @@
_sys_result; \
})
+#ifdef __riscv_v
+# define __SYSCALL_CLOBBERS "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", \
+ "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", \
+ "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", \
+ "v30", "v31", "vl", "vtype", "vxrm", "vxsat", "memory"
+#else
# define __SYSCALL_CLOBBERS "memory"
+#endif
extern long int __syscall_error (long int neg_errno);
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
index 2bbf72f71d..826a1e425c 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
- Copyright (C) 2003-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h
index 4d9f2232e0..a955c18738 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. S/390 version.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index a282e1222e..9c9e2a271f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for 64 bit S/390.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h
index 1e3581b65f..4d7b62442d 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h
index c802980013..ee2d92edff 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sysdep.h
@@ -1,5 +1,5 @@
/* Syscall definitions, Linux s390 version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h
index eecaa2dc66..449db8503c 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h
@@ -1,5 +1,5 @@
/* Single thread optimization, Linux version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
index 97e9641ab7..78c87964a2 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index 24423db127..eb29341113 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. SPARC version.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
index 9ad5192dec..d687670f47 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h
index 8f4f9f85a7..324c614fb5 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/kstat_cp.h
@@ -1,5 +1,5 @@
/* Struct kernel_stat64 to stat64. Linux/SPARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
index 1781dec0d3..9da3499e8b 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h
index 0051f8b4ca..180ac83db7 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c
index ce5175b34c..8fb0210397 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c
index 61b6f5e669..a21c758bb6 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat64.c
@@ -1,5 +1,5 @@
/* Get file status. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c
index a409f9580c..54239b8efb 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.c
@@ -1,5 +1,5 @@
/* Struct stat/stat64 to stat/stat64 conversion for Linux.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h
index 7f34f783e2..d68b407580 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/stat_t64_cp.h
@@ -1,5 +1,5 @@
/* Copy to/from struct stat with and without 64-bit time_t support.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h
index c2efdff3ac..e3b878e1be 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/struct_stat_time64.h
@@ -1,5 +1,5 @@
/* Struct stat with 64-bit time support.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h
index 781f1780d0..216f75704e 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h
index db67ca26a3..63e6610c9f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h
index 1385082f7b..8b221c3ade 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2015-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
index 8ba6e7fa95..18336f844f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h
index e8108efe2c..1ea28eb13f 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h
index 7778171875..8798309651 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number. x86-64 version.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 1d175dfb13..104acff3a3 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
index 707261ade3..63e8b99be2 100644
--- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h
index ac789a9d45..830dd09913 100644
--- a/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h
index e51d84780a..30a007b301 100644
--- a/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h
+++ b/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h
@@ -1,5 +1,5 @@
/* Hacks needed for divdi3 symbol manipulation.
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h
index bcdd76a2ab..403ad38344 100644
--- a/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h
+++ b/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/x86/sysdep.h b/lib/libc/glibc/sysdeps/x86/sysdep.h
index b8e963b654..41b040d51b 100644
--- a/lib/libc/glibc/sysdeps/x86/sysdep.h
+++ b/lib/libc/glibc/sysdeps/x86/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for x86.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/x86_64/start.S b/lib/libc/glibc/sysdeps/x86_64/start.S
index 6cb661bf04..40d6ed85b5 100644
--- a/lib/libc/glibc/sysdeps/x86_64/start.S
+++ b/lib/libc/glibc/sysdeps/x86_64/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF x86-64 ABI.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/sysdep.h
index 0356f09379..017540c78b 100644
--- a/lib/libc/glibc/sysdeps/x86_64/sysdep.h
+++ b/lib/libc/glibc/sysdeps/x86_64/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for x86-64.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h
index 91beeabf05..fcd5c18039 100644
--- a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h
+++ b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for x32.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-any/asm/hwcap.h b/lib/libc/include/aarch64-linux-any/asm/hwcap.h
index 9dc9726add..e484bcc59a 100644
--- a/lib/libc/include/aarch64-linux-any/asm/hwcap.h
+++ b/lib/libc/include/aarch64-linux-any/asm/hwcap.h
@@ -145,5 +145,6 @@
*/
#define HWCAP3_MTE_FAR (1UL << 0)
#define HWCAP3_MTE_STORE_ONLY (1UL << 1)
+#define HWCAP3_LSFE (1UL << 2)
#endif /* __ASM_HWCAP_H */
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-any/asm/kvm.h b/lib/libc/include/aarch64-linux-any/asm/kvm.h
index 1950d28cb3..8b5e526846 100644
--- a/lib/libc/include/aarch64-linux-any/asm/kvm.h
+++ b/lib/libc/include/aarch64-linux-any/asm/kvm.h
@@ -31,7 +31,7 @@
#define KVM_SPSR_FIQ 4
#define KVM_NR_SPSR 5
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
#include
#include
diff --git a/lib/libc/include/aarch64-linux-any/asm/ptrace.h b/lib/libc/include/aarch64-linux-any/asm/ptrace.h
index ebe7724174..b5f9c58433 100644
--- a/lib/libc/include/aarch64-linux-any/asm/ptrace.h
+++ b/lib/libc/include/aarch64-linux-any/asm/ptrace.h
@@ -80,7 +80,7 @@
#define PTRACE_PEEKMTETAGS 33
#define PTRACE_POKEMTETAGS 34
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/*
* User structures for general purpose, floating point and debug registers.
@@ -332,6 +332,6 @@ struct user_gcs {
__u64 gcspr_el0;
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* __ASM_PTRACE_H */
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-any/asm/sigcontext.h b/lib/libc/include/aarch64-linux-any/asm/sigcontext.h
index b84cf3a202..0543ba5e05 100644
--- a/lib/libc/include/aarch64-linux-any/asm/sigcontext.h
+++ b/lib/libc/include/aarch64-linux-any/asm/sigcontext.h
@@ -17,7 +17,7 @@
#ifndef __ASM_SIGCONTEXT_H
#define __ASM_SIGCONTEXT_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -192,7 +192,7 @@ struct gcs_context {
__u64 reserved;
};
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#include
diff --git a/lib/libc/include/aarch64-linux-any/asm/unistd_64.h b/lib/libc/include/aarch64-linux-any/asm/unistd_64.h
index 892b50dc52..6f36afa697 100644
--- a/lib/libc/include/aarch64-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/aarch64-linux-any/asm/unistd_64.h
@@ -326,6 +326,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h b/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h
index 52dee64f6f..c317abbbf6 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fenv.h b/lib/libc/include/aarch64-linux-gnu/bits/fenv.h
index 702717e1e6..d7bd07fc73 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h b/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h
index dc002b3eda..8a75e4d867 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h
@@ -1,5 +1,5 @@
/* Define FP_FAST_* macros. AArch64 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h
index a2089de39f..f4189aa1bf 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP. AArch64 Linux version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -119,4 +119,7 @@
#define HWCAP2_SME_SF8FMA (1UL << 60)
#define HWCAP2_SME_SF8DP4 (1UL << 61)
#define HWCAP2_SME_SF8DP2 (1UL << 62)
-#define HWCAP2_POE (1UL << 63)
\ No newline at end of file
+#define HWCAP2_POE (1UL << 63)
+
+#define HWCAP3_MTE_FAR (1UL << 0)
+#define HWCAP3_MTE_STORE_ONLY (1UL << 1)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/indirect-return.h b/lib/libc/include/aarch64-linux-gnu/bits/indirect-return.h
index 8f6f790cdf..d310966075 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/indirect-return.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/indirect-return.h
@@ -1,5 +1,5 @@
/* Definition of __INDIRECT_RETURN. AArch64 version.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/link.h b/lib/libc/include/aarch64-linux-gnu/bits/link.h
index 693f135477..e8d9138f03 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/link.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/long-double.h b/lib/libc/include/aarch64-linux-gnu/bits/long-double.h
index 57d7be04a6..af7784dbe6 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-128 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/math-vector.h b/lib/libc/include/aarch64-linux-gnu/bits/math-vector.h
index c450622879..68043a976c 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/math-vector.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/math-vector.h
@@ -1,6 +1,6 @@
/* Platform-specific SIMD declarations of math functions.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -113,6 +113,14 @@
# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
# undef __DECL_SIMD_expm1f
# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
+# undef __DECL_SIMD_exp2m1
+# define __DECL_SIMD_exp2m1 __DECL_SIMD_aarch64
+# undef __DECL_SIMD_exp2m1f
+# define __DECL_SIMD_exp2m1f __DECL_SIMD_aarch64
+# undef __DECL_SIMD_exp10m1
+# define __DECL_SIMD_exp10m1 __DECL_SIMD_aarch64
+# undef __DECL_SIMD_exp10m1f
+# define __DECL_SIMD_exp10m1f __DECL_SIMD_aarch64
# undef __DECL_SIMD_hypot
# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
# undef __DECL_SIMD_hypotf
@@ -125,6 +133,10 @@
# define __DECL_SIMD_log10 __DECL_SIMD_aarch64
# undef __DECL_SIMD_log10f
# define __DECL_SIMD_log10f __DECL_SIMD_aarch64
+# undef __DECL_SIMD_log10p1
+# define __DECL_SIMD_log10p1 __DECL_SIMD_aarch64
+# undef __DECL_SIMD_log10p1f
+# define __DECL_SIMD_log10p1f __DECL_SIMD_aarch64
# undef __DECL_SIMD_log1p
# define __DECL_SIMD_log1p __DECL_SIMD_aarch64
# undef __DECL_SIMD_log1pf
@@ -133,6 +145,10 @@
# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
# undef __DECL_SIMD_log2f
# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
+# undef __DECL_SIMD_log2p1
+# define __DECL_SIMD_log2p1 __DECL_SIMD_aarch64
+# undef __DECL_SIMD_log2p1f
+# define __DECL_SIMD_log2p1f __DECL_SIMD_aarch64
# undef __DECL_SIMD_logp1
# define __DECL_SIMD_logp1 __DECL_SIMD_aarch64
# undef __DECL_SIMD_logp1f
@@ -141,6 +157,10 @@
# define __DECL_SIMD_pow __DECL_SIMD_aarch64
# undef __DECL_SIMD_powf
# define __DECL_SIMD_powf __DECL_SIMD_aarch64
+# undef __DECL_SIMD_rsqrt
+# define __DECL_SIMD_rsqrt __DECL_SIMD_aarch64
+# undef __DECL_SIMD_rsqrtf
+# define __DECL_SIMD_rsqrtf __DECL_SIMD_aarch64
# undef __DECL_SIMD_sin
# define __DECL_SIMD_sin __DECL_SIMD_aarch64
# undef __DECL_SIMD_sinf
@@ -212,13 +232,18 @@ __vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_exp2m1f (__f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_exp10m1f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_log10p1f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_log2p1f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_logp1f (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_rsqrtf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
__vpcs __f32x4_t _ZGVnN4v_sinpif (__f32x4_t);
@@ -247,13 +272,18 @@ __vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
+__vpcs __f64x2_t _ZGVnN2v_exp2m1 (__f64x2_t);
+__vpcs __f64x2_t _ZGVnN2v_exp10m1 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
+__vpcs __f64x2_t _ZGVnN2v_log10p1 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
+__vpcs __f64x2_t _ZGVnN2v_log2p1 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_logp1 (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
+__vpcs __f64x2_t _ZGVnN2v_rsqrt (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
__vpcs __f64x2_t _ZGVnN2v_sinpi (__f64x2_t);
@@ -287,13 +317,18 @@ __sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
+__sv_f32_t _ZGVsMxv_exp2m1f (__sv_f32_t, __sv_bool_t);
+__sv_f32_t _ZGVsMxv_exp10m1f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
+__sv_f32_t _ZGVsMxv_log10p1f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
+__sv_f32_t _ZGVsMxv_log2p1f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_logp1f (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
+__sv_f32_t _ZGVsMxv_rsqrtf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
__sv_f32_t _ZGVsMxv_sinpif (__sv_f32_t, __sv_bool_t);
@@ -322,13 +357,18 @@ __sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
+__sv_f64_t _ZGVsMxv_exp2m1 (__sv_f64_t, __sv_bool_t);
+__sv_f64_t _ZGVsMxv_exp10m1 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
+__sv_f64_t _ZGVsMxv_log10p1 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
+__sv_f64_t _ZGVsMxv_log2p1 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_logp1 (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
+__sv_f64_t _ZGVsMxv_rsqrt (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
__sv_f64_t _ZGVsMxv_sinpi (__sv_f64_t, __sv_bool_t);
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/mman.h b/lib/libc/include/aarch64-linux-gnu/bits/mman.h
index f09eebcbcd..e07d498d15 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/mman.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/AArch64 version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/procfs.h b/lib/libc/include/aarch64-linux-gnu/bits/procfs.h
index 075f1db99b..9ecaa7d1fa 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. AArch64 version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
index 0e0020a9e1..99a96d0d98 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h
index 2dbe12da0c..d53eef2452 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/rseq.h b/lib/libc/include/aarch64-linux-gnu/bits/rseq.h
index f3769e9fe0..3e670c7aeb 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux aarch64 architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h b/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h
index 7d3d93431e..f2e5f3635f 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h b/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h
index 36912770cb..faecee9c63 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h b/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h
index 0e273c5711..3cf88c099f 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- Copyright (C) 2015-2025 Free Software Foundation, Inc.
+ Copyright (C) 2015-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h
index a05896c684..e8ceba6bf6 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* AArch64 internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/struct_stat.h b/lib/libc/include/aarch64-linux-gnu/bits/struct_stat.h
index 724450a667..0462d37a68 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/timesize.h b/lib/libc/include/aarch64-linux-gnu/bits/timesize.h
index 04251ea75c..dff2da5ed6 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h b/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h
index 3f84507cc1..d6528d5b99 100644
--- a/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h
@@ -1,6 +1,6 @@
/* Determine the wordsize from the preprocessor defines.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/finclude/math-vector-fortran.h b/lib/libc/include/aarch64-linux-gnu/finclude/math-vector-fortran.h
index c17752e023..59c7f2db4a 100644
--- a/lib/libc/include/aarch64-linux-gnu/finclude/math-vector-fortran.h
+++ b/lib/libc/include/aarch64-linux-gnu/finclude/math-vector-fortran.h
@@ -1,5 +1,5 @@
! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
-! Copyright (C) 2019-2025 Free Software Foundation, Inc.
+! Copyright (C) 2019-2026 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
!
! The GNU C Library is free software; you can redistribute it and/or
@@ -15,33 +15,82 @@
! You should have received a copy of the GNU Lesser General Public
! License along with the GNU C Library; if not, see
! .
+
!GCC$ builtin (acos) attributes simd (notinbranch)
!GCC$ builtin (acosf) attributes simd (notinbranch)
+!GCC$ builtin (acosh) attributes simd (notinbranch)
+!GCC$ builtin (acoshf) attributes simd (notinbranch)
+!GCC$ builtin (acospi) attributes simd (notinbranch)
+!GCC$ builtin (acospif) attributes simd (notinbranch)
!GCC$ builtin (asin) attributes simd (notinbranch)
!GCC$ builtin (asinf) attributes simd (notinbranch)
+!GCC$ builtin (asinh) attributes simd (notinbranch)
+!GCC$ builtin (asinhf) attributes simd (notinbranch)
+!GCC$ builtin (asinpi) attributes simd (notinbranch)
+!GCC$ builtin (asinpif) attributes simd (notinbranch)
!GCC$ builtin (atan) attributes simd (notinbranch)
-!GCC$ builtin (atanf) attributes simd (notinbranch)
!GCC$ builtin (atan2) attributes simd (notinbranch)
!GCC$ builtin (atan2f) attributes simd (notinbranch)
+!GCC$ builtin (atan2pi) attributes simd (notinbranch)
+!GCC$ builtin (atan2pif) attributes simd (notinbranch)
+!GCC$ builtin (atanf) attributes simd (notinbranch)
+!GCC$ builtin (atanh) attributes simd (notinbranch)
+!GCC$ builtin (atanhf) attributes simd (notinbranch)
+!GCC$ builtin (atanpi) attributes simd (notinbranch)
+!GCC$ builtin (atanpif) attributes simd (notinbranch)
+!GCC$ builtin (cbrt) attributes simd (notinbranch)
+!GCC$ builtin (cbrtf) attributes simd (notinbranch)
!GCC$ builtin (cos) attributes simd (notinbranch)
!GCC$ builtin (cosf) attributes simd (notinbranch)
+!GCC$ builtin (cosh) attributes simd (notinbranch)
+!GCC$ builtin (coshf) attributes simd (notinbranch)
+!GCC$ builtin (cospi) attributes simd (notinbranch)
+!GCC$ builtin (cospif) attributes simd (notinbranch)
+!GCC$ builtin (erf) attributes simd (notinbranch)
+!GCC$ builtin (erfc) attributes simd (notinbranch)
+!GCC$ builtin (erfcf) attributes simd (notinbranch)
+!GCC$ builtin (erff) attributes simd (notinbranch)
!GCC$ builtin (exp) attributes simd (notinbranch)
-!GCC$ builtin (expf) attributes simd (notinbranch)
!GCC$ builtin (exp10) attributes simd (notinbranch)
!GCC$ builtin (exp10f) attributes simd (notinbranch)
+!GCC$ builtin (exp10m1) attributes simd (notinbranch)
+!GCC$ builtin (exp10m1f) attributes simd (notinbranch)
!GCC$ builtin (exp2) attributes simd (notinbranch)
!GCC$ builtin (exp2f) attributes simd (notinbranch)
+!GCC$ builtin (exp2m1) attributes simd (notinbranch)
+!GCC$ builtin (exp2m1f) attributes simd (notinbranch)
+!GCC$ builtin (expf) attributes simd (notinbranch)
!GCC$ builtin (expm1) attributes simd (notinbranch)
!GCC$ builtin (expm1f) attributes simd (notinbranch)
+!GCC$ builtin (hypot) attributes simd (notinbranch)
+!GCC$ builtin (hypotf) attributes simd (notinbranch)
!GCC$ builtin (log) attributes simd (notinbranch)
-!GCC$ builtin (logf) attributes simd (notinbranch)
!GCC$ builtin (log10) attributes simd (notinbranch)
!GCC$ builtin (log10f) attributes simd (notinbranch)
+!GCC$ builtin (log10p1) attributes simd (notinbranch)
+!GCC$ builtin (log10p1f) attributes simd (notinbranch)
!GCC$ builtin (log1p) attributes simd (notinbranch)
!GCC$ builtin (log1pf) attributes simd (notinbranch)
!GCC$ builtin (log2) attributes simd (notinbranch)
!GCC$ builtin (log2f) attributes simd (notinbranch)
+!GCC$ builtin (log2p1) attributes simd (notinbranch)
+!GCC$ builtin (log2p1f) attributes simd (notinbranch)
+!GCC$ builtin (logf) attributes simd (notinbranch)
+!GCC$ builtin (logp1) attributes simd (notinbranch)
+!GCC$ builtin (logp1f) attributes simd (notinbranch)
+!GCC$ builtin (pow) attributes simd (notinbranch)
+!GCC$ builtin (powf) attributes simd (notinbranch)
+!GCC$ builtin (rsqrt) attributes simd (notinbranch)
+!GCC$ builtin (rsqrtf) attributes simd (notinbranch)
!GCC$ builtin (sin) attributes simd (notinbranch)
!GCC$ builtin (sinf) attributes simd (notinbranch)
+!GCC$ builtin (sinh) attributes simd (notinbranch)
+!GCC$ builtin (sinhf) attributes simd (notinbranch)
+!GCC$ builtin (sinpi) attributes simd (notinbranch)
+!GCC$ builtin (sinpif) attributes simd (notinbranch)
!GCC$ builtin (tan) attributes simd (notinbranch)
-!GCC$ builtin (tanf) attributes simd (notinbranch)
\ No newline at end of file
+!GCC$ builtin (tanf) attributes simd (notinbranch)
+!GCC$ builtin (tanh) attributes simd (notinbranch)
+!GCC$ builtin (tanhf) attributes simd (notinbranch)
+!GCC$ builtin (tanpi) attributes simd (notinbranch)
+!GCC$ builtin (tanpif) attributes simd (notinbranch)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-gnu/fpu_control.h b/lib/libc/include/aarch64-linux-gnu/fpu_control.h
index fcb6cf7f96..8c7466ad16 100644
--- a/lib/libc/include/aarch64-linux-gnu/fpu_control.h
+++ b/lib/libc/include/aarch64-linux-gnu/fpu_control.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -20,6 +20,7 @@
#define _AARCH64_FPU_CONTROL_H
#include
+#include
/* Macros for accessing the FPCR and FPSR. */
diff --git a/lib/libc/include/aarch64-linux-gnu/ieee754.h b/lib/libc/include/aarch64-linux-gnu/ieee754.h
index a49523c3d8..a19fd8dcd1 100644
--- a/lib/libc/include/aarch64-linux-gnu/ieee754.h
+++ b/lib/libc/include/aarch64-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/aarch64-linux-gnu/sys/elf.h b/lib/libc/include/aarch64-linux-gnu/sys/elf.h
index 3611e2908d..68b7bb210d 100644
--- a/lib/libc/include/aarch64-linux-gnu/sys/elf.h
+++ b/lib/libc/include/aarch64-linux-gnu/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
index 9dda966148..cb3ddcbc69 100644
--- a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/AArch64 version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h b/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h
index 4866e4fd96..b84911aa14 100644
--- a/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -63,7 +63,7 @@ typedef struct
unsigned char __reserved[4096] __attribute__ ((__aligned__ (16)));
} mcontext_t;
-/* Userlevel context. */
+/* User-level context. */
typedef struct ucontext_t
{
unsigned long __ctx(uc_flags);
diff --git a/lib/libc/include/aarch64-linux-gnu/sys/user.h b/lib/libc/include/aarch64-linux-gnu/sys/user.h
index b370717dc2..3d622faaec 100644
--- a/lib/libc/include/aarch64-linux-gnu/sys/user.h
+++ b/lib/libc/include/aarch64-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/any-linux-any/asm-generic/posix_types.h b/lib/libc/include/any-linux-any/asm-generic/posix_types.h
index 99fb554755..8877dce186 100644
--- a/lib/libc/include/any-linux-any/asm-generic/posix_types.h
+++ b/lib/libc/include/any-linux-any/asm-generic/posix_types.h
@@ -86,6 +86,7 @@ typedef struct {
*/
typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
+typedef unsigned long long __kernel_uoff_t;
typedef __kernel_long_t __kernel_old_time_t;
typedef __kernel_long_t __kernel_time_t;
typedef long long __kernel_time64_t;
diff --git a/lib/libc/include/any-linux-any/asm-generic/unistd.h b/lib/libc/include/any-linux-any/asm-generic/unistd.h
index 810329deff..50b15f7713 100644
--- a/lib/libc/include/any-linux-any/asm-generic/unistd.h
+++ b/lib/libc/include/any-linux-any/asm-generic/unistd.h
@@ -857,9 +857,11 @@ __SYSCALL(__NR_open_tree_attr, sys_open_tree_attr)
__SYSCALL(__NR_file_getattr, sys_file_getattr)
#define __NR_file_setattr 469
__SYSCALL(__NR_file_setattr, sys_file_setattr)
+#define __NR_listns 470
+__SYSCALL(__NR_listns, sys_listns)
#undef __NR_syscalls
-#define __NR_syscalls 470
+#define __NR_syscalls 471
/*
* 32 bit systems traditionally used different
diff --git a/lib/libc/include/any-linux-any/drm/amdgpu_drm.h b/lib/libc/include/any-linux-any/drm/amdgpu_drm.h
index e54dab061a..a46b28cafa 100644
--- a/lib/libc/include/any-linux-any/drm/amdgpu_drm.h
+++ b/lib/libc/include/any-linux-any/drm/amdgpu_drm.h
@@ -57,6 +57,7 @@ extern "C" {
#define DRM_AMDGPU_USERQ 0x16
#define DRM_AMDGPU_USERQ_SIGNAL 0x17
#define DRM_AMDGPU_USERQ_WAIT 0x18
+#define DRM_AMDGPU_GEM_LIST_HANDLES 0x19
#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
@@ -77,6 +78,7 @@ extern "C" {
#define DRM_IOCTL_AMDGPU_USERQ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq)
#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)
+#define DRM_IOCTL_AMDGPU_GEM_LIST_HANDLES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_LIST_HANDLES, struct drm_amdgpu_gem_list_handles)
/**
* DOC: memory domains
@@ -103,6 +105,8 @@ extern "C" {
*
* %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for
* signalling user mode queues.
+ *
+ * %AMDGPU_GEM_DOMAIN_MMIO_REMAP MMIO remap page (special mapping for HDP flushing).
*/
#define AMDGPU_GEM_DOMAIN_CPU 0x1
#define AMDGPU_GEM_DOMAIN_GTT 0x2
@@ -111,13 +115,15 @@ extern "C" {
#define AMDGPU_GEM_DOMAIN_GWS 0x10
#define AMDGPU_GEM_DOMAIN_OA 0x20
#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
+#define AMDGPU_GEM_DOMAIN_MMIO_REMAP 0x80
#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
AMDGPU_GEM_DOMAIN_GTT | \
AMDGPU_GEM_DOMAIN_VRAM | \
AMDGPU_GEM_DOMAIN_GDS | \
AMDGPU_GEM_DOMAIN_GWS | \
- AMDGPU_GEM_DOMAIN_OA | \
- AMDGPU_GEM_DOMAIN_DOORBELL)
+ AMDGPU_GEM_DOMAIN_OA | \
+ AMDGPU_GEM_DOMAIN_DOORBELL | \
+ AMDGPU_GEM_DOMAIN_MMIO_REMAP)
/* Flag that CPU access will be required for the case of VRAM domain */
#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
@@ -800,6 +806,21 @@ union drm_amdgpu_wait_fences {
#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
#define AMDGPU_GEM_OP_SET_PLACEMENT 1
+#define AMDGPU_GEM_OP_GET_MAPPING_INFO 2
+
+struct drm_amdgpu_gem_vm_entry {
+ /* Start of mapping (in bytes) */
+ __u64 addr;
+
+ /* Size of mapping (in bytes) */
+ __u64 size;
+
+ /* Mapping offset */
+ __u64 offset;
+
+ /* flags needed to recreate mapping */
+ __u64 flags;
+};
/* Sets or returns a value associated with a buffer. */
struct drm_amdgpu_gem_op {
@@ -807,8 +828,44 @@ struct drm_amdgpu_gem_op {
__u32 handle;
/** AMDGPU_GEM_OP_* */
__u32 op;
- /** Input or return value */
+ /** Input or return value. For MAPPING_INFO op: pointer to array of struct drm_amdgpu_gem_vm_entry */
__u64 value;
+ /** For MAPPING_INFO op: number of mappings (in/out) */
+ __u32 num_entries;
+
+ __u32 padding;
+};
+
+#define AMDGPU_GEM_LIST_HANDLES_FLAG_IS_IMPORT (1 << 0)
+
+struct drm_amdgpu_gem_list_handles {
+ /* User pointer to array of drm_amdgpu_gem_bo_info_entry */
+ __u64 entries;
+
+ /* Size of entries buffer / Number of handles in process (if larger than size of buffer, must retry) */
+ __u32 num_entries;
+
+ __u32 padding;
+};
+
+struct drm_amdgpu_gem_list_handles_entry {
+ /* gem handle of buffer object */
+ __u32 gem_handle;
+
+ /* Currently just one flag: IS_IMPORT */
+ __u32 flags;
+
+ /* Size of bo */
+ __u64 size;
+
+ /* Preferred domains for GEM_CREATE */
+ __u64 preferred_domains;
+
+ /* GEM_CREATE flags for re-creation of buffer */
+ __u64 alloc_flags;
+
+ /* physical start_addr alignment in bytes for some HW requirements */
+ __u64 alignment;
};
#define AMDGPU_VA_OP_MAP 1
@@ -1031,10 +1088,11 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
* Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU
*
*/
-#define AMDGPU_IDS_FLAGS_FUSION 0x1
-#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
-#define AMDGPU_IDS_FLAGS_TMZ 0x4
-#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x8
+#define AMDGPU_IDS_FLAGS_FUSION 0x01
+#define AMDGPU_IDS_FLAGS_PREEMPTION 0x02
+#define AMDGPU_IDS_FLAGS_TMZ 0x04
+#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x08
+#define AMDGPU_IDS_FLAGS_GANG_SUBMIT 0x10
/*
* Query h/w info: Flag identifying VF/PF/PT mode
@@ -1497,27 +1555,6 @@ struct drm_amdgpu_info_hw_ip {
__u32 userq_num_slots;
};
-/* GFX metadata BO sizes and alignment info (in bytes) */
-struct drm_amdgpu_info_uq_fw_areas_gfx {
- /* shadow area size */
- __u32 shadow_size;
- /* shadow area base virtual mem alignment */
- __u32 shadow_alignment;
- /* context save area size */
- __u32 csa_size;
- /* context save area base virtual mem alignment */
- __u32 csa_alignment;
-};
-
-/* IP specific fw related information used in the
- * subquery AMDGPU_INFO_UQ_FW_AREAS
- */
-struct drm_amdgpu_info_uq_fw_areas {
- union {
- struct drm_amdgpu_info_uq_fw_areas_gfx gfx;
- };
-};
-
struct drm_amdgpu_info_num_handles {
/** Max handles as supported by firmware for UVD */
__u32 uvd_max_handles;
@@ -1619,15 +1656,6 @@ struct drm_amdgpu_info_uq_metadata {
#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
-/* FIXME wrong namespace! */
-struct drm_color_ctm_3x4 {
- /*
- * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
- * (not two's complement!) format.
- */
- __u64 matrix[12];
-};
-
#if defined(__cplusplus)
}
#endif
diff --git a/lib/libc/include/any-linux-any/drm/amdxdna_accel.h b/lib/libc/include/any-linux-any/drm/amdxdna_accel.h
index 9968df0ef8..745a4e3520 100644
--- a/lib/libc/include/any-linux-any/drm/amdxdna_accel.h
+++ b/lib/libc/include/any-linux-any/drm/amdxdna_accel.h
@@ -34,6 +34,7 @@ enum amdxdna_drm_ioctl_id {
DRM_AMDXDNA_EXEC_CMD,
DRM_AMDXDNA_GET_INFO,
DRM_AMDXDNA_SET_STATE,
+ DRM_AMDXDNA_GET_ARRAY = 10,
};
/**
@@ -153,6 +154,31 @@ enum amdxdna_bo_type {
AMDXDNA_BO_CMD,
};
+/**
+ * struct amdxdna_drm_va_entry
+ * @vaddr: Virtual address.
+ * @len: Size of entry.
+ */
+struct amdxdna_drm_va_entry {
+ __u64 vaddr;
+ __u64 len;
+};
+
+/**
+ * struct amdxdna_drm_va_tbl
+ * @dmabuf_fd: The fd of dmabuf.
+ * @num_entries: Number of va entries.
+ * @va_entries: Array of va entries.
+ *
+ * The input can be either a dmabuf fd or a virtual address entry table.
+ * When dmabuf_fd is used, num_entries must be zero.
+ */
+struct amdxdna_drm_va_tbl {
+ __s32 dmabuf_fd;
+ __u32 num_entries;
+ struct amdxdna_drm_va_entry va_entries[];
+};
+
/**
* struct amdxdna_drm_create_bo - Create a buffer object.
* @flags: Buffer flags. MBZ.
@@ -416,6 +442,52 @@ enum amdxdna_drm_get_param {
DRM_AMDXDNA_QUERY_HW_CONTEXTS,
DRM_AMDXDNA_QUERY_FIRMWARE_VERSION = 8,
DRM_AMDXDNA_GET_POWER_MODE,
+ DRM_AMDXDNA_QUERY_TELEMETRY,
+ DRM_AMDXDNA_GET_FORCE_PREEMPT_STATE,
+ DRM_AMDXDNA_QUERY_RESOURCE_INFO,
+ DRM_AMDXDNA_GET_FRAME_BOUNDARY_PREEMPT_STATE,
+};
+
+/**
+ * struct amdxdna_drm_get_resource_info - Get resource information
+ */
+struct amdxdna_drm_get_resource_info {
+ /** @npu_clk_max: max H-Clocks */
+ __u64 npu_clk_max;
+ /** @npu_tops_max: max TOPs */
+ __u64 npu_tops_max;
+ /** @npu_task_max: max number of tasks */
+ __u64 npu_task_max;
+ /** @npu_tops_curr: current TOPs */
+ __u64 npu_tops_curr;
+ /** @npu_task_curr: current number of tasks */
+ __u64 npu_task_curr;
+};
+
+/**
+ * struct amdxdna_drm_attribute_state - State of an attribute
+ */
+struct amdxdna_drm_attribute_state {
+ /** @state: enabled or disabled */
+ __u8 state;
+ /** @pad: MBZ */
+ __u8 pad[7];
+};
+
+/**
+ * struct amdxdna_drm_query_telemetry_header - Telemetry data header
+ */
+struct amdxdna_drm_query_telemetry_header {
+ /** @major: Firmware telemetry interface major version number */
+ __u32 major;
+ /** @minor: Firmware telemetry interface minor version number */
+ __u32 minor;
+ /** @type: Telemetry query type */
+ __u32 type;
+ /** @map_num_elements: Total number of elements in the map table */
+ __u32 map_num_elements;
+ /** @map: Element map */
+ __u32 map[];
};
/**
@@ -430,10 +502,131 @@ struct amdxdna_drm_get_info {
__u64 buffer; /* in/out */
};
+#define AMDXDNA_HWCTX_STATE_IDLE 0
+#define AMDXDNA_HWCTX_STATE_ACTIVE 1
+
+/**
+ * struct amdxdna_drm_hwctx_entry - The hardware context array entry
+ */
+struct amdxdna_drm_hwctx_entry {
+ /** @context_id: Context ID. */
+ __u32 context_id;
+ /** @start_col: Start AIE array column assigned to context. */
+ __u32 start_col;
+ /** @num_col: Number of AIE array columns assigned to context. */
+ __u32 num_col;
+ /** @hwctx_id: The real hardware context id. */
+ __u32 hwctx_id;
+ /** @pid: ID of process which created this context. */
+ __s64 pid;
+ /** @command_submissions: Number of commands submitted. */
+ __u64 command_submissions;
+ /** @command_completions: Number of commands completed. */
+ __u64 command_completions;
+ /** @migrations: Number of times been migrated. */
+ __u64 migrations;
+ /** @preemptions: Number of times been preempted. */
+ __u64 preemptions;
+ /** @errors: Number of errors happened. */
+ __u64 errors;
+ /** @priority: Context priority. */
+ __u64 priority;
+ /** @heap_usage: Usage of device heap buffer. */
+ __u64 heap_usage;
+ /** @suspensions: Number of times been suspended. */
+ __u64 suspensions;
+ /**
+ * @state: Context state.
+ * %AMDXDNA_HWCTX_STATE_IDLE
+ * %AMDXDNA_HWCTX_STATE_ACTIVE
+ */
+ __u32 state;
+ /** @pasid: PASID been bound. */
+ __u32 pasid;
+ /** @gops: Giga operations per second. */
+ __u32 gops;
+ /** @fps: Frames per second. */
+ __u32 fps;
+ /** @dma_bandwidth: DMA bandwidth. */
+ __u32 dma_bandwidth;
+ /** @latency: Frame response latency. */
+ __u32 latency;
+ /** @frame_exec_time: Frame execution time. */
+ __u32 frame_exec_time;
+ /** @txn_op_idx: Index of last control code executed. */
+ __u32 txn_op_idx;
+ /** @ctx_pc: Program counter. */
+ __u32 ctx_pc;
+ /** @fatal_error_type: Fatal error type if context crashes. */
+ __u32 fatal_error_type;
+ /** @fatal_error_exception_type: Firmware exception type. */
+ __u32 fatal_error_exception_type;
+ /** @fatal_error_exception_pc: Firmware exception program counter. */
+ __u32 fatal_error_exception_pc;
+ /** @fatal_error_app_module: Exception module name. */
+ __u32 fatal_error_app_module;
+ /** @pad: Structure pad. */
+ __u32 pad;
+};
+
+/**
+ * struct amdxdna_async_error - XDNA async error structure
+ */
+struct amdxdna_async_error {
+ /** @err_code: Error code. */
+ __u64 err_code;
+ /** @ts_us: Timestamp. */
+ __u64 ts_us;
+ /** @ex_err_code: Extra error code */
+ __u64 ex_err_code;
+};
+
+#define DRM_AMDXDNA_HW_CONTEXT_ALL 0
+#define DRM_AMDXDNA_HW_LAST_ASYNC_ERR 2
+
+/**
+ * struct amdxdna_drm_get_array - Get information array.
+ */
+struct amdxdna_drm_get_array {
+ /**
+ * @param:
+ *
+ * Supported params:
+ *
+ * %DRM_AMDXDNA_HW_CONTEXT_ALL:
+ * Returns all created hardware contexts.
+ */
+ __u32 param;
+ /**
+ * @element_size:
+ *
+ * Specifies maximum element size and returns the actual element size.
+ */
+ __u32 element_size;
+ /**
+ * @num_element:
+ *
+ * Specifies maximum number of elements and returns the actual number
+ * of elements.
+ */
+ __u32 num_element; /* in/out */
+ /** @pad: MBZ */
+ __u32 pad;
+ /**
+ * @buffer:
+ *
+ * Specifies the match conditions and returns the matched information
+ * array.
+ */
+ __u64 buffer;
+};
+
enum amdxdna_drm_set_param {
DRM_AMDXDNA_SET_POWER_MODE,
DRM_AMDXDNA_WRITE_AIE_MEM,
DRM_AMDXDNA_WRITE_AIE_REG,
+ DRM_AMDXDNA_SET_FORCE_PREEMPT,
+ DRM_AMDXDNA_SET_FRAME_BOUNDARY_PREEMPT,
};
/**
@@ -494,6 +687,10 @@ struct amdxdna_drm_set_power_mode {
DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, \
struct amdxdna_drm_set_state)
+#define DRM_IOCTL_AMDXDNA_GET_ARRAY \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_ARRAY, \
+ struct amdxdna_drm_get_array)
+
#if defined(__cplusplus)
} /* extern c end */
#endif
diff --git a/lib/libc/include/any-linux-any/drm/drm.h b/lib/libc/include/any-linux-any/drm/drm.h
index b6ca2dc367..bd8bd0b2a4 100644
--- a/lib/libc/include/any-linux-any/drm/drm.h
+++ b/lib/libc/include/any-linux-any/drm/drm.h
@@ -591,34 +591,65 @@ struct drm_set_version {
int drm_dd_minor;
};
-/* DRM_IOCTL_GEM_CLOSE ioctl argument type */
+/**
+ * struct drm_gem_close - Argument for &DRM_IOCTL_GEM_CLOSE ioctl.
+ * @handle: Handle of the object to be closed.
+ * @pad: Padding.
+ *
+ * Releases the handle to an mm object.
+ */
struct drm_gem_close {
- /** Handle of the object to be closed. */
__u32 handle;
__u32 pad;
};
-/* DRM_IOCTL_GEM_FLINK ioctl argument type */
+/**
+ * struct drm_gem_flink - Argument for &DRM_IOCTL_GEM_FLINK ioctl.
+ * @handle: Handle for the object being named.
+ * @name: Returned global name.
+ *
+ * Create a global name for an object, returning the name.
+ *
+ * Note that the name does not hold a reference; when the object
+ * is freed, the name goes away.
+ */
struct drm_gem_flink {
- /** Handle for the object being named */
__u32 handle;
-
- /** Returned global name */
__u32 name;
};
-/* DRM_IOCTL_GEM_OPEN ioctl argument type */
+/**
+ * struct drm_gem_open - Argument for &DRM_IOCTL_GEM_OPEN ioctl.
+ * @name: Name of object being opened.
+ * @handle: Returned handle for the object.
+ * @size: Returned size of the object
+ *
+ * Open an object using the global name, returning a handle and the size.
+ *
+ * This handle (of course) holds a reference to the object, so the object
+ * will not go away until the handle is deleted.
+ */
struct drm_gem_open {
- /** Name of object being opened */
__u32 name;
-
- /** Returned handle for the object */
__u32 handle;
-
- /** Returned size of the object */
__u64 size;
};
+/**
+ * struct drm_gem_change_handle - Argument for &DRM_IOCTL_GEM_CHANGE_HANDLE ioctl.
+ * @handle: The handle of a gem object.
+ * @new_handle: An available gem handle.
+ *
+ * This ioctl changes the handle of a GEM object to the specified one.
+ * The new handle must be unused. On success the old handle is closed
+ * and all further IOCTL should refer to the new handle only.
+ * Calls to DRM_IOCTL_PRIME_FD_TO_HANDLE will return the new handle.
+ */
+struct drm_gem_change_handle {
+ __u32 handle;
+ __u32 new_handle;
+};
+
/**
* DRM_CAP_DUMB_BUFFER
*
@@ -869,6 +900,21 @@ struct drm_get_cap {
*/
#define DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6
+/**
+ * DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
+ *
+ * If set to 1 the DRM core will allow setting the COLOR_PIPELINE
+ * property on a &drm_plane, as well as drm_colorop properties.
+ *
+ * Setting of these plane properties will be rejected when this client
+ * cap is set:
+ * - COLOR_ENCODING
+ * - COLOR_RANGE
+ *
+ * The client must enable &DRM_CLIENT_CAP_ATOMIC first.
+ */
+#define DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 7
+
/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap {
__u64 capability;
@@ -1303,6 +1349,14 @@ extern "C" {
*/
#define DRM_IOCTL_SET_CLIENT_NAME DRM_IOWR(0xD1, struct drm_set_client_name)
+/**
+ * DRM_IOCTL_GEM_CHANGE_HANDLE - Move an object to a different handle
+ *
+ * Some applications (notably CRIU) need objects to have specific gem handles.
+ * This ioctl changes the object at one gem handle to use a new gem handle.
+ */
+#define DRM_IOCTL_GEM_CHANGE_HANDLE DRM_IOWR(0xD2, struct drm_gem_change_handle)
+
/*
* Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x9f.
diff --git a/lib/libc/include/any-linux-any/drm/drm_fourcc.h b/lib/libc/include/any-linux-any/drm/drm_fourcc.h
index 560229d1f0..f13e98f662 100644
--- a/lib/libc/include/any-linux-any/drm/drm_fourcc.h
+++ b/lib/libc/include/any-linux-any/drm/drm_fourcc.h
@@ -979,14 +979,20 @@ extern "C" {
* 2 = Gob Height 8, Turing+ Page Kind mapping
* 3 = Reserved for future use.
*
- * 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further
- * bit remapping step that occurs at an even lower level than the
- * page kind and block linear swizzles. This causes the layout of
- * surfaces mapped in those SOC's GPUs to be incompatible with the
- * equivalent mapping on other GPUs in the same system.
+ * 22:22 s Sector layout. There is a further bit remapping step that occurs
+ * 26:27 at an even lower level than the page kind and block linear
+ * swizzles. This causes the bit arrangement of surfaces in memory
+ * to differ subtly, and prevents direct sharing of surfaces between
+ * GPUs with different layouts.
*
- * 0 = Tegra K1 - Tegra Parker/TX2 Layout.
- * 1 = Desktop GPU and Tegra Xavier+ Layout
+ * 0 = Tegra K1 - Tegra Parker/TX2 Layout
+ * 1 = Pre-GB20x, GB20x 32+ bpp, GB10, Tegra Xavier-Orin Layout
+ * 2 = GB20x(Blackwell 2)+ 8 bpp surface layout
+ * 3 = GB20x(Blackwell 2)+ 16 bpp surface layout
+ * 4 = Reserved for future use.
+ * 5 = Reserved for future use.
+ * 6 = Reserved for future use.
+ * 7 = Reserved for future use.
*
* 25:23 c Lossless Framebuffer Compression type.
*
@@ -1001,7 +1007,7 @@ extern "C" {
* 6 = Reserved for future use
* 7 = Reserved for future use
*
- * 55:25 - Reserved for future use. Must be zero.
+ * 55:28 - Reserved for future use. Must be zero.
*/
#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
fourcc_mod_code(NVIDIA, (0x10 | \
@@ -1009,6 +1015,7 @@ extern "C" {
(((k) & 0xff) << 12) | \
(((g) & 0x3) << 20) | \
(((s) & 0x1) << 22) | \
+ (((s) & 0x6) << 25) | \
(((c) & 0x7) << 23)))
/* To grandfather in prior block linear format modifiers to the above layout,
diff --git a/lib/libc/include/any-linux-any/drm/drm_mode.h b/lib/libc/include/any-linux-any/drm/drm_mode.h
index 852c53245d..b9d7342bd5 100644
--- a/lib/libc/include/any-linux-any/drm/drm_mode.h
+++ b/lib/libc/include/any-linux-any/drm/drm_mode.h
@@ -629,6 +629,7 @@ struct drm_mode_connector_set_property {
#define DRM_MODE_OBJECT_FB 0xfbfbfbfb
#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee
+#define DRM_MODE_OBJECT_COLOROP 0xfafafafa
#define DRM_MODE_OBJECT_ANY 0
struct drm_mode_obj_get_properties {
@@ -846,6 +847,20 @@ struct drm_color_ctm {
__u64 matrix[9];
};
+struct drm_color_ctm_3x4 {
+ /*
+ * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
+ * (not two's complement!) format.
+ *
+ * out matrix in
+ * |R| |0 1 2 3 | | R |
+ * |G| = |4 5 6 7 | x | G |
+ * |B| |8 9 10 11| | B |
+ * |1.0|
+ */
+ __u64 matrix[12];
+};
+
struct drm_color_lut {
/*
* Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and
@@ -857,6 +872,125 @@ struct drm_color_lut {
__u16 reserved;
};
+/*
+ * struct drm_color_lut32
+ *
+ * 32-bit per channel color LUT entry, similar to drm_color_lut.
+ */
+struct drm_color_lut32 {
+ __u32 red;
+ __u32 green;
+ __u32 blue;
+ __u32 reserved;
+};
+
+/**
+ * enum drm_colorop_type - Type of color operation
+ *
+ * drm_colorops can be of many different types. Each type behaves differently
+ * and defines a different set of properties. This enum defines all types and
+ * gives a high-level description.
+ */
+enum drm_colorop_type {
+ /**
+ * @DRM_COLOROP_1D_CURVE:
+ *
+ * enum string "1D Curve"
+ *
+ * A 1D curve that is being applied to all color channels. The
+ * curve is specified via the CURVE_1D_TYPE colorop property.
+ */
+ DRM_COLOROP_1D_CURVE,
+
+ /**
+ * @DRM_COLOROP_1D_LUT:
+ *
+ * enum string "1D LUT"
+ *
+ * A simple 1D LUT of uniformly spaced &drm_color_lut32 entries,
+ * packed into a blob via the DATA property. The driver's
+ * expected LUT size is advertised via the SIZE property.
+ *
+ * The DATA blob is an array of struct drm_color_lut32 with size
+ * of "size".
+ */
+ DRM_COLOROP_1D_LUT,
+
+ /**
+ * @DRM_COLOROP_CTM_3X4:
+ *
+ * enum string "3x4 Matrix"
+ *
+ * A 3x4 matrix. Its values are specified via the
+ * &drm_color_ctm_3x4 struct provided via the DATA property.
+ *
+ * The DATA blob is a float[12]:
+ * out matrix in
+ * | R | | 0 1 2 3 | | R |
+ * | G | = | 4 5 6 7 | x | G |
+ * | B | | 8 9 10 12 | | B |
+ */
+ DRM_COLOROP_CTM_3X4,
+
+ /**
+ * @DRM_COLOROP_MULTIPLIER:
+ *
+ * enum string "Multiplier"
+ *
+ * A simple multiplier, applied to all color values. The
+ * multiplier is specified as a S31.32 via the MULTIPLIER
+ * property.
+ */
+ DRM_COLOROP_MULTIPLIER,
+
+ /**
+ * @DRM_COLOROP_3D_LUT:
+ *
+ * enum string "3D LUT"
+ *
+ * A 3D LUT of &drm_color_lut32 entries,
+ * packed into a blob via the DATA property. The driver's expected
+ * LUT size is advertised via the SIZE property, i.e., a 3D LUT with
+ * 17x17x17 entries will have SIZE set to 17.
+ *
+ * The DATA blob is a 3D array of struct drm_color_lut32 with dimension
+ * length of "size".
+ * The LUT elements are traversed like so:
+ *
+ * for B in range 0..n
+ * for G in range 0..n
+ * for R in range 0..n
+ * index = R + n * (G + n * B)
+ * color = lut3d[index]
+ */
+ DRM_COLOROP_3D_LUT,
+};
+
+/**
+ * enum drm_colorop_lut3d_interpolation_type - type of 3DLUT interpolation
+ */
+enum drm_colorop_lut3d_interpolation_type {
+ /**
+ * @DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL:
+ *
+ * Tetrahedral 3DLUT interpolation
+ */
+ DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
+};
+
+/**
+ * enum drm_colorop_lut1d_interpolation_type - type of interpolation for 1D LUTs
+ */
+enum drm_colorop_lut1d_interpolation_type {
+ /**
+ * @DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR:
+ *
+ * Linear interpolation. Values between points of the LUT will be
+ * linearly interpolated.
+ */
+ DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
+};
+
/**
* struct drm_plane_size_hint - Plane size hints
* @width: The width of the plane in pixel
@@ -962,6 +1096,14 @@ struct hdr_output_metadata {
* Request that the kernel sends back a vblank event (see
* struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the
* page-flip is done.
+ *
+ * When used with atomic uAPI, one event will be delivered per CRTC included in
+ * the atomic commit. A CRTC is included in an atomic commit if one of its
+ * properties is set, or if a property is set on a connector or plane linked
+ * via the CRTC_ID property to the CRTC. At least one CRTC must be included,
+ * and all pulled in CRTCs must be either previously or newly powered on (in
+ * other words, a powered off CRTC which stays off cannot be included in the
+ * atomic commit).
*/
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
/**
@@ -1058,7 +1200,7 @@ struct drm_mode_crtc_page_flip_target {
* struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout.
* @height: buffer height in pixels
* @width: buffer width in pixels
- * @bpp: bits per pixel
+ * @bpp: color mode
* @flags: must be zero
* @handle: buffer object handle
* @pitch: number of bytes between two consecutive lines
@@ -1066,6 +1208,54 @@ struct drm_mode_crtc_page_flip_target {
*
* User-space fills @height, @width, @bpp and @flags. If the IOCTL succeeds,
* the kernel fills @handle, @pitch and @size.
+ *
+ * The value of @bpp is a color-mode number describing a specific format
+ * or a variant thereof. The value often corresponds to the number of bits
+ * per pixel for most modes, although there are exceptions. Each color mode
+ * maps to a DRM format plus a number of modes with similar pixel layout.
+ * Framebuffer layout is always linear.
+ *
+ * Support for all modes and formats is optional. Even if dumb-buffer
+ * creation with a certain color mode succeeds, it is not guaranteed that
+ * the DRM driver supports any of the related formats. Most drivers support
+ * a color mode of 32 with a format of DRM_FORMAT_XRGB8888 on their primary
+ * plane.
+ *
+ * +------------+------------------------+------------------------+
+ * | Color mode | Framebuffer format | Compatible formats |
+ * +============+========================+========================+
+ * | 32 | * DRM_FORMAT_XRGB8888 | * DRM_FORMAT_BGRX8888 |
+ * | | | * DRM_FORMAT_RGBX8888 |
+ * | | | * DRM_FORMAT_XBGR8888 |
+ * +------------+------------------------+------------------------+
+ * | 24 | * DRM_FORMAT_RGB888 | * DRM_FORMAT_BGR888 |
+ * +------------+------------------------+------------------------+
+ * | 16 | * DRM_FORMAT_RGB565 | * DRM_FORMAT_BGR565 |
+ * +------------+------------------------+------------------------+
+ * | 15 | * DRM_FORMAT_XRGB1555 | * DRM_FORMAT_BGRX1555 |
+ * | | | * DRM_FORMAT_RGBX1555 |
+ * | | | * DRM_FORMAT_XBGR1555 |
+ * +------------+------------------------+------------------------+
+ * | 8 | * DRM_FORMAT_C8 | * DRM_FORMAT_D8 |
+ * | | | * DRM_FORMAT_R8 |
+ * +------------+------------------------+------------------------+
+ * | 4 | * DRM_FORMAT_C4 | * DRM_FORMAT_D4 |
+ * | | | * DRM_FORMAT_R4 |
+ * +------------+------------------------+------------------------+
+ * | 2 | * DRM_FORMAT_C2 | * DRM_FORMAT_D2 |
+ * | | | * DRM_FORMAT_R2 |
+ * +------------+------------------------+------------------------+
+ * | 1 | * DRM_FORMAT_C1 | * DRM_FORMAT_D1 |
+ * | | | * DRM_FORMAT_R1 |
+ * +------------+------------------------+------------------------+
+ *
+ * Color modes of 10, 12, 15, 30 and 64 are only supported for use by
+ * legacy user space. Please don't use them in new code. Other modes
+ * are not support.
+ *
+ * Do not attempt to allocate anything but linear framebuffer memory
+ * with single-plane RGB data. Allocation of other framebuffer
+ * layouts requires dedicated ioctls in the respective DRM driver.
*/
struct drm_mode_create_dumb {
__u32 height;
diff --git a/lib/libc/include/any-linux-any/drm/ethosu_accel.h b/lib/libc/include/any-linux-any/drm/ethosu_accel.h
new file mode 100644
index 0000000000..1a905bbd68
--- /dev/null
+++ b/lib/libc/include/any-linux-any/drm/ethosu_accel.h
@@ -0,0 +1,261 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright (C) 2025 Arm, Ltd. */
+#ifndef _ETHOSU_DRM_H_
+#define _ETHOSU_DRM_H_
+
+#include "drm.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/**
+ * DOC: IOCTL IDs
+ *
+ * enum drm_ethosu_ioctl_id - IOCTL IDs
+ *
+ * Place new ioctls at the end, don't re-order, don't replace or remove entries.
+ *
+ * These IDs are not meant to be used directly. Use the DRM_IOCTL_ETHOSU_xxx
+ * definitions instead.
+ */
+enum drm_ethosu_ioctl_id {
+ /** @DRM_ETHOSU_DEV_QUERY: Query device information. */
+ DRM_ETHOSU_DEV_QUERY = 0,
+
+ /** @DRM_ETHOSU_BO_CREATE: Create a buffer object. */
+ DRM_ETHOSU_BO_CREATE,
+
+ /** @DRM_ETHOSU_BO_WAIT: Wait on a buffer object's fence. */
+ DRM_ETHOSU_BO_WAIT,
+
+ /**
+ * @DRM_ETHOSU_BO_MMAP_OFFSET: Get the file offset to pass to
+ * mmap to map a GEM object.
+ */
+ DRM_ETHOSU_BO_MMAP_OFFSET,
+
+ /**
+ * @DRM_ETHOSU_CMDSTREAM_BO_CREATE: Create a command stream buffer
+ * object.
+ */
+ DRM_ETHOSU_CMDSTREAM_BO_CREATE,
+
+ /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
+ DRM_ETHOSU_SUBMIT,
+};
+
+/**
+ * DOC: IOCTL arguments
+ */
+
+/**
+ * enum drm_ethosu_dev_query_type - Query type
+ *
+ * Place new types at the end, don't re-order, don't remove or replace.
+ */
+enum drm_ethosu_dev_query_type {
+ /** @DRM_ETHOSU_DEV_QUERY_NPU_INFO: Query NPU information. */
+ DRM_ETHOSU_DEV_QUERY_NPU_INFO = 0,
+};
+
+/**
+ * struct drm_ethosu_gpu_info - NPU information
+ *
+ * Structure grouping all queryable information relating to the NPU.
+ */
+struct drm_ethosu_npu_info {
+ /** @id : NPU ID. */
+ __u32 id;
+#define DRM_ETHOSU_ARCH_MAJOR(x) ((x) >> 28)
+#define DRM_ETHOSU_ARCH_MINOR(x) (((x) >> 20) & 0xff)
+#define DRM_ETHOSU_ARCH_PATCH(x) (((x) >> 16) & 0xf)
+#define DRM_ETHOSU_PRODUCT_MAJOR(x) (((x) >> 12) & 0xf)
+#define DRM_ETHOSU_VERSION_MAJOR(x) (((x) >> 8) & 0xf)
+#define DRM_ETHOSU_VERSION_MINOR(x) (((x) >> 4) & 0xff)
+#define DRM_ETHOSU_VERSION_STATUS(x) ((x) & 0xf)
+
+ /** @gpu_rev: GPU revision. */
+ __u32 config;
+
+ __u32 sram_size;
+};
+
+/**
+ * struct drm_ethosu_dev_query - Arguments passed to DRM_ETHOSU_IOCTL_DEV_QUERY
+ */
+struct drm_ethosu_dev_query {
+ /** @type: the query type (see drm_ethosu_dev_query_type). */
+ __u32 type;
+
+ /**
+ * @size: size of the type being queried.
+ *
+ * If pointer is NULL, size is updated by the driver to provide the
+ * output structure size. If pointer is not NULL, the driver will
+ * only copy min(size, actual_structure_size) bytes to the pointer,
+ * and update the size accordingly. This allows us to extend query
+ * types without breaking userspace.
+ */
+ __u32 size;
+
+ /**
+ * @pointer: user pointer to a query type struct.
+ *
+ * Pointer can be NULL, in which case, nothing is copied, but the
+ * actual structure size is returned. If not NULL, it must point to
+ * a location that's large enough to hold size bytes.
+ */
+ __u64 pointer;
+};
+
+/**
+ * enum drm_ethosu_bo_flags - Buffer object flags, passed at creation time.
+ */
+enum drm_ethosu_bo_flags {
+ /**
+ * @DRM_ETHOSU_BO_NO_MMAP: The buffer object will never be CPU-mapped
+ * in userspace.
+ */
+ DRM_ETHOSU_BO_NO_MMAP = (1 << 0),
+};
+
+/**
+ * struct drm_ethosu_bo_create - Arguments passed to DRM_IOCTL_ETHOSU_BO_CREATE.
+ */
+struct drm_ethosu_bo_create {
+ /**
+ * @size: Requested size for the object
+ *
+ * The (page-aligned) allocated size for the object will be returned.
+ */
+ __u64 size;
+
+ /**
+ * @flags: Flags. Must be a combination of drm_ethosu_bo_flags flags.
+ */
+ __u32 flags;
+
+ /**
+ * @handle: Returned handle for the object.
+ *
+ * Object handles are nonzero.
+ */
+ __u32 handle;
+};
+
+/**
+ * struct drm_ethosu_bo_mmap_offset - Arguments passed to DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET.
+ */
+struct drm_ethosu_bo_mmap_offset {
+ /** @handle: Handle of the object we want an mmap offset for. */
+ __u32 handle;
+
+ /** @pad: MBZ. */
+ __u32 pad;
+
+ /** @offset: The fake offset to use for subsequent mmap calls. */
+ __u64 offset;
+};
+
+/**
+ * struct drm_ethosu_wait_bo - ioctl argument for waiting for
+ * completion of the last DRM_ETHOSU_SUBMIT on a BO.
+ *
+ * This is useful for cases where multiple processes might be
+ * rendering to a BO and you want to wait for all rendering to be
+ * completed.
+ */
+struct drm_ethosu_bo_wait {
+ __u32 handle;
+ __u32 pad;
+ __s64 timeout_ns; /* absolute */
+};
+
+struct drm_ethosu_cmdstream_bo_create {
+ /* Size of the data argument. */
+ __u32 size;
+
+ /* Flags, currently must be 0. */
+ __u32 flags;
+
+ /* Pointer to the data. */
+ __u64 data;
+
+ /** Returned GEM handle for the BO. */
+ __u32 handle;
+
+ /* Pad, must be 0. */
+ __u32 pad;
+};
+
+/**
+ * struct drm_ethosu_job - A job to be run on the NPU
+ *
+ * The kernel will schedule the execution of this job taking into account its
+ * dependencies with other jobs. All tasks in the same job will be executed
+ * sequentially on the same core, to benefit from memory residency in SRAM.
+ */
+struct drm_ethosu_job {
+ /** Input: BO handle for cmdstream. */
+ __u32 cmd_bo;
+
+ /** Input: Amount of SRAM to use. */
+ __u32 sram_size;
+
+#define ETHOSU_MAX_REGIONS 8
+ /** Input: Array of BO handles for each region. */
+ __u32 region_bo_handles[ETHOSU_MAX_REGIONS];
+};
+
+/**
+ * struct drm_ethosu_submit - ioctl argument for submitting commands to the NPU.
+ *
+ * The kernel will schedule the execution of these jobs in dependency order.
+ */
+struct drm_ethosu_submit {
+ /** Input: Pointer to an array of struct drm_ethosu_job. */
+ __u64 jobs;
+
+ /** Input: Number of jobs passed in. */
+ __u32 job_count;
+
+ /** Reserved, must be zero. */
+ __u32 pad;
+};
+
+/**
+ * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
+ * @__access: Access type. Must be R, W or RW.
+ * @__id: One of the DRM_ETHOSU_xxx id.
+ * @__type: Suffix of the type being passed to the IOCTL.
+ *
+ * Don't use this macro directly, use the DRM_IOCTL_ETHOSU_xxx
+ * values instead.
+ *
+ * Return: An IOCTL number to be passed to ioctl() from userspace.
+ */
+#define DRM_IOCTL_ETHOSU(__access, __id, __type) \
+ DRM_IO ## __access(DRM_COMMAND_BASE + DRM_ETHOSU_ ## __id, \
+ struct drm_ethosu_ ## __type)
+
+enum {
+ DRM_IOCTL_ETHOSU_DEV_QUERY =
+ DRM_IOCTL_ETHOSU(WR, DEV_QUERY, dev_query),
+ DRM_IOCTL_ETHOSU_BO_CREATE =
+ DRM_IOCTL_ETHOSU(WR, BO_CREATE, bo_create),
+ DRM_IOCTL_ETHOSU_BO_WAIT =
+ DRM_IOCTL_ETHOSU(WR, BO_WAIT, bo_wait),
+ DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET =
+ DRM_IOCTL_ETHOSU(WR, BO_MMAP_OFFSET, bo_mmap_offset),
+ DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE =
+ DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
+ DRM_IOCTL_ETHOSU_SUBMIT =
+ DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _ETHOSU_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/drm/ivpu_accel.h b/lib/libc/include/any-linux-any/drm/ivpu_accel.h
index df8215c5fc..2993c1415d 100644
--- a/lib/libc/include/any-linux-any/drm/ivpu_accel.h
+++ b/lib/libc/include/any-linux-any/drm/ivpu_accel.h
@@ -25,6 +25,7 @@ extern "C" {
#define DRM_IVPU_CMDQ_CREATE 0x0b
#define DRM_IVPU_CMDQ_DESTROY 0x0c
#define DRM_IVPU_CMDQ_SUBMIT 0x0d
+#define DRM_IVPU_BO_CREATE_FROM_USERPTR 0x0e
#define DRM_IOCTL_IVPU_GET_PARAM \
DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)
@@ -69,6 +70,10 @@ extern "C" {
#define DRM_IOCTL_IVPU_CMDQ_SUBMIT \
DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, struct drm_ivpu_cmdq_submit)
+#define DRM_IOCTL_IVPU_BO_CREATE_FROM_USERPTR \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_CREATE_FROM_USERPTR, \
+ struct drm_ivpu_bo_create_from_userptr)
+
/**
* DOC: contexts
*
@@ -90,6 +95,7 @@ extern "C" {
#define DRM_IVPU_PARAM_TILE_CONFIG 11
#define DRM_IVPU_PARAM_SKU 12
#define DRM_IVPU_PARAM_CAPABILITIES 13
+#define DRM_IVPU_PARAM_PREEMPT_BUFFER_SIZE 14
#define DRM_IVPU_PLATFORM_TYPE_SILICON 0
@@ -126,6 +132,13 @@ extern "C" {
* command queue destroy and submit job on specific command queue.
*/
#define DRM_IVPU_CAP_MANAGE_CMDQ 3
+/**
+ * DRM_IVPU_CAP_BO_CREATE_FROM_USERPTR
+ *
+ * Driver supports creating buffer objects from user space memory pointers.
+ * This allows creating GEM buffers from existing user memory regions.
+ */
+#define DRM_IVPU_CAP_BO_CREATE_FROM_USERPTR 4
/**
* struct drm_ivpu_param - Get/Set VPU parameters
@@ -176,6 +189,9 @@ struct drm_ivpu_param {
*
* %DRM_IVPU_PARAM_CAPABILITIES:
* Supported capabilities (read-only)
+ *
+ * %DRM_IVPU_PARAM_PREEMPT_BUFFER_SIZE:
+ * Size of the preemption buffer (read-only)
*/
__u32 param;
@@ -190,6 +206,7 @@ struct drm_ivpu_param {
#define DRM_IVPU_BO_HIGH_MEM DRM_IVPU_BO_SHAVE_MEM
#define DRM_IVPU_BO_MAPPABLE 0x00000002
#define DRM_IVPU_BO_DMA_MEM 0x00000004
+#define DRM_IVPU_BO_READ_ONLY 0x00000008
#define DRM_IVPU_BO_CACHED 0x00000000
#define DRM_IVPU_BO_UNCACHED 0x00010000
@@ -200,6 +217,7 @@ struct drm_ivpu_param {
(DRM_IVPU_BO_HIGH_MEM | \
DRM_IVPU_BO_MAPPABLE | \
DRM_IVPU_BO_DMA_MEM | \
+ DRM_IVPU_BO_READ_ONLY | \
DRM_IVPU_BO_CACHE_MASK)
/**
@@ -251,6 +269,44 @@ struct drm_ivpu_bo_create {
__u64 vpu_addr;
};
+/**
+ * struct drm_ivpu_bo_create_from_userptr - Create dma-buf from user pointer
+ *
+ * Create a GEM buffer object from a user pointer to a memory region.
+ */
+struct drm_ivpu_bo_create_from_userptr {
+ /** @user_ptr: User pointer to memory region (must be page aligned) */
+ __u64 user_ptr;
+
+ /** @size: Size of the memory region in bytes (must be page aligned) */
+ __u64 size;
+
+ /**
+ * @flags:
+ *
+ * Supported flags:
+ *
+ * %DRM_IVPU_BO_HIGH_MEM:
+ *
+ * Allocate VPU address from >4GB range.
+ *
+ * %DRM_IVPU_BO_DMA_MEM:
+ *
+ * Allocate from DMA memory range accessible by hardware DMA.
+ *
+ * %DRM_IVPU_BO_READ_ONLY:
+ *
+ * Allocate as a read-only buffer object.
+ */
+ __u32 flags;
+
+ /** @handle: Returned GEM object handle */
+ __u32 handle;
+
+ /** @vpu_addr: Returned VPU virtual address */
+ __u64 vpu_addr;
+};
+
/**
* struct drm_ivpu_bo_info - Query buffer object info
*/
@@ -371,6 +427,13 @@ struct drm_ivpu_cmdq_submit {
* to be executed. The offset has to be 8-byte aligned.
*/
__u32 commands_offset;
+ /**
+ * @preempt_buffer_index:
+ *
+ * Index of the preemption buffer in the buffers_ptr array.
+ */
+ __u32 preempt_buffer_index;
+ __u32 reserved;
};
/* drm_ivpu_bo_wait job status codes */
diff --git a/lib/libc/include/any-linux-any/drm/panfrost_drm.h b/lib/libc/include/any-linux-any/drm/panfrost_drm.h
index 22557772e6..639c91e2b7 100644
--- a/lib/libc/include/any-linux-any/drm/panfrost_drm.h
+++ b/lib/libc/include/any-linux-any/drm/panfrost_drm.h
@@ -22,6 +22,8 @@ extern "C" {
#define DRM_PANFROST_PERFCNT_DUMP 0x07
#define DRM_PANFROST_MADVISE 0x08
#define DRM_PANFROST_SET_LABEL_BO 0x09
+#define DRM_PANFROST_JM_CTX_CREATE 0x0a
+#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
@@ -31,6 +33,8 @@ extern "C" {
#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)
#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
+#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
+#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
/*
* Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
@@ -50,27 +54,47 @@ extern "C" {
* This asks the kernel to have the GPU execute a render command list.
*/
struct drm_panfrost_submit {
-
- /** Address to GPU mapping of job descriptor */
+ /**
+ * @jc: Address to GPU mapping of job descriptor
+ */
__u64 jc;
-
- /** An optional array of sync objects to wait on before starting this job. */
+ /**
+ * @in_syncs: An optional array of sync objects to wait on
+ * before starting this job.
+ */
__u64 in_syncs;
-
- /** Number of sync objects to wait on before starting this job. */
+ /**
+ * @in_sync_count: Number of sync objects to wait on before
+ * starting this job.
+ */
__u32 in_sync_count;
-
- /** An optional sync object to place the completion fence in. */
+ /**
+ * @out_sync: An optional sync object to place the completion fence in.
+ */
__u32 out_sync;
-
- /** Pointer to a u32 array of the BOs that are referenced by the job. */
+ /**
+ * @bo_handles: Pointer to a u32 array of the BOs that are
+ * referenced by the job.
+ */
__u64 bo_handles;
-
- /** Number of BO handles passed in (size is that times 4). */
+ /**
+ * @bo_handle_count: Number of BO handles passed in (size is
+ * that times 4).
+ */
__u32 bo_handle_count;
-
- /** A combination of PANFROST_JD_REQ_* */
+ /**
+ * @requirements: A combination of PANFROST_JD_REQ_*
+ */
__u32 requirements;
+ /**
+ * @jm_ctx_handle: JM context handle. Zero if you want to use the
+ * default context.
+ */
+ __u32 jm_ctx_handle;
+ /**
+ * @pad: Padding field. Must be zero.
+ */
+ __u32 pad;
};
/**
@@ -82,9 +106,18 @@ struct drm_panfrost_submit {
* completed.
*/
struct drm_panfrost_wait_bo {
+ /**
+ * @handle: Handle for the object to wait for.
+ */
__u32 handle;
+ /**
+ * @pad: Padding, must be zero-filled.
+ */
__u32 pad;
- __s64 timeout_ns; /* absolute */
+ /**
+ * @timeout_ns: absolute number of nanoseconds to wait.
+ */
+ __s64 timeout_ns;
};
/* Valid flags to pass to drm_panfrost_create_bo */
@@ -97,16 +130,26 @@ struct drm_panfrost_wait_bo {
* The flags argument is a bit mask of PANFROST_BO_* flags.
*/
struct drm_panfrost_create_bo {
+ /**
+ * @size: size of shmem/BO area to create (bytes)
+ */
__u32 size;
+ /**
+ * @flags: see PANFROST_BO_* flags
+ */
__u32 flags;
- /** Returned GEM handle for the BO. */
+ /**
+ * @handle: Returned GEM handle for the BO.
+ */
__u32 handle;
- /* Pad, must be zero-filled. */
+ /**
+ * @pad: Padding, must be zero-filled.
+ */
__u32 pad;
/**
- * Returned offset for the BO in the GPU address space. This offset
- * is private to the DRM fd and is valid for the lifetime of the GEM
- * handle.
+ * @offset: Returned offset for the BO in the GPU address space.
+ * This offset is private to the DRM fd and is valid for the
+ * lifetime of the GEM handle.
*
* This offset value will always be nonzero, since various HW
* units treat 0 specially.
@@ -126,10 +169,17 @@ struct drm_panfrost_create_bo {
* used in a future extension.
*/
struct drm_panfrost_mmap_bo {
- /** Handle for the object being mapped. */
+ /**
+ * @handle: Handle for the object being mapped.
+ */
__u32 handle;
+ /**
+ * @flags: currently not used (should be zero)
+ */
__u32 flags;
- /** offset into the drm node to use for subsequent mmap call. */
+ /**
+ * @offset: offset into the drm node to use for subsequent mmap call.
+ */
__u64 offset;
};
@@ -177,6 +227,7 @@ enum drm_panfrost_param {
DRM_PANFROST_PARAM_AFBC_FEATURES,
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
+ DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
};
struct drm_panfrost_get_param {
@@ -185,7 +236,7 @@ struct drm_panfrost_get_param {
__u64 value;
};
-/**
+/*
* Returns the offset for the BO in the GPU address space for this DRM fd.
* This is the same value returned by drm_panfrost_create_bo, if that was called
* from this DRM fd.
@@ -233,12 +284,14 @@ struct drm_panfrost_madvise {
* struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs.
*/
struct drm_panfrost_set_label_bo {
- /** @handle: Handle of the buffer object to label. */
+ /**
+ * @handle: Handle of the buffer object to label.
+ */
__u32 handle;
-
- /** @pad: MBZ. */
+ /**
+ * @pad: Must be zero.
+ */
__u32 pad;
-
/**
* @label: User pointer to a NUL-terminated string
*
@@ -299,6 +352,49 @@ struct panfrost_dump_registers {
__u32 value;
};
+enum drm_panfrost_jm_ctx_priority {
+ /**
+ * @PANFROST_JM_CTX_PRIORITY_LOW: Low priority context.
+ */
+ PANFROST_JM_CTX_PRIORITY_LOW = 0,
+
+ /**
+ * @PANFROST_JM_CTX_PRIORITY_MEDIUM: Medium priority context.
+ */
+ PANFROST_JM_CTX_PRIORITY_MEDIUM,
+
+ /**
+ * @PANFROST_JM_CTX_PRIORITY_HIGH: High priority context.
+ *
+ * Requires CAP_SYS_NICE or DRM_MASTER.
+ */
+ PANFROST_JM_CTX_PRIORITY_HIGH,
+};
+
+struct drm_panfrost_jm_ctx_create {
+ /**
+ * @handle: Handle of the created JM context
+ */
+ __u32 handle;
+ /**
+ * @priority: Context priority (see enum drm_panfrost_jm_ctx_priority).
+ */
+ __u32 priority;
+};
+
+struct drm_panfrost_jm_ctx_destroy {
+ /**
+ * @handle: Handle of the JM context to destroy.
+ *
+ * Must be a valid context handle returned by DRM_IOCTL_PANTHOR_JM_CTX_CREATE.
+ */
+ __u32 handle;
+ /**
+ * @pad: Padding field, must be zero.
+ */
+ __u32 pad;
+};
+
#if defined(__cplusplus)
}
#endif
diff --git a/lib/libc/include/any-linux-any/drm/panthor_drm.h b/lib/libc/include/any-linux-any/drm/panthor_drm.h
index 9274998d24..35bb24e19e 100644
--- a/lib/libc/include/any-linux-any/drm/panthor_drm.h
+++ b/lib/libc/include/any-linux-any/drm/panthor_drm.h
@@ -327,6 +327,9 @@ struct drm_panthor_gpu_info {
/** @pad: MBZ. */
__u32 pad;
+
+ /** @gpu_features: Bitmask describing supported GPU-wide features */
+ __u64 gpu_features;
};
/**
diff --git a/lib/libc/include/any-linux-any/drm/rocket_accel.h b/lib/libc/include/any-linux-any/drm/rocket_accel.h
new file mode 100644
index 0000000000..782120422b
--- /dev/null
+++ b/lib/libc/include/any-linux-any/drm/rocket_accel.h
@@ -0,0 +1,142 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2024 Tomeu Vizoso
+ */
+#ifndef __DRM_UAPI_ROCKET_ACCEL_H__
+#define __DRM_UAPI_ROCKET_ACCEL_H__
+
+#include "drm.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define DRM_ROCKET_CREATE_BO 0x00
+#define DRM_ROCKET_SUBMIT 0x01
+#define DRM_ROCKET_PREP_BO 0x02
+#define DRM_ROCKET_FINI_BO 0x03
+
+#define DRM_IOCTL_ROCKET_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKET_CREATE_BO, struct drm_rocket_create_bo)
+#define DRM_IOCTL_ROCKET_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_SUBMIT, struct drm_rocket_submit)
+#define DRM_IOCTL_ROCKET_PREP_BO DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_PREP_BO, struct drm_rocket_prep_bo)
+#define DRM_IOCTL_ROCKET_FINI_BO DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_FINI_BO, struct drm_rocket_fini_bo)
+
+/**
+ * struct drm_rocket_create_bo - ioctl argument for creating Rocket BOs.
+ *
+ */
+struct drm_rocket_create_bo {
+ /** Input: Size of the requested BO. */
+ __u32 size;
+
+ /** Output: GEM handle for the BO. */
+ __u32 handle;
+
+ /**
+ * Output: DMA address for the BO in the NPU address space. This address
+ * is private to the DRM fd and is valid for the lifetime of the GEM
+ * handle.
+ */
+ __u64 dma_address;
+
+ /** Output: Offset into the drm node to use for subsequent mmap call. */
+ __u64 offset;
+};
+
+/**
+ * struct drm_rocket_prep_bo - ioctl argument for starting CPU ownership of the BO.
+ *
+ * Takes care of waiting for any NPU jobs that might still use the NPU and performs cache
+ * synchronization.
+ */
+struct drm_rocket_prep_bo {
+ /** Input: GEM handle of the buffer object. */
+ __u32 handle;
+
+ /** Reserved, must be zero. */
+ __u32 reserved;
+
+ /** Input: Amount of time to wait for NPU jobs. */
+ __s64 timeout_ns;
+};
+
+/**
+ * struct drm_rocket_fini_bo - ioctl argument for finishing CPU ownership of the BO.
+ *
+ * Synchronize caches for NPU access.
+ */
+struct drm_rocket_fini_bo {
+ /** Input: GEM handle of the buffer object. */
+ __u32 handle;
+
+ /** Reserved, must be zero. */
+ __u32 reserved;
+};
+
+/**
+ * struct drm_rocket_task - A task to be run on the NPU
+ *
+ * A task is the smallest unit of work that can be run on the NPU.
+ */
+struct drm_rocket_task {
+ /** Input: DMA address to NPU mapping of register command buffer */
+ __u32 regcmd;
+
+ /** Input: Number of commands in the register command buffer */
+ __u32 regcmd_count;
+};
+
+/**
+ * struct drm_rocket_job - A job to be run on the NPU
+ *
+ * The kernel will schedule the execution of this job taking into account its
+ * dependencies with other jobs. All tasks in the same job will be executed
+ * sequentially on the same core, to benefit from memory residency in SRAM.
+ */
+struct drm_rocket_job {
+ /** Input: Pointer to an array of struct drm_rocket_task. */
+ __u64 tasks;
+
+ /** Input: Pointer to a u32 array of the BOs that are read by the job. */
+ __u64 in_bo_handles;
+
+ /** Input: Pointer to a u32 array of the BOs that are written to by the job. */
+ __u64 out_bo_handles;
+
+ /** Input: Number of tasks passed in. */
+ __u32 task_count;
+
+ /** Input: Size in bytes of the structs in the @tasks field. */
+ __u32 task_struct_size;
+
+ /** Input: Number of input BO handles passed in (size is that times 4). */
+ __u32 in_bo_handle_count;
+
+ /** Input: Number of output BO handles passed in (size is that times 4). */
+ __u32 out_bo_handle_count;
+};
+
+/**
+ * struct drm_rocket_submit - ioctl argument for submitting commands to the NPU.
+ *
+ * The kernel will schedule the execution of these jobs in dependency order.
+ */
+struct drm_rocket_submit {
+ /** Input: Pointer to an array of struct drm_rocket_job. */
+ __u64 jobs;
+
+ /** Input: Number of jobs passed in. */
+ __u32 job_count;
+
+ /** Input: Size in bytes of the structs in the @jobs field. */
+ __u32 job_struct_size;
+
+ /** Reserved, must be zero. */
+ __u64 reserved;
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __DRM_UAPI_ROCKET_ACCEL_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/drm/v3d_drm.h b/lib/libc/include/any-linux-any/drm/v3d_drm.h
index 2ab8bee601..b2b694d4c0 100644
--- a/lib/libc/include/any-linux-any/drm/v3d_drm.h
+++ b/lib/libc/include/any-linux-any/drm/v3d_drm.h
@@ -294,6 +294,8 @@ enum drm_v3d_param {
DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
DRM_V3D_PARAM_MAX_PERF_COUNTERS,
DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES,
+ DRM_V3D_PARAM_GLOBAL_RESET_COUNTER,
+ DRM_V3D_PARAM_CONTEXT_RESET_COUNTER,
};
struct drm_v3d_get_param {
diff --git a/lib/libc/include/any-linux-any/drm/xe_drm.h b/lib/libc/include/any-linux-any/drm/xe_drm.h
index fbe9b00ea6..68f290c393 100644
--- a/lib/libc/include/any-linux-any/drm/xe_drm.h
+++ b/lib/libc/include/any-linux-any/drm/xe_drm.h
@@ -81,6 +81,8 @@ extern "C" {
* - &DRM_IOCTL_XE_EXEC
* - &DRM_IOCTL_XE_WAIT_USER_FENCE
* - &DRM_IOCTL_XE_OBSERVATION
+ * - &DRM_IOCTL_XE_MADVISE
+ * - &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
*/
/*
@@ -102,6 +104,8 @@ extern "C" {
#define DRM_XE_EXEC 0x09
#define DRM_XE_WAIT_USER_FENCE 0x0a
#define DRM_XE_OBSERVATION 0x0b
+#define DRM_XE_MADVISE 0x0c
+#define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d
/* Must be kept compact -- no holes */
@@ -117,6 +121,8 @@ extern "C" {
#define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)
#define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)
#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
+#define DRM_IOCTL_XE_MADVISE DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)
+#define DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_QUERY_MEM_RANGE_ATTRS, struct drm_xe_vm_query_mem_range_attr)
/**
* DOC: Xe IOCTL Extensions
@@ -760,8 +766,16 @@ struct drm_xe_device_query {
* gem creation
*
* The @flags can be:
- * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING
- * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT
+ * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING - Modify the GEM object
+ * allocation strategy by deferring physical memory allocation
+ * until the object is either bound to a virtual memory region via
+ * VM_BIND or accessed by the CPU. As a result, no backing memory is
+ * reserved at the time of GEM object creation.
+ * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT - Indicates that the GEM object is
+ * intended for scanout via the display engine. When set, kernel ensures
+ * that the allocation is placed in a memory region compatible with the
+ * display engine requirements. This may impose restrictions on tiling,
+ * alignment, and memory placement to guarantee proper display functionality.
* - %DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM - When using VRAM as a
* possible placement, ensure that the corresponding VRAM allocation
* will always use the CPU accessible part of VRAM. This is important
@@ -1003,6 +1017,24 @@ struct drm_xe_vm_destroy {
* valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
* mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
* handle MBZ, and the BO offset MBZ.
+ * - %DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET - Can be used in combination with
+ * %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR to reset madvises when the underlying
+ * CPU address space range is unmapped (typically with munmap(2) or brk(2)).
+ * The madvise values set with &DRM_IOCTL_XE_MADVISE are reset to the values
+ * that were present immediately after the &DRM_IOCTL_XE_VM_BIND.
+ * The reset GPU virtual address range is the intersection of the range bound
+ * using &DRM_IOCTL_XE_VM_BIND and the virtual CPU address space range
+ * unmapped.
+ * This functionality is present to mimic the behaviour of CPU address space
+ * madvises set using madvise(2), which are typically reset on unmap.
+ * Note: free(3) may or may not call munmap(2) and/or brk(2), and may thus
+ * not invoke autoreset. Neither will stack variables going out of scope.
+ * Therefore it's recommended to always explicitly reset the madvises when
+ * freeing the memory backing a region used in a &DRM_IOCTL_XE_MADVISE call.
+ *
+ * The @prefetch_mem_region_instance for %DRM_XE_VM_BIND_OP_PREFETCH can also be:
+ * - %DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC, which ensures prefetching occurs in
+ * the memory region advised by madvise.
*/
struct drm_xe_vm_bind_op {
/** @extensions: Pointer to the first extension struct, if any */
@@ -1105,9 +1137,11 @@ struct drm_xe_vm_bind_op {
#define DRM_XE_VM_BIND_FLAG_DUMPABLE (1 << 3)
#define DRM_XE_VM_BIND_FLAG_CHECK_PXP (1 << 4)
#define DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR (1 << 5)
+#define DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET (1 << 6)
/** @flags: Bind flags */
__u32 flags;
+#define DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC -1
/**
* @prefetch_mem_region_instance: Memory region to prefetch VMA to.
* It is a region instance, not a mask.
@@ -1429,6 +1463,7 @@ struct drm_xe_exec {
/** @exec_queue_id: Exec queue ID for the batch buffer */
__u32 exec_queue_id;
+#define DRM_XE_MAX_SYNCS 1024
/** @num_syncs: Amount of struct drm_xe_sync in array. */
__u32 num_syncs;
@@ -1974,6 +2009,271 @@ struct drm_xe_query_eu_stall {
__u64 sampling_rates[];
};
+/**
+ * struct drm_xe_madvise - Input of &DRM_IOCTL_XE_MADVISE
+ *
+ * This structure is used to set memory attributes for a virtual address range
+ * in a VM. The type of attribute is specified by @type, and the corresponding
+ * union member is used to provide additional parameters for @type.
+ *
+ * Supported attribute types:
+ * - DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC: Set preferred memory location.
+ * - DRM_XE_MEM_RANGE_ATTR_ATOMIC: Set atomic access policy.
+ * - DRM_XE_MEM_RANGE_ATTR_PAT: Set page attribute table index.
+ *
+ * Example:
+ *
+ * .. code-block:: C
+ *
+ * struct drm_xe_madvise madvise = {
+ * .vm_id = vm_id,
+ * .start = 0x100000,
+ * .range = 0x2000,
+ * .type = DRM_XE_MEM_RANGE_ATTR_ATOMIC,
+ * .atomic_val = DRM_XE_ATOMIC_DEVICE,
+ * };
+ *
+ * ioctl(fd, DRM_IOCTL_XE_MADVISE, &madvise);
+ *
+ */
+struct drm_xe_madvise {
+ /** @extensions: Pointer to the first extension struct, if any */
+ __u64 extensions;
+
+ /** @start: start of the virtual address range */
+ __u64 start;
+
+ /** @range: size of the virtual address range */
+ __u64 range;
+
+ /** @vm_id: vm_id of the virtual range */
+ __u32 vm_id;
+
+#define DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC 0
+#define DRM_XE_MEM_RANGE_ATTR_ATOMIC 1
+#define DRM_XE_MEM_RANGE_ATTR_PAT 2
+ /** @type: type of attribute */
+ __u32 type;
+
+ union {
+ /**
+ * @preferred_mem_loc: preferred memory location
+ *
+ * Used when @type == DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC
+ *
+ * Supported values for @preferred_mem_loc.devmem_fd:
+ * - DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE: set vram of fault tile as preferred loc
+ * - DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM: set smem as preferred loc
+ *
+ * Supported values for @preferred_mem_loc.migration_policy:
+ * - DRM_XE_MIGRATE_ALL_PAGES
+ * - DRM_XE_MIGRATE_ONLY_SYSTEM_PAGES
+ */
+ struct {
+#define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 0
+#define DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM -1
+ /** @preferred_mem_loc.devmem_fd: fd for preferred loc */
+ __u32 devmem_fd;
+
+#define DRM_XE_MIGRATE_ALL_PAGES 0
+#define DRM_XE_MIGRATE_ONLY_SYSTEM_PAGES 1
+ /** @preferred_mem_loc.migration_policy: Page migration policy */
+ __u16 migration_policy;
+
+ /** @preferred_mem_loc.pad : MBZ */
+ __u16 pad;
+
+ /** @preferred_mem_loc.reserved : Reserved */
+ __u64 reserved;
+ } preferred_mem_loc;
+
+ /**
+ * @atomic: Atomic access policy
+ *
+ * Used when @type == DRM_XE_MEM_RANGE_ATTR_ATOMIC.
+ *
+ * Supported values for @atomic.val:
+ * - DRM_XE_ATOMIC_UNDEFINED: Undefined or default behaviour.
+ * Support both GPU and CPU atomic operations for system allocator.
+ * Support GPU atomic operations for normal(bo) allocator.
+ * - DRM_XE_ATOMIC_DEVICE: Support GPU atomic operations.
+ * - DRM_XE_ATOMIC_GLOBAL: Support both GPU and CPU atomic operations.
+ * - DRM_XE_ATOMIC_CPU: Support CPU atomic only, no GPU atomics supported.
+ */
+ struct {
+#define DRM_XE_ATOMIC_UNDEFINED 0
+#define DRM_XE_ATOMIC_DEVICE 1
+#define DRM_XE_ATOMIC_GLOBAL 2
+#define DRM_XE_ATOMIC_CPU 3
+ /** @atomic.val: value of atomic operation */
+ __u32 val;
+
+ /** @atomic.pad: MBZ */
+ __u32 pad;
+
+ /** @atomic.reserved: Reserved */
+ __u64 reserved;
+ } atomic;
+
+ /**
+ * @pat_index: Page attribute table index
+ *
+ * Used when @type == DRM_XE_MEM_RANGE_ATTR_PAT.
+ */
+ struct {
+ /** @pat_index.val: PAT index value */
+ __u32 val;
+
+ /** @pat_index.pad: MBZ */
+ __u32 pad;
+
+ /** @pat_index.reserved: Reserved */
+ __u64 reserved;
+ } pat_index;
+ };
+
+ /** @reserved: Reserved */
+ __u64 reserved[2];
+};
+
+/**
+ * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS
+ *
+ * This structure is provided by userspace and filled by KMD in response to the
+ * DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ioctl. It describes memory attributes of
+ * a memory ranges within a user specified address range in a VM.
+ *
+ * The structure includes information such as atomic access policy,
+ * page attribute table (PAT) index, and preferred memory location.
+ * Userspace allocates an array of these structures and passes a pointer to the
+ * ioctl to retrieve attributes for each memory ranges
+ *
+ * @extensions: Pointer to the first extension struct, if any
+ * @start: Start address of the memory range
+ * @end: End address of the virtual memory range
+ *
+ */
+struct drm_xe_mem_range_attr {
+ /** @extensions: Pointer to the first extension struct, if any */
+ __u64 extensions;
+
+ /** @start: start of the memory range */
+ __u64 start;
+
+ /** @end: end of the memory range */
+ __u64 end;
+
+ /** @preferred_mem_loc: preferred memory location */
+ struct {
+ /** @preferred_mem_loc.devmem_fd: fd for preferred loc */
+ __u32 devmem_fd;
+
+ /** @preferred_mem_loc.migration_policy: Page migration policy */
+ __u32 migration_policy;
+ } preferred_mem_loc;
+
+ /** @atomic: Atomic access policy */
+ struct {
+ /** @atomic.val: atomic attribute */
+ __u32 val;
+
+ /** @atomic.reserved: Reserved */
+ __u32 reserved;
+ } atomic;
+
+ /** @pat_index: Page attribute table index */
+ struct {
+ /** @pat_index.val: PAT index */
+ __u32 val;
+
+ /** @pat_index.reserved: Reserved */
+ __u32 reserved;
+ } pat_index;
+
+ /** @reserved: Reserved */
+ __u64 reserved[2];
+};
+
+/**
+ * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES
+ *
+ * This structure is used to query memory attributes of memory regions
+ * within a user specified address range in a VM. It provides detailed
+ * information about each memory range, including atomic access policy,
+ * page attribute table (PAT) index, and preferred memory location.
+ *
+ * Userspace first calls the ioctl with @num_mem_ranges = 0,
+ * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL to retrieve
+ * the number of memory regions and size of each memory range attribute.
+ * Then, it allocates a buffer of that size and calls the ioctl again to fill
+ * the buffer with memory range attributes.
+ *
+ * If second call fails with -ENOSPC, it means memory ranges changed between
+ * first call and now, retry IOCTL again with @num_mem_ranges = 0,
+ * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL followed by
+ * Second ioctl call.
+ *
+ * Example:
+ *
+ * .. code-block:: C
+ *
+ * struct drm_xe_vm_query_mem_range_attr query = {
+ * .vm_id = vm_id,
+ * .start = 0x100000,
+ * .range = 0x2000,
+ * };
+ *
+ * // First ioctl call to get num of mem regions and sizeof each attribute
+ * ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);
+ *
+ * // Allocate buffer for the memory region attributes
+ * void *ptr = malloc(query.num_mem_ranges * query.sizeof_mem_range_attr);
+ * void *ptr_start = ptr;
+ *
+ * query.vector_of_mem_attr = (uintptr_t)ptr;
+ *
+ * // Second ioctl call to actually fill the memory attributes
+ * ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);
+ *
+ * // Iterate over the returned memory region attributes
+ * for (unsigned int i = 0; i < query.num_mem_ranges; ++i) {
+ * struct drm_xe_mem_range_attr *attr = (struct drm_xe_mem_range_attr *)ptr;
+ *
+ * // Do something with attr
+ *
+ * // Move pointer by one entry
+ * ptr += query.sizeof_mem_range_attr;
+ * }
+ *
+ * free(ptr_start);
+ */
+struct drm_xe_vm_query_mem_range_attr {
+ /** @extensions: Pointer to the first extension struct, if any */
+ __u64 extensions;
+
+ /** @vm_id: vm_id of the virtual range */
+ __u32 vm_id;
+
+ /** @num_mem_ranges: number of mem_ranges in range */
+ __u32 num_mem_ranges;
+
+ /** @start: start of the virtual address range */
+ __u64 start;
+
+ /** @range: size of the virtual address range */
+ __u64 range;
+
+ /** @sizeof_mem_range_attr: size of struct drm_xe_mem_range_attr */
+ __u64 sizeof_mem_range_attr;
+
+ /** @vector_of_mem_attr: userptr to array of struct drm_xe_mem_range_attr */
+ __u64 vector_of_mem_attr;
+
+ /** @reserved: Reserved */
+ __u64 reserved[2];
+
+};
+
#if defined(__cplusplus)
}
#endif
diff --git a/lib/libc/include/any-linux-any/linux/acrn.h b/lib/libc/include/any-linux-any/linux/acrn.h
index 02239d21b2..b2270d3d8f 100644
--- a/lib/libc/include/any-linux-any/linux/acrn.h
+++ b/lib/libc/include/any-linux-any/linux/acrn.h
@@ -418,26 +418,32 @@ struct acrn_pcidev {
};
/**
- * struct acrn_mmiodev - Info for assigning or de-assigning a MMIO device
- * @name: Name of the MMIO device.
- * @res[].user_vm_pa: Physical address of User VM of the MMIO region
- * for the MMIO device.
- * @res[].service_vm_pa: Physical address of Service VM of the MMIO
- * region for the MMIO device.
- * @res[].size: Size of the MMIO region for the MMIO device.
- * @res[].mem_type: Memory type of the MMIO region for the MMIO
- * device.
+ * struct acrn_mmio_dev_res - MMIO device resource description
+ * @user_vm_pa: Physical address of User VM of the MMIO region
+ * for the MMIO device.
+ * @service_vm_pa: Physical address of Service VM of the MMIO
+ * region for the MMIO device.
+ * @size: Size of the MMIO region for the MMIO device.
+ * @mem_type: Memory type of the MMIO region for the MMIO
+ * device.
+ */
+struct acrn_mmio_dev_res {
+ __u64 user_vm_pa;
+ __u64 service_vm_pa;
+ __u64 size;
+ __u64 mem_type;
+};
+
+/**
+ * struct acrn_mmiodev - Info for assigning or de-assigning an MMIO device
+ * @name: Name of the MMIO device.
+ * @res: Array of MMIO device descriptions
*
* This structure will be passed to hypervisor directly.
*/
struct acrn_mmiodev {
__u8 name[8];
- struct {
- __u64 user_vm_pa;
- __u64 service_vm_pa;
- __u64 size;
- __u64 mem_type;
- } res[ACRN_MMIODEV_RES_NUM];
+ struct acrn_mmio_dev_res res[ACRN_MMIODEV_RES_NUM];
};
/**
diff --git a/lib/libc/include/any-linux-any/linux/android/binder.h b/lib/libc/include/any-linux-any/linux/android/binder.h
index 78c2f377ad..c4e9ae0798 100644
--- a/lib/libc/include/any-linux-any/linux/android/binder.h
+++ b/lib/libc/include/any-linux-any/linux/android/binder.h
@@ -38,7 +38,7 @@ enum {
BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE),
};
-enum {
+enum flat_binder_object_flags {
FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
diff --git a/lib/libc/include/any-linux-any/linux/android/binder_netlink.h b/lib/libc/include/any-linux-any/linux/android/binder_netlink.h
new file mode 100644
index 0000000000..41f2dc8f87
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/android/binder_netlink.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/* Documentation/netlink/specs/binder.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
+
+#ifndef _LINUX_ANDROID_BINDER_NETLINK_H
+#define _LINUX_ANDROID_BINDER_NETLINK_H
+
+#define BINDER_FAMILY_NAME "binder"
+#define BINDER_FAMILY_VERSION 1
+
+enum {
+ BINDER_A_REPORT_ERROR = 1,
+ BINDER_A_REPORT_CONTEXT,
+ BINDER_A_REPORT_FROM_PID,
+ BINDER_A_REPORT_FROM_TID,
+ BINDER_A_REPORT_TO_PID,
+ BINDER_A_REPORT_TO_TID,
+ BINDER_A_REPORT_IS_REPLY,
+ BINDER_A_REPORT_FLAGS,
+ BINDER_A_REPORT_CODE,
+ BINDER_A_REPORT_DATA_SIZE,
+
+ __BINDER_A_REPORT_MAX,
+ BINDER_A_REPORT_MAX = (__BINDER_A_REPORT_MAX - 1)
+};
+
+enum {
+ BINDER_CMD_REPORT = 1,
+
+ __BINDER_CMD_MAX,
+ BINDER_CMD_MAX = (__BINDER_CMD_MAX - 1)
+};
+
+#define BINDER_MCGRP_REPORT "report"
+
+#endif /* _LINUX_ANDROID_BINDER_NETLINK_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/aspeed-video.h b/lib/libc/include/any-linux-any/linux/aspeed-video.h
index 0dbdd4a822..82e4006731 100644
--- a/lib/libc/include/any-linux-any/linux/aspeed-video.h
+++ b/lib/libc/include/any-linux-any/linux/aspeed-video.h
@@ -8,6 +8,13 @@
#include
+/* aspeed video's input types */
+enum aspeed_video_input {
+ VIDEO_INPUT_VGA = 0,
+ VIDEO_INPUT_GFX,
+ VIDEO_INPUT_MAX
+};
+
#define V4L2_CID_ASPEED_HQ_MODE (V4L2_CID_USER_ASPEED_BASE + 1)
#define V4L2_CID_ASPEED_HQ_JPEG_QUALITY (V4L2_CID_USER_ASPEED_BASE + 2)
diff --git a/lib/libc/include/any-linux-any/linux/audit.h b/lib/libc/include/any-linux-any/linux/audit.h
index 11ebd0e60b..fd93ab126e 100644
--- a/lib/libc/include/any-linux-any/linux/audit.h
+++ b/lib/libc/include/any-linux-any/linux/audit.h
@@ -148,6 +148,8 @@
#define AUDIT_IPE_POLICY_LOAD 1422 /* IPE policy load */
#define AUDIT_LANDLOCK_ACCESS 1423 /* Landlock denial */
#define AUDIT_LANDLOCK_DOMAIN 1424 /* Landlock domain status */
+#define AUDIT_MAC_TASK_CONTEXTS 1425 /* Multiple LSM task contexts */
+#define AUDIT_MAC_OBJ_CONTEXTS 1426 /* Multiple LSM objext contexts */
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
#define AUDIT_LAST_KERN_ANOM_MSG 1799
diff --git a/lib/libc/include/any-linux-any/linux/blktrace_api.h b/lib/libc/include/any-linux-any/linux/blktrace_api.h
index b3799fb2cf..b8c1cf49c6 100644
--- a/lib/libc/include/any-linux-any/linux/blktrace_api.h
+++ b/lib/libc/include/any-linux-any/linux/blktrace_api.h
@@ -26,11 +26,22 @@ enum blktrace_cat {
BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */
BLK_TC_FUA = 1 << 15, /* fua requests */
- BLK_TC_END = 1 << 15, /* we've run out of bits! */
+ BLK_TC_END_V1 = 1 << 15, /* we've run out of bits! */
+
+ BLK_TC_ZONE_APPEND = 1ull << 16, /* zone append */
+ BLK_TC_ZONE_RESET = 1ull << 17, /* zone reset */
+ BLK_TC_ZONE_RESET_ALL = 1ull << 18, /* zone reset all */
+ BLK_TC_ZONE_FINISH = 1ull << 19, /* zone finish */
+ BLK_TC_ZONE_OPEN = 1ull << 20, /* zone open */
+ BLK_TC_ZONE_CLOSE = 1ull << 21, /* zone close */
+
+ BLK_TC_WRITE_ZEROES = 1ull << 22, /* write-zeroes */
+
+ BLK_TC_END_V2 = 1ull << 22,
};
#define BLK_TC_SHIFT (16)
-#define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)
+#define BLK_TC_ACT(act) ((u64)(act) << BLK_TC_SHIFT)
/*
* Basic trace actions
@@ -53,6 +64,8 @@ enum blktrace_act {
__BLK_TA_REMAP, /* bio was remapped */
__BLK_TA_ABORT, /* request aborted */
__BLK_TA_DRV_DATA, /* driver-specific binary data */
+ __BLK_TA_ZONE_PLUG, /* zone write plug was plugged */
+ __BLK_TA_ZONE_UNPLUG, /* zone write plug was unplugged */
__BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/
};
@@ -88,12 +101,19 @@ enum blktrace_notify {
#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))
#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))
+#define BLK_TA_ZONE_APPEND (__BLK_TA_COMPLETE |\
+ BLK_TC_ACT(BLK_TC_ZONE_APPEND))
+#define BLK_TA_ZONE_PLUG (__BLK_TA_ZONE_PLUG | BLK_TC_ACT(BLK_TC_QUEUE))
+#define BLK_TA_ZONE_UNPLUG (__BLK_TA_ZONE_UNPLUG |\
+ BLK_TC_ACT(BLK_TC_QUEUE))
+
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
#define BLK_IO_TRACE_MAGIC 0x65617400
#define BLK_IO_TRACE_VERSION 0x07
+#define BLK_IO_TRACE2_VERSION 0x08
/*
* The trace itself
@@ -113,6 +133,21 @@ struct blk_io_trace {
/* cgroup id will be stored here if exists */
};
+struct blk_io_trace2 {
+ __u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
+ __u32 sequence; /* event number */
+ __u64 time; /* in nanoseconds */
+ __u64 sector; /* disk offset */
+ __u32 bytes; /* transfer length */
+ __u32 pid; /* who did it */
+ __u64 action; /* what happened */
+ __u32 device; /* device number */
+ __u32 cpu; /* on what cpu did it happen */
+ __u16 error; /* completion error */
+ __u16 pdu_len; /* length of data after this trace */
+ __u8 pad[12];
+ /* cgroup id will be stored here if it exists */
+};
/*
* The remap event
*/
@@ -129,6 +164,7 @@ enum {
};
#define BLKTRACE_BDEV_SIZE 32
+#define BLKTRACE_BDEV_SIZE2 64
/*
* User setup structure passed with BLKTRACESETUP
@@ -143,4 +179,19 @@ struct blk_user_trace_setup {
__u32 pid;
};
+/*
+ * User setup structure passed with BLKTRACESETUP2
+ */
+struct blk_user_trace_setup2 {
+ char name[BLKTRACE_BDEV_SIZE2]; /* output */
+ __u64 act_mask; /* input */
+ __u32 buf_size; /* input */
+ __u32 buf_nr; /* input */
+ __u64 start_lba;
+ __u64 end_lba;
+ __u32 pid;
+ __u32 flags; /* currently unused */
+ __u64 reserved[11];
+};
+
#endif /* BLKTRACE_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/blkzoned.h b/lib/libc/include/any-linux-any/linux/blkzoned.h
index 3fd4d0ce2d..07d4f4b49f 100644
--- a/lib/libc/include/any-linux-any/linux/blkzoned.h
+++ b/lib/libc/include/any-linux-any/linux/blkzoned.h
@@ -48,6 +48,8 @@ enum blk_zone_type {
* FINISH ZONE command.
* @BLK_ZONE_COND_READONLY: The zone is read-only.
* @BLK_ZONE_COND_OFFLINE: The zone is offline (sectors cannot be read/written).
+ * @BLK_ZONE_COND_ACTIVE: The zone is either implicitly open, explicitly open,
+ * or closed.
*
* The Zone Condition state machine in the ZBC/ZAC standards maps the above
* deinitions as:
@@ -61,6 +63,13 @@ enum blk_zone_type {
*
* Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should
* be considered invalid.
+ *
+ * The condition BLK_ZONE_COND_ACTIVE is used only with cached zone reports.
+ * It is used to report any of the BLK_ZONE_COND_IMP_OPEN,
+ * BLK_ZONE_COND_EXP_OPEN and BLK_ZONE_COND_CLOSED conditions. Conversely, a
+ * regular zone report will never report a zone condition using
+ * BLK_ZONE_COND_ACTIVE and instead use the conditions BLK_ZONE_COND_IMP_OPEN,
+ * BLK_ZONE_COND_EXP_OPEN or BLK_ZONE_COND_CLOSED as reported by the device.
*/
enum blk_zone_cond {
BLK_ZONE_COND_NOT_WP = 0x0,
@@ -71,15 +80,29 @@ enum blk_zone_cond {
BLK_ZONE_COND_READONLY = 0xD,
BLK_ZONE_COND_FULL = 0xE,
BLK_ZONE_COND_OFFLINE = 0xF,
+
+ BLK_ZONE_COND_ACTIVE = 0xFF, /* added in Linux 6.19 */
+#define BLK_ZONE_COND_ACTIVE BLK_ZONE_COND_ACTIVE
};
/**
* enum blk_zone_report_flags - Feature flags of reported zone descriptors.
*
- * @BLK_ZONE_REP_CAPACITY: Zone descriptor has capacity field.
+ * @BLK_ZONE_REP_CAPACITY: Output only. Indicates that zone descriptors in a
+ * zone report have a valid capacity field.
+ * @BLK_ZONE_REP_CACHED: Input only. Indicates that the zone report should be
+ * generated using cached zone information. In this case,
+ * the implicit open, explicit open and closed zone
+ * conditions are all reported with the
+ * BLK_ZONE_COND_ACTIVE condition.
*/
enum blk_zone_report_flags {
- BLK_ZONE_REP_CAPACITY = (1 << 0),
+ /* Output flags */
+ BLK_ZONE_REP_CAPACITY = (1U << 0),
+
+ /* Input flags */
+ BLK_ZONE_REP_CACHED = (1U << 31), /* added in Linux 6.19 */
+#define BLK_ZONE_REP_CACHED BLK_ZONE_REP_CACHED
};
/**
@@ -122,6 +145,10 @@ struct blk_zone {
* @sector: starting sector of report
* @nr_zones: IN maximum / OUT actual
* @flags: one or more flags as defined by enum blk_zone_report_flags.
+ * @flags: one or more flags as defined by enum blk_zone_report_flags.
+ * With BLKREPORTZONE, this field is ignored as an input and is valid
+ * only as an output. Using BLKREPORTZONEV2, this field is used as both
+ * input and output.
* @zones: Space to hold @nr_zones @zones entries on reply.
*
* The array of at most @nr_zones must follow this structure in memory.
@@ -148,9 +175,19 @@ struct blk_zone_range {
/**
* Zoned block device ioctl's:
*
- * @BLKREPORTZONE: Get zone information. Takes a zone report as argument.
- * The zone report will start from the zone containing the
- * sector specified in the report request structure.
+ * @BLKREPORTZONE: Get zone information from a zoned device. Takes a zone report
+ * as argument. The zone report will start from the zone
+ * containing the sector specified in struct blk_zone_report.
+ * The flags field of struct blk_zone_report is used as an
+ * output only and ignored as an input.
+ * DEPRECATED, use BLKREPORTZONEV2 instead.
+ * @BLKREPORTZONEV2: Same as @BLKREPORTZONE but uses the flags field of
+ * struct blk_zone_report as an input, allowing to get a zone
+ * report using cached zone information if the flag
+ * BLK_ZONE_REP_CACHED is set. In such case, the zone report
+ * may include zones with the condition @BLK_ZONE_COND_ACTIVE
+ * (c.f. the description of this condition above for more
+ * details).
* @BLKRESETZONE: Reset the write pointer of the zones in the specified
* sector range. The sector range must be zone aligned.
* @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
@@ -169,5 +206,6 @@ struct blk_zone_range {
#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)
#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)
#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
+#define BLKREPORTZONEV2 _IOWR(0x12, 142, struct blk_zone_report)
#endif /* _BLKZONED_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/bpf.h b/lib/libc/include/any-linux-any/linux/bpf.h
index a221b88815..eb4445bb24 100644
--- a/lib/libc/include/any-linux-any/linux/bpf.h
+++ b/lib/libc/include/any-linux-any/linux/bpf.h
@@ -1026,6 +1026,7 @@ enum bpf_map_type {
BPF_MAP_TYPE_USER_RINGBUF,
BPF_MAP_TYPE_CGRP_STORAGE,
BPF_MAP_TYPE_ARENA,
+ BPF_MAP_TYPE_INSN_ARRAY,
__MAX_BPF_MAP_TYPE
};
@@ -1430,6 +1431,9 @@ enum {
/* Do not translate kernel bpf_arena pointers to user pointers */
BPF_F_NO_USER_CONV = (1U << 18),
+
+/* Enable BPF ringbuf overwrite mode */
+ BPF_F_RB_OVERWRITE = (1U << 19),
};
/* Flags for BPF_PROG_QUERY. */
@@ -1522,6 +1526,12 @@ union bpf_attr {
* If provided, map_flags should have BPF_F_TOKEN_FD flag set.
*/
__s32 map_token_fd;
+
+ /* Hash of the program that has exclusive access to the map.
+ */
+ __aligned_u64 excl_prog_hash;
+ /* Size of the passed excl_prog_hash. */
+ __u32 excl_prog_hash_size;
};
struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */
@@ -1605,6 +1615,16 @@ union bpf_attr {
* continuous.
*/
__u32 fd_array_cnt;
+ /* Pointer to a buffer containing the signature of the BPF
+ * program.
+ */
+ __aligned_u64 signature;
+ /* Size of the signature buffer in bytes. */
+ __u32 signature_size;
+ /* ID of the kernel keyring to be used for signature
+ * verification.
+ */
+ __s32 keyring_id;
};
struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -4875,7 +4895,7 @@ union bpf_attr {
*
* **-ENOENT** if the bpf_local_storage cannot be found.
*
- * long bpf_d_path(struct path *path, char *buf, u32 sz)
+ * long bpf_d_path(const struct path *path, char *buf, u32 sz)
* Description
* Return full path for given **struct path** object, which
* needs to be the kernel BTF *path* object. The path is
@@ -5602,7 +5622,7 @@ union bpf_attr {
* Return
* *sk* if casting is valid, or **NULL** otherwise.
*
- * long bpf_dynptr_from_mem(void *data, u32 size, u64 flags, struct bpf_dynptr *ptr)
+ * long bpf_dynptr_from_mem(void *data, u64 size, u64 flags, struct bpf_dynptr *ptr)
* Description
* Get a dynptr to local memory *data*.
*
@@ -5645,7 +5665,7 @@ union bpf_attr {
* Return
* Nothing. Always succeeds.
*
- * long bpf_dynptr_read(void *dst, u32 len, const struct bpf_dynptr *src, u32 offset, u64 flags)
+ * long bpf_dynptr_read(void *dst, u64 len, const struct bpf_dynptr *src, u64 offset, u64 flags)
* Description
* Read *len* bytes from *src* into *dst*, starting from *offset*
* into *src*.
@@ -5655,7 +5675,7 @@ union bpf_attr {
* of *src*'s data, -EINVAL if *src* is an invalid dynptr or if
* *flags* is not 0.
*
- * long bpf_dynptr_write(const struct bpf_dynptr *dst, u32 offset, void *src, u32 len, u64 flags)
+ * long bpf_dynptr_write(const struct bpf_dynptr *dst, u64 offset, void *src, u64 len, u64 flags)
* Description
* Write *len* bytes from *src* into *dst*, starting from *offset*
* into *dst*.
@@ -5676,7 +5696,7 @@ union bpf_attr {
* is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs,
* other errors correspond to errors returned by **bpf_skb_store_bytes**\ ().
*
- * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len)
+ * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u64 offset, u64 len)
* Description
* Get a pointer to the underlying dynptr data.
*
@@ -6215,6 +6235,7 @@ enum {
BPF_RB_RING_SIZE = 1,
BPF_RB_CONS_POS = 2,
BPF_RB_PROD_POS = 3,
+ BPF_RB_OVERWRITE_POS = 4,
};
/* BPF ring buffer constants */
@@ -6666,6 +6687,8 @@ struct bpf_map_info {
__u32 btf_value_type_id;
__u32 btf_vmlinux_id;
__u64 map_extra;
+ __aligned_u64 hash;
+ __u32 hash_size;
} __attribute__((aligned(8)));
struct bpf_btf_info {
@@ -7182,6 +7205,8 @@ enum {
TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */
SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */
+ SK_BPF_BYPASS_PROT_MEM = 1010, /* Get or Set sk->sk_bypass_prot_mem */
+
};
enum {
@@ -7418,6 +7443,10 @@ struct bpf_timer {
__u64 __opaque[2];
} __attribute__((aligned(8)));
+struct bpf_task_work {
+ __u64 __opaque;
+} __attribute__((aligned(8)));
+
struct bpf_wq {
__u64 __opaque[2];
} __attribute__((aligned(8)));
@@ -7623,4 +7652,24 @@ enum bpf_kfunc_flags {
BPF_F_PAD_ZEROS = (1ULL << 0),
};
+/*
+ * Values of a BPF_MAP_TYPE_INSN_ARRAY entry must be of this type.
+ *
+ * Before the map is used the orig_off field should point to an
+ * instruction inside the program being loaded. The other fields
+ * must be set to 0.
+ *
+ * After the program is loaded, the xlated_off will be adjusted
+ * by the verifier to point to the index of the original instruction
+ * in the xlated program. If the instruction is deleted, it will
+ * be set to (u32)-1. The jitted_off will be set to the corresponding
+ * offset in the jitted image of the program.
+ */
+struct bpf_insn_array_value {
+ __u32 orig_off;
+ __u32 xlated_off;
+ __u32 jitted_off;
+ __u32 :32;
+};
+
#endif /* __LINUX_BPF_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/btrfs.h b/lib/libc/include/any-linux-any/linux/btrfs.h
index b1d1e77265..aba1c89a0b 100644
--- a/lib/libc/include/any-linux-any/linux/btrfs.h
+++ b/lib/libc/include/any-linux-any/linux/btrfs.h
@@ -1097,6 +1097,12 @@ enum btrfs_err_code {
BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
};
+/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
+#define BTRFS_SHUTDOWN_FLAGS_DEFAULT 0x0
+#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH 0x1
+#define BTRFS_SHUTDOWN_FLAGS_NOLOGFLUSH 0x2
+#define BTRFS_SHUTDOWN_FLAGS_LAST 0x3
+
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -1218,6 +1224,9 @@ enum btrfs_err_code {
#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
struct btrfs_ioctl_subvol_wait)
+/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
+#define BTRFS_IOC_SHUTDOWN _IOR('X', 125, __u32)
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/libc/include/any-linux-any/linux/can/netlink.h b/lib/libc/include/any-linux-any/linux/can/netlink.h
index 2890f7e444..18fab11591 100644
--- a/lib/libc/include/any-linux-any/linux/can/netlink.h
+++ b/lib/libc/include/any-linux-any/linux/can/netlink.h
@@ -5,6 +5,7 @@
* Definitions for the CAN netlink interface
*
* Copyright (c) 2009 Wolfgang Grandegger
+ * Copyright (c) 2021-2025 Vincent Mailhol
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the version 2 of the GNU General Public License
@@ -101,8 +102,13 @@ struct can_ctrlmode {
#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
#define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */
-#define CAN_CTRLMODE_TDC_AUTO 0x200 /* CAN transiver automatically calculates TDCV */
-#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */
+#define CAN_CTRLMODE_TDC_AUTO 0x200 /* FD transceiver automatically calculates TDCV */
+#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* FD TDCV is manually set up by user */
+#define CAN_CTRLMODE_RESTRICTED 0x800 /* Restricted operation mode */
+#define CAN_CTRLMODE_XL 0x1000 /* CAN XL mode */
+#define CAN_CTRLMODE_XL_TDC_AUTO 0x2000 /* XL transceiver automatically calculates TDCV */
+#define CAN_CTRLMODE_XL_TDC_MANUAL 0x4000 /* XL TDCV is manually set up by user */
+#define CAN_CTRLMODE_XL_TMS 0x8000 /* Transceiver Mode Switching */
/*
* CAN device statistics
@@ -129,15 +135,20 @@ enum {
IFLA_CAN_RESTART_MS,
IFLA_CAN_RESTART,
IFLA_CAN_BERR_COUNTER,
- IFLA_CAN_DATA_BITTIMING,
- IFLA_CAN_DATA_BITTIMING_CONST,
+ IFLA_CAN_DATA_BITTIMING, /* FD */
+ IFLA_CAN_DATA_BITTIMING_CONST, /* FD */
IFLA_CAN_TERMINATION,
IFLA_CAN_TERMINATION_CONST,
IFLA_CAN_BITRATE_CONST,
- IFLA_CAN_DATA_BITRATE_CONST,
+ IFLA_CAN_DATA_BITRATE_CONST, /* FD */
IFLA_CAN_BITRATE_MAX,
- IFLA_CAN_TDC,
+ IFLA_CAN_TDC, /* FD */
IFLA_CAN_CTRLMODE_EXT,
+ IFLA_CAN_XL_DATA_BITTIMING,
+ IFLA_CAN_XL_DATA_BITTIMING_CONST,
+ IFLA_CAN_XL_DATA_BITRATE_CONST,
+ IFLA_CAN_XL_TDC,
+ IFLA_CAN_XL_PWM,
/* add new constants above here */
__IFLA_CAN_MAX,
@@ -145,7 +156,7 @@ enum {
};
/*
- * CAN FD Transmitter Delay Compensation (TDC)
+ * CAN FD/XL Transmitter Delay Compensation (TDC)
*
* Please refer to struct can_tdc_const and can_tdc in
* include/linux/can/bittiming.h for further details.
@@ -179,6 +190,29 @@ enum {
IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTRLMODE - 1
};
+/*
+ * CAN FD/XL Pulse-Width Modulation (PWM)
+ *
+ * Please refer to struct can_pwm_const and can_pwm in
+ * include/linux/can/bittiming.h for further details.
+ */
+enum {
+ IFLA_CAN_PWM_UNSPEC,
+ IFLA_CAN_PWM_PWMS_MIN, /* u32 */
+ IFLA_CAN_PWM_PWMS_MAX, /* u32 */
+ IFLA_CAN_PWM_PWML_MIN, /* u32 */
+ IFLA_CAN_PWM_PWML_MAX, /* u32 */
+ IFLA_CAN_PWM_PWMO_MIN, /* u32 */
+ IFLA_CAN_PWM_PWMO_MAX, /* u32 */
+ IFLA_CAN_PWM_PWMS, /* u32 */
+ IFLA_CAN_PWM_PWML, /* u32 */
+ IFLA_CAN_PWM_PWMO, /* u32 */
+
+ /* add new constants above here */
+ __IFLA_CAN_PWM,
+ IFLA_CAN_PWM_MAX = __IFLA_CAN_PWM - 1
+};
+
/* u16 termination range: 1..65535 Ohms */
#define CAN_TERMINATION_DISABLED 0
diff --git a/lib/libc/include/any-linux-any/linux/comedi.h b/lib/libc/include/any-linux-any/linux/comedi.h
index 0ef8eadde4..c30157b456 100644
--- a/lib/libc/include/any-linux-any/linux/comedi.h
+++ b/lib/libc/include/any-linux-any/linux/comedi.h
@@ -640,7 +640,7 @@ struct comedi_chaninfo {
/**
* struct comedi_rangeinfo - used to retrieve the range table for a channel
- * @range_type: Encodes subdevice index (bits 27:24), channel index
+ * @range_type: Encodes subdevice index (bits 31:24), channel index
* (bits 23:16) and range table length (bits 15:0).
* @range_ptr: Pointer to array of @struct comedi_krange to be filled
* in with the range table for the channel or subdevice.
diff --git a/lib/libc/include/any-linux-any/linux/dev_energymodel.h b/lib/libc/include/any-linux-any/linux/dev_energymodel.h
new file mode 100644
index 0000000000..9e1c8f55bb
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/dev_energymodel.h
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/* Documentation/netlink/specs/dev-energymodel.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
+
+#ifndef _LINUX_DEV_ENERGYMODEL_H
+#define _LINUX_DEV_ENERGYMODEL_H
+
+#define DEV_ENERGYMODEL_FAMILY_NAME "dev-energymodel"
+#define DEV_ENERGYMODEL_FAMILY_VERSION 1
+
+/**
+ * enum dev_energymodel_perf_state_flags
+ * @DEV_ENERGYMODEL_PERF_STATE_FLAGS_PERF_STATE_INEFFICIENT: The performance
+ * state is inefficient. There is in this perf-domain, another performance
+ * state with a higher frequency but a lower or equal power cost.
+ */
+enum dev_energymodel_perf_state_flags {
+ DEV_ENERGYMODEL_PERF_STATE_FLAGS_PERF_STATE_INEFFICIENT = 1,
+};
+
+/**
+ * enum dev_energymodel_perf_domain_flags
+ * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_MICROWATTS: The power values
+ * are in micro-Watts or some other scale.
+ * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_SKIP_INEFFICIENCIES: Skip
+ * inefficient states when estimating energy consumption.
+ * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_ARTIFICIAL: The power values
+ * are artificial and might be created by platform missing real power
+ * information.
+ */
+enum dev_energymodel_perf_domain_flags {
+ DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_MICROWATTS = 1,
+ DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_SKIP_INEFFICIENCIES = 2,
+ DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_ARTIFICIAL = 4,
+};
+
+enum {
+ DEV_ENERGYMODEL_A_PERF_DOMAIN_PAD = 1,
+ DEV_ENERGYMODEL_A_PERF_DOMAIN_PERF_DOMAIN_ID,
+ DEV_ENERGYMODEL_A_PERF_DOMAIN_FLAGS,
+ DEV_ENERGYMODEL_A_PERF_DOMAIN_CPUS,
+
+ __DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX,
+ DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX = (__DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX - 1)
+};
+
+enum {
+ DEV_ENERGYMODEL_A_PERF_TABLE_PERF_DOMAIN_ID = 1,
+ DEV_ENERGYMODEL_A_PERF_TABLE_PERF_STATE,
+
+ __DEV_ENERGYMODEL_A_PERF_TABLE_MAX,
+ DEV_ENERGYMODEL_A_PERF_TABLE_MAX = (__DEV_ENERGYMODEL_A_PERF_TABLE_MAX - 1)
+};
+
+enum {
+ DEV_ENERGYMODEL_A_PERF_STATE_PAD = 1,
+ DEV_ENERGYMODEL_A_PERF_STATE_PERFORMANCE,
+ DEV_ENERGYMODEL_A_PERF_STATE_FREQUENCY,
+ DEV_ENERGYMODEL_A_PERF_STATE_POWER,
+ DEV_ENERGYMODEL_A_PERF_STATE_COST,
+ DEV_ENERGYMODEL_A_PERF_STATE_FLAGS,
+
+ __DEV_ENERGYMODEL_A_PERF_STATE_MAX,
+ DEV_ENERGYMODEL_A_PERF_STATE_MAX = (__DEV_ENERGYMODEL_A_PERF_STATE_MAX - 1)
+};
+
+enum {
+ DEV_ENERGYMODEL_CMD_GET_PERF_DOMAINS = 1,
+ DEV_ENERGYMODEL_CMD_GET_PERF_TABLE,
+ DEV_ENERGYMODEL_CMD_PERF_DOMAIN_CREATED,
+ DEV_ENERGYMODEL_CMD_PERF_DOMAIN_UPDATED,
+ DEV_ENERGYMODEL_CMD_PERF_DOMAIN_DELETED,
+
+ __DEV_ENERGYMODEL_CMD_MAX,
+ DEV_ENERGYMODEL_CMD_MAX = (__DEV_ENERGYMODEL_CMD_MAX - 1)
+};
+
+#define DEV_ENERGYMODEL_MCGRP_EVENT "event"
+
+#endif /* _LINUX_DEV_ENERGYMODEL_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/devlink.h b/lib/libc/include/any-linux-any/linux/devlink.h
index 5c3318cc97..621e00d943 100644
--- a/lib/libc/include/any-linux-any/linux/devlink.h
+++ b/lib/libc/include/any-linux-any/linux/devlink.h
@@ -181,6 +181,7 @@ enum devlink_sb_threshold_type {
enum devlink_eswitch_mode {
DEVLINK_ESWITCH_MODE_LEGACY,
DEVLINK_ESWITCH_MODE_SWITCHDEV,
+ DEVLINK_ESWITCH_MODE_SWITCHDEV_INACTIVE,
};
enum devlink_eswitch_inline_mode {
@@ -636,6 +637,11 @@ enum devlink_attr {
DEVLINK_ATTR_RATE_TC_BWS, /* nested */
+ DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD, /* u64 */
+
+ DEVLINK_ATTR_PARAM_VALUE_DEFAULT, /* dynamic */
+ DEVLINK_ATTR_PARAM_RESET_DEFAULT, /* flag */
+
/* Add new attributes above here, update the spec in
* Documentation/netlink/specs/devlink.yaml and re-generate
* net/devlink/netlink_gen.c.
diff --git a/lib/libc/include/any-linux-any/linux/dpll.h b/lib/libc/include/any-linux-any/linux/dpll.h
index 4e69e1087a..2e62513f27 100644
--- a/lib/libc/include/any-linux-any/linux/dpll.h
+++ b/lib/libc/include/any-linux-any/linux/dpll.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/dpll.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_DPLL_H
#define _LINUX_DPLL_H
@@ -216,6 +217,7 @@ enum dpll_a {
DPLL_A_LOCK_STATUS_ERROR,
DPLL_A_CLOCK_QUALITY_LEVEL,
DPLL_A_PHASE_OFFSET_MONITOR,
+ DPLL_A_PHASE_OFFSET_AVG_FACTOR,
__DPLL_A_MAX,
DPLL_A_MAX = (__DPLL_A_MAX - 1)
@@ -250,6 +252,7 @@ enum dpll_a_pin {
DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED,
DPLL_A_PIN_ESYNC_PULSE,
DPLL_A_PIN_REFERENCE_SYNC,
+ DPLL_A_PIN_PHASE_ADJUST_GRAN,
__DPLL_A_PIN_MAX,
DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
diff --git a/lib/libc/include/any-linux-any/linux/ethtool.h b/lib/libc/include/any-linux-any/linux/ethtool.h
index aacdee5fc3..2186d2f2d2 100644
--- a/lib/libc/include/any-linux-any/linux/ethtool.h
+++ b/lib/libc/include/any-linux-any/linux/ethtool.h
@@ -2075,6 +2075,10 @@ enum ethtool_link_mode_bit_indices {
ETHTOOL_LINK_MODE_800000baseDR4_2_Full_BIT = 118,
ETHTOOL_LINK_MODE_800000baseSR4_Full_BIT = 119,
ETHTOOL_LINK_MODE_800000baseVR4_Full_BIT = 120,
+ ETHTOOL_LINK_MODE_1600000baseCR8_Full_BIT = 121,
+ ETHTOOL_LINK_MODE_1600000baseKR8_Full_BIT = 122,
+ ETHTOOL_LINK_MODE_1600000baseDR8_Full_BIT = 123,
+ ETHTOOL_LINK_MODE_1600000baseDR8_2_Full_BIT = 124,
/* must be last entry */
__ETHTOOL_LINK_MODE_MASK_NBITS
@@ -2188,6 +2192,7 @@ enum ethtool_link_mode_bit_indices {
#define SPEED_200000 200000
#define SPEED_400000 400000
#define SPEED_800000 800000
+#define SPEED_1600000 1600000
#define SPEED_UNKNOWN -1
@@ -2378,6 +2383,7 @@ enum {
#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
#define RXH_GTP_TEID (1 << 8) /* teid in case of GTP */
+#define RXH_IP6_FL (1 << 9) /* IPv6 flow label */
#define RXH_DISCARD (1 << 31)
#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
diff --git a/lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h b/lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h
index 35042d7278..2ab973732a 100644
--- a/lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h
+++ b/lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/ethtool.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_ETHTOOL_NETLINK_GENERATED_H
#define _LINUX_ETHTOOL_NETLINK_GENERATED_H
@@ -561,12 +562,24 @@ enum {
ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
};
+enum {
+ ETHTOOL_A_FEC_HIST_PAD = 1,
+ ETHTOOL_A_FEC_HIST_BIN_LOW,
+ ETHTOOL_A_FEC_HIST_BIN_HIGH,
+ ETHTOOL_A_FEC_HIST_BIN_VAL,
+ ETHTOOL_A_FEC_HIST_BIN_VAL_PER_LANE,
+
+ __ETHTOOL_A_FEC_HIST_CNT,
+ ETHTOOL_A_FEC_HIST_MAX = (__ETHTOOL_A_FEC_HIST_CNT - 1)
+};
+
enum {
ETHTOOL_A_FEC_STAT_UNSPEC,
ETHTOOL_A_FEC_STAT_PAD,
ETHTOOL_A_FEC_STAT_CORRECTED,
ETHTOOL_A_FEC_STAT_UNCORR,
ETHTOOL_A_FEC_STAT_CORR_BITS,
+ ETHTOOL_A_FEC_STAT_HIST,
__ETHTOOL_A_FEC_STAT_CNT,
ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1)
@@ -791,6 +804,39 @@ enum {
ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)
};
+enum {
+ ETHTOOL_A_MSE_CAPABILITIES_MAX_AVERAGE_MSE = 1,
+ ETHTOOL_A_MSE_CAPABILITIES_MAX_PEAK_MSE,
+ ETHTOOL_A_MSE_CAPABILITIES_REFRESH_RATE_PS,
+ ETHTOOL_A_MSE_CAPABILITIES_NUM_SYMBOLS,
+
+ __ETHTOOL_A_MSE_CAPABILITIES_CNT,
+ ETHTOOL_A_MSE_CAPABILITIES_MAX = (__ETHTOOL_A_MSE_CAPABILITIES_CNT - 1)
+};
+
+enum {
+ ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE = 1,
+ ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE,
+ ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE,
+
+ __ETHTOOL_A_MSE_SNAPSHOT_CNT,
+ ETHTOOL_A_MSE_SNAPSHOT_MAX = (__ETHTOOL_A_MSE_SNAPSHOT_CNT - 1)
+};
+
+enum {
+ ETHTOOL_A_MSE_HEADER = 1,
+ ETHTOOL_A_MSE_CAPABILITIES,
+ ETHTOOL_A_MSE_CHANNEL_A,
+ ETHTOOL_A_MSE_CHANNEL_B,
+ ETHTOOL_A_MSE_CHANNEL_C,
+ ETHTOOL_A_MSE_CHANNEL_D,
+ ETHTOOL_A_MSE_WORST_CHANNEL,
+ ETHTOOL_A_MSE_LINK,
+
+ __ETHTOOL_A_MSE_CNT,
+ ETHTOOL_A_MSE_MAX = (__ETHTOOL_A_MSE_CNT - 1)
+};
+
enum {
ETHTOOL_MSG_USER_NONE = 0,
ETHTOOL_MSG_STRSET_GET = 1,
@@ -843,6 +889,7 @@ enum {
ETHTOOL_MSG_RSS_SET,
ETHTOOL_MSG_RSS_CREATE_ACT,
ETHTOOL_MSG_RSS_DELETE_ACT,
+ ETHTOOL_MSG_MSE_GET,
__ETHTOOL_MSG_USER_CNT,
ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)
@@ -903,6 +950,7 @@ enum {
ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,
ETHTOOL_MSG_RSS_CREATE_NTF,
ETHTOOL_MSG_RSS_DELETE_NTF,
+ ETHTOOL_MSG_MSE_GET_REPLY,
__ETHTOOL_MSG_KERNEL_CNT,
ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)
diff --git a/lib/libc/include/any-linux-any/linux/ext4.h b/lib/libc/include/any-linux-any/linux/ext4.h
index edbf8f035c..e864103cde 100644
--- a/lib/libc/include/any-linux-any/linux/ext4.h
+++ b/lib/libc/include/any-linux-any/linux/ext4.h
@@ -33,6 +33,8 @@
#define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32)
#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)
#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)
+#define EXT4_IOC_GET_TUNE_SB_PARAM _IOR('f', 45, struct ext4_tune_sb_params)
+#define EXT4_IOC_SET_TUNE_SB_PARAM _IOW('f', 46, struct ext4_tune_sb_params)
#define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)
@@ -108,6 +110,57 @@ struct ext4_new_group_input {
__u16 unused;
};
+struct ext4_tune_sb_params {
+ __u32 set_flags;
+ __u32 checkinterval;
+ __u16 errors_behavior;
+ __u16 mnt_count;
+ __u16 max_mnt_count;
+ __u16 raid_stride;
+ __u64 last_check_time;
+ __u64 reserved_blocks;
+ __u64 blocks_count;
+ __u32 default_mnt_opts;
+ __u32 reserved_uid;
+ __u32 reserved_gid;
+ __u32 raid_stripe_width;
+ __u16 encoding;
+ __u16 encoding_flags;
+ __u8 def_hash_alg;
+ __u8 pad_1;
+ __u16 pad_2;
+ __u32 feature_compat;
+ __u32 feature_incompat;
+ __u32 feature_ro_compat;
+ __u32 set_feature_compat_mask;
+ __u32 set_feature_incompat_mask;
+ __u32 set_feature_ro_compat_mask;
+ __u32 clear_feature_compat_mask;
+ __u32 clear_feature_incompat_mask;
+ __u32 clear_feature_ro_compat_mask;
+ __u8 mount_opts[64];
+ __u8 pad[68];
+};
+
+#define EXT4_TUNE_FL_ERRORS_BEHAVIOR 0x00000001
+#define EXT4_TUNE_FL_MNT_COUNT 0x00000002
+#define EXT4_TUNE_FL_MAX_MNT_COUNT 0x00000004
+#define EXT4_TUNE_FL_CHECKINTRVAL 0x00000008
+#define EXT4_TUNE_FL_LAST_CHECK_TIME 0x00000010
+#define EXT4_TUNE_FL_RESERVED_BLOCKS 0x00000020
+#define EXT4_TUNE_FL_RESERVED_UID 0x00000040
+#define EXT4_TUNE_FL_RESERVED_GID 0x00000080
+#define EXT4_TUNE_FL_DEFAULT_MNT_OPTS 0x00000100
+#define EXT4_TUNE_FL_DEF_HASH_ALG 0x00000200
+#define EXT4_TUNE_FL_RAID_STRIDE 0x00000400
+#define EXT4_TUNE_FL_RAID_STRIPE_WIDTH 0x00000800
+#define EXT4_TUNE_FL_MOUNT_OPTS 0x00001000
+#define EXT4_TUNE_FL_FEATURES 0x00002000
+#define EXT4_TUNE_FL_EDIT_FEATURES 0x00004000
+#define EXT4_TUNE_FL_FORCE_FSCK 0x00008000
+#define EXT4_TUNE_FL_ENCODING 0x00010000
+#define EXT4_TUNE_FL_ENCODING_FLAGS 0x00020000
+
/*
* Returned by EXT4_IOC_GET_ES_CACHE as an additional possible flag.
* It indicates that the entry in extent status cache is for a hole.
diff --git a/lib/libc/include/any-linux-any/linux/fb.h b/lib/libc/include/any-linux-any/linux/fb.h
index 33d91b1524..6650e72ef0 100644
--- a/lib/libc/include/any-linux-any/linux/fb.h
+++ b/lib/libc/include/any-linux-any/linux/fb.h
@@ -317,7 +317,7 @@ enum {
#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */
#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */
#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */
-#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */
+#define FB_VBLANK_HAVE_VSYNC 0x100 /* vertical syncs can be detected */
struct fb_vblank {
__u32 flags; /* FB_VBLANK flags */
diff --git a/lib/libc/include/any-linux-any/linux/fcntl.h b/lib/libc/include/any-linux-any/linux/fcntl.h
index 782578d670..6adc03f8fa 100644
--- a/lib/libc/include/any-linux-any/linux/fcntl.h
+++ b/lib/libc/include/any-linux-any/linux/fcntl.h
@@ -4,6 +4,7 @@
#include
#include
+#include
#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
@@ -79,6 +80,17 @@
*/
#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
+/* Set/Get delegations */
+#define F_GETDELEG (F_LINUX_SPECIFIC_BASE + 15)
+#define F_SETDELEG (F_LINUX_SPECIFIC_BASE + 16)
+
+/* Argument structure for F_GETDELEG and F_SETDELEG */
+struct delegation {
+ __u32 d_flags; /* Must be 0 */
+ __u16 d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */
+ __u16 __pad; /* Must be 0 */
+};
+
/*
* Types of directory notifications that may be requested.
*/
@@ -111,6 +123,7 @@
#define PIDFD_SELF_THREAD_GROUP -10001 /* Current thread group leader. */
#define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */
+#define FD_NSFS_ROOT -10003 /* Root of the nsfs filesystem */
#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
/* Generic flags for the *at(2) family of syscalls. */
diff --git a/lib/libc/include/any-linux-any/linux/fou.h b/lib/libc/include/any-linux-any/linux/fou.h
index fb70cbe09f..5074c599f7 100644
--- a/lib/libc/include/any-linux-any/linux/fou.h
+++ b/lib/libc/include/any-linux-any/linux/fou.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/fou.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_FOU_H
#define _LINUX_FOU_H
diff --git a/lib/libc/include/any-linux-any/linux/fs.h b/lib/libc/include/any-linux-any/linux/fs.h
index ffd4070c60..29221c3f26 100644
--- a/lib/libc/include/any-linux-any/linux/fs.h
+++ b/lib/libc/include/any-linux-any/linux/fs.h
@@ -294,8 +294,9 @@ struct file_attr {
#define BLKROTATIONAL _IO(0x12,126)
#define BLKZEROOUT _IO(0x12,127)
#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
-/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
+/* 130-136 and 142 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */
+#define BLKTRACESETUP2 _IOWR(0x12, 142, struct blk_user_trace_setup2)
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
#define FIBMAP _IO(0x00,1) /* bmap access */
@@ -426,10 +427,13 @@ typedef int __bitwise __kernel_rwf_t;
/* buffered IO that drops the cache after reading or writing data */
#define RWF_DONTCACHE ((__kernel_rwf_t)0x00000080)
+/* prevent pipe and socket writes from raising SIGPIPE */
+#define RWF_NOSIGNAL ((__kernel_rwf_t)0x00000100)
+
/* mask of flags supported by the kernel */
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
- RWF_DONTCACHE)
+ RWF_DONTCACHE | RWF_NOSIGNAL)
#define PROCFS_IOCTL_MAGIC 'f'
diff --git a/lib/libc/include/any-linux-any/linux/fuse.h b/lib/libc/include/any-linux-any/linux/fuse.h
index 63375b267a..547ce86ac1 100644
--- a/lib/libc/include/any-linux-any/linux/fuse.h
+++ b/lib/libc/include/any-linux-any/linux/fuse.h
@@ -235,6 +235,11 @@
*
* 7.44
* - add FUSE_NOTIFY_INC_EPOCH
+ *
+ * 7.45
+ * - add FUSE_COPY_FILE_RANGE_64
+ * - add struct fuse_copy_file_range_out
+ * - add FUSE_NOTIFY_PRUNE
*/
#ifndef _LINUX_FUSE_H
@@ -266,7 +271,7 @@
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 44
+#define FUSE_KERNEL_MINOR_VERSION 45
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -653,6 +658,7 @@ enum fuse_opcode {
FUSE_SYNCFS = 50,
FUSE_TMPFILE = 51,
FUSE_STATX = 52,
+ FUSE_COPY_FILE_RANGE_64 = 53,
/* CUSE specific operations */
CUSE_INIT = 4096,
@@ -671,7 +677,7 @@ enum fuse_notify_code {
FUSE_NOTIFY_DELETE = 6,
FUSE_NOTIFY_RESEND = 7,
FUSE_NOTIFY_INC_EPOCH = 8,
- FUSE_NOTIFY_CODE_MAX,
+ FUSE_NOTIFY_PRUNE = 9,
};
/* The read buffer is required to be at least 8k, but may be much larger */
@@ -1110,6 +1116,12 @@ struct fuse_notify_retrieve_in {
uint64_t dummy4;
};
+struct fuse_notify_prune_out {
+ uint32_t count;
+ uint32_t padding;
+ uint64_t spare;
+};
+
struct fuse_backing_map {
int32_t fd;
uint32_t flags;
@@ -1122,6 +1134,7 @@ struct fuse_backing_map {
#define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, \
struct fuse_backing_map)
#define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t)
+#define FUSE_DEV_IOC_SYNC_INIT _IO(FUSE_DEV_IOC_MAGIC, 3)
struct fuse_lseek_in {
uint64_t fh;
@@ -1144,6 +1157,11 @@ struct fuse_copy_file_range_in {
uint64_t flags;
};
+/* For FUSE_COPY_FILE_RANGE_64 */
+struct fuse_copy_file_range_out {
+ uint64_t bytes_copied;
+};
+
#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)
struct fuse_setupmapping_in {
diff --git a/lib/libc/include/any-linux-any/linux/gpib.h b/lib/libc/include/any-linux-any/linux/gpib.h
new file mode 100644
index 0000000000..510e8361d5
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/gpib.h
@@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+/***************************************************************************
+ * copyright : (C) 2002 by Frank Mori Hess
+ ***************************************************************************/
+
+#ifndef _GPIB_H
+#define _GPIB_H
+
+#define GPIB_MAX_NUM_BOARDS 16
+#define GPIB_MAX_NUM_DESCRIPTORS 0x1000
+
+enum ibsta_bit_numbers {
+ DCAS_NUM = 0,
+ DTAS_NUM = 1,
+ LACS_NUM = 2,
+ TACS_NUM = 3,
+ ATN_NUM = 4,
+ CIC_NUM = 5,
+ REM_NUM = 6,
+ LOK_NUM = 7,
+ CMPL_NUM = 8,
+ EVENT_NUM = 9,
+ SPOLL_NUM = 10,
+ RQS_NUM = 11,
+ SRQI_NUM = 12,
+ END_NUM = 13,
+ TIMO_NUM = 14,
+ ERR_NUM = 15
+};
+
+/* IBSTA status bits (returned by all functions) */
+enum ibsta_bits {
+ DCAS = (1 << DCAS_NUM), /* device clear state */
+ DTAS = (1 << DTAS_NUM), /* device trigger state */
+ LACS = (1 << LACS_NUM), /* GPIB interface is addressed as Listener */
+ TACS = (1 << TACS_NUM), /* GPIB interface is addressed as Talker */
+ ATN = (1 << ATN_NUM), /* Attention is asserted */
+ CIC = (1 << CIC_NUM), /* GPIB interface is Controller-in-Charge */
+ REM = (1 << REM_NUM), /* remote state */
+ LOK = (1 << LOK_NUM), /* lockout state */
+ CMPL = (1 << CMPL_NUM), /* I/O is complete */
+ EVENT = (1 << EVENT_NUM), /* DCAS, DTAS, or IFC has occurred */
+ SPOLL = (1 << SPOLL_NUM), /* board serial polled by busmaster */
+ RQS = (1 << RQS_NUM), /* Device requesting service */
+ SRQI = (1 << SRQI_NUM), /* SRQ is asserted */
+ END = (1 << END_NUM), /* EOI or EOS encountered */
+ TIMO = (1 << TIMO_NUM), /* Time limit on I/O or wait function exceeded */
+ ERR = (1 << ERR_NUM), /* Function call terminated on error */
+
+ device_status_mask = ERR | TIMO | END | CMPL | RQS,
+ board_status_mask = ERR | TIMO | END | CMPL | SPOLL |
+ EVENT | LOK | REM | CIC | ATN | TACS | LACS | DTAS | DCAS | SRQI,
+};
+
+/* End-of-string (EOS) modes for use with ibeos */
+
+enum eos_flags {
+ EOS_MASK = 0x1c00,
+ REOS = 0x0400, /* Terminate reads on EOS */
+ XEOS = 0x800, /* assert EOI when EOS char is sent */
+ BIN = 0x1000 /* Do 8-bit compare on EOS */
+};
+
+/* GPIB Bus Control Lines bit vector */
+enum bus_control_line {
+ VALID_DAV = 0x01,
+ VALID_NDAC = 0x02,
+ VALID_NRFD = 0x04,
+ VALID_IFC = 0x08,
+ VALID_REN = 0x10,
+ VALID_SRQ = 0x20,
+ VALID_ATN = 0x40,
+ VALID_EOI = 0x80,
+ VALID_ALL = 0xff,
+ BUS_DAV = 0x0100, /* DAV line status bit */
+ BUS_NDAC = 0x0200, /* NDAC line status bit */
+ BUS_NRFD = 0x0400, /* NRFD line status bit */
+ BUS_IFC = 0x0800, /* IFC line status bit */
+ BUS_REN = 0x1000, /* REN line status bit */
+ BUS_SRQ = 0x2000, /* SRQ line status bit */
+ BUS_ATN = 0x4000, /* ATN line status bit */
+ BUS_EOI = 0x8000 /* EOI line status bit */
+};
+
+enum ppe_bits {
+ PPC_DISABLE = 0x10,
+ PPC_SENSE = 0x8, /* parallel poll sense bit */
+ PPC_DIO_MASK = 0x7
+};
+
+enum {
+ request_service_bit = 0x40,
+};
+
+enum gpib_events {
+ EVENT_NONE = 0,
+ EVENT_DEV_TRG = 1,
+ EVENT_DEV_CLR = 2,
+ EVENT_IFC = 3
+};
+
+#endif /* _GPIB_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/gpib_ioctl.h b/lib/libc/include/any-linux-any/linux/gpib_ioctl.h
new file mode 100644
index 0000000000..45f0e801aa
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/gpib_ioctl.h
@@ -0,0 +1,167 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+/***************************************************************************
+ * copyright : (C) 2002 by Frank Mori Hess
+ ***************************************************************************/
+
+#ifndef _GPIB_IOCTL_H
+#define _GPIB_IOCTL_H
+
+#include
+#include
+
+#define GPIB_CODE 160
+
+struct gpib_board_type_ioctl {
+ char name[100];
+};
+
+/* argument for read/write/command ioctls */
+struct gpib_read_write_ioctl {
+ __u64 buffer_ptr;
+ __u32 requested_transfer_count;
+ __u32 completed_transfer_count;
+ __s32 end; /* end flag return for reads, end io suppression request for cmd*/
+ __s32 handle;
+};
+
+struct gpib_open_dev_ioctl {
+ __u32 handle;
+ __u32 pad;
+ __s32 sad;
+ __u32 is_board;
+};
+
+struct gpib_close_dev_ioctl {
+ __u32 handle;
+};
+
+struct gpib_serial_poll_ioctl {
+ __u32 pad;
+ __s32 sad;
+ __u8 status_byte;
+ __u8 padding[3]; /* align to 32 bit boundary */
+};
+
+struct gpib_eos_ioctl {
+ __s32 eos;
+ __s32 eos_flags;
+};
+
+struct gpib_wait_ioctl {
+ __s32 handle;
+ __s32 wait_mask;
+ __s32 clear_mask;
+ __s32 set_mask;
+ __s32 ibsta;
+ __s32 pad;
+ __s32 sad;
+ __u32 usec_timeout;
+};
+
+struct gpib_online_ioctl {
+ __u64 init_data_ptr;
+ __s32 init_data_length;
+ __s32 online;
+};
+
+struct gpib_spoll_bytes_ioctl {
+ __u32 num_bytes;
+ __u32 pad;
+ __s32 sad;
+};
+
+struct gpib_board_info_ioctl {
+ __u32 pad;
+ __s32 sad;
+ __s32 parallel_poll_configuration;
+ __s32 autopolling;
+ __s32 is_system_controller;
+ __u32 t1_delay;
+ unsigned ist : 1;
+ unsigned no_7_bit_eos : 1;
+ unsigned padding :30; /* align to 32 bit boundary */
+};
+
+struct gpib_select_pci_ioctl {
+ __s32 pci_bus;
+ __s32 pci_slot;
+};
+
+struct gpib_ppoll_config_ioctl {
+ __u8 config;
+ unsigned set_ist : 1;
+ unsigned clear_ist : 1;
+ unsigned padding :22; /* align to 32 bit boundary */
+};
+
+struct gpib_pad_ioctl {
+ __u32 handle;
+ __u32 pad;
+};
+
+struct gpib_sad_ioctl {
+ __u32 handle;
+ __s32 sad;
+};
+
+/* select a piece of hardware to attach by its sysfs device path */
+struct gpib_select_device_path_ioctl {
+ char device_path[0x1000];
+};
+
+/* update status byte and request service */
+struct gpib_request_service2 {
+ __u8 status_byte;
+ __u8 padding[3]; /* align to 32 bit boundary */
+ __s32 new_reason_for_service;
+};
+
+/* Standard functions. */
+enum gpib_ioctl {
+ IBRD = _IOWR(GPIB_CODE, 100, struct gpib_read_write_ioctl),
+ IBWRT = _IOWR(GPIB_CODE, 101, struct gpib_read_write_ioctl),
+ IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
+ IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
+ IBCLOSEDEV = _IOW(GPIB_CODE, 4, struct gpib_close_dev_ioctl),
+ IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl),
+ IBRPP = _IOWR(GPIB_CODE, 6, __u8),
+
+ IBSIC = _IOW(GPIB_CODE, 9, __u32),
+ IBSRE = _IOW(GPIB_CODE, 10, __s32),
+ IBGTS = _IO(GPIB_CODE, 11),
+ IBCAC = _IOW(GPIB_CODE, 12, __s32),
+ IBLINES = _IOR(GPIB_CODE, 14, __s16),
+ IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl),
+ IBSAD = _IOW(GPIB_CODE, 16, struct gpib_sad_ioctl),
+ IBTMO = _IOW(GPIB_CODE, 17, __u32),
+ IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
+ IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl),
+ IBRSV = _IOW(GPIB_CODE, 20, __u8),
+ CFCBASE = _IOW(GPIB_CODE, 21, __u64),
+ CFCIRQ = _IOW(GPIB_CODE, 22, __u32),
+ CFCDMA = _IOW(GPIB_CODE, 23, __u32),
+ CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl),
+
+ IBMUTEX = _IOW(GPIB_CODE, 26, __s32),
+ IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
+ IBPPC = _IOW(GPIB_CODE, 28, struct gpib_ppoll_config_ioctl),
+ IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),
+
+ IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, __s32),
+ IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
+ IBEVENT = _IOR(GPIB_CODE, 33, __s16),
+ IBRSC = _IOW(GPIB_CODE, 34, __s32),
+ IB_T1_DELAY = _IOW(GPIB_CODE, 35, __u32),
+ IBLOC = _IO(GPIB_CODE, 36),
+
+ IBAUTOSPOLL = _IOW(GPIB_CODE, 38, __s16),
+ IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
+ IBPP2_SET = _IOW(GPIB_CODE, 40, __s16),
+ IBPP2_GET = _IOR(GPIB_CODE, 41, __s16),
+ IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
+ /* 44 was IBSELECT_SERIAL_NUMBER */
+ IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2)
+};
+
+#endif /* _GPIB_IOCTL_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/handshake.h b/lib/libc/include/any-linux-any/linux/handshake.h
index 7874215475..83c4f050ad 100644
--- a/lib/libc/include/any-linux-any/linux/handshake.h
+++ b/lib/libc/include/any-linux-any/linux/handshake.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/handshake.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_HANDSHAKE_H
#define _LINUX_HANDSHAKE_H
diff --git a/lib/libc/include/any-linux-any/linux/hidraw.h b/lib/libc/include/any-linux-any/linux/hidraw.h
index 7b1d5d2f6a..059fa946ea 100644
--- a/lib/libc/include/any-linux-any/linux/hidraw.h
+++ b/lib/libc/include/any-linux-any/linux/hidraw.h
@@ -48,6 +48,8 @@ struct hidraw_devinfo {
#define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
+#define HIDIOCTL_LAST _IOC_NR(HIDIOCREVOKE)
+
#define HIDRAW_FIRST_MINOR 0
#define HIDRAW_MAX_DEVICES 64
/* number of reports to buffer */
diff --git a/lib/libc/include/any-linux-any/linux/i2c.h b/lib/libc/include/any-linux-any/linux/i2c.h
index 11b43063b1..a4da4b4da7 100644
--- a/lib/libc/include/any-linux-any/linux/i2c.h
+++ b/lib/libc/include/any-linux-any/linux/i2c.h
@@ -36,7 +36,7 @@
*
* Only if I2C_FUNC_NOSTART is set:
* %I2C_M_NOSTART: skip repeated start sequence
-
+ *
* Only if I2C_FUNC_PROTOCOL_MANGLING is set:
* %I2C_M_NO_RD_ACK: in a read message, master ACK/NACK bit is skipped
* %I2C_M_IGNORE_NAK: treat NACK from client as ACK
diff --git a/lib/libc/include/any-linux-any/linux/i8k.h b/lib/libc/include/any-linux-any/linux/i8k.h
index 82cf7e69f0..9d08d4bce0 100644
--- a/lib/libc/include/any-linux-any/linux/i8k.h
+++ b/lib/libc/include/any-linux-any/linux/i8k.h
@@ -36,6 +36,8 @@
#define I8K_FAN_LOW 1
#define I8K_FAN_HIGH 2
#define I8K_FAN_TURBO 3
+/* Many machines treat this mode as some sort of automatic mode */
+#define I8K_FAN_AUTO 3
#define I8K_FAN_MAX I8K_FAN_TURBO
#define I8K_VOL_UP 1
diff --git a/lib/libc/include/any-linux-any/linux/if_bridge.h b/lib/libc/include/any-linux-any/linux/if_bridge.h
index 415dc8f953..8593f5ca74 100644
--- a/lib/libc/include/any-linux-any/linux/if_bridge.h
+++ b/lib/libc/include/any-linux-any/linux/if_bridge.h
@@ -823,6 +823,8 @@ struct br_mcast_stats {
/* bridge boolean options
* BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
* BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping
+ * BR_BOOLOPT_FDB_LOCAL_VLAN_0 - local FDB entries installed by the bridge
+ * driver itself should only be added on VLAN 0
*
* IMPORTANT: if adding a new option do not forget to handle
* it in br_boolopt_toggle/get and bridge sysfs
@@ -832,6 +834,7 @@ enum br_boolopt_id {
BR_BOOLOPT_MCAST_VLAN_SNOOPING,
BR_BOOLOPT_MST_ENABLE,
BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION,
+ BR_BOOLOPT_FDB_LOCAL_VLAN_0,
BR_BOOLOPT_MAX
};
diff --git a/lib/libc/include/any-linux-any/linux/if_ether.h b/lib/libc/include/any-linux-any/linux/if_ether.h
index 7af9ced28b..c81e8662b7 100644
--- a/lib/libc/include/any-linux-any/linux/if_ether.h
+++ b/lib/libc/include/any-linux-any/linux/if_ether.h
@@ -92,6 +92,9 @@
#define ETH_P_ETHERCAT 0x88A4 /* EtherCAT */
#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
+#define ETH_P_MXLGSW 0x88C3 /* Infineon Technologies Corporate Research ST
+ * Used by MaxLinear GSW DSA
+ */
#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
#define ETH_P_TIPC 0x88CA /* TIPC */
#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */
@@ -114,6 +117,7 @@
#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_YT921X 0x9988 /* Motorcomm YT921x DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
diff --git a/lib/libc/include/any-linux-any/linux/if_link.h b/lib/libc/include/any-linux-any/linux/if_link.h
index 7cf6e78a14..9a6f4c08d3 100644
--- a/lib/libc/include/any-linux-any/linux/if_link.h
+++ b/lib/libc/include/any-linux-any/linux/if_link.h
@@ -379,6 +379,8 @@ enum {
IFLA_DPLL_PIN,
IFLA_MAX_PACING_OFFLOAD_HORIZON,
IFLA_NETNS_IMMUTABLE,
+ IFLA_HEADROOM,
+ IFLA_TAILROOM,
__IFLA_MAX
};
@@ -1562,6 +1564,7 @@ enum {
IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
IFLA_BOND_SLAVE_PRIO,
+ IFLA_BOND_SLAVE_ACTOR_PORT_PRIO,
__IFLA_BOND_SLAVE_MAX,
};
diff --git a/lib/libc/include/any-linux-any/linux/if_team.h b/lib/libc/include/any-linux-any/linux/if_team.h
index 1fd7f45940..a1024a4529 100644
--- a/lib/libc/include/any-linux-any/linux/if_team.h
+++ b/lib/libc/include/any-linux-any/linux/if_team.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/team.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_IF_TEAM_H
#define _LINUX_IF_TEAM_H
diff --git a/lib/libc/include/any-linux-any/linux/iio/types.h b/lib/libc/include/any-linux-any/linux/iio/types.h
index 425d95fd13..be99610f27 100644
--- a/lib/libc/include/any-linux-any/linux/iio/types.h
+++ b/lib/libc/include/any-linux-any/linux/iio/types.h
@@ -52,6 +52,7 @@ enum iio_chan_type {
IIO_COLORTEMP,
IIO_CHROMATICITY,
IIO_ATTENTION,
+ IIO_ALTCURRENT,
};
enum iio_modifier {
@@ -108,6 +109,10 @@ enum iio_modifier {
IIO_MOD_ROLL,
IIO_MOD_LIGHT_UVA,
IIO_MOD_LIGHT_UVB,
+ IIO_MOD_RMS,
+ IIO_MOD_ACTIVE,
+ IIO_MOD_REACTIVE,
+ IIO_MOD_APPARENT,
};
enum iio_event_type {
diff --git a/lib/libc/include/any-linux-any/linux/input-event-codes.h b/lib/libc/include/any-linux-any/linux/input-event-codes.h
index 33e936a042..3ee0d097c9 100644
--- a/lib/libc/include/any-linux-any/linux/input-event-codes.h
+++ b/lib/libc/include/any-linux-any/linux/input-event-codes.h
@@ -27,6 +27,7 @@
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
+#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
#define INPUT_PROP_MAX 0x1f
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
@@ -630,6 +631,18 @@
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
+/*
+ * Keycodes for hotkeys toggling the electronic privacy screen found on some
+ * laptops on/off. Note when the embedded-controller turns on/off the eprivacy
+ * screen itself then the state should be reported through drm connecter props:
+ * https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
+ * Except when implementing the drm connecter properties API is not possible
+ * because e.g. the firmware does not allow querying the presence and/or status
+ * of the eprivacy screen at boot.
+ */
+#define KEY_EPRIVACY_SCREEN_ON 0x252
+#define KEY_EPRIVACY_SCREEN_OFF 0x253
+
#define KEY_KBDINPUTASSIST_PREV 0x260
#define KEY_KBDINPUTASSIST_NEXT 0x261
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
@@ -878,6 +891,7 @@
#define ABS_VOLUME 0x20
#define ABS_PROFILE 0x21
+#define ABS_SND_PROFILE 0x22
#define ABS_MISC 0x28
@@ -987,4 +1001,12 @@
#define SND_MAX 0x07
#define SND_CNT (SND_MAX+1)
+/*
+ * ABS_SND_PROFILE values
+ */
+
+#define SND_PROFILE_SILENT 0x00
+#define SND_PROFILE_VIBRATE 0x01
+#define SND_PROFILE_RING 0x02
+
#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/input.h b/lib/libc/include/any-linux-any/linux/input.h
index faa5b9d721..71006dc6d7 100644
--- a/lib/libc/include/any-linux-any/linux/input.h
+++ b/lib/libc/include/any-linux-any/linux/input.h
@@ -427,6 +427,24 @@ struct ff_rumble_effect {
__u16 weak_magnitude;
};
+/**
+ * struct ff_haptic_effect
+ * @hid_usage: hid_usage according to Haptics page (WAVEFORM_CLICK, etc.)
+ * @vendor_id: the waveform vendor ID if hid_usage is in the vendor-defined range
+ * @vendor_waveform_page: the vendor waveform page if hid_usage is in the vendor-defined range
+ * @intensity: strength of the effect as percentage
+ * @repeat_count: number of times to retrigger effect
+ * @retrigger_period: time before effect is retriggered (in ms)
+ */
+struct ff_haptic_effect {
+ __u16 hid_usage;
+ __u16 vendor_id;
+ __u8 vendor_waveform_page;
+ __u16 intensity;
+ __u16 repeat_count;
+ __u16 retrigger_period;
+};
+
/**
* struct ff_effect - defines force feedback effect
* @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
@@ -463,6 +481,7 @@ struct ff_effect {
struct ff_periodic_effect periodic;
struct ff_condition_effect condition[2]; /* One for each axis */
struct ff_rumble_effect rumble;
+ struct ff_haptic_effect haptic;
} u;
};
@@ -470,6 +489,7 @@ struct ff_effect {
* Force feedback effect types
*/
+#define FF_HAPTIC 0x4f
#define FF_RUMBLE 0x50
#define FF_PERIODIC 0x51
#define FF_CONSTANT 0x52
@@ -479,7 +499,7 @@ struct ff_effect {
#define FF_INERTIA 0x56
#define FF_RAMP 0x57
-#define FF_EFFECT_MIN FF_RUMBLE
+#define FF_EFFECT_MIN FF_HAPTIC
#define FF_EFFECT_MAX FF_RAMP
/*
diff --git a/lib/libc/include/any-linux-any/linux/io_uring.h b/lib/libc/include/any-linux-any/linux/io_uring.h
index 92cc87565f..cfd70529ed 100644
--- a/lib/libc/include/any-linux-any/linux/io_uring.h
+++ b/lib/libc/include/any-linux-any/linux/io_uring.h
@@ -225,6 +225,18 @@ enum io_uring_sqe_flags_bit {
/* Use hybrid poll in iopoll process */
#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
+/*
+ * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have
+ * IORING_CQE_F_32 set in cqe->flags.
+ */
+#define IORING_SETUP_CQE_MIXED (1U << 18)
+
+/*
+ * Allow both 64b and 128b SQEs. If a 128b SQE is posted, it will have
+ * a 128b opcode.
+ */
+#define IORING_SETUP_SQE_MIXED (1U << 19)
+
enum io_uring_op {
IORING_OP_NOP,
IORING_OP_READV,
@@ -289,6 +301,8 @@ enum io_uring_op {
IORING_OP_READV_FIXED,
IORING_OP_WRITEV_FIXED,
IORING_OP_PIPE,
+ IORING_OP_NOP128,
+ IORING_OP_URING_CMD128,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -298,9 +312,13 @@ enum io_uring_op {
* sqe->uring_cmd_flags top 8bits aren't available for userspace
* IORING_URING_CMD_FIXED use registered buffer; pass this flag
* along with setting sqe->buf_index.
+ * IORING_URING_CMD_MULTISHOT must be used with buffer select, like other
+ * multishot commands. Not compatible with
+ * IORING_URING_CMD_FIXED, for now.
*/
#define IORING_URING_CMD_FIXED (1U << 0)
-#define IORING_URING_CMD_MASK IORING_URING_CMD_FIXED
+#define IORING_URING_CMD_MULTISHOT (1U << 1)
+#define IORING_URING_CMD_MASK (IORING_URING_CMD_FIXED | IORING_URING_CMD_MULTISHOT)
/*
@@ -394,7 +412,7 @@ enum io_uring_op {
* will be contiguous from the starting buffer ID.
*
* IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec
- * to allow vectorized send operations.
+ * to allow vectorized send operations.
*/
#define IORING_RECVSEND_POLL_FIRST (1U << 0)
#define IORING_RECV_MULTISHOT (1U << 1)
@@ -454,6 +472,7 @@ enum io_uring_msg_ring_flags {
#define IORING_NOP_FIXED_FILE (1U << 2)
#define IORING_NOP_FIXED_BUFFER (1U << 3)
#define IORING_NOP_TW (1U << 4)
+#define IORING_NOP_CQE32 (1U << 5)
/*
* IO completion data structure (Completion Queue Entry)
@@ -487,12 +506,22 @@ struct io_uring_cqe {
* other provided buffer type, all completions with a
* buffer passed back is automatically returned to the
* application.
+ * IORING_CQE_F_SKIP If set, then the application/liburing must ignore this
+ * CQE. It's only purpose is to fill a gap in the ring,
+ * if a large CQE is attempted posted when the ring has
+ * just a single small CQE worth of space left before
+ * wrapping.
+ * IORING_CQE_F_32 If set, this is a 32b/big-cqe posting. Use with rings
+ * setup in a mixed CQE mode, where both 16b and 32b
+ * CQEs may be posted to the CQ ring.
*/
#define IORING_CQE_F_BUFFER (1U << 0)
#define IORING_CQE_F_MORE (1U << 1)
#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
#define IORING_CQE_F_NOTIF (1U << 3)
#define IORING_CQE_F_BUF_MORE (1U << 4)
+#define IORING_CQE_F_SKIP (1U << 5)
+#define IORING_CQE_F_32 (1U << 15)
#define IORING_CQE_BUFFER_SHIFT 16
@@ -665,6 +694,12 @@ enum io_uring_register_op {
IORING_REGISTER_MEM_REGION = 34,
+ /* query various aspects of io_uring, see linux/io_uring/query.h */
+ IORING_REGISTER_QUERY = 35,
+
+ /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
+ IORING_REGISTER_ZCRX_CTRL = 36,
+
/* this goes last */
IORING_REGISTER_LAST,
@@ -974,6 +1009,7 @@ enum io_uring_socket_op {
SOCKET_URING_OP_GETSOCKOPT,
SOCKET_URING_OP_SETSOCKOPT,
SOCKET_URING_OP_TX_TIMESTAMP,
+ SOCKET_URING_OP_GETSOCKNAME,
};
/*
@@ -1028,6 +1064,10 @@ struct io_uring_zcrx_area_reg {
__u64 __resv2[2];
};
+enum zcrx_reg_flags {
+ ZCRX_REG_IMPORT = 1,
+};
+
/*
* Argument for IORING_REGISTER_ZCRX_IFQ
*/
@@ -1046,6 +1086,33 @@ struct io_uring_zcrx_ifq_reg {
__u64 __resv[3];
};
+enum zcrx_ctrl_op {
+ ZCRX_CTRL_FLUSH_RQ,
+ ZCRX_CTRL_EXPORT,
+
+ __ZCRX_CTRL_LAST,
+};
+
+struct zcrx_ctrl_flush_rq {
+ __u64 __resv[6];
+};
+
+struct zcrx_ctrl_export {
+ __u32 zcrx_fd;
+ __u32 __resv1[11];
+};
+
+struct zcrx_ctrl {
+ __u32 zcrx_id;
+ __u32 op; /* see enum zcrx_ctrl_op */
+ __u64 __resv[2];
+
+ union {
+ struct zcrx_ctrl_export zc_export;
+ struct zcrx_ctrl_flush_rq zc_flush;
+ };
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/libc/include/any-linux-any/linux/io_uring/query.h b/lib/libc/include/any-linux-any/linux/io_uring/query.h
new file mode 100644
index 0000000000..6f9c60a5bf
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/io_uring/query.h
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
+/*
+ * Header file for the io_uring query interface.
+ */
+#ifndef LINUX_IO_URING_QUERY_H
+#define LINUX_IO_URING_QUERY_H
+
+#include
+
+struct io_uring_query_hdr {
+ __u64 next_entry;
+ __u64 query_data;
+ __u32 query_op;
+ __u32 size;
+ __s32 result;
+ __u32 __resv[3];
+};
+
+enum {
+ IO_URING_QUERY_OPCODES = 0,
+ IO_URING_QUERY_ZCRX = 1,
+ IO_URING_QUERY_SCQ = 2,
+
+ __IO_URING_QUERY_MAX,
+};
+
+/* Doesn't require a ring */
+struct io_uring_query_opcode {
+ /* The number of supported IORING_OP_* opcodes */
+ __u32 nr_request_opcodes;
+ /* The number of supported IORING_[UN]REGISTER_* opcodes */
+ __u32 nr_register_opcodes;
+ /* Bitmask of all supported IORING_FEAT_* flags */
+ __u64 feature_flags;
+ /* Bitmask of all supported IORING_SETUP_* flags */
+ __u64 ring_setup_flags;
+ /* Bitmask of all supported IORING_ENTER_** flags */
+ __u64 enter_flags;
+ /* Bitmask of all supported IOSQE_* flags */
+ __u64 sqe_flags;
+ /* The number of available query opcodes */
+ __u32 nr_query_opcodes;
+ __u32 __pad;
+};
+
+struct io_uring_query_zcrx {
+ /* Bitmask of supported ZCRX_REG_* flags, */
+ __u64 register_flags;
+ /* Bitmask of all supported IORING_ZCRX_AREA_* flags */
+ __u64 area_flags;
+ /* The number of supported ZCRX_CTRL_* opcodes */
+ __u32 nr_ctrl_opcodes;
+ __u32 __resv1;
+ /* The refill ring header size */
+ __u32 rq_hdr_size;
+ /* The alignment for the header */
+ __u32 rq_hdr_alignment;
+ __u64 __resv2;
+};
+
+struct io_uring_query_scq {
+ /* The SQ/CQ rings header size */
+ __u64 hdr_size;
+ /* The alignment for the header */
+ __u64 hdr_alignment;
+};
+
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/iommufd.h b/lib/libc/include/any-linux-any/linux/iommufd.h
index 847b6135e9..8f4e6e49fb 100644
--- a/lib/libc/include/any-linux-any/linux/iommufd.h
+++ b/lib/libc/include/any-linux-any/linux/iommufd.h
@@ -450,6 +450,16 @@ struct iommu_hwpt_vtd_s1 {
* nested domain will translate the same as the nesting parent. The S1 will
* install a Context Descriptor Table pointing at userspace memory translated
* by the nesting parent.
+ *
+ * It's suggested to allocate a vDEVICE object carrying vSID and then re-attach
+ * the nested domain, as soon as the vSID is available in the VMM level:
+ *
+ * - when Cfg=translate, a vDEVICE must be allocated prior to attaching to the
+ * allocated nested domain, as CD/ATS invalidations and vevents need a vSID.
+ * - when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain
+ * attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if
+ * VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to
+ * report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort.
*/
struct iommu_hwpt_arm_smmuv3 {
__aligned_le64 ste[2];
diff --git a/lib/libc/include/any-linux-any/linux/isst_if.h b/lib/libc/include/any-linux-any/linux/isst_if.h
index 073e491b77..882a6eedde 100644
--- a/lib/libc/include/any-linux-any/linux/isst_if.h
+++ b/lib/libc/include/any-linux-any/linux/isst_if.h
@@ -52,7 +52,7 @@ struct isst_if_cpu_map {
/**
* struct isst_if_cpu_maps - structure for CPU map IOCTL
* @cmd_count: Number of CPU mapping command in cpu_map[]
- * @cpu_map[]: Holds one or more CPU map data structure
+ * @cpu_map: Holds one or more CPU map data structure
*
* This structure used with ioctl ISST_IF_GET_PHY_ID to send
* one or more CPU mapping commands. Here IOCTL return value indicates
@@ -82,8 +82,8 @@ struct isst_if_io_reg {
/**
* struct isst_if_io_regs - structure for IO register commands
- * @cmd_count: Number of io reg commands in io_reg[]
- * @io_reg[]: Holds one or more io_reg command structure
+ * @req_count: Number of io reg commands in io_reg[]
+ * @io_reg: Holds one or more io_reg command structure
*
* This structure used with ioctl ISST_IF_IO_CMD to send
* one or more read/write commands to PUNIT. Here IOCTL return value
@@ -120,7 +120,7 @@ struct isst_if_mbox_cmd {
/**
* struct isst_if_mbox_cmds - structure for mailbox commands
* @cmd_count: Number of mailbox commands in mbox_cmd[]
- * @mbox_cmd[]: Holds one or more mbox commands
+ * @mbox_cmd: Holds one or more mbox commands
*
* This structure used with ioctl ISST_IF_MBOX_COMMAND to send
* one or more mailbox commands to PUNIT. Here IOCTL return value
@@ -152,7 +152,7 @@ struct isst_if_msr_cmd {
/**
* struct isst_if_msr_cmds - structure for msr commands
* @cmd_count: Number of mailbox commands in msr_cmd[]
- * @msr_cmd[]: Holds one or more msr commands
+ * @msr_cmd: Holds one or more msr commands
*
* This structure used with ioctl ISST_IF_MSR_COMMAND to send
* one or more MSR commands. IOCTL return value indicates number of
@@ -167,8 +167,9 @@ struct isst_if_msr_cmds {
* struct isst_core_power - Structure to get/set core_power feature
* @get_set: 0: Get, 1: Set
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @enable: Feature enable status
+ * @supported: Power domain supports SST_CP interface
* @priority_type: Priority type for the feature (ordered/proportional)
*
* Structure to get/set core_power feature state using IOCTL
@@ -187,11 +188,11 @@ struct isst_core_power {
* struct isst_clos_param - Structure to get/set clos praram
* @get_set: 0: Get, 1: Set
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
- * clos: Clos ID for the parameters
- * min_freq_mhz: Minimum frequency in MHz
- * max_freq_mhz: Maximum frequency in MHz
- * prop_prio: Proportional priority from 0-15
+ * @power_domain_id: Power Domain id
+ * @clos: Clos ID for the parameters
+ * @min_freq_mhz: Minimum frequency in MHz
+ * @max_freq_mhz: Maximum frequency in MHz
+ * @prop_prio: Proportional priority from 0-15
*
* Structure to get/set per clos property using IOCTL
* ISST_IF_CLOS_PARAM.
@@ -209,7 +210,7 @@ struct isst_clos_param {
/**
* struct isst_if_clos_assoc - Structure to assign clos to a CPU
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @logical_cpu: CPU number
* @clos: Clos ID to assign to the logical CPU
*
@@ -228,6 +229,7 @@ struct isst_if_clos_assoc {
* @get_set: Request is for get or set
* @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
* Linux CPU number
+ * @assoc_info: CLOS data for this CPU
*
* Structure used to get/set associate CPUs to clos using IOCTL
* ISST_IF_CLOS_ASSOC.
@@ -257,7 +259,7 @@ struct isst_tpmi_instance_count {
/**
* struct isst_perf_level_info - Structure to get information on SST-PP levels
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @logical_cpu: CPU number
* @clos: Clos ID to assign to the logical CPU
* @max_level: Maximum performance level supported by the platform
@@ -267,8 +269,8 @@ struct isst_tpmi_instance_count {
* @feature_state: SST-BF and SST-TF (enabled/disabled) status at current level
* @locked: SST-PP performance level change is locked/unlocked
* @enabled: SST-PP feature is enabled or not
- * @sst-tf_support: SST-TF support status at this level
- * @sst-bf_support: SST-BF support status at this level
+ * @sst_tf_support: SST-TF support status at this level
+ * @sst_bf_support: SST-BF support status at this level
*
* Structure to get SST-PP details using IOCTL ISST_IF_PERF_LEVELS.
*/
@@ -289,7 +291,7 @@ struct isst_perf_level_info {
/**
* struct isst_perf_level_control - Structure to set SST-PP level
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @level: level to set
*
* Structure used change SST-PP level using IOCTL ISST_IF_PERF_SET_LEVEL.
@@ -303,7 +305,7 @@ struct isst_perf_level_control {
/**
* struct isst_perf_feature_control - Structure to activate SST-BF/SST-TF
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @feature: bit 0 = SST-BF state, bit 1 = SST-TF state
*
* Structure used to enable SST-BF/SST-TF using IOCTL ISST_IF_PERF_SET_FEATURE.
@@ -320,7 +322,7 @@ struct isst_perf_feature_control {
/**
* struct isst_perf_level_data_info - Structure to get SST-PP level details
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @level: SST-PP level for which caller wants to get information
* @tdp_ratio: TDP Ratio
* @base_freq_mhz: Base frequency in MHz
@@ -341,8 +343,8 @@ struct isst_perf_feature_control {
* @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency
* @max_buckets: Maximum trl buckets
* @max_trl_levels: Maximum trl levels
- * @bucket_core_counts[TRL_MAX_BUCKETS]: Number of cores per bucket
- * @trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]: maximum frequency
+ * @bucket_core_counts: Number of cores per bucket
+ * @trl_freq_mhz: maximum frequency
* for a bucket and trl level
*
* Structure used to get information on frequencies and TDP for a SST-PP
@@ -402,7 +404,7 @@ struct isst_perf_level_fabric_info {
/**
* struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @level: SST-PP level for which caller wants to get information
* @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
* Linux CPU number. If 0 CPU buffer is copied to user space
@@ -430,7 +432,7 @@ struct isst_perf_level_cpu_mask {
/**
* struct isst_base_freq_info - Structure to get SST-BF frequencies
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @level: SST-PP level for which caller wants to get information
* @high_base_freq_mhz: High priority CPU base frequency
* @low_base_freq_mhz: Low priority CPU base frequency
@@ -453,9 +455,11 @@ struct isst_base_freq_info {
/**
* struct isst_turbo_freq_info - Structure to get SST-TF frequencies
* @socket_id: Socket/package id
- * @power_domain: Power Domain id
+ * @power_domain_id: Power Domain id
* @level: SST-PP level for which caller wants to get information
* @max_clip_freqs: Maximum number of low priority core clipping frequencies
+ * @max_buckets: Maximum trl buckets
+ * @max_trl_levels: Maximum trl levels
* @lp_clip_freq_mhz: Clip frequencies per trl level
* @bucket_core_counts: Maximum number of cores for a bucket
* @trl_freq_mhz: Frequencies per trl level for each bucket
diff --git a/lib/libc/include/any-linux-any/linux/ivtv.h b/lib/libc/include/any-linux-any/linux/ivtv.h
index ae6bab82b8..aaeff03f96 100644
--- a/lib/libc/include/any-linux-any/linux/ivtv.h
+++ b/lib/libc/include/any-linux-any/linux/ivtv.h
@@ -2,7 +2,7 @@
/*
Public ivtv API header
Copyright (C) 2003-2004 Kevin Thayer
- Copyright (C) 2004-2007 Hans Verkuil
+ Copyright (C) 2004-2007 Hans Verkuil
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/libc/include/any-linux-any/linux/kexec.h b/lib/libc/include/any-linux-any/linux/kexec.h
index 49ff741624..e965aab40d 100644
--- a/lib/libc/include/any-linux-any/linux/kexec.h
+++ b/lib/libc/include/any-linux-any/linux/kexec.h
@@ -22,12 +22,16 @@
* KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.
* KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd
* fd field.
+ * KEXEC_FILE_FORCE_DTB : Force carrying over the current boot's DTB to the new
+ * kernel on x86. This is already the default behavior on
+ * some other architectures, like ARM64 and PowerPC.
*/
#define KEXEC_FILE_UNLOAD 0x00000001
#define KEXEC_FILE_ON_CRASH 0x00000002
#define KEXEC_FILE_NO_INITRAMFS 0x00000004
#define KEXEC_FILE_DEBUG 0x00000008
#define KEXEC_FILE_NO_CMA 0x00000010
+#define KEXEC_FILE_FORCE_DTB 0x00000020
/* These values match the ELF architecture values.
* Unless there is a good reason that should continue to be the case.
diff --git a/lib/libc/include/any-linux-any/linux/kfd_ioctl.h b/lib/libc/include/any-linux-any/linux/kfd_ioctl.h
index bad6286285..b120355bbb 100644
--- a/lib/libc/include/any-linux-any/linux/kfd_ioctl.h
+++ b/lib/libc/include/any-linux-any/linux/kfd_ioctl.h
@@ -67,8 +67,8 @@ struct kfd_ioctl_get_version_args {
struct kfd_ioctl_create_queue_args {
__u64 ring_base_address; /* to KFD */
- __u64 write_pointer_address; /* from KFD */
- __u64 read_pointer_address; /* from KFD */
+ __u64 write_pointer_address; /* to KFD */
+ __u64 read_pointer_address; /* to KFD */
__u64 doorbell_offset; /* from KFD */
__u32 ring_size; /* to KFD */
diff --git a/lib/libc/include/any-linux-any/linux/kvm.h b/lib/libc/include/any-linux-any/linux/kvm.h
index 3e4d668e1e..190c95cec9 100644
--- a/lib/libc/include/any-linux-any/linux/kvm.h
+++ b/lib/libc/include/any-linux-any/linux/kvm.h
@@ -179,6 +179,7 @@ struct kvm_xen_exit {
#define KVM_EXIT_LOONGARCH_IOCSR 38
#define KVM_EXIT_MEMORY_FAULT 39
#define KVM_EXIT_TDX 40
+#define KVM_EXIT_ARM_SEA 41
/* For KVM_EXIT_INTERNAL_ERROR */
/* Emulate instruction failed. */
@@ -465,6 +466,14 @@ struct kvm_run {
} setup_event_notify;
};
} tdx;
+ /* KVM_EXIT_ARM_SEA */
+ struct {
+#define KVM_EXIT_ARM_SEA_FLAG_GPA_VALID (1ULL << 0)
+ __u64 flags;
+ __u64 esr;
+ __u64 gva;
+ __u64 gpa;
+ } arm_sea;
/* Fix the size of the union. */
char padding[256];
};
@@ -954,6 +963,9 @@ struct kvm_enable_cap {
#define KVM_CAP_ARM_EL2_E2H0 241
#define KVM_CAP_RISCV_MP_STATE_RESET 242
#define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243
+#define KVM_CAP_GUEST_MEMFD_FLAGS 244
+#define KVM_CAP_ARM_SEA_TO_USER 245
+#define KVM_CAP_S390_USER_OPEREXEC 246
struct kvm_irq_routing_irqchip {
__u32 irqchip;
@@ -1590,6 +1602,8 @@ struct kvm_memory_attributes {
#define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)
#define KVM_CREATE_GUEST_MEMFD _IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd)
+#define GUEST_MEMFD_FLAG_MMAP (1ULL << 0)
+#define GUEST_MEMFD_FLAG_INIT_SHARED (1ULL << 1)
struct kvm_create_guest_memfd {
__u64 size;
diff --git a/lib/libc/include/any-linux-any/linux/landlock.h b/lib/libc/include/any-linux-any/linux/landlock.h
index e4fcb8006b..37f269bdbb 100644
--- a/lib/libc/include/any-linux-any/linux/landlock.h
+++ b/lib/libc/include/any-linux-any/linux/landlock.h
@@ -216,6 +216,23 @@ struct landlock_net_port_attr {
* :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with
* ``O_TRUNC``. This access right is available since the third version of the
* Landlock ABI.
+ * - %LANDLOCK_ACCESS_FS_IOCTL_DEV: Invoke :manpage:`ioctl(2)` commands on an opened
+ * character or block device.
+ *
+ * This access right applies to all `ioctl(2)` commands implemented by device
+ * drivers. However, the following common IOCTL commands continue to be
+ * invokable independent of the %LANDLOCK_ACCESS_FS_IOCTL_DEV right:
+ *
+ * * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``),
+ * * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``),
+ * * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``,
+ * ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)
+ * * Some IOCTL commands which do not make sense when used with devices, but
+ * whose implementations are safe and return the right error codes
+ * (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``)
+ *
+ * This access right is available since the fifth version of the Landlock
+ * ABI.
*
* Whether an opened file can be truncated with :manpage:`ftruncate(2)` or used
* with `ioctl(2)` is determined during :manpage:`open(2)`, in the same way as
@@ -275,26 +292,6 @@ struct landlock_net_port_attr {
* If multiple requirements are not met, the ``EACCES`` error code takes
* precedence over ``EXDEV``.
*
- * The following access right applies both to files and directories:
- *
- * - %LANDLOCK_ACCESS_FS_IOCTL_DEV: Invoke :manpage:`ioctl(2)` commands on an opened
- * character or block device.
- *
- * This access right applies to all `ioctl(2)` commands implemented by device
- * drivers. However, the following common IOCTL commands continue to be
- * invokable independent of the %LANDLOCK_ACCESS_FS_IOCTL_DEV right:
- *
- * * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``),
- * * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``),
- * * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``,
- * ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)
- * * Some IOCTL commands which do not make sense when used with devices, but
- * whose implementations are safe and return the right error codes
- * (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``)
- *
- * This access right is available since the fifth version of the Landlock
- * ABI.
- *
* .. warning::
*
* It is currently not possible to restrict some file-related actions
diff --git a/lib/libc/include/any-linux-any/linux/liveupdate.h b/lib/libc/include/any-linux-any/linux/liveupdate.h
new file mode 100644
index 0000000000..8f3aeca415
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/liveupdate.h
@@ -0,0 +1,216 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+/*
+ * Userspace interface for /dev/liveupdate
+ * Live Update Orchestrator
+ *
+ * Copyright (c) 2025, Google LLC.
+ * Pasha Tatashin
+ */
+
+#ifndef _LIVEUPDATE_H
+#define _LIVEUPDATE_H
+
+#include
+#include
+
+/**
+ * DOC: General ioctl format
+ *
+ * The ioctl interface follows a general format to allow for extensibility. Each
+ * ioctl is passed in a structure pointer as the argument providing the size of
+ * the structure in the first u32. The kernel checks that any structure space
+ * beyond what it understands is 0. This allows userspace to use the backward
+ * compatible portion while consistently using the newer, larger, structures.
+ *
+ * ioctls use a standard meaning for common errnos:
+ *
+ * - ENOTTY: The IOCTL number itself is not supported at all
+ * - E2BIG: The IOCTL number is supported, but the provided structure has
+ * non-zero in a part the kernel does not understand.
+ * - EOPNOTSUPP: The IOCTL number is supported, and the structure is
+ * understood, however a known field has a value the kernel does not
+ * understand or support.
+ * - EINVAL: Everything about the IOCTL was understood, but a field is not
+ * correct.
+ * - ENOENT: A provided token does not exist.
+ * - ENOMEM: Out of memory.
+ * - EOVERFLOW: Mathematics overflowed.
+ *
+ * As well as additional errnos, within specific ioctls.
+ */
+
+/* The ioctl type, documented in ioctl-number.rst */
+#define LIVEUPDATE_IOCTL_TYPE 0xBA
+
+/* The maximum length of session name including null termination */
+#define LIVEUPDATE_SESSION_NAME_LENGTH 64
+
+/* The /dev/liveupdate ioctl commands */
+enum {
+ LIVEUPDATE_CMD_BASE = 0x00,
+ LIVEUPDATE_CMD_CREATE_SESSION = LIVEUPDATE_CMD_BASE,
+ LIVEUPDATE_CMD_RETRIEVE_SESSION = 0x01,
+};
+
+/* ioctl commands for session file descriptors */
+enum {
+ LIVEUPDATE_CMD_SESSION_BASE = 0x40,
+ LIVEUPDATE_CMD_SESSION_PRESERVE_FD = LIVEUPDATE_CMD_SESSION_BASE,
+ LIVEUPDATE_CMD_SESSION_RETRIEVE_FD = 0x41,
+ LIVEUPDATE_CMD_SESSION_FINISH = 0x42,
+};
+
+/**
+ * struct liveupdate_ioctl_create_session - ioctl(LIVEUPDATE_IOCTL_CREATE_SESSION)
+ * @size: Input; sizeof(struct liveupdate_ioctl_create_session)
+ * @fd: Output; The new file descriptor for the created session.
+ * @name: Input; A null-terminated string for the session name, max
+ * length %LIVEUPDATE_SESSION_NAME_LENGTH including termination
+ * character.
+ *
+ * Creates a new live update session for managing preserved resources.
+ * This ioctl can only be called on the main /dev/liveupdate device.
+ *
+ * Return: 0 on success, negative error code on failure.
+ */
+struct liveupdate_ioctl_create_session {
+ __u32 size;
+ __s32 fd;
+ __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
+};
+
+#define LIVEUPDATE_IOCTL_CREATE_SESSION \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_CREATE_SESSION)
+
+/**
+ * struct liveupdate_ioctl_retrieve_session - ioctl(LIVEUPDATE_IOCTL_RETRIEVE_SESSION)
+ * @size: Input; sizeof(struct liveupdate_ioctl_retrieve_session)
+ * @fd: Output; The new file descriptor for the retrieved session.
+ * @name: Input; A null-terminated string identifying the session to retrieve.
+ * The name must exactly match the name used when the session was
+ * created in the previous kernel.
+ *
+ * Retrieves a handle (a new file descriptor) for a preserved session by its
+ * name. This is the primary mechanism for a userspace agent to regain control
+ * of its preserved resources after a live update.
+ *
+ * The userspace application provides the null-terminated `name` of a session
+ * it created before the live update. If a preserved session with a matching
+ * name is found, the kernel instantiates it and returns a new file descriptor
+ * in the `fd` field. This new session FD can then be used for all file-specific
+ * operations, such as restoring individual file descriptors with
+ * LIVEUPDATE_SESSION_RETRIEVE_FD.
+ *
+ * It is the responsibility of the userspace application to know the names of
+ * the sessions it needs to retrieve. If no session with the given name is
+ * found, the ioctl will fail with -ENOENT.
+ *
+ * This ioctl can only be called on the main /dev/liveupdate device when the
+ * system is in the LIVEUPDATE_STATE_UPDATED state.
+ */
+struct liveupdate_ioctl_retrieve_session {
+ __u32 size;
+ __s32 fd;
+ __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
+};
+
+#define LIVEUPDATE_IOCTL_RETRIEVE_SESSION \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_RETRIEVE_SESSION)
+
+/* Session specific IOCTLs */
+
+/**
+ * struct liveupdate_session_preserve_fd - ioctl(LIVEUPDATE_SESSION_PRESERVE_FD)
+ * @size: Input; sizeof(struct liveupdate_session_preserve_fd)
+ * @fd: Input; The user-space file descriptor to be preserved.
+ * @token: Input; An opaque, unique token for preserved resource.
+ *
+ * Holds parameters for preserving a file descriptor.
+ *
+ * User sets the @fd field identifying the file descriptor to preserve
+ * (e.g., memfd, kvm, iommufd, VFIO). The kernel validates if this FD type
+ * and its dependencies are supported for preservation. If validation passes,
+ * the kernel marks the FD internally and *initiates the process* of preparing
+ * its state for saving. The actual snapshotting of the state typically occurs
+ * during the subsequent %LIVEUPDATE_IOCTL_PREPARE execution phase, though
+ * some finalization might occur during freeze.
+ * On successful validation and initiation, the kernel uses the @token
+ * field with an opaque identifier representing the resource being preserved.
+ * This token confirms the FD is targeted for preservation and is required for
+ * the subsequent %LIVEUPDATE_SESSION_RETRIEVE_FD call after the live update.
+ *
+ * Return: 0 on success (validation passed, preservation initiated), negative
+ * error code on failure (e.g., unsupported FD type, dependency issue,
+ * validation failed).
+ */
+struct liveupdate_session_preserve_fd {
+ __u32 size;
+ __s32 fd;
+ __aligned_u64 token;
+};
+
+#define LIVEUPDATE_SESSION_PRESERVE_FD \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_PRESERVE_FD)
+
+/**
+ * struct liveupdate_session_retrieve_fd - ioctl(LIVEUPDATE_SESSION_RETRIEVE_FD)
+ * @size: Input; sizeof(struct liveupdate_session_retrieve_fd)
+ * @fd: Output; The new file descriptor representing the fully restored
+ * kernel resource.
+ * @token: Input; An opaque, token that was used to preserve the resource.
+ *
+ * Retrieve a previously preserved file descriptor.
+ *
+ * User sets the @token field to the value obtained from a successful
+ * %LIVEUPDATE_IOCTL_FD_PRESERVE call before the live update. On success,
+ * the kernel restores the state (saved during the PREPARE/FREEZE phases)
+ * associated with the token and populates the @fd field with a new file
+ * descriptor referencing the restored resource in the current (new) kernel.
+ * This operation must be performed *before* signaling completion via
+ * %LIVEUPDATE_IOCTL_FINISH.
+ *
+ * Return: 0 on success, negative error code on failure (e.g., invalid token).
+ */
+struct liveupdate_session_retrieve_fd {
+ __u32 size;
+ __s32 fd;
+ __aligned_u64 token;
+};
+
+#define LIVEUPDATE_SESSION_RETRIEVE_FD \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_RETRIEVE_FD)
+
+/**
+ * struct liveupdate_session_finish - ioctl(LIVEUPDATE_SESSION_FINISH)
+ * @size: Input; sizeof(struct liveupdate_session_finish)
+ * @reserved: Input; Must be zero. Reserved for future use.
+ *
+ * Signals the completion of the restoration process for a retrieved session.
+ * This is the final operation that should be performed on a session file
+ * descriptor after a live update.
+ *
+ * This ioctl must be called once all required file descriptors for the session
+ * have been successfully retrieved (using %LIVEUPDATE_SESSION_RETRIEVE_FD) and
+ * are fully restored from the userspace and kernel perspective.
+ *
+ * Upon success, the kernel releases its ownership of the preserved resources
+ * associated with this session. This allows internal resources to be freed,
+ * typically by decrementing reference counts on the underlying preserved
+ * objects.
+ *
+ * If this operation fails, the resources remain preserved in memory. Userspace
+ * may attempt to call finish again. The resources will otherwise be reset
+ * during the next live update cycle.
+ *
+ * Return: 0 on success, negative error code on failure.
+ */
+struct liveupdate_session_finish {
+ __u32 size;
+ __u32 reserved;
+};
+
+#define LIVEUPDATE_SESSION_FINISH \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_FINISH)
+
+#endif /* _LIVEUPDATE_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/lockd_netlink.h b/lib/libc/include/any-linux-any/linux/lockd_netlink.h
index 60f7378be6..4c8674ec54 100644
--- a/lib/libc/include/any-linux-any/linux/lockd_netlink.h
+++ b/lib/libc/include/any-linux-any/linux/lockd_netlink.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/lockd.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_LOCKD_NETLINK_H
#define _LINUX_LOCKD_NETLINK_H
diff --git a/lib/libc/include/any-linux-any/linux/magic.h b/lib/libc/include/any-linux-any/linux/magic.h
index 99fb2381fb..1cdc396128 100644
--- a/lib/libc/include/any-linux-any/linux/magic.h
+++ b/lib/libc/include/any-linux-any/linux/magic.h
@@ -103,5 +103,6 @@
#define DEVMEM_MAGIC 0x454d444d /* "DMEM" */
#define SECRETMEM_MAGIC 0x5345434d /* "SECM" */
#define PID_FS_MAGIC 0x50494446 /* "PIDF" */
+#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
#endif /* __LINUX_MAGIC_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/map_benchmark.h b/lib/libc/include/any-linux-any/linux/map_benchmark.h
new file mode 100644
index 0000000000..1689166dc5
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/map_benchmark.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
+/*
+ * Copyright (C) 2022-2025 HiSilicon Limited.
+ */
+
+#ifndef _DMA_BENCHMARK_H
+#define _DMA_BENCHMARK_H
+
+#include
+
+#define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
+#define DMA_MAP_MAX_THREADS 1024
+#define DMA_MAP_MAX_SECONDS 300
+#define DMA_MAP_MAX_TRANS_DELAY (10 * NSEC_PER_MSEC)
+
+#define DMA_MAP_BIDIRECTIONAL 0
+#define DMA_MAP_TO_DEVICE 1
+#define DMA_MAP_FROM_DEVICE 2
+
+struct map_benchmark {
+ __u64 avg_map_100ns; /* average map latency in 100ns */
+ __u64 map_stddev; /* standard deviation of map latency */
+ __u64 avg_unmap_100ns; /* as above */
+ __u64 unmap_stddev;
+ __u32 threads; /* how many threads will do map/unmap in parallel */
+ __u32 seconds; /* how long the test will last */
+ __s32 node; /* which numa node this benchmark will run on */
+ __u32 dma_bits; /* DMA addressing capability */
+ __u32 dma_dir; /* DMA data direction */
+ __u32 dma_trans_ns; /* time for DMA transmission in ns */
+ __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
+ __u8 expansion[76]; /* For future use */
+};
+
+#endif /* _DMA_BENCHMARK_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/mdio.h b/lib/libc/include/any-linux-any/linux/mdio.h
index 8a50aa7023..a87d5ff304 100644
--- a/lib/libc/include/any-linux-any/linux/mdio.h
+++ b/lib/libc/include/any-linux-any/linux/mdio.h
@@ -116,10 +116,24 @@
#define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00)
/* 10PASS-TS/2BASE-TL */
#define MDIO_CTRL1_SPEED10P2B (MDIO_CTRL1_SPEEDSELEXT | 0x04)
+/* Note: the MDIO_CTRL1_SPEED_XXX values for everything past 10PASS-TS/2BASE-TL
+ * do not match between the PCS and PMA values. Any additions past this point
+ * should be PMA or PCS specific. The following 2 defines are workarounds for
+ * values added before this was caught. They should be considered deprecated.
+ */
+#define MDIO_CTRL1_SPEED2_5G MDIO_PMA_CTRL1_SPEED2_5G
+#define MDIO_CTRL1_SPEED5G MDIO_PMA_CTRL1_SPEED5G
+/* 100 Gb/s */
+#define MDIO_PCS_CTRL1_SPEED100G (MDIO_CTRL1_SPEEDSELEXT | 0x10)
+/* 25 Gb/s */
+#define MDIO_PCS_CTRL1_SPEED25G (MDIO_CTRL1_SPEEDSELEXT | 0x14)
+/* 50 Gb/s */
+#define MDIO_PCS_CTRL1_SPEED50G (MDIO_CTRL1_SPEEDSELEXT | 0x18)
/* 2.5 Gb/s */
-#define MDIO_CTRL1_SPEED2_5G (MDIO_CTRL1_SPEEDSELEXT | 0x18)
+#define MDIO_PMA_CTRL1_SPEED2_5G (MDIO_CTRL1_SPEEDSELEXT | 0x18)
/* 5 Gb/s */
-#define MDIO_CTRL1_SPEED5G (MDIO_CTRL1_SPEEDSELEXT | 0x1c)
+#define MDIO_PMA_CTRL1_SPEED5G (MDIO_CTRL1_SPEEDSELEXT | 0x1c)
+
/* Status register 1. */
#define MDIO_STAT1_LPOWERABLE 0x0002 /* Low-power ability */
@@ -133,6 +147,11 @@
#define MDIO_AN_STAT1_PAGE 0x0040 /* Page received */
#define MDIO_AN_STAT1_XNP 0x0080 /* Extended next page status */
+/* Device Identifier 2 */
+#define MDIO_DEVID2_OUI 0xfc00 /* OUI Portion of PHY ID */
+#define MDIO_DEVID2_MODEL_NUM 0x03f0 /* Manufacturer's Model Number */
+#define MDIO_DEVID2_REV_NUM 0x000f /* Revision Number */
+
/* Speed register. */
#define MDIO_SPEED_10G 0x0001 /* 10G capable */
#define MDIO_PMA_SPEED_2B 0x0002 /* 2BASE-TL capable */
diff --git a/lib/libc/include/any-linux-any/linux/media-bus-format.h b/lib/libc/include/any-linux-any/linux/media-bus-format.h
index 0c437c27f4..a31aaf1776 100644
--- a/lib/libc/include/any-linux-any/linux/media-bus-format.h
+++ b/lib/libc/include/any-linux-any/linux/media-bus-format.h
@@ -34,7 +34,7 @@
#define MEDIA_BUS_FMT_FIXED 0x0001
-/* RGB - next is 0x1028 */
+/* RGB - next is 0x1029 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
@@ -74,6 +74,7 @@
#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x1021
#define MEDIA_BUS_FMT_RGB121212_1X36 0x1019
#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a
+#define MEDIA_BUS_FMT_RGB202020_1X60 0x1028
/* YUV (including grey) - next is 0x202f */
#define MEDIA_BUS_FMT_Y8_1X8 0x2001
@@ -123,7 +124,7 @@
#define MEDIA_BUS_FMT_YUV16_1X48 0x202a
#define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b
-/* Bayer - next is 0x3021 */
+/* Bayer - next is 0x3025 */
#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
@@ -156,6 +157,10 @@
#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e
#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f
#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020
+#define MEDIA_BUS_FMT_SBGGR20_1X20 0x3021
+#define MEDIA_BUS_FMT_SGBRG20_1X20 0x3022
+#define MEDIA_BUS_FMT_SGRBG20_1X20 0x3023
+#define MEDIA_BUS_FMT_SRGGB20_1X20 0x3024
/* JPEG compressed formats - next is 0x4002 */
#define MEDIA_BUS_FMT_JPEG_1X8 0x4001
diff --git a/lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h b/lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h
index 1c1d8b46b2..22df6912f9 100644
--- a/lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h
+++ b/lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h
@@ -8,6 +8,8 @@
#include
+#include
+
/*
* Frames are split into zones of almost equal width and height - a zone is a
* rectangular tile of a frame. The metering blocks within the ISP collect
@@ -141,7 +143,7 @@ struct c3_isp_stats_info {
* @C3_ISP_PARAMS_BUFFER_V0: First version of C3 ISP parameters block
*/
enum c3_isp_params_buffer_version {
- C3_ISP_PARAMS_BUFFER_V0,
+ C3_ISP_PARAMS_BUFFER_V0 = V4L2_ISP_PARAMS_VERSION_V0,
};
/**
@@ -176,62 +178,23 @@ enum c3_isp_params_block_type {
C3_ISP_PARAMS_BLOCK_SENTINEL
};
-#define C3_ISP_PARAMS_BLOCK_FL_DISABLE (1U << 0)
-#define C3_ISP_PARAMS_BLOCK_FL_ENABLE (1U << 1)
+/* For backward compatibility */
+#define C3_ISP_PARAMS_BLOCK_FL_DISABLE V4L2_ISP_PARAMS_FL_BLOCK_DISABLE
+#define C3_ISP_PARAMS_BLOCK_FL_ENABLE V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
/**
- * struct c3_isp_params_block_header - C3 ISP parameter block header
+ * c3_isp_params_block_header - C3 ISP parameter block header
*
* This structure represents the common part of all the ISP configuration
- * blocks. Each parameters block shall embed an instance of this structure type
- * as its first member, followed by the block-specific configuration data. The
- * driver inspects this common header to discern the block type and its size and
- * properly handle the block content by casting it to the correct block-specific
- * type.
+ * blocks and is identical to :c:type:`v4l2_isp_params_block_header`.
*
- * The @type field is one of the values enumerated by
+ * The type field is one of the values enumerated by
* :c:type:`c3_isp_params_block_type` and specifies how the data should be
- * interpreted by the driver. The @size field specifies the size of the
- * parameters block and is used by the driver for validation purposes. The
- * @flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL*.
+ * interpreted by the driver.
*
- * When userspace wants to disable an ISP block the
- * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit should be set in the @flags field. In
- * this case userspace may optionally omit the remainder of the configuration
- * block, which will be ignored by the driver.
- *
- * When a new configuration of an ISP block needs to be applied userspace
- * shall fully populate the ISP block and omit setting the
- * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit in the @flags field.
- *
- * Userspace is responsible for correctly populating the parameters block header
- * fields (@type, @flags and @size) and the block-specific parameters.
- *
- * For example:
- *
- * .. code-block:: c
- *
- * void populate_pst_gamma(struct c3_isp_params_block_header *block) {
- * struct c3_isp_params_pst_gamma *gamma =
- * (struct c3_isp_params_pst_gamma *)block;
- *
- * gamma->header.type = C3_ISP_PARAMS_BLOCK_PST_GAMMA;
- * gamma->header.flags = C3_ISP_PARAMS_BLOCK_FL_ENABLE;
- * gamma->header.size = sizeof(*gamma);
- *
- * for (unsigned int i = 0; i < 129; i++)
- * gamma->pst_gamma_lut[i] = i;
- * }
- *
- * @type: The parameters block type from :c:type:`c3_isp_params_block_type`
- * @flags: A bitmask of block flags
- * @size: Size (in bytes) of the parameters block, including this header
+ * The flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL_*.
*/
-struct c3_isp_params_block_header {
- __u16 type;
- __u16 flags;
- __u32 size;
-};
+#define c3_isp_params_block_header v4l2_isp_params_block_header
/**
* struct c3_isp_params_awb_gains - Gains for auto-white balance
@@ -498,26 +461,10 @@ struct c3_isp_params_blc {
/**
* struct c3_isp_params_cfg - C3 ISP configuration parameters
*
- * This struct contains the configuration parameters of the C3 ISP
- * algorithms, serialized by userspace into an opaque data buffer. Each
- * configuration parameter block is represented by a block-specific structure
- * which contains a :c:type:`c3_isp_param_block_header` entry as first
- * member. Userspace populates the @data buffer with configuration parameters
- * for the blocks that it intends to configure. As a consequence, the data
- * buffer effective size changes according to the number of ISP blocks that
- * userspace intends to configure.
+ * This is the driver-specific implementation of
+ * :c:type:`v4l2_isp_params_buffer`.
*
- * The parameters buffer is versioned by the @version field to allow modifying
- * and extending its definition. Userspace should populate the @version field to
- * inform the driver about the version it intends to use. The driver will parse
- * and handle the @data buffer according to the data layout specific to the
- * indicated revision and return an error if the desired revision is not
- * supported.
- *
- * For each ISP block that userspace wants to configure, a block-specific
- * structure is appended to the @data buffer, one after the other without gaps
- * in between nor overlaps. Userspace shall populate the @total_size field with
- * the effective size, in bytes, of the @data buffer.
+ * Currently only C3_ISP_PARAM_BUFFER_V0 is supported.
*
* The expected memory layout of the parameters buffer is::
*
@@ -561,4 +508,5 @@ struct c3_isp_params_cfg {
__u8 data[C3_ISP_PARAMS_MAX_SIZE];
};
+
#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/media/arm/mali-c55-config.h b/lib/libc/include/any-linux-any/linux/media/arm/mali-c55-config.h
new file mode 100644
index 0000000000..7dde3f61bd
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/media/arm/mali-c55-config.h
@@ -0,0 +1,785 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * ARM Mali-C55 ISP Driver - Userspace API
+ *
+ * Copyright (C) 2023 Ideas on Board Oy
+ */
+
+#ifndef __UAPI_MALI_C55_CONFIG_H
+#define __UAPI_MALI_C55_CONFIG_H
+
+#include
+#include
+#include
+
+#define V4L2_CID_MALI_C55_CAPABILITIES (V4L2_CID_USER_MALI_C55_BASE + 0x0)
+#define MALI_C55_GPS_PONG (1U << 0)
+#define MALI_C55_GPS_WDR (1U << 1)
+#define MALI_C55_GPS_COMPRESSION (1U << 2)
+#define MALI_C55_GPS_TEMPER (1U << 3)
+#define MALI_C55_GPS_SINTER_LITE (1U << 4)
+#define MALI_C55_GPS_SINTER (1U << 5)
+#define MALI_C55_GPS_IRIDIX_LTM (1U << 6)
+#define MALI_C55_GPS_IRIDIX_GTM (1U << 7)
+#define MALI_C55_GPS_CNR (1U << 8)
+#define MALI_C55_GPS_FRSCALER (1U << 9)
+#define MALI_C55_GPS_DS_PIPE (1U << 10)
+
+/*
+ * Frames are split into zones of almost equal width and height - a zone is a
+ * rectangular tile of a frame. The metering blocks within the ISP collect
+ * aggregated statistics per zone. A maximum of 15x15 zones can be configured,
+ * and so the statistics buffer within the hardware is sized to accommodate
+ * that.
+ *
+ * The utilised number of zones is runtime configurable.
+ */
+#define MALI_C55_MAX_ZONES (15 * 15)
+
+/**
+ * struct mali_c55_ae_1024bin_hist - Auto Exposure 1024-bin histogram statistics
+ *
+ * @bins: 1024 element array of 16-bit pixel counts.
+ *
+ * The 1024-bin histogram module collects image-global but zone-weighted
+ * intensity distributions of pixels in fixed-width bins. The modules can be
+ * configured into different "plane modes" which affect the contents of the
+ * collected statistics. In plane mode 0, pixel intensities are taken regardless
+ * of colour plane into a single 1024-bin histogram with a bin width of 4. In
+ * plane mode 1, four 256-bin histograms with a bin width of 16 are collected -
+ * one for each CFA colour plane. In plane modes 4, 5, 6 and 7 two 512-bin
+ * histograms with a bin width of 8 are collected - in each mode one of the
+ * colour planes is collected into the first histogram and all the others are
+ * combined into the second. The histograms are stored consecutively in the bins
+ * array.
+ *
+ * The 16-bit pixel counts are stored as a 4-bit exponent in the most
+ * significant bits followed by a 12-bit mantissa. Conversion to a usable
+ * format can be done according to the following pseudo-code::
+ *
+ * if (e == 0) {
+ * bin = m * 2;
+ * } else {
+ * bin = (m + 4096) * 2^e
+ * }
+ *
+ * where
+ * e is the exponent value in range 0..15
+ * m is the mantissa value in range 0..4095
+ *
+ * The pixels used in calculating the statistics can be masked using three
+ * methods:
+ *
+ * 1. Pixels can be skipped in X and Y directions independently.
+ * 2. Minimum/Maximum intensities can be configured
+ * 3. Zones can be differentially weighted, including 0 weighted to mask them
+ *
+ * The data for this histogram can be collected from different tap points in the
+ * ISP depending on configuration - after the white balance or digital gain
+ * blocks, or immediately after the input crossbar.
+ */
+struct mali_c55_ae_1024bin_hist {
+ __u16 bins[1024];
+} __attribute__((packed));
+
+/**
+ * struct mali_c55_ae_5bin_hist - Auto Exposure 5-bin histogram statistics
+ *
+ * @hist0: 16-bit normalised pixel count for the 0th intensity bin
+ * @hist1: 16-bit normalised pixel count for the 1st intensity bin
+ * @hist3: 16-bit normalised pixel count for the 3rd intensity bin
+ * @hist4: 16-bit normalised pixel count for the 4th intensity bin
+ *
+ * The ISP generates a 5-bin histogram of normalised pixel counts within bins of
+ * pixel intensity for each of 225 possible zones within a frame. The centre bin
+ * of the histogram for each zone is not available from the hardware and must be
+ * calculated by subtracting the values of hist0, hist1, hist3 and hist4 from
+ * 0xffff as in the following equation:
+ *
+ * hist2 = 0xffff - (hist0 + hist1 + hist3 + hist4)
+ */
+struct mali_c55_ae_5bin_hist {
+ __u16 hist0;
+ __u16 hist1;
+ __u16 hist3;
+ __u16 hist4;
+} __attribute__((packed));
+
+/**
+ * struct mali_c55_awb_average_ratios - Auto White Balance colour ratios
+ *
+ * @avg_rg_gr: Average R/G or G/R ratio in Q4.8 format.
+ * @avg_bg_br: Average B/G or B/R ratio in Q4.8 format.
+ * @num_pixels: The number of pixels used in the AWB calculation
+ *
+ * The ISP calculates and collects average colour ratios for each zone in an
+ * image and stores them in Q4.8 format (the lowest 8 bits are fractional, with
+ * bits [11:8] representing the integer). The exact ratios collected (either
+ * R/G, B/G or G/R, B/R) are configurable through the parameters buffer. The
+ * value of the 4 high bits is undefined.
+ */
+struct mali_c55_awb_average_ratios {
+ __u16 avg_rg_gr;
+ __u16 avg_bg_br;
+ __u32 num_pixels;
+} __attribute__((packed));
+
+/**
+ * struct mali_c55_af_statistics - Auto Focus edge and intensity statistics
+ *
+ * @intensity_stats: Packed mantissa and exponent value for pixel intensity
+ * @edge_stats: Packed mantissa and exponent values for edge intensity
+ *
+ * The ISP collects the squared sum of pixel intensities for each zone within a
+ * configurable Region of Interest on the frame. Additionally, the same data are
+ * collected after being passed through a bandpass filter which removes high and
+ * low frequency components - these are referred to as the edge statistics.
+ *
+ * The intensity and edge statistics for a zone can be used to calculate the
+ * contrast information for a zone
+ *
+ * C = E2 / I2
+ *
+ * Where I2 is the intensity statistic for a zone and E2 is the edge statistic
+ * for that zone. Optimum focus is reached when C is at its maximum.
+ *
+ * The intensity and edge statistics are stored packed into a non-standard 16
+ * bit floating point format, where the 7 most significant bits represent the
+ * exponent and the 9 least significant bits the mantissa. This format can be
+ * unpacked with the following pseudocode::
+ *
+ * if (e == 0) {
+ * x = m;
+ * } else {
+ * x = 2^e-1 * (m + 2^9)
+ * }
+ *
+ * where
+ * e is the exponent value in range 0..127
+ * m is the mantissa value in range 0..511
+ */
+struct mali_c55_af_statistics {
+ __u16 intensity_stats;
+ __u16 edge_stats;
+} __attribute__((packed));
+
+/**
+ * struct mali_c55_stats_buffer - 3A statistics for the mali-c55 ISP
+ *
+ * @ae_1024bin_hist: 1024-bin frame-global pixel intensity histogram
+ * @iridix_1024bin_hist: Post-Iridix block 1024-bin histogram
+ * @ae_5bin_hists: 5-bin pixel intensity histograms for AEC
+ * @reserved1: Undefined buffer space
+ * @awb_ratios: Color balance ratios for Auto White Balance
+ * @reserved2: Undefined buffer space
+ * @af_statistics: Pixel intensity statistics for Auto Focus
+ * @reserved3: Undefined buffer space
+ *
+ * This struct describes the metering statistics space in the Mali-C55 ISP's
+ * hardware in its entirety. The space between each defined area is marked as
+ * "unknown" and may not be 0, but should not be used. The @ae_5bin_hists,
+ * @awb_ratios and @af_statistics members are arrays of statistics per-zone.
+ * The zones are arranged in the array in raster order starting from the top
+ * left corner of the image.
+ */
+
+struct mali_c55_stats_buffer {
+ struct mali_c55_ae_1024bin_hist ae_1024bin_hist;
+ struct mali_c55_ae_1024bin_hist iridix_1024bin_hist;
+ struct mali_c55_ae_5bin_hist ae_5bin_hists[MALI_C55_MAX_ZONES];
+ __u32 reserved1[14];
+ struct mali_c55_awb_average_ratios awb_ratios[MALI_C55_MAX_ZONES];
+ __u32 reserved2[14];
+ struct mali_c55_af_statistics af_statistics[MALI_C55_MAX_ZONES];
+ __u32 reserved3[15];
+} __attribute__((packed));
+
+/**
+ * enum mali_c55_param_block_type - Enumeration of Mali-C55 parameter blocks
+ *
+ * This enumeration defines the types of Mali-C55 parameters block. Each block
+ * configures a specific processing block of the Mali-C55 ISP. The block
+ * type allows the driver to correctly interpret the parameters block data.
+ *
+ * It is the responsibility of userspace to correctly set the type of each
+ * parameters block.
+ *
+ * @MALI_C55_PARAM_BLOCK_SENSOR_OFFS: Sensor pre-shading black level offset
+ * @MALI_C55_PARAM_BLOCK_AEXP_HIST: Auto-exposure 1024-bin histogram
+ * configuration
+ * @MALI_C55_PARAM_BLOCK_AEXP_IHIST: Post-Iridix auto-exposure 1024-bin
+ * histogram configuration
+ * @MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS: Auto-exposure 1024-bin histogram
+ * weighting
+ * @MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS: Post-Iridix auto-exposure 1024-bin
+ * histogram weighting
+ * @MALI_C55_PARAM_BLOCK_DIGITAL_GAIN: Digital gain
+ * @MALI_C55_PARAM_BLOCK_AWB_GAINS: Auto-white balance gains
+ * @MALI_C55_PARAM_BLOCK_AWB_CONFIG: Auto-white balance statistics config
+ * @MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP: Auto-white balance gains for AEXP-0 tap
+ * @MALI_C55_PARAM_MESH_SHADING_CONFIG : Mesh shading tables configuration
+ * @MALI_C55_PARAM_MESH_SHADING_SELECTION: Mesh shading table selection
+ */
+enum mali_c55_param_block_type {
+ MALI_C55_PARAM_BLOCK_SENSOR_OFFS,
+ MALI_C55_PARAM_BLOCK_AEXP_HIST,
+ MALI_C55_PARAM_BLOCK_AEXP_IHIST,
+ MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS,
+ MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS,
+ MALI_C55_PARAM_BLOCK_DIGITAL_GAIN,
+ MALI_C55_PARAM_BLOCK_AWB_GAINS,
+ MALI_C55_PARAM_BLOCK_AWB_CONFIG,
+ MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP,
+ MALI_C55_PARAM_MESH_SHADING_CONFIG,
+ MALI_C55_PARAM_MESH_SHADING_SELECTION,
+};
+
+/**
+ * struct mali_c55_params_sensor_off_preshading - offset subtraction for each
+ * color channel
+ *
+ * Provides removal of the sensor black level from the sensor data. Separate
+ * offsets are provided for each of the four Bayer component color channels
+ * which are defaulted to R, Gr, Gb, B.
+ *
+ * header.type should be set to MALI_C55_PARAM_BLOCK_SENSOR_OFFS from
+ * :c:type:`mali_c55_param_block_type` for this block.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @chan00: Offset for color channel 00 (default: R)
+ * @chan01: Offset for color channel 01 (default: Gr)
+ * @chan10: Offset for color channel 10 (default: Gb)
+ * @chan11: Offset for color channel 11 (default: B)
+ */
+struct mali_c55_params_sensor_off_preshading {
+ struct v4l2_isp_params_block_header header;
+ __u32 chan00;
+ __u32 chan01;
+ __u32 chan10;
+ __u32 chan11;
+};
+
+/**
+ * enum mali_c55_aexp_hist_tap_points - Tap points for the AEXP histogram
+ * @MALI_C55_AEXP_HIST_TAP_WB: After static white balance
+ * @MALI_C55_AEXP_HIST_TAP_FS: After WDR Frame Stitch
+ * @MALI_C55_AEXP_HIST_TAP_TPG: After the test pattern generator
+ */
+enum mali_c55_aexp_hist_tap_points {
+ MALI_C55_AEXP_HIST_TAP_WB = 0,
+ MALI_C55_AEXP_HIST_TAP_FS,
+ MALI_C55_AEXP_HIST_TAP_TPG,
+};
+
+/**
+ * enum mali_c55_aexp_skip_x - Horizontal pixel skipping
+ * @MALI_C55_AEXP_SKIP_X_EVERY_2ND: Collect every 2nd pixel horizontally
+ * @MALI_C55_AEXP_SKIP_X_EVERY_3RD: Collect every 3rd pixel horizontally
+ * @MALI_C55_AEXP_SKIP_X_EVERY_4TH: Collect every 4th pixel horizontally
+ * @MALI_C55_AEXP_SKIP_X_EVERY_5TH: Collect every 5th pixel horizontally
+ * @MALI_C55_AEXP_SKIP_X_EVERY_8TH: Collect every 8th pixel horizontally
+ * @MALI_C55_AEXP_SKIP_X_EVERY_9TH: Collect every 9th pixel horizontally
+ */
+enum mali_c55_aexp_skip_x {
+ MALI_C55_AEXP_SKIP_X_EVERY_2ND,
+ MALI_C55_AEXP_SKIP_X_EVERY_3RD,
+ MALI_C55_AEXP_SKIP_X_EVERY_4TH,
+ MALI_C55_AEXP_SKIP_X_EVERY_5TH,
+ MALI_C55_AEXP_SKIP_X_EVERY_8TH,
+ MALI_C55_AEXP_SKIP_X_EVERY_9TH
+};
+
+/**
+ * enum mali_c55_aexp_skip_y - Vertical pixel skipping
+ * @MALI_C55_AEXP_SKIP_Y_ALL: Collect every single pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_2ND: Collect every 2nd pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_3RD: Collect every 3rd pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_4TH: Collect every 4th pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_5TH: Collect every 5th pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_8TH: Collect every 8th pixel vertically
+ * @MALI_C55_AEXP_SKIP_Y_EVERY_9TH: Collect every 9th pixel vertically
+ */
+enum mali_c55_aexp_skip_y {
+ MALI_C55_AEXP_SKIP_Y_ALL,
+ MALI_C55_AEXP_SKIP_Y_EVERY_2ND,
+ MALI_C55_AEXP_SKIP_Y_EVERY_3RD,
+ MALI_C55_AEXP_SKIP_Y_EVERY_4TH,
+ MALI_C55_AEXP_SKIP_Y_EVERY_5TH,
+ MALI_C55_AEXP_SKIP_Y_EVERY_8TH,
+ MALI_C55_AEXP_SKIP_Y_EVERY_9TH
+};
+
+/**
+ * enum mali_c55_aexp_row_column_offset - Start from the first or second row or
+ * column
+ * @MALI_C55_AEXP_FIRST_ROW_OR_COL: Start from the first row / column
+ * @MALI_C55_AEXP_SECOND_ROW_OR_COL: Start from the second row / column
+ */
+enum mali_c55_aexp_row_column_offset {
+ MALI_C55_AEXP_FIRST_ROW_OR_COL = 1,
+ MALI_C55_AEXP_SECOND_ROW_OR_COL = 2,
+};
+
+/**
+ * enum mali_c55_aexp_hist_plane_mode - Mode for the AEXP Histograms
+ * @MALI_C55_AEXP_HIST_COMBINED: All color planes in one 1024-bin histogram
+ * @MALI_C55_AEXP_HIST_SEPARATE: Each color plane in one 256-bin histogram with a bin width of 16
+ * @MALI_C55_AEXP_HIST_FOCUS_00: Top left plane in the first bank, rest in second bank
+ * @MALI_C55_AEXP_HIST_FOCUS_01: Top right plane in the first bank, rest in second bank
+ * @MALI_C55_AEXP_HIST_FOCUS_10: Bottom left plane in the first bank, rest in second bank
+ * @MALI_C55_AEXP_HIST_FOCUS_11: Bottom right plane in the first bank, rest in second bank
+ *
+ * In the "focus" modes statistics are collected into two 512-bin histograms
+ * with a bin width of 8. One colour plane is in the first histogram with the
+ * remainder combined into the second. The four options represent which of the
+ * four positions in a bayer pattern are the focused plane.
+ */
+enum mali_c55_aexp_hist_plane_mode {
+ MALI_C55_AEXP_HIST_COMBINED = 0,
+ MALI_C55_AEXP_HIST_SEPARATE = 1,
+ MALI_C55_AEXP_HIST_FOCUS_00 = 4,
+ MALI_C55_AEXP_HIST_FOCUS_01 = 5,
+ MALI_C55_AEXP_HIST_FOCUS_10 = 6,
+ MALI_C55_AEXP_HIST_FOCUS_11 = 7,
+};
+
+/**
+ * struct mali_c55_params_aexp_hist - configuration for AEXP metering hists
+ *
+ * This struct allows users to configure the 1024-bin AEXP histograms. Broadly
+ * speaking the parameters allow you to mask particular regions of the image and
+ * to select different kinds of histogram.
+ *
+ * The skip_x, offset_x, skip_y and offset_y fields allow users to ignore or
+ * mask pixels in the frame by their position relative to the top left pixel.
+ * First, the skip_y, offset_x and offset_y fields define which of the pixels
+ * within each 2x2 region will be counted in the statistics.
+ *
+ * If skip_y == 0 then two pixels from each covered region will be counted. If
+ * both offset_x and offset_y are zero, then the two left-most pixels in each
+ * 2x2 pixel region will be counted. Setting offset_x = 1 will discount the top
+ * left pixel and count the top right pixel. Setting offset_y = 1 will discount
+ * the bottom left pixel and count the bottom right pixel.
+ *
+ * If skip_y != 0 then only a single pixel from each region covered by the
+ * pattern will be counted. In this case offset_x controls whether the pixel
+ * that's counted is in the left (if offset_x == 0) or right (if offset_x == 1)
+ * column and offset_y controls whether the pixel that's counted is in the top
+ * (if offset_y == 0) or bottom (if offset_y == 1) row.
+ *
+ * The skip_x and skip_y fields control how the 2x2 pixel region is repeated
+ * across the image data. The first instance of the region is always in the top
+ * left of the image data. The skip_x field controls how many pixels are ignored
+ * in the x direction before the pixel masking region is repeated. The skip_y
+ * field controls how many pixels are ignored in the y direction before the
+ * pixel masking region is repeated.
+ *
+ * These fields can be used to reduce the number of pixels counted for the
+ * statistics, but it's important to be careful to configure them correctly.
+ * Some combinations of values will result in colour components from the input
+ * data being ignored entirely, for example in the following configuration:
+ *
+ * skip_x = 0
+ * offset_x = 0
+ * skip_y = 0
+ * offset_y = 0
+ *
+ * Only the R and Gb components of RGGB data that was input would be collected.
+ * Similarly in the following configuration:
+ *
+ * skip_x = 0
+ * offset_x = 0
+ * skip_y = 1
+ * offset_y = 1
+ *
+ * Only the Gb component of RGGB data that was input would be collected. To
+ * correct things such that all 4 colour components were included it would be
+ * necessary to set the skip_x and skip_y fields in a way that resulted in all
+ * four colour components being collected:
+ *
+ * skip_x = 1
+ * offset_x = 0
+ * skip_y = 1
+ * offset_y = 1
+ *
+ * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AEXP_HIST or
+ * MALI_C55_PARAM_BLOCK_AEXP_IHIST from :c:type:`mali_c55_param_block_type`.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @skip_x: Horizontal decimation. See enum mali_c55_aexp_skip_x
+ * @offset_x: Skip the first column, or not. See enum mali_c55_aexp_row_column_offset
+ * @skip_y: Vertical decimation. See enum mali_c55_aexp_skip_y
+ * @offset_y: Skip the first row, or not. See enum mali_c55_aexp_row_column_offset
+ * @scale_bottom: Scale pixels in bottom half of intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
+ * @scale_top: scale pixels in top half of intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
+ * @plane_mode: Plane separation mode. See enum mali_c55_aexp_hist_plane_mode
+ * @tap_point: Tap point for histogram from enum mali_c55_aexp_hist_tap_points.
+ * This parameter is unused for the post-Iridix Histogram
+ */
+struct mali_c55_params_aexp_hist {
+ struct v4l2_isp_params_block_header header;
+ __u8 skip_x;
+ __u8 offset_x;
+ __u8 skip_y;
+ __u8 offset_y;
+ __u8 scale_bottom;
+ __u8 scale_top;
+ __u8 plane_mode;
+ __u8 tap_point;
+};
+
+/**
+ * struct mali_c55_params_aexp_weights - Array of weights for AEXP metering
+ *
+ * This struct allows users to configure the weighting for both of the 1024-bin
+ * AEXP histograms. The pixel data collected for each zone is multiplied by the
+ * corresponding weight from this array, which may be zero if the intention is
+ * to mask off the zone entirely.
+ *
+ * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS
+ * or MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS from :c:type:`mali_c55_param_block_type`.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @nodes_used_horiz: Number of active zones horizontally [0..15]
+ * @nodes_used_vert: Number of active zones vertically [0..15]
+ * @zone_weights: Zone weighting. Index is row*col where 0,0 is the top
+ * left zone continuing in raster order. Each zone can be
+ * weighted in the range [0..15]. The number of rows and
+ * columns is defined by @nodes_used_vert and
+ * @nodes_used_horiz
+ */
+struct mali_c55_params_aexp_weights {
+ struct v4l2_isp_params_block_header header;
+ __u8 nodes_used_horiz;
+ __u8 nodes_used_vert;
+ __u8 zone_weights[MALI_C55_MAX_ZONES];
+};
+
+/**
+ * struct mali_c55_params_digital_gain - Digital gain value
+ *
+ * This struct carries a digital gain value to set in the ISP.
+ *
+ * header.type should be set to MALI_C55_PARAM_BLOCK_DIGITAL_GAIN from
+ * :c:type:`mali_c55_param_block_type` for this block.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @gain: The digital gain value to apply, in Q5.8 format.
+ */
+struct mali_c55_params_digital_gain {
+ struct v4l2_isp_params_block_header header;
+ __u16 gain;
+};
+
+/**
+ * enum mali_c55_awb_stats_mode - Statistics mode for AWB
+ * @MALI_C55_AWB_MODE_GRBR: Statistics collected as Green/Red and Blue/Red ratios
+ * @MALI_C55_AWB_MODE_RGBG: Statistics collected as Red/Green and Blue/Green ratios
+ */
+enum mali_c55_awb_stats_mode {
+ MALI_C55_AWB_MODE_GRBR = 0,
+ MALI_C55_AWB_MODE_RGBG,
+};
+
+/**
+ * struct mali_c55_params_awb_gains - Gain settings for auto white balance
+ *
+ * This struct allows users to configure the gains for auto-white balance. There
+ * are four gain settings corresponding to each colour channel in the bayer
+ * domain. Although named generically, the association between the gain applied
+ * and the colour channel is done automatically within the ISP depending on the
+ * input format, and so the following mapping always holds true::
+ *
+ * gain00 = R
+ * gain01 = Gr
+ * gain10 = Gb
+ * gain11 = B
+ *
+ * All of the gains are stored in Q4.8 format.
+ *
+ * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AWB_GAINS or
+ * MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP from :c:type:`mali_c55_param_block_type`.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @gain00: Multiplier for colour channel 00
+ * @gain01: Multiplier for colour channel 01
+ * @gain10: Multiplier for colour channel 10
+ * @gain11: Multiplier for colour channel 11
+ */
+struct mali_c55_params_awb_gains {
+ struct v4l2_isp_params_block_header header;
+ __u16 gain00;
+ __u16 gain01;
+ __u16 gain10;
+ __u16 gain11;
+};
+
+/**
+ * enum mali_c55_params_awb_tap_points - Tap points for the AWB statistics
+ * @MALI_C55_AWB_STATS_TAP_PF: Immediately after the Purple Fringe block
+ * @MALI_C55_AWB_STATS_TAP_CNR: Immediately after the CNR block
+ */
+enum mali_c55_params_awb_tap_points {
+ MALI_C55_AWB_STATS_TAP_PF = 0,
+ MALI_C55_AWB_STATS_TAP_CNR,
+};
+
+/**
+ * struct mali_c55_params_awb_config - Stats settings for auto-white balance
+ *
+ * This struct allows the configuration of the statistics generated for auto
+ * white balance. Pixel intensity limits can be set to exclude overly bright or
+ * dark regions of an image from the statistics entirely. Colour ratio minima
+ * and maxima can be set to discount pixels who's ratios fall outside the
+ * defined boundaries; there are two sets of registers to do this - the
+ * "min/max" ratios which bound a region and the "high/low" ratios which further
+ * trim the upper and lower ratios. For example with the boundaries configured
+ * as follows, only pixels whos colour ratios falls into the region marked "A"
+ * would be counted::
+ *
+ * cr_high
+ * 2.0 | |
+ * | cb_max --> _________________________v_____
+ * 1.8 | | \ |
+ * | | \ |
+ * 1.6 | | \ |
+ * | | \ |
+ * c 1.4 | cb_low -->|\ A \|<-- cb_high
+ * b | | \ |
+ * 1.2 | | \ |
+ * r | | \ |
+ * a 1.0 | cb_min --> |____\_________________________|
+ * t | ^ ^ ^
+ * i 0.8 | | | |
+ * o | cr_min | cr_max
+ * s 0.6 | |
+ * | cr_low
+ * 0.4 |
+ * |
+ * 0.2 |
+ * |
+ * 0.0 |_______________________________________________________________
+ * 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
+ * cr ratios
+ *
+ * header.type should be set to MALI_C55_PARAM_BLOCK_AWB_CONFIG from
+ * :c:type:`mali_c55_param_block_type` for this block.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @tap_point: The tap point from enum mali_c55_params_awb_tap_points
+ * @stats_mode: AWB statistics collection mode, see :c:type:`mali_c55_awb_stats_mode`
+ * @white_level: Upper pixel intensity (I.E. raw pixel values) limit
+ * @black_level: Lower pixel intensity (I.E. raw pixel values) limit
+ * @cr_max: Maximum R/G ratio (Q4.8 format)
+ * @cr_min: Minimum R/G ratio (Q4.8 format)
+ * @cb_max: Maximum B/G ratio (Q4.8 format)
+ * @cb_min: Minimum B/G ratio (Q4.8 format)
+ * @nodes_used_horiz: Number of active zones horizontally [0..15]
+ * @nodes_used_vert: Number of active zones vertically [0..15]
+ * @cr_high: R/G ratio trim high (Q4.8 format)
+ * @cr_low: R/G ratio trim low (Q4.8 format)
+ * @cb_high: B/G ratio trim high (Q4.8 format)
+ * @cb_low: B/G ratio trim low (Q4.8 format)
+ */
+struct mali_c55_params_awb_config {
+ struct v4l2_isp_params_block_header header;
+ __u8 tap_point;
+ __u8 stats_mode;
+ __u16 white_level;
+ __u16 black_level;
+ __u16 cr_max;
+ __u16 cr_min;
+ __u16 cb_max;
+ __u16 cb_min;
+ __u8 nodes_used_horiz;
+ __u8 nodes_used_vert;
+ __u16 cr_high;
+ __u16 cr_low;
+ __u16 cb_high;
+ __u16 cb_low;
+};
+
+#define MALI_C55_NUM_MESH_SHADING_ELEMENTS 3072
+
+/**
+ * struct mali_c55_params_mesh_shading_config - Mesh shading configuration
+ *
+ * The mesh shading correction module allows programming a separate table of
+ * either 16x16 or 32x32 node coefficients for 3 different light sources. The
+ * final correction coefficients applied are computed by blending the
+ * coefficients from two tables together.
+ *
+ * A page of 1024 32-bit integers is associated to each colour channel, with
+ * pages stored consecutively in memory. Each 32-bit integer packs 3 8-bit
+ * correction coefficients for a single node, one for each of the three light
+ * sources. The 8 most significant bits are unused. The following table
+ * describes the layout::
+ *
+ * +----------- Page (Colour Plane) 0 -------------+
+ * | @mesh[i] | Mesh Point | Bits | Light Source |
+ * +-----------+------------+-------+--------------+
+ * | 0 | 0,0 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | 1 | 0,1 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | ... | ... | ... | ... |
+ * +-----------+------------+-------+--------------+
+ * | 1023 | 31,31 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +----------- Page (Colour Plane) 1 -------------+
+ * | @mesh[i] | Mesh Point | Bits | Light Source |
+ * +-----------+------------+-------+--------------+
+ * | 1024 | 0,0 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | 1025 | 0,1 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | ... | ... | ... | ... |
+ * +-----------+------------+-------+--------------+
+ * | 2047 | 31,31 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +----------- Page (Colour Plane) 2 -------------+
+ * | @mesh[i] | Mesh Point | Bits | Light Source |
+ * +-----------+------------+-------+--------------+
+ * | 2048 | 0,0 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | 2049 | 0,1 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ * | ... | ... | ... | ... |
+ * +-----------+------------+-------+--------------+
+ * | 3071 | 31,31 | 16,23 | LS2 |
+ * | | | 08-15 | LS1 |
+ * | | | 00-07 | LS0 |
+ * +-----------+------------+-------+--------------+
+ *
+ * The @mesh_scale member determines the precision and minimum and maximum gain.
+ * For example if @mesh_scale is 0 and therefore selects 0 - 2x gain, a value of
+ * 0 in a coefficient means 0.0 gain, a value of 128 means 1.0 gain and 255
+ * means 2.0 gain.
+ *
+ * header.type should be set to MALI_C55_PARAM_MESH_SHADING_CONFIG from
+ * :c:type:`mali_c55_param_block_type` for this block.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @mesh_show: Output the mesh data rather than image data
+ * @mesh_scale: Set the precision and maximum gain range of mesh shading
+ * - 0 = 0-2x gain
+ * - 1 = 0-4x gain
+ * - 2 = 0-8x gain
+ * - 3 = 0-16x gain
+ * - 4 = 1-2x gain
+ * - 5 = 1-3x gain
+ * - 6 = 1-5x gain
+ * - 7 = 1-9x gain
+ * @mesh_page_r: Mesh page select for red colour plane [0..2]
+ * @mesh_page_g: Mesh page select for green colour plane [0..2]
+ * @mesh_page_b: Mesh page select for blue colour plane [0..2]
+ * @mesh_width: Number of horizontal nodes minus 1 [15,31]
+ * @mesh_height: Number of vertical nodes minus 1 [15,31]
+ * @mesh: Mesh shading correction tables
+ */
+struct mali_c55_params_mesh_shading_config {
+ struct v4l2_isp_params_block_header header;
+ __u8 mesh_show;
+ __u8 mesh_scale;
+ __u8 mesh_page_r;
+ __u8 mesh_page_g;
+ __u8 mesh_page_b;
+ __u8 mesh_width;
+ __u8 mesh_height;
+ __u32 mesh[MALI_C55_NUM_MESH_SHADING_ELEMENTS];
+};
+
+/** enum mali_c55_params_mesh_alpha_bank - Mesh shading table bank selection
+ * @MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS1 - Select Light Sources 0 and 1
+ * @MALI_C55_MESH_ALPHA_BANK_LS1_AND_LS2 - Select Light Sources 1 and 2
+ * @MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS2 - Select Light Sources 0 and 2
+ */
+enum mali_c55_params_mesh_alpha_bank {
+ MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS1 = 0,
+ MALI_C55_MESH_ALPHA_BANK_LS1_AND_LS2 = 1,
+ MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS2 = 4
+};
+
+/**
+ * struct mali_c55_params_mesh_shading_selection - Mesh table selection
+ *
+ * The module computes the final correction coefficients by blending the ones
+ * from two light source tables, which are selected (independently for each
+ * colour channel) by the @mesh_alpha_bank_r/g/b fields.
+ *
+ * The final blended coefficients for each node are calculated using the
+ * following equation:
+ *
+ * Final coefficient = (a * LS\ :sub:`b`\ + (256 - a) * LS\ :sub:`a`\) / 256
+ *
+ * Where a is the @mesh_alpha_r/g/b value, and LS\ :sub:`a`\ and LS\ :sub:`b`\
+ * are the node cofficients for the two tables selected by the
+ * @mesh_alpha_bank_r/g/b value.
+ *
+ * The scale of the applied correction may also be controlled by tuning the
+ * @mesh_strength member. This is a modifier to the final coefficients which can
+ * be used to globally reduce the gains applied.
+ *
+ * header.type should be set to MALI_C55_PARAM_MESH_SHADING_SELECTION from
+ * :c:type:`mali_c55_param_block_type` for this block.
+ *
+ * @header: The Mali-C55 parameters block header
+ * @mesh_alpha_bank_r: Red mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
+ * @mesh_alpha_bank_g: Green mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
+ * @mesh_alpha_bank_b: Blue mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
+ * @mesh_alpha_r: Blend coefficient for R [0..255]
+ * @mesh_alpha_g: Blend coefficient for G [0..255]
+ * @mesh_alpha_b: Blend coefficient for B [0..255]
+ * @mesh_strength: Mesh strength in Q4.12 format [0..4096]
+ */
+struct mali_c55_params_mesh_shading_selection {
+ struct v4l2_isp_params_block_header header;
+ __u8 mesh_alpha_bank_r;
+ __u8 mesh_alpha_bank_g;
+ __u8 mesh_alpha_bank_b;
+ __u8 mesh_alpha_r;
+ __u8 mesh_alpha_g;
+ __u8 mesh_alpha_b;
+ __u16 mesh_strength;
+};
+
+/**
+ * define MALI_C55_PARAMS_MAX_SIZE - Maximum size of all Mali C55 Parameters
+ *
+ * Though the parameters for the Mali-C55 are passed as optional blocks, the
+ * driver still needs to know the absolute maximum size so that it can allocate
+ * a buffer sized appropriately to accommodate userspace attempting to set all
+ * possible parameters in a single frame.
+ *
+ * Some structs are in this list multiple times. Where that's the case, it just
+ * reflects the fact that the same struct can be used with multiple different
+ * header types from :c:type:`mali_c55_param_block_type`.
+ */
+#define MALI_C55_PARAMS_MAX_SIZE \
+ (sizeof(struct mali_c55_params_sensor_off_preshading) + \
+ sizeof(struct mali_c55_params_aexp_hist) + \
+ sizeof(struct mali_c55_params_aexp_weights) + \
+ sizeof(struct mali_c55_params_aexp_hist) + \
+ sizeof(struct mali_c55_params_aexp_weights) + \
+ sizeof(struct mali_c55_params_digital_gain) + \
+ sizeof(struct mali_c55_params_awb_gains) + \
+ sizeof(struct mali_c55_params_awb_config) + \
+ sizeof(struct mali_c55_params_awb_gains) + \
+ sizeof(struct mali_c55_params_mesh_shading_config) + \
+ sizeof(struct mali_c55_params_mesh_shading_selection))
+
+#endif /* __UAPI_MALI_C55_CONFIG_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/media/v4l2-isp.h b/lib/libc/include/any-linux-any/linux/media/v4l2-isp.h
new file mode 100644
index 0000000000..20e61e299c
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/media/v4l2-isp.h
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Video4Linux2 generic ISP parameters and statistics support
+ *
+ * Copyright (C) 2025 Ideas On Board Oy
+ * Author: Jacopo Mondi
+ */
+
+#ifndef _V4L2_ISP_H_
+#define _V4L2_ISP_H_
+
+#include
+#include
+
+/**
+ * enum v4l2_isp_params_version - V4L2 ISP parameters versioning
+ *
+ * @V4L2_ISP_PARAMS_VERSION_V0: First version of the V4L2 ISP parameters format
+ * (for compatibility)
+ * @V4L2_ISP_PARAMS_VERSION_V1: First version of the V4L2 ISP parameters format
+ *
+ * V0 and V1 are identical in order to support drivers compatible with the V4L2
+ * ISP parameters format already upstreamed which use either 0 or 1 as their
+ * versioning identifier. Both V0 and V1 refers to the first version of the
+ * V4L2 ISP parameters format.
+ *
+ * Future revisions of the V4L2 ISP parameters format should start from the
+ * value of 2.
+ */
+enum v4l2_isp_params_version {
+ V4L2_ISP_PARAMS_VERSION_V0 = 0,
+ V4L2_ISP_PARAMS_VERSION_V1
+};
+
+#define V4L2_ISP_PARAMS_FL_BLOCK_DISABLE (1U << 0)
+#define V4L2_ISP_PARAMS_FL_BLOCK_ENABLE (1U << 1)
+
+/*
+ * Reserve the first 8 bits for V4L2_ISP_PARAMS_FL_* flag.
+ *
+ * Driver-specific flags should be defined as:
+ * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(0))
+ * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(1))
+ */
+#define V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(n) ((n) + 8)
+
+/**
+ * struct v4l2_isp_params_block_header - V4L2 extensible parameters block header
+ * @type: The parameters block type (driver-specific)
+ * @flags: A bitmask of block flags (driver-specific)
+ * @size: Size (in bytes) of the parameters block, including this header
+ *
+ * This structure represents the common part of all the ISP configuration
+ * blocks. Each parameters block shall embed an instance of this structure type
+ * as its first member, followed by the block-specific configuration data.
+ *
+ * The @type field is an ISP driver-specific value that identifies the block
+ * type. The @size field specifies the size of the parameters block.
+ *
+ * The @flags field is a bitmask of per-block flags V4L2_PARAMS_ISP_FL_* and
+ * driver-specific flags specified by the driver header.
+ */
+struct v4l2_isp_params_block_header {
+ __u16 type;
+ __u16 flags;
+ __u32 size;
+} __attribute__((aligned(8)));
+
+/**
+ * struct v4l2_isp_params_buffer - V4L2 extensible parameters configuration
+ * @version: The parameters buffer version (driver-specific)
+ * @data_size: The configuration data effective size, excluding this header
+ * @data: The configuration data
+ *
+ * This structure contains the configuration parameters of the ISP algorithms,
+ * serialized by userspace into a data buffer. Each configuration parameter
+ * block is represented by a block-specific structure which contains a
+ * :c:type:`v4l2_isp_params_block_header` entry as first member. Userspace
+ * populates the @data buffer with configuration parameters for the blocks that
+ * it intends to configure. As a consequence, the data buffer effective size
+ * changes according to the number of ISP blocks that userspace intends to
+ * configure and is set by userspace in the @data_size field.
+ *
+ * The parameters buffer is versioned by the @version field to allow modifying
+ * and extending its definition. Userspace shall populate the @version field to
+ * inform the driver about the version it intends to use. The driver will parse
+ * and handle the @data buffer according to the data layout specific to the
+ * indicated version and return an error if the desired version is not
+ * supported.
+ *
+ * For each ISP block that userspace wants to configure, a block-specific
+ * structure is appended to the @data buffer, one after the other without gaps
+ * in between. Userspace shall populate the @data_size field with the effective
+ * size, in bytes, of the @data buffer.
+ */
+struct v4l2_isp_params_buffer {
+ __u32 version;
+ __u32 data_size;
+ __u8 data[] __counted_by(data_size);
+};
+
+#endif /* _V4L2_ISP_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/mempolicy.h b/lib/libc/include/any-linux-any/linux/mempolicy.h
index 2df80acf65..9943941832 100644
--- a/lib/libc/include/any-linux-any/linux/mempolicy.h
+++ b/lib/libc/include/any-linux-any/linux/mempolicy.h
@@ -66,10 +66,16 @@ enum {
#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */
/*
- * These bit locations are exposed in the vm.zone_reclaim_mode sysctl
- * ABI. New bits are OK, but existing bits can never change.
+ * Enabling zone reclaim means the page allocator will attempt to fulfill
+ * the allocation request on the current node by triggering reclaim and
+ * trying to shrink the current node.
+ * Fallback allocations on the next candidates in the zonelist are considered
+ * when reclaim fails to free up enough memory in the current node/zone.
+ *
+ * These bit locations are exposed in the vm.zone_reclaim_mode sysctl.
+ * New bits are OK, but existing bits should not be changed.
*/
-#define RECLAIM_ZONE (1<<0) /* Run shrink_inactive_list on the zone */
+#define RECLAIM_ZONE (1<<0) /* Enable zone reclaim */
#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */
#define RECLAIM_UNMAP (1<<2) /* Unmap pages during reclaim */
diff --git a/lib/libc/include/any-linux-any/linux/mount.h b/lib/libc/include/any-linux-any/linux/mount.h
index 5062431943..9fd5d88023 100644
--- a/lib/libc/include/any-linux-any/linux/mount.h
+++ b/lib/libc/include/any-linux-any/linux/mount.h
@@ -197,7 +197,7 @@ struct statmount {
*/
struct mnt_id_req {
__u32 size;
- __u32 spare;
+ __u32 mnt_ns_fd;
__u64 mnt_id;
__u64 param;
__u64 mnt_ns_id;
diff --git a/lib/libc/include/any-linux-any/linux/mptcp.h b/lib/libc/include/any-linux-any/linux/mptcp.h
index 7abe4077f7..766139324f 100644
--- a/lib/libc/include/any-linux-any/linux/mptcp.h
+++ b/lib/libc/include/any-linux-any/linux/mptcp.h
@@ -30,20 +30,28 @@
#define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1)
#define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 _BITUL(0)
+#define MPTCP_PM_EV_FLAG_SERVER_SIDE _BITUL(1)
-#define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0)
-#define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1)
-#define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2)
-#define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3)
-#define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4)
+#define MPTCP_PM_ADDR_FLAG_SIGNAL _BITUL(0)
+#define MPTCP_PM_ADDR_FLAG_SUBFLOW _BITUL(1)
+#define MPTCP_PM_ADDR_FLAG_BACKUP _BITUL(2)
+#define MPTCP_PM_ADDR_FLAG_FULLMESH _BITUL(3)
+#define MPTCP_PM_ADDR_FLAG_IMPLICIT _BITUL(4)
+#define MPTCP_PM_ADDR_FLAG_LAMINAR _BITUL(5)
+#define MPTCP_PM_ADDR_FLAGS_MASK GENMASK(5, 0)
struct mptcp_info {
__u8 mptcpi_subflows;
+ #define mptcpi_extra_subflows mptcpi_subflows
__u8 mptcpi_add_addr_signal;
__u8 mptcpi_add_addr_accepted;
__u8 mptcpi_subflows_max;
+ #define mptcpi_limit_extra_subflows mptcpi_subflows_max
__u8 mptcpi_add_addr_signal_max;
+ #define mptcpi_endp_signal_max mptcpi_add_addr_signal_max
__u8 mptcpi_add_addr_accepted_max;
+ #define mptcpi_limit_add_addr_accepted mptcpi_add_addr_accepted_max
+ /* 16-bit hole that can no longer be filled */
__u32 mptcpi_flags;
__u32 mptcpi_token;
__u64 mptcpi_write_seq;
@@ -51,14 +59,18 @@ struct mptcp_info {
__u64 mptcpi_rcv_nxt;
__u8 mptcpi_local_addr_used;
__u8 mptcpi_local_addr_max;
+ #define mptcpi_endp_subflow_max mptcpi_local_addr_max
__u8 mptcpi_csum_enabled;
+ /* 8-bit hole that can no longer be filled */
__u32 mptcpi_retransmits;
__u64 mptcpi_bytes_retrans;
__u64 mptcpi_bytes_sent;
__u64 mptcpi_bytes_received;
__u64 mptcpi_bytes_acked;
__u8 mptcpi_subflows_total;
- __u8 reserved[3];
+ __u8 mptcpi_endp_laminar_max;
+ __u8 mptcpi_endp_fullmesh_max;
+ __u8 reserved;
__u32 mptcpi_last_data_sent;
__u32 mptcpi_last_data_recv;
__u32 mptcpi_last_ack_recv;
diff --git a/lib/libc/include/any-linux-any/linux/mptcp_pm.h b/lib/libc/include/any-linux-any/linux/mptcp_pm.h
index 9dd09b314f..eb12cf124c 100644
--- a/lib/libc/include/any-linux-any/linux/mptcp_pm.h
+++ b/lib/libc/include/any-linux-any/linux/mptcp_pm.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/mptcp_pm.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_MPTCP_PM_H
#define _LINUX_MPTCP_PM_H
@@ -16,10 +17,10 @@
* good time to allocate memory and send ADD_ADDR if needed. Depending on the
* traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED
* is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,
- * sport, dport, server-side, [flags].
+ * sport, dport, [server-side], [flags].
* @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new
* subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,
- * sport, dport, server-side, [flags].
+ * sport, dport, [server-side], [flags].
* @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token.
* @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer.
* Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].
diff --git a/lib/libc/include/any-linux-any/linux/mshv.h b/lib/libc/include/any-linux-any/linux/mshv.h
index 1fccce47ae..7e542a818e 100644
--- a/lib/libc/include/any-linux-any/linux/mshv.h
+++ b/lib/libc/include/any-linux-any/linux/mshv.h
@@ -26,6 +26,7 @@ enum {
MSHV_PT_BIT_LAPIC,
MSHV_PT_BIT_X2APIC,
MSHV_PT_BIT_GPA_SUPER_PAGES,
+ MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
MSHV_PT_BIT_COUNT,
};
@@ -41,6 +42,8 @@ enum {
* @pt_flags: Bitmask of 1 << MSHV_PT_BIT_*
* @pt_isolation: MSHV_PT_ISOLATION_*
*
+ * This is the initial/v1 version for backward compatibility.
+ *
* Returns a file descriptor to act as a handle to a guest partition.
* At this point the partition is not yet initialized in the hypervisor.
* Some operations must be done with the partition in this state, e.g. setting
@@ -52,6 +55,37 @@ struct mshv_create_partition {
__u64 pt_isolation;
};
+#define MSHV_NUM_CPU_FEATURES_BANKS 2
+
+/**
+ * struct mshv_create_partition_v2
+ *
+ * This is extended version of the above initial MSHV_CREATE_PARTITION
+ * ioctl and allows for following additional parameters:
+ *
+ * @pt_num_cpu_fbanks: Must be set to MSHV_NUM_CPU_FEATURES_BANKS.
+ * @pt_cpu_fbanks: Disabled processor feature banks array.
+ * @pt_disabled_xsave: Disabled xsave feature bits.
+ *
+ * pt_cpu_fbanks and pt_disabled_xsave are passed through as-is to the create
+ * partition hypercall.
+ *
+ * Returns : same as above original mshv_create_partition
+ */
+struct mshv_create_partition_v2 {
+ __u64 pt_flags;
+ __u64 pt_isolation;
+ __u16 pt_num_cpu_fbanks;
+ __u8 pt_rsvd[6]; /* MBZ */
+ __u64 pt_cpu_fbanks[MSHV_NUM_CPU_FEATURES_BANKS];
+ __u64 pt_rsvd1[2]; /* MBZ */
+#if defined(__x86_64__)
+ __u64 pt_disabled_xsave;
+#else
+ __u64 pt_rsvd2; /* MBZ */
+#endif
+} __attribute__((packed));
+
/* /dev/mshv */
#define MSHV_CREATE_PARTITION _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition)
@@ -89,7 +123,7 @@ enum {
* @rsvd: MBZ
*
* Map or unmap a region of userspace memory to Guest Physical Addresses (GPA).
- * Mappings can't overlap in GPA space or userspace.
+ * Mappings can't overlap in GPA space.
* To unmap, these fields must match an existing mapping.
*/
struct mshv_user_mem_region {
@@ -288,4 +322,84 @@ struct mshv_get_set_vp_state {
* #define MSHV_ROOT_HVCALL _IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall)
*/
+/* Structure definitions, macros and IOCTLs for mshv_vtl */
+
+#define MSHV_CAP_CORE_API_STABLE 0x0
+#define MSHV_CAP_REGISTER_PAGE 0x1
+#define MSHV_CAP_VTL_RETURN_ACTION 0x2
+#define MSHV_CAP_DR6_SHARED 0x3
+#define MSHV_MAX_RUN_MSG_SIZE 256
+
+struct mshv_vp_registers {
+ __u32 count; /* supports only 1 register at a time */
+ __u32 reserved; /* Reserved for alignment or future use */
+ __u64 regs_ptr; /* pointer to struct hv_register_assoc */
+};
+
+struct mshv_vtl_set_eventfd {
+ __s32 fd;
+ __u32 flag;
+};
+
+struct mshv_vtl_signal_event {
+ __u32 connection_id;
+ __u32 flag;
+};
+
+struct mshv_vtl_sint_post_msg {
+ __u64 message_type;
+ __u32 connection_id;
+ __u32 payload_size; /* Must not exceed HV_MESSAGE_PAYLOAD_BYTE_COUNT */
+ __u64 payload_ptr; /* pointer to message payload (bytes) */
+};
+
+struct mshv_vtl_ram_disposition {
+ __u64 start_pfn;
+ __u64 last_pfn;
+};
+
+struct mshv_vtl_set_poll_file {
+ __u32 cpu;
+ __u32 fd;
+};
+
+struct mshv_vtl_hvcall_setup {
+ __u64 bitmap_array_size; /* stores number of bytes */
+ __u64 allow_bitmap_ptr;
+};
+
+struct mshv_vtl_hvcall {
+ __u64 control; /* Hypercall control code */
+ __u64 input_size; /* Size of the input data */
+ __u64 input_ptr; /* Pointer to the input struct */
+ __u64 status; /* Status of the hypercall (output) */
+ __u64 output_size; /* Size of the output data */
+ __u64 output_ptr; /* Pointer to the output struct */
+};
+
+struct mshv_sint_mask {
+ __u8 mask;
+ __u8 reserved[7];
+};
+
+/* /dev/mshv device IOCTL */
+#define MSHV_CHECK_EXTENSION _IOW(MSHV_IOCTL, 0x00, __u32)
+
+/* vtl device */
+#define MSHV_CREATE_VTL _IOR(MSHV_IOCTL, 0x1D, char)
+#define MSHV_ADD_VTL0_MEMORY _IOW(MSHV_IOCTL, 0x21, struct mshv_vtl_ram_disposition)
+#define MSHV_SET_POLL_FILE _IOW(MSHV_IOCTL, 0x25, struct mshv_vtl_set_poll_file)
+#define MSHV_RETURN_TO_LOWER_VTL _IO(MSHV_IOCTL, 0x27)
+#define MSHV_GET_VP_REGISTERS _IOWR(MSHV_IOCTL, 0x05, struct mshv_vp_registers)
+#define MSHV_SET_VP_REGISTERS _IOW(MSHV_IOCTL, 0x06, struct mshv_vp_registers)
+
+/* VMBus device IOCTLs */
+#define MSHV_SINT_SIGNAL_EVENT _IOW(MSHV_IOCTL, 0x22, struct mshv_vtl_signal_event)
+#define MSHV_SINT_POST_MESSAGE _IOW(MSHV_IOCTL, 0x23, struct mshv_vtl_sint_post_msg)
+#define MSHV_SINT_SET_EVENTFD _IOW(MSHV_IOCTL, 0x24, struct mshv_vtl_set_eventfd)
+#define MSHV_SINT_PAUSE_MESSAGE_STREAM _IOW(MSHV_IOCTL, 0x25, struct mshv_sint_mask)
+
+/* hv_hvcall device */
+#define MSHV_HVCALL_SETUP _IOW(MSHV_IOCTL, 0x1E, struct mshv_vtl_hvcall_setup)
+#define MSHV_HVCALL _IOWR(MSHV_IOCTL, 0x1F, struct mshv_vtl_hvcall)
#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/net_shaper.h b/lib/libc/include/any-linux-any/linux/net_shaper.h
index b9c409a55b..03b1aa4f08 100644
--- a/lib/libc/include/any-linux-any/linux/net_shaper.h
+++ b/lib/libc/include/any-linux-any/linux/net_shaper.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/net_shaper.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_NET_SHAPER_H
#define _LINUX_NET_SHAPER_H
diff --git a/lib/libc/include/any-linux-any/linux/netdev.h b/lib/libc/include/any-linux-any/linux/netdev.h
index 4de80b0793..d48296f17f 100644
--- a/lib/libc/include/any-linux-any/linux/netdev.h
+++ b/lib/libc/include/any-linux-any/linux/netdev.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/netdev.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_NETDEV_H
#define _LINUX_NETDEV_H
@@ -80,6 +81,7 @@ enum netdev_qstats_scope {
enum netdev_napi_threaded {
NETDEV_NAPI_THREADED_DISABLED,
NETDEV_NAPI_THREADED_ENABLED,
+ NETDEV_NAPI_THREADED_BUSY_POLL,
};
enum {
diff --git a/lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h b/lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h
index 9795d421a2..4f481f87ec 100644
--- a/lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h
+++ b/lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h
@@ -881,7 +881,7 @@ enum nft_exthdr_flags {
* enum nft_exthdr_op - nf_tables match options
*
* @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers
- * @NFT_EXTHDR_OP_TCP: match against tcp options
+ * @NFT_EXTHDR_OP_TCPOPT: match against tcp options
* @NFT_EXTHDR_OP_IPV4: match against ipv4 options
* @NFT_EXTHDR_OP_SCTP: match against sctp chunks
* @NFT_EXTHDR_OP_DCCP: match against dccp otions
@@ -959,6 +959,7 @@ enum nft_exthdr_attributes {
* @NFT_META_SDIF: slave device interface index
* @NFT_META_SDIFNAME: slave device interface name
* @NFT_META_BRI_BROUTE: packet br_netfilter_broute bit
+ * @NFT_META_BRI_IIFHWADDR: packet input bridge interface ethernet address
*/
enum nft_meta_keys {
NFT_META_LEN,
@@ -999,6 +1000,7 @@ enum nft_meta_keys {
NFT_META_SDIFNAME,
NFT_META_BRI_BROUTE,
__NFT_META_IIFTYPE,
+ NFT_META_BRI_IIFHWADDR,
};
/**
@@ -1198,7 +1200,7 @@ enum nft_ct_attributes {
#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
/**
- * enum nft_flow_attributes - ct offload expression attributes
+ * enum nft_offload_attributes - ct offload expression attributes
* @NFTA_FLOW_TABLE_NAME: flow table name (NLA_STRING)
*/
enum nft_offload_attributes {
@@ -1408,7 +1410,7 @@ enum nft_reject_types {
};
/**
- * enum nft_reject_code - Generic reject codes for IPv4/IPv6
+ * enum nft_reject_inet_code - Generic reject codes for IPv4/IPv6
*
* @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable
* @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable
@@ -1478,9 +1480,9 @@ enum nft_nat_attributes {
/**
* enum nft_tproxy_attributes - nf_tables tproxy expression netlink attributes
*
- * NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)
- * NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)
- * NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)
*/
enum nft_tproxy_attributes {
NFTA_TPROXY_UNSPEC,
@@ -1781,7 +1783,7 @@ enum nft_synproxy_attributes {
#define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1)
/**
- * enum nft_device_attributes - nf_tables device netlink attributes
+ * enum nft_devices_attributes - nf_tables device netlink attributes
*
* @NFTA_DEVICE_NAME: name of this device (NLA_STRING)
* @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING)
diff --git a/lib/libc/include/any-linux-any/linux/netfilter_ipv6/ip6t_srh.h b/lib/libc/include/any-linux-any/linux/netfilter_ipv6/ip6t_srh.h
index b470290111..8930a1afe9 100644
--- a/lib/libc/include/any-linux-any/linux/netfilter_ipv6/ip6t_srh.h
+++ b/lib/libc/include/any-linux-any/linux/netfilter_ipv6/ip6t_srh.h
@@ -41,13 +41,13 @@
/**
* struct ip6t_srh - SRH match options
- * @ next_hdr: Next header field of SRH
- * @ hdr_len: Extension header length field of SRH
- * @ segs_left: Segments left field of SRH
- * @ last_entry: Last entry field of SRH
- * @ tag: Tag field of SRH
- * @ mt_flags: match options
- * @ mt_invflags: Invert the sense of match options
+ * @next_hdr: Next header field of SRH
+ * @hdr_len: Extension header length field of SRH
+ * @segs_left: Segments left field of SRH
+ * @last_entry: Last entry field of SRH
+ * @tag: Tag field of SRH
+ * @mt_flags: match options
+ * @mt_invflags: Invert the sense of match options
*/
struct ip6t_srh {
@@ -62,19 +62,19 @@ struct ip6t_srh {
/**
* struct ip6t_srh1 - SRH match options (revision 1)
- * @ next_hdr: Next header field of SRH
- * @ hdr_len: Extension header length field of SRH
- * @ segs_left: Segments left field of SRH
- * @ last_entry: Last entry field of SRH
- * @ tag: Tag field of SRH
- * @ psid_addr: Address of previous SID in SRH SID list
- * @ nsid_addr: Address of NEXT SID in SRH SID list
- * @ lsid_addr: Address of LAST SID in SRH SID list
- * @ psid_msk: Mask of previous SID in SRH SID list
- * @ nsid_msk: Mask of next SID in SRH SID list
- * @ lsid_msk: MAsk of last SID in SRH SID list
- * @ mt_flags: match options
- * @ mt_invflags: Invert the sense of match options
+ * @next_hdr: Next header field of SRH
+ * @hdr_len: Extension header length field of SRH
+ * @segs_left: Segments left field of SRH
+ * @last_entry: Last entry field of SRH
+ * @tag: Tag field of SRH
+ * @psid_addr: Address of previous SID in SRH SID list
+ * @nsid_addr: Address of NEXT SID in SRH SID list
+ * @lsid_addr: Address of LAST SID in SRH SID list
+ * @psid_msk: Mask of previous SID in SRH SID list
+ * @nsid_msk: Mask of next SID in SRH SID list
+ * @lsid_msk: MAsk of last SID in SRH SID list
+ * @mt_flags: match options
+ * @mt_invflags: Invert the sense of match options
*/
struct ip6t_srh1 {
diff --git a/lib/libc/include/any-linux-any/linux/nfs.h b/lib/libc/include/any-linux-any/linux/nfs.h
index 45ddcfc8b7..4970e6cdf2 100644
--- a/lib/libc/include/any-linux-any/linux/nfs.h
+++ b/lib/libc/include/any-linux-any/linux/nfs.h
@@ -49,7 +49,6 @@
NFSERR_NOENT = 2, /* v2 v3 v4 */
NFSERR_IO = 5, /* v2 v3 v4 */
NFSERR_NXIO = 6, /* v2 v3 v4 */
- NFSERR_EAGAIN = 11, /* v2 v3 */
NFSERR_ACCES = 13, /* v2 v3 v4 */
NFSERR_EXIST = 17, /* v2 v3 v4 */
NFSERR_XDEV = 18, /* v3 v4 */
diff --git a/lib/libc/include/any-linux-any/linux/nfsd_netlink.h b/lib/libc/include/any-linux-any/linux/nfsd_netlink.h
index e924948f6b..99e7881f3e 100644
--- a/lib/libc/include/any-linux-any/linux/nfsd_netlink.h
+++ b/lib/libc/include/any-linux-any/linux/nfsd_netlink.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/nfsd.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_NFSD_NETLINK_H
#define _LINUX_NFSD_NETLINK_H
diff --git a/lib/libc/include/any-linux-any/linux/nl80211-vnd-intel.h b/lib/libc/include/any-linux-any/linux/nl80211-vnd-intel.h
index 6f87408a3c..e89d02ea90 100644
--- a/lib/libc/include/any-linux-any/linux/nl80211-vnd-intel.h
+++ b/lib/libc/include/any-linux-any/linux/nl80211-vnd-intel.h
@@ -84,7 +84,6 @@ enum iwl_vendor_auth_akm_mode {
*
* @NUM_IWL_MVM_VENDOR_ATTR: number of vendor attributes
* @MAX_IWL_MVM_VENDOR_ATTR: highest vendor attribute number
-
*/
enum iwl_mvm_vendor_attr {
__IWL_MVM_VENDOR_ATTR_INVALID = 0x00,
diff --git a/lib/libc/include/any-linux-any/linux/nl80211.h b/lib/libc/include/any-linux-any/linux/nl80211.h
index 747551a6f2..60f9999ac1 100644
--- a/lib/libc/include/any-linux-any/linux/nl80211.h
+++ b/lib/libc/include/any-linux-any/linux/nl80211.h
@@ -1085,8 +1085,9 @@
* %NL80211_ATTR_NAN_MASTER_PREF attribute and optional
* %NL80211_ATTR_BANDS attributes. If %NL80211_ATTR_BANDS is
* omitted or set to 0, it means don't-care and the device will
- * decide what to use. After this command NAN functions can be
- * added.
+ * decide what to use. Additional cluster configuration may be
+ * optionally provided with %NL80211_ATTR_NAN_CONFIG.
+ * After this command NAN functions can be added.
* @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
* its %NL80211_ATTR_WDEV interface.
* @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined
@@ -1115,6 +1116,10 @@
* current configuration is not changed. If it is present but
* set to zero, the configuration is changed to don't-care
* (i.e. the device can decide what to do).
+ * Additional parameters may be provided with
+ * %NL80211_ATTR_NAN_CONFIG. User space should provide all previously
+ * configured nested attributes under %NL80211_ATTR_NAN_CONFIG, even if
+ * only a subset was changed.
* @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.
* This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
* %NL80211_ATTR_COOKIE.
@@ -1344,6 +1349,18 @@
* control EPCS configuration. Used to notify userland on the current state
* of EPCS.
*
+ * @NL80211_CMD_NAN_NEXT_DW_NOTIFICATION: This command is used to notify
+ * user space about the next NAN Discovery Window (DW). User space may use
+ * it to prepare frames to be sent in the next DW.
+ * %NL80211_ATTR_WIPHY_FREQ is used to indicate the frequency of the next
+ * DW. SDF transmission should be requested with %NL80211_CMD_FRAME and
+ * the device/driver shall take care of the actual transmission timing.
+ * This notification is only sent to the NAN interface owning socket
+ * (see %NL80211_ATTR_SOCKET_OWNER flag).
+ * @NL80211_CMD_NAN_CLUSTER_JOINED: This command is used to notify
+ * user space that the NAN new cluster has been joined. The cluster ID is
+ * indicated by %NL80211_ATTR_MAC.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1604,6 +1621,9 @@ enum nl80211_commands {
NL80211_CMD_ASSOC_MLO_RECONF,
NL80211_CMD_EPCS_CFG,
+ NL80211_CMD_NAN_NEXT_DW_NOTIFICATION,
+ NL80211_CMD_NAN_CLUSTER_JOINED,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1943,8 +1963,9 @@ enum nl80211_commands {
* The driver must also specify support for this with the extended
* features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
* NL80211_EXT_FEATURE_BEACON_RATE_HT,
- * NL80211_EXT_FEATURE_BEACON_RATE_VHT and
- * NL80211_EXT_FEATURE_BEACON_RATE_HE.
+ * NL80211_EXT_FEATURE_BEACON_RATE_VHT,
+ * NL80211_EXT_FEATURE_BEACON_RATE_HE and
+ * NL80211_EXT_FEATURE_BEACON_RATE_EHT.
*
* @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
* at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
@@ -2283,7 +2304,8 @@ enum nl80211_commands {
* @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).
* This is similar to @NL80211_ATTR_STA_AID but with a difference of being
* allowed to be used with the first @NL80211_CMD_SET_STATION command to
- * update a TDLS peer STA entry.
+ * update a TDLS peer STA entry. For S1G interfaces, this is limited to
+ * 1600 for the current mac80211 implementation.
*
* @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
*
@@ -2858,8 +2880,9 @@ enum nl80211_commands {
* index. If the userspace includes more RNR elements than number of
* MBSSID elements then these will be added in every EMA beacon.
*
- * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is
- * disabled.
+ * @NL80211_ATTR_MLO_LINK_DISABLED: Unused. It was used to indicate that a link
+ * is disabled during association. However, the AP will send the
+ * information by including a TTLM in the association response.
*
* @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e.
* include BSSes that can only be used in restricted scenarios and/or
@@ -2928,6 +2951,29 @@ enum nl80211_commands {
* required alongside this attribute. Refer to
* @enum nl80211_s1g_short_beacon_attrs for the attribute definitions.
*
+ * @NL80211_ATTR_BSS_PARAM: nested attribute used with %NL80211_CMD_GET_WIPHY
+ * which indicates which BSS parameters can be modified. The attribute can
+ * also be used as flag attribute by user-space in %NL80211_CMD_SET_BSS to
+ * indicate that it wants strict checking on the BSS parameters to be
+ * modified.
+ *
+ * @NL80211_ATTR_NAN_CONFIG: Nested attribute for
+ * extended NAN cluster configuration. This is used with
+ * %NL80211_CMD_START_NAN and %NL80211_CMD_CHANGE_NAN_CONFIG.
+ * See &enum nl80211_nan_conf_attributes for details.
+ * This attribute is optional.
+ * @NL80211_ATTR_NAN_NEW_CLUSTER: Flag attribute indicating that a new
+ * NAN cluster has been created. This is used with
+ * %NL80211_CMD_NAN_CLUSTER_JOINED
+ * @NL80211_ATTR_NAN_CAPABILITIES: Nested attribute for NAN capabilities.
+ * This is used with %NL80211_CMD_GET_WIPHY to indicate the NAN
+ * capabilities supported by the driver. See &enum nl80211_nan_capabilities
+ * for details.
+ *
+ * @NL80211_ATTR_S1G_PRIMARY_2MHZ: flag attribute indicating that the S1G
+ * primary channel is 2 MHz wide, and the control channel designates
+ * the 1 MHz primary subchannel within that 2 MHz primary.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3489,6 +3535,12 @@ enum nl80211_attrs {
NL80211_ATTR_S1G_LONG_BEACON_PERIOD,
NL80211_ATTR_S1G_SHORT_BEACON,
+ NL80211_ATTR_BSS_PARAM,
+ NL80211_ATTR_NAN_CONFIG,
+ NL80211_ATTR_NAN_NEW_CLUSTER,
+ NL80211_ATTR_NAN_CAPABILITIES,
+
+ NL80211_ATTR_S1G_PRIMARY_2MHZ,
/* add attributes here, update the policy in nl80211.c */
@@ -3735,6 +3787,22 @@ enum nl80211_eht_gi {
NL80211_RATE_INFO_EHT_GI_3_2,
};
+/**
+ * enum nl80211_eht_ltf - EHT long training field
+ * @NL80211_RATE_INFO_EHT_1XLTF: 3.2 usec
+ * @NL80211_RATE_INFO_EHT_2XLTF: 6.4 usec
+ * @NL80211_RATE_INFO_EHT_4XLTF: 12.8 usec
+ * @NL80211_RATE_INFO_EHT_6XLTF: 19.2 usec
+ * @NL80211_RATE_INFO_EHT_8XLTF: 25.6 usec
+ */
+enum nl80211_eht_ltf {
+ NL80211_RATE_INFO_EHT_1XLTF,
+ NL80211_RATE_INFO_EHT_2XLTF,
+ NL80211_RATE_INFO_EHT_4XLTF,
+ NL80211_RATE_INFO_EHT_6XLTF,
+ NL80211_RATE_INFO_EHT_8XLTF,
+};
+
/**
* enum nl80211_eht_ru_alloc - EHT RU allocation values
* @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation
@@ -4371,6 +4439,12 @@ enum nl80211_wmm_rule {
* very low power (VLP) AP, despite being NO_IR.
* @NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY: This channel can be active in
* 20 MHz bandwidth, despite being NO_IR.
+ * @NL80211_FREQUENCY_ATTR_NO_4MHZ: 4 MHz operation is not allowed on this
+ * channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_NO_8MHZ: 8 MHz operation is not allowed on this
+ * channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this
+ * channel in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
* currently defined
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -4416,6 +4490,9 @@ enum nl80211_frequency_attr {
NL80211_FREQUENCY_ATTR_CAN_MONITOR,
NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,
NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY,
+ NL80211_FREQUENCY_ATTR_NO_4MHZ,
+ NL80211_FREQUENCY_ATTR_NO_8MHZ,
+ NL80211_FREQUENCY_ATTR_NO_16MHZ,
/* keep last */
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -5481,6 +5558,10 @@ enum nl80211_key_attributes {
* see &struct nl80211_txrate_he
* @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
* @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
+ * @NL80211_TXRATE_EHT: EHT rates allowed for TX rate selection,
+ * see &struct nl80211_txrate_eht
+ * @NL80211_TXRATE_EHT_GI: configure EHT GI, (u8, see &enum nl80211_eht_gi)
+ * @NL80211_TXRATE_EHT_LTF: configure EHT LTF, (u8, see &enum nl80211_eht_ltf)
* @__NL80211_TXRATE_AFTER_LAST: internal
* @NL80211_TXRATE_MAX: highest TX rate attribute
*/
@@ -5493,6 +5574,9 @@ enum nl80211_tx_rate_attributes {
NL80211_TXRATE_HE,
NL80211_TXRATE_HE_GI,
NL80211_TXRATE_HE_LTF,
+ NL80211_TXRATE_EHT,
+ NL80211_TXRATE_EHT_GI,
+ NL80211_TXRATE_EHT_LTF,
/* keep last */
__NL80211_TXRATE_AFTER_LAST,
@@ -5525,6 +5609,15 @@ enum nl80211_txrate_gi {
NL80211_TXRATE_FORCE_LGI,
};
+#define NL80211_EHT_NSS_MAX 16
+/**
+ * struct nl80211_txrate_eht - EHT MCS/NSS txrate bitmap
+ * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
+ */
+struct nl80211_txrate_eht {
+ __u16 mcs[NL80211_EHT_NSS_MAX];
+};
+
/**
* enum nl80211_band - Frequency band
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band
@@ -6649,6 +6742,9 @@ enum nl80211_feature_flags {
* (signaling and payload protected) A-MSDUs and this shall be advertised
* in the RSNXE.
*
+ * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
+ * configuration (AP/mesh) with EHT rates.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -6724,6 +6820,7 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_OWE_OFFLOAD_AP,
NL80211_EXT_FEATURE_DFS_CONCURRENT,
NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
+ NL80211_EXT_FEATURE_BEACON_RATE_EHT,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
@@ -7278,6 +7375,105 @@ enum nl80211_nan_match_attributes {
NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
};
+/**
+ * enum nl80211_nan_band_conf_attributes - NAN band configuration attributes
+ * @__NL80211_NAN_BAND_CONF_INVALID: Invalid.
+ * @NL80211_NAN_BAND_CONF_BAND: Band for which the configuration is
+ * being set. The value is according to &enum nl80211_band (u8).
+ * @NL80211_NAN_BAND_CONF_FREQ: Discovery frequency. This attribute shall not
+ * be present on 2.4 GHZ band. On 5 GHz band its presence is optional.
+ * The allowed values are 5220 (channel 44) or 5745 (channel 149).
+ * If not present, channel 149 is used if allowed, otherwise channel 44
+ * will be selected. The value is in MHz (u16).
+ * @NL80211_NAN_BAND_CONF_RSSI_CLOSE: RSSI close threshold used for NAN state
+ * transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
+ * Device Role and State Transition" of Wi-Fi Aware (TM) Specification
+ * v4.0. If not specified, default device value is used. The value should
+ * be greater than -60 dBm (s8).
+ * @NL80211_NAN_BAND_CONF_RSSI_MIDDLE: RSSI middle threshold used for NAN state
+ * transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
+ * Device Role and State Transition" of Wi-Fi Aware (TM) Specification
+ * v4.0. If not present, default device value is used. The value should be
+ * greater than -75 dBm and less than %NL80211_NAN_BAND_CONF_RSSI_CLOSE
+ * (s8).
+ * @NL80211_NAN_BAND_CONF_WAKE_DW: Committed DW information (values 0-5).
+ * Value 0 means that the device will not wake up during the
+ * discovery window. Values 1-5 mean that the device will wake up
+ * during each 2^(n - 1) discovery window, where n is the value of
+ * this attribute. Setting this attribute to 0 is not allowed on
+ * 2.4 GHz band (u8). This is an optional parameter (default is 1).
+ * @NL80211_NAN_BAND_CONF_DISABLE_SCAN: Optional flag attribute to disable
+ * scanning (for cluster merge) on the band. If set, the device will not
+ * scan on this band anymore. Disabling scanning on 2.4 GHz band is not
+ * allowed.
+ * @NUM_NL80211_NAN_BAND_CONF_ATTR: Internal.
+ * @NL80211_NAN_BAND_CONF_ATTR_MAX: Highest NAN band configuration attribute.
+ *
+ * These attributes are used to configure NAN band-specific parameters. Note,
+ * that both RSSI attributes should be configured (or both left unset).
+ */
+enum nl80211_nan_band_conf_attributes {
+ __NL80211_NAN_BAND_CONF_INVALID,
+ NL80211_NAN_BAND_CONF_BAND,
+ NL80211_NAN_BAND_CONF_FREQ,
+ NL80211_NAN_BAND_CONF_RSSI_CLOSE,
+ NL80211_NAN_BAND_CONF_RSSI_MIDDLE,
+ NL80211_NAN_BAND_CONF_WAKE_DW,
+ NL80211_NAN_BAND_CONF_DISABLE_SCAN,
+
+ /* keep last */
+ NUM_NL80211_NAN_BAND_CONF_ATTR,
+ NL80211_NAN_BAND_CONF_ATTR_MAX = NUM_NL80211_NAN_BAND_CONF_ATTR - 1,
+};
+
+/**
+ * enum nl80211_nan_conf_attributes - NAN configuration attributes
+ * @__NL80211_NAN_CONF_INVALID: Invalid attribute, used for validation.
+ * @NL80211_NAN_CONF_CLUSTER_ID: ID for the NAN cluster. This is a MAC
+ * address that can take values from 50-6F-9A-01-00-00 to
+ * 50-6F-9A-01-FF-FF. This attribute is optional. If not present,
+ * a random Cluster ID will be chosen.
+ * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
+ * published in the beacons. This is an optional byte array.
+ * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
+ * be published in the beacons. This is an optional byte array.
+ * @NL80211_NAN_CONF_BAND_CONFIGS: This is a nested array attribute,
+ * containing multiple entries for each supported band. Each band
+ * configuration consists of &enum nl80211_nan_band_conf_attributes.
+ * @NL80211_NAN_CONF_SCAN_PERIOD: Scan period in seconds. If not configured,
+ * device default is used. Zero value will disable scanning.
+ * This is u16 (optional).
+ * @NL80211_NAN_CONF_SCAN_DWELL_TIME: Scan dwell time in TUs per channel.
+ * Only non-zero values are valid. If not configured the device default
+ * value is used. This is u16 (optional)
+ * @NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL: Discovery beacon interval
+ * in TUs. Valid range is 50-200 TUs. If not configured the device default
+ * value is used. This is u8 (optional)
+ * @NL80211_NAN_CONF_NOTIFY_DW: If set, the driver will notify userspace about
+ * the upcoming discovery window with
+ * %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION.
+ * This is a flag attribute.
+ * @NUM_NL80211_NAN_CONF_ATTR: Internal.
+ * @NL80211_NAN_CONF_ATTR_MAX: Highest NAN configuration attribute.
+ *
+ * These attributes are used to configure NAN-specific parameters.
+ */
+enum nl80211_nan_conf_attributes {
+ __NL80211_NAN_CONF_INVALID,
+ NL80211_NAN_CONF_CLUSTER_ID,
+ NL80211_NAN_CONF_EXTRA_ATTRS,
+ NL80211_NAN_CONF_VENDOR_ELEMS,
+ NL80211_NAN_CONF_BAND_CONFIGS,
+ NL80211_NAN_CONF_SCAN_PERIOD,
+ NL80211_NAN_CONF_SCAN_DWELL_TIME,
+ NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL,
+ NL80211_NAN_CONF_NOTIFY_DW,
+
+ /* keep last */
+ NUM_NL80211_NAN_CONF_ATTR,
+ NL80211_NAN_CONF_ATTR_MAX = NUM_NL80211_NAN_CONF_ATTR - 1,
+};
+
/**
* enum nl80211_external_auth_action - Action to perform with external
* authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
@@ -8187,4 +8383,54 @@ enum nl80211_s1g_short_beacon_attrs {
__NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1
};
+/**
+ * enum nl80211_nan_capabilities - NAN (Neighbor Aware Networking)
+ * capabilities.
+ *
+ * @__NL80211_NAN_CAPABILITIES_INVALID: Invalid.
+ * @NL80211_NAN_CAPA_CONFIGURABLE_SYNC: Flag attribute indicating that
+ * the device supports configurable synchronization. If set, the device
+ * should be able to handle %NL80211_ATTR_NAN_CONFIG
+ * attribute in the %NL80211_CMD_START_NAN (and change) command.
+ * @NL80211_NAN_CAPA_USERSPACE_DE: Flag attribute indicating that
+ * NAN Discovery Engine (DE) is not offloaded and the driver assumes
+ * user space DE implementation. When set, %NL80211_CMD_ADD_NAN_FUNCTION,
+ * %NL80211_CMD_DEL_NAN_FUNCTION and %NL80211_CMD_NAN_MATCH commands
+ * should not be used. In addition, the device/driver should support
+ * sending discovery window (DW) notifications using
+ * %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION and handling transmission and
+ * reception of NAN SDF frames on NAN device interface during DW windows.
+ * (%NL80211_CMD_FRAME is used to transmit SDFs)
+ * @NL80211_NAN_CAPA_OP_MODE: u8 attribute indicating the supported operation
+ * modes as defined in Wi-Fi Aware (TM) specification Table 81 (Operation
+ * Mode field format).
+ * @NL80211_NAN_CAPA_NUM_ANTENNAS: u8 attribute indicating the number of
+ * TX and RX antennas supported by the device. Lower nibble indicates
+ * the number of TX antennas and upper nibble indicates the number of RX
+ * antennas. Value 0 indicates the information is not available.
+ * See table 79 of Wi-Fi Aware (TM) specification (Number of
+ * Antennas field).
+ * @NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME: u16 attribute indicating the
+ * maximum time in microseconds that the device requires to switch
+ * channels.
+ * @NL80211_NAN_CAPA_CAPABILITIES: u8 attribute containing the
+ * capabilities of the device as defined in Wi-Fi Aware (TM)
+ * specification Table 79 (Capabilities field).
+ * @__NL80211_NAN_CAPABILITIES_LAST: Internal
+ * @NL80211_NAN_CAPABILITIES_MAX: Highest NAN capability attribute.
+ */
+enum nl80211_nan_capabilities {
+ __NL80211_NAN_CAPABILITIES_INVALID,
+
+ NL80211_NAN_CAPA_CONFIGURABLE_SYNC,
+ NL80211_NAN_CAPA_USERSPACE_DE,
+ NL80211_NAN_CAPA_OP_MODE,
+ NL80211_NAN_CAPA_NUM_ANTENNAS,
+ NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME,
+ NL80211_NAN_CAPA_CAPABILITIES,
+ /* keep last */
+ __NL80211_NAN_CAPABILITIES_LAST,
+ NL80211_NAN_CAPABILITIES_MAX = __NL80211_NAN_CAPABILITIES_LAST - 1,
+};
+
#endif /* __LINUX_NL80211_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/nsfs.h b/lib/libc/include/any-linux-any/linux/nsfs.h
index 4c2a921d32..71f8fa87fd 100644
--- a/lib/libc/include/any-linux-any/linux/nsfs.h
+++ b/lib/libc/include/any-linux-any/linux/nsfs.h
@@ -16,8 +16,6 @@
#define NS_GET_NSTYPE _IO(NSIO, 0x3)
/* Get owner UID (in the caller's user namespace) for a user namespace */
#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
-/* Get the id for a mount namespace */
-#define NS_GET_MNTNS_ID _IOR(NSIO, 0x5, __u64)
/* Translate pid from target pid namespace into the caller's pid namespace. */
#define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int)
/* Return thread-group leader id of pid in the callers pid namespace. */
@@ -42,6 +40,10 @@ struct mnt_ns_info {
/* Get previous namespace. */
#define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
+/* Retrieve namespace identifiers. */
+#define NS_GET_MNTNS_ID _IOR(NSIO, 5, __u64)
+#define NS_GET_ID _IOR(NSIO, 13, __u64)
+
enum init_ns_ino {
IPC_NS_INIT_INO = 0xEFFFFFFFU,
UTS_NS_INIT_INO = 0xEFFFFFFEU,
@@ -53,4 +55,68 @@ enum init_ns_ino {
MNT_NS_INIT_INO = 0xEFFFFFF8U,
};
+struct nsfs_file_handle {
+ __u64 ns_id;
+ __u32 ns_type;
+ __u32 ns_inum;
+};
+
+#define NSFS_FILE_HANDLE_SIZE_VER0 16 /* sizeof first published struct */
+#define NSFS_FILE_HANDLE_SIZE_LATEST sizeof(struct nsfs_file_handle) /* sizeof latest published struct */
+
+enum init_ns_id {
+ IPC_NS_INIT_ID = 1ULL,
+ UTS_NS_INIT_ID = 2ULL,
+ USER_NS_INIT_ID = 3ULL,
+ PID_NS_INIT_ID = 4ULL,
+ CGROUP_NS_INIT_ID = 5ULL,
+ TIME_NS_INIT_ID = 6ULL,
+ NET_NS_INIT_ID = 7ULL,
+ MNT_NS_INIT_ID = 8ULL,
+};
+
+enum ns_type {
+ TIME_NS = (1ULL << 7), /* CLONE_NEWTIME */
+ MNT_NS = (1ULL << 17), /* CLONE_NEWNS */
+ CGROUP_NS = (1ULL << 25), /* CLONE_NEWCGROUP */
+ UTS_NS = (1ULL << 26), /* CLONE_NEWUTS */
+ IPC_NS = (1ULL << 27), /* CLONE_NEWIPC */
+ USER_NS = (1ULL << 28), /* CLONE_NEWUSER */
+ PID_NS = (1ULL << 29), /* CLONE_NEWPID */
+ NET_NS = (1ULL << 30), /* CLONE_NEWNET */
+};
+
+/**
+ * struct ns_id_req - namespace ID request structure
+ * @size: size of this structure
+ * @spare: reserved for future use
+ * @filter: filter mask
+ * @ns_id: last namespace id
+ * @user_ns_id: owning user namespace ID
+ *
+ * Structure for passing namespace ID and miscellaneous parameters to
+ * statns(2) and listns(2).
+ *
+ * For statns(2) @param represents the request mask.
+ * For listns(2) @param represents the last listed mount id (or zero).
+ */
+struct ns_id_req {
+ __u32 size;
+ __u32 spare;
+ __u64 ns_id;
+ struct /* listns */ {
+ __u32 ns_type;
+ __u32 spare2;
+ __u64 user_ns_id;
+ };
+};
+
+/*
+ * Special @user_ns_id value that can be passed to listns()
+ */
+#define LISTNS_CURRENT_USER 0xffffffffffffffff /* Caller's userns */
+
+/* List of all ns_id_req versions. */
+#define NS_ID_REQ_SIZE_VER0 32 /* sizeof first published struct */
+
#endif /* __LINUX_NSFS_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/ovpn.h b/lib/libc/include/any-linux-any/linux/ovpn.h
index 261b4d7cd8..5c3959fcb6 100644
--- a/lib/libc/include/any-linux-any/linux/ovpn.h
+++ b/lib/libc/include/any-linux-any/linux/ovpn.h
@@ -2,6 +2,7 @@
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/ovpn.yaml */
/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
#ifndef _LINUX_OVPN_H
#define _LINUX_OVPN_H
diff --git a/lib/libc/include/any-linux-any/linux/pci_regs.h b/lib/libc/include/any-linux-any/linux/pci_regs.h
index cd11a2a882..b5e6035e5e 100644
--- a/lib/libc/include/any-linux-any/linux/pci_regs.h
+++ b/lib/libc/include/any-linux-any/linux/pci_regs.h
@@ -207,6 +207,9 @@
/* Capability lists */
+#define PCI_CAP_ID_MASK 0x00ff /* Capability ID mask */
+#define PCI_CAP_LIST_NEXT_MASK 0xff00 /* Next Capability Pointer mask */
+
#define PCI_CAP_LIST_ID 0 /* Capability ID */
#define PCI_CAP_ID_PM 0x01 /* Power Management */
#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */
@@ -500,6 +503,7 @@
#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */
#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */
#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */
+#define PCI_EXP_DEVCAP_TEE 0x40000000 /* TEE I/O (TDISP) Support */
#define PCI_EXP_DEVCTL 0x08 /* Device Control */
#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */
#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */
@@ -751,6 +755,8 @@
#define PCI_EXT_CAP_ID_NPEM 0x29 /* Native PCIe Enclosure Management */
#define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */
#define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */
+#define PCI_EXT_CAP_ID_DEV3 0x2F /* Device 3 Capability/Control/Status */
+#define PCI_EXT_CAP_ID_IDE 0x30 /* Integrity and Data Encryption */
#define PCI_EXT_CAP_ID_PL_64GT 0x31 /* Physical Layer 64.0 GT/s */
#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_64GT
@@ -776,6 +782,12 @@
#define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */
#define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */
#define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */
+#define PCI_ERR_UNC_POISON_BLK 0x04000000 /* Poisoned TLP Egress Blocked */
+#define PCI_ERR_UNC_DMWR_BLK 0x08000000 /* DMWr Request Egress Blocked */
+#define PCI_ERR_UNC_IDE_CHECK 0x10000000 /* IDE Check Failed */
+#define PCI_ERR_UNC_MISR_IDE 0x20000000 /* Misrouted IDE TLP */
+#define PCI_ERR_UNC_PCRC_CHECK 0x40000000 /* PCRC Check Failed */
+#define PCI_ERR_UNC_XLAT_BLK 0x80000000 /* TLP Translation Egress Blocked */
#define PCI_ERR_UNCOR_MASK 0x08 /* Uncorrectable Error Mask */
/* Same bits as above */
#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */
@@ -798,6 +810,7 @@
#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */
#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */
#define PCI_ERR_CAP_PREFIX_LOG_PRESENT 0x00000800 /* TLP Prefix Log Present */
+#define PCI_ERR_CAP_COMP_TIME_LOG 0x00001000 /* Completion Timeout Prefix/Header Log Capable */
#define PCI_ERR_CAP_TLP_LOG_FLIT 0x00040000 /* TLP was logged in Flit Mode */
#define PCI_ERR_CAP_TLP_LOG_SIZE 0x00f80000 /* Logged TLP Size (only in Flit mode) */
#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */
@@ -1234,9 +1247,95 @@
/* Deprecated old name, replaced with PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE */
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE
+/* Device 3 Extended Capability */
+#define PCI_DEV3_CAP 0x04 /* Device 3 Capabilities Register */
+#define PCI_DEV3_CTL 0x08 /* Device 3 Control Register */
+#define PCI_DEV3_STA 0x0c /* Device 3 Status Register */
+#define PCI_DEV3_STA_SEGMENT 0x8 /* Segment Captured (end-to-end flit-mode detected) */
+
/* Compute Express Link (CXL r3.1, sec 8.1.5) */
#define PCI_DVSEC_CXL_PORT 3
#define PCI_DVSEC_CXL_PORT_CTL 0x0c
#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
+/* Integrity and Data Encryption Extended Capability */
+#define PCI_IDE_CAP 0x04
+#define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */
+#define PCI_IDE_CAP_SELECTIVE 0x2 /* Selective IDE Streams Supported */
+#define PCI_IDE_CAP_FLOWTHROUGH 0x4 /* Flow-Through IDE Stream Supported */
+#define PCI_IDE_CAP_PARTIAL_HEADER_ENC 0x8 /* Partial Header Encryption Supported */
+#define PCI_IDE_CAP_AGGREGATION 0x10 /* Aggregation Supported */
+#define PCI_IDE_CAP_PCRC 0x20 /* PCRC Supported */
+#define PCI_IDE_CAP_IDE_KM 0x40 /* IDE_KM Protocol Supported */
+#define PCI_IDE_CAP_SEL_CFG 0x80 /* Selective IDE for Config Request Support */
+#define PCI_IDE_CAP_ALG __GENMASK(12, 8) /* Supported Algorithms */
+#define PCI_IDE_CAP_ALG_AES_GCM_256 0 /* AES-GCM 256 key size, 96b MAC */
+#define PCI_IDE_CAP_LINK_TC_NUM __GENMASK(15, 13) /* Link IDE TCs */
+#define PCI_IDE_CAP_SEL_NUM __GENMASK(23, 16) /* Supported Selective IDE Streams */
+#define PCI_IDE_CAP_TEE_LIMITED 0x1000000 /* TEE-Limited Stream Supported */
+#define PCI_IDE_CTL 0x08
+#define PCI_IDE_CTL_FLOWTHROUGH_IDE 0x4 /* Flow-Through IDE Stream Enabled */
+
+#define PCI_IDE_LINK_STREAM_0 0xc /* First Link Stream Register Block */
+#define PCI_IDE_LINK_BLOCK_SIZE 8
+/* Link IDE Stream block, up to PCI_IDE_CAP_LINK_TC_NUM */
+#define PCI_IDE_LINK_CTL_0 0x00 /* First Link Control Register Offset in block */
+#define PCI_IDE_LINK_CTL_EN 0x1 /* Link IDE Stream Enable */
+#define PCI_IDE_LINK_CTL_TX_AGGR_NPR __GENMASK(3, 2) /* Tx Aggregation Mode NPR */
+#define PCI_IDE_LINK_CTL_TX_AGGR_PR __GENMASK(5, 4) /* Tx Aggregation Mode PR */
+#define PCI_IDE_LINK_CTL_TX_AGGR_CPL __GENMASK(7, 6) /* Tx Aggregation Mode CPL */
+#define PCI_IDE_LINK_CTL_PCRC_EN 0x100 /* PCRC Enable */
+#define PCI_IDE_LINK_CTL_PART_ENC __GENMASK(13, 10) /* Partial Header Encryption Mode */
+#define PCI_IDE_LINK_CTL_ALG __GENMASK(18, 14) /* Selection from PCI_IDE_CAP_ALG */
+#define PCI_IDE_LINK_CTL_TC __GENMASK(21, 19) /* Traffic Class */
+#define PCI_IDE_LINK_CTL_ID __GENMASK(31, 24) /* Stream ID */
+#define PCI_IDE_LINK_STS_0 0x4 /* First Link Status Register Offset in block */
+#define PCI_IDE_LINK_STS_STATE __GENMASK(3, 0) /* Link IDE Stream State */
+#define PCI_IDE_LINK_STS_IDE_FAIL 0x80000000 /* IDE fail message received */
+
+/* Selective IDE Stream block, up to PCI_IDE_CAP_SELECTIVE_STREAMS_NUM */
+/* Selective IDE Stream Capability Register */
+#define PCI_IDE_SEL_CAP 0x00
+#define PCI_IDE_SEL_CAP_ASSOC_NUM __GENMASK(3, 0)
+/* Selective IDE Stream Control Register */
+#define PCI_IDE_SEL_CTL 0x04
+#define PCI_IDE_SEL_CTL_EN 0x1 /* Selective IDE Stream Enable */
+#define PCI_IDE_SEL_CTL_TX_AGGR_NPR __GENMASK(3, 2) /* Tx Aggregation Mode NPR */
+#define PCI_IDE_SEL_CTL_TX_AGGR_PR __GENMASK(5, 4) /* Tx Aggregation Mode PR */
+#define PCI_IDE_SEL_CTL_TX_AGGR_CPL __GENMASK(7, 6) /* Tx Aggregation Mode CPL */
+#define PCI_IDE_SEL_CTL_PCRC_EN 0x100 /* PCRC Enable */
+#define PCI_IDE_SEL_CTL_CFG_EN 0x200 /* Selective IDE for Configuration Requests */
+#define PCI_IDE_SEL_CTL_PART_ENC __GENMASK(13, 10) /* Partial Header Encryption Mode */
+#define PCI_IDE_SEL_CTL_ALG __GENMASK(18, 14) /* Selection from PCI_IDE_CAP_ALG */
+#define PCI_IDE_SEL_CTL_TC __GENMASK(21, 19) /* Traffic Class */
+#define PCI_IDE_SEL_CTL_DEFAULT 0x400000 /* Default Stream */
+#define PCI_IDE_SEL_CTL_TEE_LIMITED 0x800000 /* TEE-Limited Stream */
+#define PCI_IDE_SEL_CTL_ID __GENMASK(31, 24) /* Stream ID */
+#define PCI_IDE_SEL_CTL_ID_MAX 255
+/* Selective IDE Stream Status Register */
+#define PCI_IDE_SEL_STS 0x08
+#define PCI_IDE_SEL_STS_STATE __GENMASK(3, 0) /* Selective IDE Stream State */
+#define PCI_IDE_SEL_STS_STATE_INSECURE 0
+#define PCI_IDE_SEL_STS_STATE_SECURE 2
+#define PCI_IDE_SEL_STS_IDE_FAIL 0x80000000 /* IDE fail message received */
+/* IDE RID Association Register 1 */
+#define PCI_IDE_SEL_RID_1 0x0c
+#define PCI_IDE_SEL_RID_1_LIMIT __GENMASK(23, 8)
+/* IDE RID Association Register 2 */
+#define PCI_IDE_SEL_RID_2 0x10
+#define PCI_IDE_SEL_RID_2_VALID 0x1
+#define PCI_IDE_SEL_RID_2_BASE __GENMASK(23, 8)
+#define PCI_IDE_SEL_RID_2_SEG __GENMASK(31, 24)
+/* Selective IDE Address Association Register Block, up to PCI_IDE_SEL_CAP_ASSOC_NUM */
+#define PCI_IDE_SEL_ADDR_BLOCK_SIZE 12
+#define PCI_IDE_SEL_ADDR_1(x) (20 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
+#define PCI_IDE_SEL_ADDR_1_VALID 0x1
+#define PCI_IDE_SEL_ADDR_1_BASE_LOW __GENMASK(19, 8)
+#define PCI_IDE_SEL_ADDR_1_LIMIT_LOW __GENMASK(31, 20)
+/* IDE Address Association Register 2 is "Memory Limit Upper" */
+#define PCI_IDE_SEL_ADDR_2(x) (24 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
+/* IDE Address Association Register 3 is "Memory Base Upper" */
+#define PCI_IDE_SEL_ADDR_3(x) (28 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
+#define PCI_IDE_SEL_BLOCK_SIZE(nr_assoc) (20 + PCI_IDE_SEL_ADDR_BLOCK_SIZE * (nr_assoc))
+
#endif /* LINUX_PCI_REGS_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/perf_event.h b/lib/libc/include/any-linux-any/linux/perf_event.h
index c148f90cae..8459dd89d7 100644
--- a/lib/libc/include/any-linux-any/linux/perf_event.h
+++ b/lib/libc/include/any-linux-any/linux/perf_event.h
@@ -2,7 +2,7 @@
/*
* Performance events:
*
- * Copyright (C) 2008-2009, Thomas Gleixner
+ * Copyright (C) 2008-2009, Linutronix GmbH, Thomas Gleixner
* Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar
* Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra
*
@@ -382,6 +382,7 @@ enum perf_event_read_format {
#define PERF_ATTR_SIZE_VER6 120 /* Add: aux_sample_size */
#define PERF_ATTR_SIZE_VER7 128 /* Add: sig_data */
#define PERF_ATTR_SIZE_VER8 136 /* Add: config3 */
+#define PERF_ATTR_SIZE_VER9 144 /* add: config4 */
/*
* 'struct perf_event_attr' contains various attributes that define
@@ -463,7 +464,9 @@ struct perf_event_attr {
inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
remove_on_exec : 1, /* event is removed from task on exec */
sigtrap : 1, /* send synchronous SIGTRAP on event */
- __reserved_1 : 26;
+ defer_callchain: 1, /* request PERF_RECORD_CALLCHAIN_DEFERRED records */
+ defer_output : 1, /* output PERF_RECORD_CALLCHAIN_DEFERRED records */
+ __reserved_1 : 24;
union {
__u32 wakeup_events; /* wake up every n events */
@@ -543,6 +546,7 @@ struct perf_event_attr {
__u64 sig_data;
__u64 config3; /* extension of config2 */
+ __u64 config4; /* extension of config3 */
};
/*
@@ -1239,6 +1243,22 @@ enum perf_event_type {
*/
PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
+ /*
+ * This user callchain capture was deferred until shortly before
+ * returning to user space. Previous samples would have kernel
+ * callchains only and they need to be stitched with this to make full
+ * callchains.
+ *
+ * struct {
+ * struct perf_event_header header;
+ * u64 cookie;
+ * u64 nr;
+ * u64 ips[nr];
+ * struct sample_id sample_id;
+ * };
+ */
+ PERF_RECORD_CALLCHAIN_DEFERRED = 22,
+
PERF_RECORD_MAX, /* non-ABI */
};
@@ -1269,6 +1289,7 @@ enum perf_callchain_context {
PERF_CONTEXT_HV = (__u64)-32,
PERF_CONTEXT_KERNEL = (__u64)-128,
PERF_CONTEXT_USER = (__u64)-512,
+ PERF_CONTEXT_USER_DEFERRED = (__u64)-640,
PERF_CONTEXT_GUEST = (__u64)-2048,
PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176,
diff --git a/lib/libc/include/any-linux-any/linux/pidfd.h b/lib/libc/include/any-linux-any/linux/pidfd.h
index fb5f32a696..b6b447e819 100644
--- a/lib/libc/include/any-linux-any/linux/pidfd.h
+++ b/lib/libc/include/any-linux-any/linux/pidfd.h
@@ -22,8 +22,12 @@
#define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */
#define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */
#define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */
+#define PIDFD_INFO_SUPPORTED_MASK (1UL << 5) /* Want/got supported mask flags */
+#define PIDFD_INFO_COREDUMP_SIGNAL (1UL << 6) /* Always returned if PIDFD_INFO_COREDUMP is requested. */
#define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */
+#define PIDFD_INFO_SIZE_VER1 72 /* sizeof second published struct */
+#define PIDFD_INFO_SIZE_VER2 80 /* sizeof third published struct */
/*
* Values for @coredump_mask in pidfd_info.
@@ -87,8 +91,11 @@ struct pidfd_info {
__u32 fsuid;
__u32 fsgid;
__s32 exit_code;
- __u32 coredump_mask;
- __u32 __spare1;
+ struct /* coredump info */ {
+ __u32 coredump_mask;
+ __u32 coredump_signal;
+ };
+ __u64 supported_mask; /* Mask flags that this kernel supports */
};
#define PIDFS_IOCTL_MAGIC 0xFF
diff --git a/lib/libc/include/any-linux-any/linux/pr.h b/lib/libc/include/any-linux-any/linux/pr.h
index c52481a33e..f44b2dda54 100644
--- a/lib/libc/include/any-linux-any/linux/pr.h
+++ b/lib/libc/include/any-linux-any/linux/pr.h
@@ -56,6 +56,18 @@ struct pr_clear {
__u32 __pad;
};
+struct pr_read_keys {
+ __u32 generation;
+ __u32 num_keys;
+ __u64 keys_ptr;
+};
+
+struct pr_read_reservation {
+ __u64 key;
+ __u32 generation;
+ __u32 type;
+};
+
#define PR_FL_IGNORE_KEY (1 << 0) /* ignore existing key */
#define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration)
@@ -64,5 +76,9 @@ struct pr_clear {
#define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt)
#define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt)
#define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear)
+#define IOC_PR_READ_KEYS _IOWR('p', 206, struct pr_read_keys)
+#define IOC_PR_READ_RESERVATION _IOR('p', 207, struct pr_read_reservation)
+
+#define PR_KEYS_MAX (1u << 16)
#endif /* _PR_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/prctl.h b/lib/libc/include/any-linux-any/linux/prctl.h
index c5ffc68b8c..00b7b5fe56 100644
--- a/lib/libc/include/any-linux-any/linux/prctl.h
+++ b/lib/libc/include/any-linux-any/linux/prctl.h
@@ -177,7 +177,17 @@ struct prctl_mm_map {
#define PR_GET_TID_ADDRESS 40
+/*
+ * Flags for PR_SET_THP_DISABLE are only applicable when disabling. Bit 0
+ * is reserved, so PR_GET_THP_DISABLE can return "1 | flags", to effectively
+ * return "1" when no flags were specified for PR_SET_THP_DISABLE.
+ */
#define PR_SET_THP_DISABLE 41
+/*
+ * Don't disable THPs when explicitly advised (e.g., MADV_HUGEPAGE /
+ * VM_HUGEPAGE, MADV_COLLAPSE).
+ */
+# define PR_THP_DISABLE_EXCEPT_ADVISED (1 << 1)
#define PR_GET_THP_DISABLE 42
/*
diff --git a/lib/libc/include/any-linux-any/linux/psp-sev.h b/lib/libc/include/any-linux-any/linux/psp-sev.h
index ce45a7f9bf..ba30f4cd48 100644
--- a/lib/libc/include/any-linux-any/linux/psp-sev.h
+++ b/lib/libc/include/any-linux-any/linux/psp-sev.h
@@ -47,32 +47,32 @@ typedef enum {
* with possible values from the specification.
*/
SEV_RET_NO_FW_CALL = -1,
- SEV_RET_SUCCESS = 0,
- SEV_RET_INVALID_PLATFORM_STATE,
- SEV_RET_INVALID_GUEST_STATE,
- SEV_RET_INAVLID_CONFIG,
+ SEV_RET_SUCCESS = 0,
+ SEV_RET_INVALID_PLATFORM_STATE = 0x0001,
+ SEV_RET_INVALID_GUEST_STATE = 0x0002,
+ SEV_RET_INAVLID_CONFIG = 0x0003,
SEV_RET_INVALID_CONFIG = SEV_RET_INAVLID_CONFIG,
- SEV_RET_INVALID_LEN,
- SEV_RET_ALREADY_OWNED,
- SEV_RET_INVALID_CERTIFICATE,
- SEV_RET_POLICY_FAILURE,
- SEV_RET_INACTIVE,
- SEV_RET_INVALID_ADDRESS,
- SEV_RET_BAD_SIGNATURE,
- SEV_RET_BAD_MEASUREMENT,
- SEV_RET_ASID_OWNED,
- SEV_RET_INVALID_ASID,
- SEV_RET_WBINVD_REQUIRED,
- SEV_RET_DFFLUSH_REQUIRED,
- SEV_RET_INVALID_GUEST,
- SEV_RET_INVALID_COMMAND,
- SEV_RET_ACTIVE,
- SEV_RET_HWSEV_RET_PLATFORM,
- SEV_RET_HWSEV_RET_UNSAFE,
- SEV_RET_UNSUPPORTED,
- SEV_RET_INVALID_PARAM,
- SEV_RET_RESOURCE_LIMIT,
- SEV_RET_SECURE_DATA_INVALID,
+ SEV_RET_INVALID_LEN = 0x0004,
+ SEV_RET_ALREADY_OWNED = 0x0005,
+ SEV_RET_INVALID_CERTIFICATE = 0x0006,
+ SEV_RET_POLICY_FAILURE = 0x0007,
+ SEV_RET_INACTIVE = 0x0008,
+ SEV_RET_INVALID_ADDRESS = 0x0009,
+ SEV_RET_BAD_SIGNATURE = 0x000A,
+ SEV_RET_BAD_MEASUREMENT = 0x000B,
+ SEV_RET_ASID_OWNED = 0x000C,
+ SEV_RET_INVALID_ASID = 0x000D,
+ SEV_RET_WBINVD_REQUIRED = 0x000E,
+ SEV_RET_DFFLUSH_REQUIRED = 0x000F,
+ SEV_RET_INVALID_GUEST = 0x0010,
+ SEV_RET_INVALID_COMMAND = 0x0011,
+ SEV_RET_ACTIVE = 0x0012,
+ SEV_RET_HWSEV_RET_PLATFORM = 0x0013,
+ SEV_RET_HWSEV_RET_UNSAFE = 0x0014,
+ SEV_RET_UNSUPPORTED = 0x0015,
+ SEV_RET_INVALID_PARAM = 0x0016,
+ SEV_RET_RESOURCE_LIMIT = 0x0017,
+ SEV_RET_SECURE_DATA_INVALID = 0x0018,
SEV_RET_INVALID_PAGE_SIZE = 0x0019,
SEV_RET_INVALID_PAGE_STATE = 0x001A,
SEV_RET_INVALID_MDATA_ENTRY = 0x001B,
@@ -87,6 +87,22 @@ typedef enum {
SEV_RET_RESTORE_REQUIRED = 0x0025,
SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026,
SEV_RET_INVALID_KEY = 0x0027,
+ SEV_RET_SHUTDOWN_INCOMPLETE = 0x0028,
+ SEV_RET_INCORRECT_BUFFER_LENGTH = 0x0030,
+ SEV_RET_EXPAND_BUFFER_LENGTH_REQUEST = 0x0031,
+ SEV_RET_SPDM_REQUEST = 0x0032,
+ SEV_RET_SPDM_ERROR = 0x0033,
+ SEV_RET_SEV_STATUS_ERR_IN_DEV_CONN = 0x0035,
+ SEV_RET_SEV_STATUS_INVALID_DEV_CTX = 0x0036,
+ SEV_RET_SEV_STATUS_INVALID_TDI_CTX = 0x0037,
+ SEV_RET_SEV_STATUS_INVALID_TDI = 0x0038,
+ SEV_RET_SEV_STATUS_RECLAIM_REQUIRED = 0x0039,
+ SEV_RET_IN_USE = 0x003A,
+ SEV_RET_SEV_STATUS_INVALID_DEV_STATE = 0x003B,
+ SEV_RET_SEV_STATUS_INVALID_TDI_STATE = 0x003C,
+ SEV_RET_SEV_STATUS_DEV_CERT_CHANGED = 0x003D,
+ SEV_RET_SEV_STATUS_RESYNC_REQ = 0x003E,
+ SEV_RET_SEV_STATUS_RESPONSE_TOO_LARGE = 0x003F,
SEV_RET_MAX,
} sev_ret_code;
@@ -185,6 +201,10 @@ struct sev_user_data_get_id2 {
* @mask_chip_id: whether chip id is present in attestation reports or not
* @mask_chip_key: whether attestation reports are signed or not
* @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded
+ * @feature_info: whether SNP_FEATURE_INFO command is available
+ * @rapl_dis: whether RAPL is disabled
+ * @ciphertext_hiding_cap: whether platform has ciphertext hiding capability
+ * @ciphertext_hiding_en: whether ciphertext hiding is enabled
* @rsvd1: reserved
* @guest_count: the number of guest currently managed by the firmware
* @current_tcb_version: current TCB version
@@ -200,7 +220,11 @@ struct sev_user_data_snp_status {
__u32 mask_chip_id:1; /* Out */
__u32 mask_chip_key:1; /* Out */
__u32 vlek_en:1; /* Out */
- __u32 rsvd1:29;
+ __u32 feature_info:1; /* Out */
+ __u32 rapl_dis:1; /* Out */
+ __u32 ciphertext_hiding_cap:1; /* Out */
+ __u32 ciphertext_hiding_en:1; /* Out */
+ __u32 rsvd1:25;
__u32 guest_count; /* Out */
__u64 current_tcb_version; /* Out */
__u64 reported_tcb_version; /* Out */
diff --git a/lib/libc/include/any-linux-any/linux/psp-sfs.h b/lib/libc/include/any-linux-any/linux/psp-sfs.h
new file mode 100644
index 0000000000..effaa14b67
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/psp-sfs.h
@@ -0,0 +1,87 @@
+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
+/*
+ * Userspace interface for AMD Seamless Firmware Servicing (SFS)
+ *
+ * Copyright (C) 2025 Advanced Micro Devices, Inc.
+ *
+ * Author: Ashish Kalra
+ */
+
+#ifndef __PSP_SFS_USER_H__
+#define __PSP_SFS_USER_H__
+
+#include
+
+/**
+ * SFS: AMD Seamless Firmware Support (SFS) interface
+ */
+
+#define PAYLOAD_NAME_SIZE 64
+#define TEE_EXT_CMD_BUFFER_SIZE 4096
+
+/**
+ * struct sfs_user_get_fw_versions - get current level of base firmware (output).
+ * @blob: current level of base firmware for ASP and patch levels (input/output).
+ * @sfs_status: 32-bit SFS status value (output).
+ * @sfs_extended_status: 32-bit SFS extended status value (output).
+ */
+struct sfs_user_get_fw_versions {
+ __u8 blob[TEE_EXT_CMD_BUFFER_SIZE];
+ __u32 sfs_status;
+ __u32 sfs_extended_status;
+} __attribute__((packed));
+
+/**
+ * struct sfs_user_update_package - update SFS package (input).
+ * @payload_name: name of SFS package to load, verify and execute (input).
+ * @sfs_status: 32-bit SFS status value (output).
+ * @sfs_extended_status: 32-bit SFS extended status value (output).
+ */
+struct sfs_user_update_package {
+ char payload_name[PAYLOAD_NAME_SIZE];
+ __u32 sfs_status;
+ __u32 sfs_extended_status;
+} __attribute__((packed));
+
+/**
+ * Seamless Firmware Support (SFS) IOC
+ *
+ * possible return codes for all SFS IOCTLs:
+ * 0: success
+ * -EINVAL: invalid input
+ * -E2BIG: excess data passed
+ * -EFAULT: failed to copy to/from userspace
+ * -EBUSY: mailbox in recovery or in use
+ * -ENODEV: driver not bound with PSP device
+ * -EACCES: request isn't authorized
+ * -EINVAL: invalid parameter
+ * -ETIMEDOUT: request timed out
+ * -EAGAIN: invalid request for state machine
+ * -ENOENT: not implemented
+ * -ENFILE: overflow
+ * -EPERM: invalid signature
+ * -EIO: PSP I/O error
+ */
+#define SFS_IOC_TYPE 'S'
+
+/**
+ * SFSIOCFWVERS - returns blob containing FW versions
+ * ASP provides the current level of Base Firmware for the ASP
+ * and the other microprocessors as well as current patch
+ * level(s).
+ */
+#define SFSIOCFWVERS _IOWR(SFS_IOC_TYPE, 0x1, struct sfs_user_get_fw_versions)
+
+/**
+ * SFSIOCUPDATEPKG - updates package/payload
+ * ASP loads, verifies and executes the SFS package.
+ * By default, the SFS package/payload is loaded from
+ * /lib/firmware/amd, but alternative firmware loading
+ * path can be specified using kernel parameter
+ * firmware_class.path or the firmware loading path
+ * can be customized using sysfs file:
+ * /sys/module/firmware_class/parameters/path.
+ */
+#define SFSIOCUPDATEPKG _IOWR(SFS_IOC_TYPE, 0x2, struct sfs_user_update_package)
+
+#endif /* __PSP_SFS_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/psp.h b/lib/libc/include/any-linux-any/linux/psp.h
new file mode 100644
index 0000000000..edfee02161
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/psp.h
@@ -0,0 +1,85 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/* Documentation/netlink/specs/psp.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
+
+#ifndef _LINUX_PSP_H
+#define _LINUX_PSP_H
+
+#define PSP_FAMILY_NAME "psp"
+#define PSP_FAMILY_VERSION 1
+
+enum psp_version {
+ PSP_VERSION_HDR0_AES_GCM_128,
+ PSP_VERSION_HDR0_AES_GCM_256,
+ PSP_VERSION_HDR0_AES_GMAC_128,
+ PSP_VERSION_HDR0_AES_GMAC_256,
+};
+
+enum {
+ PSP_A_DEV_ID = 1,
+ PSP_A_DEV_IFINDEX,
+ PSP_A_DEV_PSP_VERSIONS_CAP,
+ PSP_A_DEV_PSP_VERSIONS_ENA,
+
+ __PSP_A_DEV_MAX,
+ PSP_A_DEV_MAX = (__PSP_A_DEV_MAX - 1)
+};
+
+enum {
+ PSP_A_ASSOC_DEV_ID = 1,
+ PSP_A_ASSOC_VERSION,
+ PSP_A_ASSOC_RX_KEY,
+ PSP_A_ASSOC_TX_KEY,
+ PSP_A_ASSOC_SOCK_FD,
+
+ __PSP_A_ASSOC_MAX,
+ PSP_A_ASSOC_MAX = (__PSP_A_ASSOC_MAX - 1)
+};
+
+enum {
+ PSP_A_KEYS_KEY = 1,
+ PSP_A_KEYS_SPI,
+
+ __PSP_A_KEYS_MAX,
+ PSP_A_KEYS_MAX = (__PSP_A_KEYS_MAX - 1)
+};
+
+enum {
+ PSP_A_STATS_DEV_ID = 1,
+ PSP_A_STATS_KEY_ROTATIONS,
+ PSP_A_STATS_STALE_EVENTS,
+ PSP_A_STATS_RX_PACKETS,
+ PSP_A_STATS_RX_BYTES,
+ PSP_A_STATS_RX_AUTH_FAIL,
+ PSP_A_STATS_RX_ERROR,
+ PSP_A_STATS_RX_BAD,
+ PSP_A_STATS_TX_PACKETS,
+ PSP_A_STATS_TX_BYTES,
+ PSP_A_STATS_TX_ERROR,
+
+ __PSP_A_STATS_MAX,
+ PSP_A_STATS_MAX = (__PSP_A_STATS_MAX - 1)
+};
+
+enum {
+ PSP_CMD_DEV_GET = 1,
+ PSP_CMD_DEV_ADD_NTF,
+ PSP_CMD_DEV_DEL_NTF,
+ PSP_CMD_DEV_SET,
+ PSP_CMD_DEV_CHANGE_NTF,
+ PSP_CMD_KEY_ROTATE,
+ PSP_CMD_KEY_ROTATE_NTF,
+ PSP_CMD_RX_ASSOC,
+ PSP_CMD_TX_ASSOC,
+ PSP_CMD_GET_STATS,
+
+ __PSP_CMD_MAX,
+ PSP_CMD_MAX = (__PSP_CMD_MAX - 1)
+};
+
+#define PSP_MCGRP_MGMT "mgmt"
+#define PSP_MCGRP_USE "use"
+
+#endif /* _LINUX_PSP_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/ptp_clock.h b/lib/libc/include/any-linux-any/linux/ptp_clock.h
index f1325f8d62..c30e0bbca9 100644
--- a/lib/libc/include/any-linux-any/linux/ptp_clock.h
+++ b/lib/libc/include/any-linux-any/linux/ptp_clock.h
@@ -248,6 +248,10 @@ struct ptp_pin_desc {
_IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended)
#define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19)
#define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int)
+#define PTP_SYS_OFFSET_PRECISE_CYCLES \
+ _IOWR(PTP_CLK_MAGIC, 21, struct ptp_sys_offset_precise)
+#define PTP_SYS_OFFSET_EXTENDED_CYCLES \
+ _IOWR(PTP_CLK_MAGIC, 22, struct ptp_sys_offset_extended)
struct ptp_extts_event {
struct ptp_clock_time t; /* Time event occurred. */
diff --git a/lib/libc/include/any-linux-any/linux/raid/md_p.h b/lib/libc/include/any-linux-any/linux/raid/md_p.h
index b07f8e0115..10e3a335c9 100644
--- a/lib/libc/include/any-linux-any/linux/raid/md_p.h
+++ b/lib/libc/include/any-linux-any/linux/raid/md_p.h
@@ -291,7 +291,8 @@ struct mdp_superblock_1 {
__le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */
__le32 sb_csum; /* checksum up to devs[max_dev] */
__le32 max_dev; /* size of devs[] array to consider */
- __u8 pad3[64-32]; /* set to 0 when writing */
+ __le32 logical_block_size; /* same as q->limits->logical_block_size */
+ __u8 pad3[64-36]; /* set to 0 when writing */
/* device state information. Indexed by dev_number.
* 2 bytes per device
diff --git a/lib/libc/include/any-linux-any/linux/rkisp1-config.h b/lib/libc/include/any-linux-any/linux/rkisp1-config.h
index 2eb9ca60c7..de50a52521 100644
--- a/lib/libc/include/any-linux-any/linux/rkisp1-config.h
+++ b/lib/libc/include/any-linux-any/linux/rkisp1-config.h
@@ -9,6 +9,8 @@
#include
+#include
+
/* Defect Pixel Cluster Detection */
#define RKISP1_CIF_ISP_MODULE_DPCC (1U << 0)
/* Black Level Subtraction */
@@ -1158,79 +1160,26 @@ enum rkisp1_ext_params_block_type {
RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,
};
-#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)
-#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)
+/* For backward compatibility */
+#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE V4L2_ISP_PARAMS_FL_BLOCK_DISABLE
+#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
/* A bitmask of parameters blocks supported on the current hardware. */
#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS (V4L2_CID_USER_RKISP1_BASE + 0x01)
/**
- * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block
- * header
+ * rkisp1_ext_params_block_header - RkISP1 extensible parameters block header
*
* This structure represents the common part of all the ISP configuration
- * blocks. Each parameters block shall embed an instance of this structure type
- * as its first member, followed by the block-specific configuration data. The
- * driver inspects this common header to discern the block type and its size and
- * properly handle the block content by casting it to the correct block-specific
- * type.
+ * blocks and is identical to :c:type:`v4l2_isp_params_block_header`.
*
- * The @type field is one of the values enumerated by
+ * The type field is one of the values enumerated by
* :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be
- * interpreted by the driver. The @size field specifies the size of the
- * parameters block and is used by the driver for validation purposes.
+ * interpreted by the driver.
*
- * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
- *
- * When userspace wants to configure and enable an ISP block it shall fully
- * populate the block configuration and set the
- * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE bit in the @flags field.
- *
- * When userspace simply wants to disable an ISP block the
- * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bit should be set in @flags field. The
- * driver ignores the rest of the block configuration structure in this case.
- *
- * If a new configuration of an ISP block has to be applied userspace shall
- * fully populate the ISP block configuration and omit setting the
- * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits
- * in the @flags field.
- *
- * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and
- * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed
- * and not accepted by the driver.
- *
- * Userspace is responsible for correctly populating the parameters block header
- * fields (@type, @flags and @size) and the block-specific parameters.
- *
- * For example:
- *
- * .. code-block:: c
- *
- * void populate_bls(struct rkisp1_ext_params_block_header *block) {
- * struct rkisp1_ext_params_bls_config *bls =
- * (struct rkisp1_ext_params_bls_config *)block;
- *
- * bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;
- * bls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;
- * bls->header.size = sizeof(*bls);
- *
- * bls->config.enable_auto = 0;
- * bls->config.fixed_val.r = blackLevelRed_;
- * bls->config.fixed_val.gr = blackLevelGreenR_;
- * bls->config.fixed_val.gb = blackLevelGreenB_;
- * bls->config.fixed_val.b = blackLevelBlue_;
- * }
- *
- * @type: The parameters block type, see
- * :c:type:`rkisp1_ext_params_block_type`
- * @flags: A bitmask of block flags
- * @size: Size (in bytes) of the parameters block, including this header
+ * The flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
*/
-struct rkisp1_ext_params_block_header {
- __u16 type;
- __u16 flags;
- __u32 size;
-};
+#define rkisp1_ext_params_block_header v4l2_isp_params_block_header
/**
* struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config
@@ -1588,27 +1537,14 @@ struct rkisp1_ext_params_wdr_config {
* @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters
*/
enum rksip1_ext_param_buffer_version {
- RKISP1_EXT_PARAM_BUFFER_V1 = 1,
+ RKISP1_EXT_PARAM_BUFFER_V1 = V4L2_ISP_PARAMS_VERSION_V1,
};
/**
* struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration
*
- * This struct contains the configuration parameters of the RkISP1 ISP
- * algorithms, serialized by userspace into a data buffer. Each configuration
- * parameter block is represented by a block-specific structure which contains a
- * :c:type:`rkisp1_ext_params_block_header` entry as first member. Userspace
- * populates the @data buffer with configuration parameters for the blocks that
- * it intends to configure. As a consequence, the data buffer effective size
- * changes according to the number of ISP blocks that userspace intends to
- * configure and is set by userspace in the @data_size field.
- *
- * The parameters buffer is versioned by the @version field to allow modifying
- * and extending its definition. Userspace shall populate the @version field to
- * inform the driver about the version it intends to use. The driver will parse
- * and handle the @data buffer according to the data layout specific to the
- * indicated version and return an error if the desired version is not
- * supported.
+ * This is the driver-specific implementation of
+ * :c:type:`v4l2_isp_params_buffer`.
*
* Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported.
* When a new format version will be added, a mechanism for userspace to query
@@ -1624,11 +1560,6 @@ enum rksip1_ext_param_buffer_version {
* the maximum value represents the blocks supported by the kernel driver,
* independently of the device instance.
*
- * For each ISP block that userspace wants to configure, a block-specific
- * structure is appended to the @data buffer, one after the other without gaps
- * in between nor overlaps. Userspace shall populate the @data_size field with
- * the effective size, in bytes, of the @data buffer.
- *
* The expected memory layout of the parameters buffer is::
*
* +-------------------- struct rkisp1_ext_params_cfg -------------------+
@@ -1678,4 +1609,5 @@ struct rkisp1_ext_params_cfg {
__u8 data[RKISP1_EXT_PARAMS_MAX_SIZE];
};
+
#endif /* _RKISP1_CONFIG_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/rseq.h b/lib/libc/include/any-linux-any/linux/rseq.h
index 753d9fb689..098884d5e4 100644
--- a/lib/libc/include/any-linux-any/linux/rseq.h
+++ b/lib/libc/include/any-linux-any/linux/rseq.h
@@ -114,20 +114,13 @@ struct rseq {
/*
* Restartable sequences flags field.
*
- * This field should only be updated by the thread which
- * registered this data structure. Read by the kernel.
- * Mainly used for single-stepping through rseq critical sections
- * with debuggers.
- *
- * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
- * Inhibit instruction sequence block restart on preemption
- * for this thread.
- * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
- * Inhibit instruction sequence block restart on signal
- * delivery for this thread.
- * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
- * Inhibit instruction sequence block restart on migration for
- * this thread.
+ * This field was initially intended to allow event masking for
+ * single-stepping through rseq critical sections with debuggers.
+ * The kernel does not support this anymore and the relevant bits
+ * are checked for being always false:
+ * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
+ * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
+ * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
*/
__u32 flags;
diff --git a/lib/libc/include/any-linux-any/linux/stddef.h b/lib/libc/include/any-linux-any/linux/stddef.h
index 3617ec45ae..3c5b007adb 100644
--- a/lib/libc/include/any-linux-any/linux/stddef.h
+++ b/lib/libc/include/any-linux-any/linux/stddef.h
@@ -3,7 +3,6 @@
#define _LINUX_STDDEF_H
-
#ifndef __always_inline
#define __always_inline __inline__
#endif
diff --git a/lib/libc/include/any-linux-any/linux/tcp.h b/lib/libc/include/any-linux-any/linux/tcp.h
index 91e31b3251..d31f30cee2 100644
--- a/lib/libc/include/any-linux-any/linux/tcp.h
+++ b/lib/libc/include/any-linux-any/linux/tcp.h
@@ -316,6 +316,15 @@ struct tcp_info {
* in milliseconds, including any
* unfinished recovery.
*/
+ __u32 tcpi_received_ce; /* # of CE marks received */
+ __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
+ __u32 tcpi_delivered_e0_bytes;
+ __u32 tcpi_delivered_ce_bytes;
+ __u32 tcpi_received_e1_bytes;
+ __u32 tcpi_received_e0_bytes;
+ __u32 tcpi_received_ce_bytes;
+ __u16 tcpi_accecn_fail_mode;
+ __u16 tcpi_accecn_opt_seen;
};
/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
diff --git a/lib/libc/include/any-linux-any/linux/tee.h b/lib/libc/include/any-linux-any/linux/tee.h
index 43e7f3b250..4f8d7d97a7 100644
--- a/lib/libc/include/any-linux-any/linux/tee.h
+++ b/lib/libc/include/any-linux-any/linux/tee.h
@@ -42,14 +42,16 @@
#define TEE_IOC_MAGIC 0xa4
#define TEE_IOC_BASE 0
-#define TEE_MAX_ARG_SIZE 1024
+#define TEE_MAX_ARG_SIZE 4096
#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */
#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */
+#define TEE_GEN_CAP_OBJREF (1 << 4)/* Supports generic object reference */
-#define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */
+#define TEE_MEMREF_NULL ((__u64)(-1)) /* NULL MemRef Buffer */
+#define TEE_OBJREF_NULL ((__u64)(-1)) /* NULL ObjRef Object */
/*
* TEE Implementation ID
@@ -57,6 +59,7 @@
#define TEE_IMPL_ID_OPTEE 1
#define TEE_IMPL_ID_AMDTEE 2
#define TEE_IMPL_ID_TSTEE 3
+#define TEE_IMPL_ID_QTEE 4
/*
* OP-TEE specific capabilities
@@ -151,6 +154,20 @@ struct tee_ioctl_buf_data {
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */
+/*
+ * These defines userspace buffer parameters.
+ */
+#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT 8
+#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT 9
+#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INOUT 10 /* input and output */
+
+/*
+ * These defines object reference parameters.
+ */
+#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INPUT 11
+#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_OUTPUT 12
+#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INOUT 13
+
/*
* Mask for the type part of the attribute, leaves room for more types
*/
@@ -186,14 +203,18 @@ struct tee_ioctl_buf_data {
/**
* struct tee_ioctl_param - parameter
* @attr: attributes
- * @a: if a memref, offset into the shared memory object, else a value parameter
- * @b: if a memref, size of the buffer, else a value parameter
+ * @a: if a memref, offset into the shared memory object,
+ * else if a ubuf, address of the user buffer,
+ * else if an objref, object identifier, else a value parameter
+ * @b: if a memref or ubuf, size of the buffer,
+ * else if objref, flags for the object, else a value parameter
* @c: if a memref, shared memory identifier, else a value parameter
*
- * @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref or value is used in
- * the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value and
- * TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref. TEE_PARAM_ATTR_TYPE_NONE
- * indicates that none of the members are used.
+ * @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref, ubuf, or value is
+ * used in the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value,
+ * TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref, TEE_PARAM_ATTR_TYPE_UBUF_*
+ * indicates ubuf, and TEE_PARAM_ATTR_TYPE_OBJREF_* indicates objref.
+ * TEE_PARAM_ATTR_TYPE_NONE indicates that none of the members are used.
*
* Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an
* identifier representing the shared memory object. A memref can reference
@@ -228,8 +249,9 @@ struct tee_ioctl_param {
* @cancel_id: [in] Cancellation id, a unique value to identify this request
* @session: [out] Session id
* @ret: [out] return value
- * @ret_origin [out] origin of the return value
- * @num_params [in] number of parameters following this struct
+ * @ret_origin: [out] origin of the return value
+ * @num_params: [in] number of &struct tee_ioctl_param entries in @params
+ * @params: array of ioctl parameters
*/
struct tee_ioctl_open_session_arg {
__u8 uuid[TEE_IOCTL_UUID_LEN];
@@ -255,14 +277,14 @@ struct tee_ioctl_open_session_arg {
struct tee_ioctl_buf_data)
/**
- * struct tee_ioctl_invoke_func_arg - Invokes a function in a Trusted
- * Application
+ * struct tee_ioctl_invoke_arg - Invokes a function in a Trusted Application
* @func: [in] Trusted Application function, specific to the TA
* @session: [in] Session id
* @cancel_id: [in] Cancellation id, a unique value to identify this request
* @ret: [out] return value
- * @ret_origin [out] origin of the return value
- * @num_params [in] number of parameters following this struct
+ * @ret_origin: [out] origin of the return value
+ * @num_params: [in] number of parameters following this struct
+ * @params: array of ioctl parameters
*/
struct tee_ioctl_invoke_arg {
__u32 func;
@@ -317,7 +339,8 @@ struct tee_ioctl_close_session_arg {
/**
* struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function
* @func: [in] supplicant function
- * @num_params [in/out] number of parameters following this struct
+ * @num_params: [in/out] number of &struct tee_ioctl_param entries in @params
+ * @params: array of ioctl parameters
*
* @num_params is the number of params that tee-supplicant has room to
* receive when input, @num_params is the number of actual params
@@ -342,7 +365,8 @@ struct tee_iocl_supp_recv_arg {
/**
* struct tee_iocl_supp_send_arg - Send a response to a received request
* @ret: [out] return value
- * @num_params [in] number of parameters following this struct
+ * @num_params: [in] number of &struct tee_ioctl_param entries in @params
+ * @params: array of ioctl parameters
*/
struct tee_iocl_supp_send_arg {
__u32 ret;
@@ -378,6 +402,37 @@ struct tee_ioctl_shm_register_data {
__s32 id;
};
+/**
+ * struct tee_ioctl_shm_register_fd_data - Shared memory registering argument
+ * @fd: [in] File descriptor identifying dmabuf reference
+ * @size: [out] Size of referenced memory
+ * @flags: [in] Flags to/from allocation.
+ * @id: [out] Identifier of the shared memory
+ *
+ * The flags field should currently be zero as input. Updated by the call
+ * with actual flags as defined by TEE_IOCTL_SHM_* above.
+ * This structure is used as argument for TEE_IOC_SHM_REGISTER_FD below.
+ */
+struct tee_ioctl_shm_register_fd_data {
+ __s64 fd;
+ __u64 size;
+ __u32 flags;
+ __s32 id;
+};
+
+/**
+ * TEE_IOC_SHM_REGISTER_FD - register a shared memory from a file descriptor
+ *
+ * Returns a file descriptor on success or < 0 on failure
+ *
+ * The returned file descriptor refers to the shared memory object in the
+ * kernel. The supplied file deccriptor can be closed if it's not needed
+ * for other purposes. The shared memory is freed when the descriptor is
+ * closed.
+ */
+#define TEE_IOC_SHM_REGISTER_FD _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 8, \
+ struct tee_ioctl_shm_register_fd_data)
+
/**
* TEE_IOC_SHM_REGISTER - Register shared memory argument
*
@@ -401,4 +456,25 @@ struct tee_ioctl_shm_register_data {
* munmap(): unmaps previously shared memory
*/
+/**
+ * struct tee_ioctl_object_invoke_arg - Invokes an object in a
+ * Trusted Application
+ * @id: [in] Object id
+ * @op: [in] Object operation, specific to the object
+ * @ret: [out] return value
+ * @num_params: [in] number of parameters following this struct
+ * @params: array of ioctl parameters
+ */
+struct tee_ioctl_object_invoke_arg {
+ __u64 id;
+ __u32 op;
+ __u32 ret;
+ __u32 num_params;
+ /* num_params tells the actual number of element in params */
+ struct tee_ioctl_param params[];
+};
+
+#define TEE_IOC_OBJECT_INVOKE _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 10, \
+ struct tee_ioctl_buf_data)
+
#endif /*__TEE_H*/
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/tls.h b/lib/libc/include/any-linux-any/linux/tls.h
index 34431c8acd..0914102011 100644
--- a/lib/libc/include/any-linux-any/linux/tls.h
+++ b/lib/libc/include/any-linux-any/linux/tls.h
@@ -41,6 +41,7 @@
#define TLS_RX 2 /* Set receive parameters */
#define TLS_TX_ZEROCOPY_RO 3 /* TX zerocopy (only sendfile now) */
#define TLS_RX_EXPECT_NO_PAD 4 /* Attempt opportunistic zero-copy */
+#define TLS_TX_MAX_PAYLOAD_LEN 5 /* Maximum plaintext size */
/* Supported versions */
#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
@@ -194,6 +195,7 @@ enum {
TLS_INFO_RXCONF,
TLS_INFO_ZC_RO_TX,
TLS_INFO_RX_NO_PAD,
+ TLS_INFO_TX_MAX_PAYLOAD_LEN,
__TLS_INFO_MAX,
};
#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)
diff --git a/lib/libc/include/any-linux-any/linux/usb/cdc.h b/lib/libc/include/any-linux-any/linux/usb/cdc.h
index 9d896d4fd5..ef5a82e37d 100644
--- a/lib/libc/include/any-linux-any/linux/usb/cdc.h
+++ b/lib/libc/include/any-linux-any/linux/usb/cdc.h
@@ -104,8 +104,10 @@ struct usb_cdc_union_desc {
__u8 bDescriptorSubType;
__u8 bMasterInterface0;
- __u8 bSlaveInterface0;
- /* ... and there could be other slave interfaces */
+ union {
+ __u8 bSlaveInterface0;
+ __DECLARE_FLEX_ARRAY(__u8, bSlaveInterfaces);
+ };
} __attribute__ ((packed));
/* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */
@@ -115,8 +117,10 @@ struct usb_cdc_country_functional_desc {
__u8 bDescriptorSubType;
__u8 iCountryCodeRelDate;
- __le16 wCountyCode0;
- /* ... and there can be a lot of country codes */
+ union {
+ __le16 wCountryCode0;
+ __DECLARE_FLEX_ARRAY(__le16, wCountryCodes);
+ };
} __attribute__ ((packed));
/* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */
diff --git a/lib/libc/include/any-linux-any/linux/v4l2-controls.h b/lib/libc/include/any-linux-any/linux/v4l2-controls.h
index 03405ef3a6..4faebbcf3a 100644
--- a/lib/libc/include/any-linux-any/linux/v4l2-controls.h
+++ b/lib/libc/include/any-linux-any/linux/v4l2-controls.h
@@ -226,6 +226,12 @@ enum v4l2_colorfx {
*/
#define V4L2_CID_USER_RKISP1_BASE (V4L2_CID_USER_BASE + 0x1220)
+/*
+ * The base for the Arm Mali-C55 ISP driver controls.
+ * We reserve 16 controls for this driver
+ */
+#define V4L2_CID_USER_MALI_C55_BASE (V4L2_CID_USER_BASE + 0x1230)
+
/* MPEG-class control IDs */
/* The MPEG controls are applicable to all codec controls
* and the 'MPEG' part of the define is historical */
@@ -1189,7 +1195,7 @@ enum v4l2_flash_strobe_source {
#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
-#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
+#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
enum v4l2_jpeg_chroma_subsampling {
V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
@@ -1198,15 +1204,15 @@ enum v4l2_jpeg_chroma_subsampling {
V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
};
-#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
-#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
+#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
+#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
-#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
-#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
-#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
-#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
-#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
-#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
+#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
+#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
+#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
+#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
+#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
+#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
/* Image source controls */
@@ -1239,10 +1245,10 @@ enum v4l2_jpeg_chroma_subsampling {
#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900)
#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1)
-#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)
-#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)
-#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)
-#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)
+#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)
+#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)
+#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)
+#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)
enum v4l2_dv_tx_mode {
V4L2_DV_TX_MODE_DVI_D = 0,
V4L2_DV_TX_MODE_HDMI = 1,
@@ -1263,7 +1269,7 @@ enum v4l2_dv_it_content_type {
V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
};
-#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
+#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
@@ -1533,15 +1539,6 @@ struct v4l2_ctrl_h264_pred_weights {
struct v4l2_h264_weight_factors weight_factors[2];
};
-#define V4L2_H264_SLICE_TYPE_P 0
-#define V4L2_H264_SLICE_TYPE_B 1
-#define V4L2_H264_SLICE_TYPE_I 2
-#define V4L2_H264_SLICE_TYPE_SP 3
-#define V4L2_H264_SLICE_TYPE_SI 4
-
-#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01
-#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02
-
#define V4L2_H264_TOP_FIELD_REF 0x1
#define V4L2_H264_BOTTOM_FIELD_REF 0x2
#define V4L2_H264_FRAME_REF 0x3
@@ -1562,8 +1559,17 @@ struct v4l2_h264_reference {
* Maximum DPB size, as specified by section 'A.3.1 Level limits
* common to the Baseline, Main, and Extended profiles'.
*/
-#define V4L2_H264_NUM_DPB_ENTRIES 16
-#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
+#define V4L2_H264_NUM_DPB_ENTRIES 16
+#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
+
+#define V4L2_H264_SLICE_TYPE_P 0
+#define V4L2_H264_SLICE_TYPE_B 1
+#define V4L2_H264_SLICE_TYPE_I 2
+#define V4L2_H264_SLICE_TYPE_SP 3
+#define V4L2_H264_SLICE_TYPE_SI 4
+
+#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01
+#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02
#define V4L2_CID_STATELESS_H264_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 6)
/**
@@ -1703,7 +1709,6 @@ struct v4l2_ctrl_h264_decode_params {
__u32 flags;
};
-
/* Stateless FWHT control, used by the vicodec driver */
/* Current FWHT version */
@@ -2545,44 +2550,10 @@ struct v4l2_ctrl_hevc_scaling_matrix {
__u8 scaling_list_dc_coef_32x32[2];
};
-#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
-#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
-
-#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
-
-struct v4l2_ctrl_hdr10_cll_info {
- __u16 max_content_light_level;
- __u16 max_pic_average_light_level;
-};
-
-#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
-
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
-#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
-#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
-
-struct v4l2_ctrl_hdr10_mastering_display {
- __u16 display_primaries_x[3];
- __u16 display_primaries_y[3];
- __u16 white_point_x;
- __u16 white_point_y;
- __u32 max_display_mastering_luminance;
- __u32 min_display_mastering_luminance;
-};
-
/* Stateless VP9 controls */
#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
-#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
+#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
/**
* struct v4l2_vp9_loop_filter - VP9 loop filter parameters
@@ -3509,4 +3480,38 @@ struct v4l2_ctrl_av1_film_grain {
#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE
#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE
+#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
+#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
+
+#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
+
+struct v4l2_ctrl_hdr10_cll_info {
+ __u16 max_content_light_level;
+ __u16 max_pic_average_light_level;
+};
+
+#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
+
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
+#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
+#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
+
+struct v4l2_ctrl_hdr10_mastering_display {
+ __u16 display_primaries_x[3];
+ __u16 display_primaries_y[3];
+ __u16 white_point_x;
+ __u16 white_point_y;
+ __u32 max_display_mastering_luminance;
+ __u32 min_display_mastering_luminance;
+};
+
#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/v4l2-dv-timings.h b/lib/libc/include/any-linux-any/linux/v4l2-dv-timings.h
index f14587888d..3791c25e5a 100644
--- a/lib/libc/include/any-linux-any/linux/v4l2-dv-timings.h
+++ b/lib/libc/include/any-linux-any/linux/v4l2-dv-timings.h
@@ -2,7 +2,7 @@
/*
* V4L2 DV timings header.
*
- * Copyright (C) 2012-2016 Hans Verkuil
+ * Copyright (C) 2012-2016 Hans Verkuil
*/
#ifndef _V4L2_DV_TIMINGS_H
diff --git a/lib/libc/include/any-linux-any/linux/version.h b/lib/libc/include/any-linux-any/linux/version.h
index c5e8c73f06..4d81f6650c 100644
--- a/lib/libc/include/any-linux-any/linux/version.h
+++ b/lib/libc/include/any-linux-any/linux/version.h
@@ -1,5 +1,5 @@
-#define LINUX_VERSION_CODE 397568
+#define LINUX_VERSION_CODE 398080
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
#define LINUX_VERSION_MAJOR 6
-#define LINUX_VERSION_PATCHLEVEL 17
+#define LINUX_VERSION_PATCHLEVEL 19
#define LINUX_VERSION_SUBLEVEL 0
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/vfio.h b/lib/libc/include/any-linux-any/linux/vfio.h
index 817cd3bba6..2fe756d15c 100644
--- a/lib/libc/include/any-linux-any/linux/vfio.h
+++ b/lib/libc/include/any-linux-any/linux/vfio.h
@@ -14,6 +14,7 @@
#include
#include
+#include
#define VFIO_API_VERSION 0
@@ -1478,6 +1479,33 @@ struct vfio_device_feature_bus_master {
};
#define VFIO_DEVICE_FEATURE_BUS_MASTER 10
+/**
+ * Upon VFIO_DEVICE_FEATURE_GET create a dma_buf fd for the
+ * regions selected.
+ *
+ * open_flags are the typical flags passed to open(2), eg O_RDWR, O_CLOEXEC,
+ * etc. offset/length specify a slice of the region to create the dmabuf from.
+ * nr_ranges is the total number of (P2P DMA) ranges that comprise the dmabuf.
+ *
+ * flags should be 0.
+ *
+ * Return: The fd number on success, -1 and errno is set on failure.
+ */
+#define VFIO_DEVICE_FEATURE_DMA_BUF 11
+
+struct vfio_region_dma_range {
+ __u64 offset;
+ __u64 length;
+};
+
+struct vfio_device_feature_dma_buf {
+ __u32 region_index;
+ __u32 open_flags;
+ __u32 flags;
+ __u32 nr_ranges;
+ struct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges);
+};
+
/* -------- API for Type1 VFIO IOMMU -------- */
/**
diff --git a/lib/libc/include/any-linux-any/linux/videodev2.h b/lib/libc/include/any-linux-any/linux/videodev2.h
index afc6ef2e22..a9bb91a56c 100644
--- a/lib/libc/include/any-linux-any/linux/videodev2.h
+++ b/lib/libc/include/any-linux-any/linux/videodev2.h
@@ -51,7 +51,7 @@
*
* Author: Bill Dirks
* Justin Schoeman
- * Hans Verkuil
+ * Hans Verkuil
* et al.
*/
#ifndef __LINUX_VIDEODEV2_H
@@ -857,6 +857,10 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */
#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */
+/* Vendor specific - used for Arm Mali-C55 ISP */
+#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */
+#define V4L2_META_FMT_MALI_C55_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */
+
/* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
@@ -1542,8 +1546,8 @@ struct v4l2_bt_timings {
} __attribute__ ((packed));
/* Interlaced or progressive format */
-#define V4L2_DV_PROGRESSIVE 0
-#define V4L2_DV_INTERLACED 1
+#define V4L2_DV_PROGRESSIVE 0
+#define V4L2_DV_INTERLACED 1
/* Polarities. If bit is not set, it is assumed to be negative polarity */
#define V4L2_DV_VSYNC_POS_POL 0x00000001
@@ -2715,15 +2719,15 @@ struct v4l2_remove_buffers {
* Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
* You must be root to use these ioctls. Never use these in applications!
*/
-#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
-#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
+#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
+#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
-#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
-#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
-#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
-#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
-#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
+#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
+#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
+#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
+#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
+#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)
diff --git a/lib/libc/include/any-linux-any/linux/virtio_ids.h b/lib/libc/include/any-linux-any/linux/virtio_ids.h
index c3e777be20..56a254e955 100644
--- a/lib/libc/include/any-linux-any/linux/virtio_ids.h
+++ b/lib/libc/include/any-linux-any/linux/virtio_ids.h
@@ -68,6 +68,7 @@
#define VIRTIO_ID_AUDIO_POLICY 39 /* virtio audio policy */
#define VIRTIO_ID_BT 40 /* virtio bluetooth */
#define VIRTIO_ID_GPIO 41 /* virtio gpio */
+#define VIRTIO_ID_SPI 45 /* virtio spi */
/*
* Virtio Transitional IDs
diff --git a/lib/libc/include/any-linux-any/linux/virtio_net.h b/lib/libc/include/any-linux-any/linux/virtio_net.h
index d20bf32f8b..b9a134a3b8 100644
--- a/lib/libc/include/any-linux-any/linux/virtio_net.h
+++ b/lib/libc/include/any-linux-any/linux/virtio_net.h
@@ -193,7 +193,8 @@ struct virtio_net_hdr_v1 {
struct virtio_net_hdr_v1_hash {
struct virtio_net_hdr_v1 hdr;
- __le32 hash_value;
+ __le16 hash_value_lo;
+ __le16 hash_value_hi;
#define VIRTIO_NET_HASH_REPORT_NONE 0
#define VIRTIO_NET_HASH_REPORT_IPv4 1
#define VIRTIO_NET_HASH_REPORT_TCPv4 2
diff --git a/lib/libc/include/any-linux-any/linux/virtio_pci.h b/lib/libc/include/any-linux-any/linux/virtio_pci.h
index c94b33dd58..0ea45985e2 100644
--- a/lib/libc/include/any-linux-any/linux/virtio_pci.h
+++ b/lib/libc/include/any-linux-any/linux/virtio_pci.h
@@ -40,7 +40,7 @@
#define _LINUX_VIRTIO_PCI_H
#include
-#include
+#include
#ifndef VIRTIO_PCI_NO_LEGACY
diff --git a/lib/libc/include/any-linux-any/linux/virtio_spi.h b/lib/libc/include/any-linux-any/linux/virtio_spi.h
new file mode 100644
index 0000000000..878c47d147
--- /dev/null
+++ b/lib/libc/include/any-linux-any/linux/virtio_spi.h
@@ -0,0 +1,181 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Copyright (C) 2023 OpenSynergy GmbH
+ * Copyright (C) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+#ifndef _LINUX_VIRTIO_VIRTIO_SPI_H
+#define _LINUX_VIRTIO_VIRTIO_SPI_H
+
+#include
+#include
+#include
+#include
+
+/* Sample data on trailing clock edge */
+#define VIRTIO_SPI_CPHA _BITUL(0)
+/* Clock is high when IDLE */
+#define VIRTIO_SPI_CPOL _BITUL(1)
+/* Chip Select is active high */
+#define VIRTIO_SPI_CS_HIGH _BITUL(2)
+/* Transmit LSB first */
+#define VIRTIO_SPI_MODE_LSB_FIRST _BITUL(3)
+/* Loopback mode */
+#define VIRTIO_SPI_MODE_LOOP _BITUL(4)
+
+/**
+ * struct virtio_spi_config - All config fields are read-only for the
+ * Virtio SPI driver
+ * @cs_max_number: maximum number of chipselect the host SPI controller
+ * supports.
+ * @cs_change_supported: indicates if the host SPI controller supports to toggle
+ * chipselect after each transfer in one message:
+ * 0: unsupported, chipselect will be kept in active state throughout the
+ * message transaction;
+ * 1: supported.
+ * Note: Message here contains a sequence of SPI transfers.
+ * @tx_nbits_supported: indicates the supported number of bit for writing:
+ * bit 0: DUAL (2-bit transfer), 1 for supported
+ * bit 1: QUAD (4-bit transfer), 1 for supported
+ * bit 2: OCTAL (8-bit transfer), 1 for supported
+ * other bits are reserved as 0, 1-bit transfer is always supported.
+ * @rx_nbits_supported: indicates the supported number of bit for reading:
+ * bit 0: DUAL (2-bit transfer), 1 for supported
+ * bit 1: QUAD (4-bit transfer), 1 for supported
+ * bit 2: OCTAL (8-bit transfer), 1 for supported
+ * other bits are reserved as 0, 1-bit transfer is always supported.
+ * @bits_per_word_mask: mask indicating which values of bits_per_word are
+ * supported. If not set, no limitation for bits_per_word.
+ * @mode_func_supported: indicates the following features are supported or not:
+ * bit 0-1: CPHA feature
+ * 0b00: invalid, should support as least one CPHA setting
+ * 0b01: supports CPHA=0 only
+ * 0b10: supports CPHA=1 only
+ * 0b11: supports CPHA=0 and CPHA=1.
+ * bit 2-3: CPOL feature
+ * 0b00: invalid, should support as least one CPOL setting
+ * 0b01: supports CPOL=0 only
+ * 0b10: supports CPOL=1 only
+ * 0b11: supports CPOL=0 and CPOL=1.
+ * bit 4: chipselect active high feature, 0 for unsupported and 1 for
+ * supported, chipselect active low is supported by default.
+ * bit 5: LSB first feature, 0 for unsupported and 1 for supported,
+ * MSB first is supported by default.
+ * bit 6: loopback mode feature, 0 for unsupported and 1 for supported,
+ * normal mode is supported by default.
+ * @max_freq_hz: the maximum clock rate supported in Hz unit, 0 means no
+ * limitation for transfer speed.
+ * @max_word_delay_ns: the maximum word delay supported, in nanoseconds.
+ * A value of 0 indicates that word delay is unsupported.
+ * Each transfer may consist of a sequence of words.
+ * @max_cs_setup_ns: the maximum delay supported after chipselect is asserted,
+ * in ns unit, 0 means delay is not supported to introduce after chipselect is
+ * asserted.
+ * @max_cs_hold_ns: the maximum delay supported before chipselect is deasserted,
+ * in ns unit, 0 means delay is not supported to introduce before chipselect
+ * is deasserted.
+ * @max_cs_incative_ns: maximum delay supported after chipselect is deasserted,
+ * in ns unit, 0 means delay is not supported to introduce after chipselect is
+ * deasserted.
+ */
+struct virtio_spi_config {
+ __u8 cs_max_number;
+ __u8 cs_change_supported;
+#define VIRTIO_SPI_RX_TX_SUPPORT_DUAL _BITUL(0)
+#define VIRTIO_SPI_RX_TX_SUPPORT_QUAD _BITUL(1)
+#define VIRTIO_SPI_RX_TX_SUPPORT_OCTAL _BITUL(2)
+ __u8 tx_nbits_supported;
+ __u8 rx_nbits_supported;
+ __le32 bits_per_word_mask;
+#define VIRTIO_SPI_MF_SUPPORT_CPHA_0 _BITUL(0)
+#define VIRTIO_SPI_MF_SUPPORT_CPHA_1 _BITUL(1)
+#define VIRTIO_SPI_MF_SUPPORT_CPOL_0 _BITUL(2)
+#define VIRTIO_SPI_MF_SUPPORT_CPOL_1 _BITUL(3)
+#define VIRTIO_SPI_MF_SUPPORT_CS_HIGH _BITUL(4)
+#define VIRTIO_SPI_MF_SUPPORT_LSB_FIRST _BITUL(5)
+#define VIRTIO_SPI_MF_SUPPORT_LOOPBACK _BITUL(6)
+ __le32 mode_func_supported;
+ __le32 max_freq_hz;
+ __le32 max_word_delay_ns;
+ __le32 max_cs_setup_ns;
+ __le32 max_cs_hold_ns;
+ __le32 max_cs_inactive_ns;
+};
+
+/**
+ * struct spi_transfer_head - virtio SPI transfer descriptor
+ * @chip_select_id: chipselect index the SPI transfer used.
+ * @bits_per_word: the number of bits in each SPI transfer word.
+ * @cs_change: whether to deselect device after finishing this transfer
+ * before starting the next transfer, 0 means cs keep asserted and
+ * 1 means cs deasserted then asserted again.
+ * @tx_nbits: bus width for write transfer.
+ * 0,1: bus width is 1, also known as SINGLE
+ * 2 : bus width is 2, also known as DUAL
+ * 4 : bus width is 4, also known as QUAD
+ * 8 : bus width is 8, also known as OCTAL
+ * other values are invalid.
+ * @rx_nbits: bus width for read transfer.
+ * 0,1: bus width is 1, also known as SINGLE
+ * 2 : bus width is 2, also known as DUAL
+ * 4 : bus width is 4, also known as QUAD
+ * 8 : bus width is 8, also known as OCTAL
+ * other values are invalid.
+ * @reserved: for future use.
+ * @mode: SPI transfer mode.
+ * bit 0: CPHA, determines the timing (i.e. phase) of the data
+ * bits relative to the clock pulses.For CPHA=0, the
+ * "out" side changes the data on the trailing edge of the
+ * preceding clock cycle, while the "in" side captures the data
+ * on (or shortly after) the leading edge of the clock cycle.
+ * For CPHA=1, the "out" side changes the data on the leading
+ * edge of the current clock cycle, while the "in" side
+ * captures the data on (or shortly after) the trailing edge of
+ * the clock cycle.
+ * bit 1: CPOL, determines the polarity of the clock. CPOL=0 is a
+ * clock which idles at 0, and each cycle consists of a pulse
+ * of 1. CPOL=1 is a clock which idles at 1, and each cycle
+ * consists of a pulse of 0.
+ * bit 2: CS_HIGH, if 1, chip select active high, else active low.
+ * bit 3: LSB_FIRST, determines per-word bits-on-wire, if 0, MSB
+ * first, else LSB first.
+ * bit 4: LOOP, loopback mode.
+ * @freq: the transfer speed in Hz.
+ * @word_delay_ns: delay to be inserted between consecutive words of a
+ * transfer, in ns unit.
+ * @cs_setup_ns: delay to be introduced after CS is asserted, in ns
+ * unit.
+ * @cs_delay_hold_ns: delay to be introduced before CS is deasserted
+ * for each transfer, in ns unit.
+ * @cs_change_delay_inactive_ns: delay to be introduced after CS is
+ * deasserted and before next asserted, in ns unit.
+ */
+struct spi_transfer_head {
+ __u8 chip_select_id;
+ __u8 bits_per_word;
+ __u8 cs_change;
+ __u8 tx_nbits;
+ __u8 rx_nbits;
+ __u8 reserved[3];
+ __le32 mode;
+ __le32 freq;
+ __le32 word_delay_ns;
+ __le32 cs_setup_ns;
+ __le32 cs_delay_hold_ns;
+ __le32 cs_change_delay_inactive_ns;
+};
+
+/**
+ * struct spi_transfer_result - virtio SPI transfer result
+ * @result: Transfer result code.
+ * VIRTIO_SPI_TRANS_OK: Transfer successful.
+ * VIRTIO_SPI_PARAM_ERR: Parameter error.
+ * VIRTIO_SPI_TRANS_ERR: Transfer error.
+ */
+struct spi_transfer_result {
+#define VIRTIO_SPI_TRANS_OK 0
+#define VIRTIO_SPI_PARAM_ERR 1
+#define VIRTIO_SPI_TRANS_ERR 2
+ __u8 result;
+};
+
+#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_SPI_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/vmcore.h b/lib/libc/include/any-linux-any/linux/vmcore.h
index c054379faf..8806b3211b 100644
--- a/lib/libc/include/any-linux-any/linux/vmcore.h
+++ b/lib/libc/include/any-linux-any/linux/vmcore.h
@@ -15,4 +15,13 @@ struct vmcoredd_header {
__u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */
};
+enum hwerr_error_type {
+ HWERR_RECOV_CPU,
+ HWERR_RECOV_MEMORY,
+ HWERR_RECOV_PCI,
+ HWERR_RECOV_CXL,
+ HWERR_RECOV_OTHERS,
+ HWERR_RECOV_MAX,
+};
+
#endif /* _VMCORE_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/linux/wireguard.h b/lib/libc/include/any-linux-any/linux/wireguard.h
index 1a7c3ec481..679808267f 100644
--- a/lib/libc/include/any-linux-any/linux/wireguard.h
+++ b/lib/libc/include/any-linux-any/linux/wireguard.h
@@ -1,156 +1,31 @@
-/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
-/*
- * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved.
- *
- * Documentation
- * =============
- *
- * The below enums and macros are for interfacing with WireGuard, using generic
- * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two
- * methods: get and set. Note that while they share many common attributes,
- * these two functions actually accept a slightly different set of inputs and
- * outputs.
- *
- * WG_CMD_GET_DEVICE
- * -----------------
- *
- * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain
- * one but not both of:
- *
- * WGDEVICE_A_IFINDEX: NLA_U32
- * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- *
- * The kernel will then return several messages (NLM_F_MULTI) containing the
- * following tree of nested items:
- *
- * WGDEVICE_A_IFINDEX: NLA_U32
- * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- * WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- * WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- * WGDEVICE_A_LISTEN_PORT: NLA_U16
- * WGDEVICE_A_FWMARK: NLA_U32
- * WGDEVICE_A_PEERS: NLA_NESTED
- * 0: NLA_NESTED
- * WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- * WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- * WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6
- * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16
- * WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec
- * WGPEER_A_RX_BYTES: NLA_U64
- * WGPEER_A_TX_BYTES: NLA_U64
- * WGPEER_A_ALLOWEDIPS: NLA_NESTED
- * 0: NLA_NESTED
- * WGALLOWEDIP_A_FAMILY: NLA_U16
- * WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr
- * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
- * 0: NLA_NESTED
- * ...
- * 0: NLA_NESTED
- * ...
- * ...
- * WGPEER_A_PROTOCOL_VERSION: NLA_U32
- * 0: NLA_NESTED
- * ...
- * ...
- *
- * It is possible that all of the allowed IPs of a single peer will not
- * fit within a single netlink message. In that case, the same peer will
- * be written in the following message, except it will only contain
- * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several
- * times in a row for the same peer. It is then up to the receiver to
- * coalesce adjacent peers. Likewise, it is possible that all peers will
- * not fit within a single message. So, subsequent peers will be sent
- * in following messages, except those will only contain WGDEVICE_A_IFNAME
- * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these
- * messages to form the complete list of peers.
- *
- * Since this is an NLA_F_DUMP command, the final message will always be
- * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message
- * contains an integer error code. It is either zero or a negative error
- * code corresponding to the errno.
- *
- * WG_CMD_SET_DEVICE
- * -----------------
- *
- * May only be called via NLM_F_REQUEST. The command should contain the
- * following tree of nested items, containing one but not both of
- * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:
- *
- * WGDEVICE_A_IFINDEX: NLA_U32
- * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- * WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current
- * peers should be removed prior to adding the list below.
- * WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove
- * WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly
- * WGDEVICE_A_FWMARK: NLA_U32, 0 to disable
- * WGDEVICE_A_PEERS: NLA_NESTED
- * 0: NLA_NESTED
- * WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN
- * WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the
- * specified peer should not exist at the end of the
- * operation, rather than added/updated and/or
- * WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed
- * IPs of this peer should be removed prior to adding
- * the list below and/or WGPEER_F_UPDATE_ONLY if the
- * peer should only be set if it already exists.
- * WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove
- * WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6
- * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable
- * WGPEER_A_ALLOWEDIPS: NLA_NESTED
- * 0: NLA_NESTED
- * WGALLOWEDIP_A_FAMILY: NLA_U16
- * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr
- * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
- * WGALLOWEDIP_A_FLAGS: NLA_U32, WGALLOWEDIP_F_REMOVE_ME if
- * the specified IP should be removed;
- * otherwise, this IP will be added if
- * it is not already present.
- * 0: NLA_NESTED
- * ...
- * 0: NLA_NESTED
- * ...
- * ...
- * WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at
- * all by most users of this API, as the
- * most recent protocol will be used when
- * this is unset. Otherwise, must be set
- * to 1.
- * 0: NLA_NESTED
- * ...
- * ...
- *
- * It is possible that the amount of configuration data exceeds that of
- * the maximum message length accepted by the kernel. In that case, several
- * messages should be sent one after another, with each successive one
- * filling in information not contained in the prior. Note that if
- * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably
- * should not be specified in fragments that come after, so that the list
- * of peers is only cleared the first time but appended after. Likewise for
- * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message
- * of a peer, it likely should not be specified in subsequent fragments.
- *
- * If an error occurs, NLMSG_ERROR will reply containing an errno.
- */
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/* Documentation/netlink/specs/wireguard.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
-#ifndef _WG_UAPI_WIREGUARD_H
-#define _WG_UAPI_WIREGUARD_H
+#ifndef _LINUX_WIREGUARD_H
+#define _LINUX_WIREGUARD_H
-#define WG_GENL_NAME "wireguard"
-#define WG_GENL_VERSION 1
+#define WG_GENL_NAME "wireguard"
+#define WG_GENL_VERSION 1
-#define WG_KEY_LEN 32
-
-enum wg_cmd {
- WG_CMD_GET_DEVICE,
- WG_CMD_SET_DEVICE,
- __WG_CMD_MAX
-};
-#define WG_CMD_MAX (__WG_CMD_MAX - 1)
+#define WG_KEY_LEN 32
enum wgdevice_flag {
- WGDEVICE_F_REPLACE_PEERS = 1U << 0,
- __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS
+ WGDEVICE_F_REPLACE_PEERS = 1,
};
+
+enum wgpeer_flag {
+ WGPEER_F_REMOVE_ME = 1,
+ WGPEER_F_REPLACE_ALLOWEDIPS = 2,
+ WGPEER_F_UPDATE_ONLY = 4,
+};
+
+enum wgallowedip_flag {
+ WGALLOWEDIP_F_REMOVE_ME = 1,
+};
+
enum wgdevice_attribute {
WGDEVICE_A_UNSPEC,
WGDEVICE_A_IFINDEX,
@@ -161,17 +36,11 @@ enum wgdevice_attribute {
WGDEVICE_A_LISTEN_PORT,
WGDEVICE_A_FWMARK,
WGDEVICE_A_PEERS,
+
__WGDEVICE_A_LAST
};
#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)
-enum wgpeer_flag {
- WGPEER_F_REMOVE_ME = 1U << 0,
- WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1,
- WGPEER_F_UPDATE_ONLY = 1U << 2,
- __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS |
- WGPEER_F_UPDATE_ONLY
-};
enum wgpeer_attribute {
WGPEER_A_UNSPEC,
WGPEER_A_PUBLIC_KEY,
@@ -184,22 +53,28 @@ enum wgpeer_attribute {
WGPEER_A_TX_BYTES,
WGPEER_A_ALLOWEDIPS,
WGPEER_A_PROTOCOL_VERSION,
+
__WGPEER_A_LAST
};
#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)
-enum wgallowedip_flag {
- WGALLOWEDIP_F_REMOVE_ME = 1U << 0,
- __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME
-};
enum wgallowedip_attribute {
WGALLOWEDIP_A_UNSPEC,
WGALLOWEDIP_A_FAMILY,
WGALLOWEDIP_A_IPADDR,
WGALLOWEDIP_A_CIDR_MASK,
WGALLOWEDIP_A_FLAGS,
+
__WGALLOWEDIP_A_LAST
};
#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
-#endif /* _WG_UAPI_WIREGUARD_H */
\ No newline at end of file
+enum wg_cmd {
+ WG_CMD_GET_DEVICE,
+ WG_CMD_SET_DEVICE,
+
+ __WG_CMD_MAX
+};
+#define WG_CMD_MAX (__WG_CMD_MAX - 1)
+
+#endif /* _LINUX_WIREGUARD_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/misc/fastrpc.h b/lib/libc/include/any-linux-any/misc/fastrpc.h
index f2a35db7cc..6f59b5d126 100644
--- a/lib/libc/include/any-linux-any/misc/fastrpc.h
+++ b/lib/libc/include/any-linux-any/misc/fastrpc.h
@@ -134,7 +134,7 @@ struct fastrpc_mem_unmap {
};
struct fastrpc_ioctl_capability {
- __u32 domain;
+ __u32 unused; /* deprecated, ignored by the kernel */
__u32 attribute_id;
__u32 capability; /* dsp capability */
__u32 reserved[4];
diff --git a/lib/libc/include/any-linux-any/misc/uacce/hisi_qm.h b/lib/libc/include/any-linux-any/misc/uacce/hisi_qm.h
index 3f89cd1528..1b774e03ac 100644
--- a/lib/libc/include/any-linux-any/misc/uacce/hisi_qm.h
+++ b/lib/libc/include/any-linux-any/misc/uacce/hisi_qm.h
@@ -31,6 +31,7 @@ struct hisi_qp_info {
#define HISI_QM_API_VER_BASE "hisi_qm_v1"
#define HISI_QM_API_VER2_BASE "hisi_qm_v2"
#define HISI_QM_API_VER3_BASE "hisi_qm_v3"
+#define HISI_QM_API_VER5_BASE "hisi_qm_v5"
/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */
#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)
diff --git a/lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h b/lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h
index 0eb7bf77a1..087df33405 100644
--- a/lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h
+++ b/lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h
@@ -255,6 +255,7 @@ enum rdma_driver_id {
RDMA_DRIVER_SIW,
RDMA_DRIVER_ERDMA,
RDMA_DRIVER_MANA,
+ RDMA_DRIVER_IONIC,
};
enum ib_uverbs_gid_type {
diff --git a/lib/libc/include/any-linux-any/rdma/ib_user_sa.h b/lib/libc/include/any-linux-any/rdma/ib_user_sa.h
index 1017cb10f7..a2038c59f8 100644
--- a/lib/libc/include/any-linux-any/rdma/ib_user_sa.h
+++ b/lib/libc/include/any-linux-any/rdma/ib_user_sa.h
@@ -74,4 +74,18 @@ struct ib_user_path_rec {
__u8 preference;
};
+struct ib_user_service_rec {
+ __be64 id;
+ __u8 gid[16];
+ __be16 pkey;
+ __u8 reserved[2];
+ __be32 lease;
+ __u8 key[16];
+ __u8 name[64];
+ __u8 data_8[16];
+ __be16 data_16[8];
+ __be32 data_32[4];
+ __be64 data_64[2];
+};
+
#endif /* IB_USER_SA_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/rdma/ionic-abi.h b/lib/libc/include/any-linux-any/rdma/ionic-abi.h
new file mode 100644
index 0000000000..8e95282d89
--- /dev/null
+++ b/lib/libc/include/any-linux-any/rdma/ionic-abi.h
@@ -0,0 +1,115 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc */
+
+#ifndef IONIC_ABI_H
+#define IONIC_ABI_H
+
+#include
+
+#define IONIC_ABI_VERSION 1
+
+#define IONIC_EXPDB_64 1
+#define IONIC_EXPDB_128 2
+#define IONIC_EXPDB_256 4
+#define IONIC_EXPDB_512 8
+
+#define IONIC_EXPDB_SQ 1
+#define IONIC_EXPDB_RQ 2
+
+#define IONIC_CMB_ENABLE 1
+#define IONIC_CMB_REQUIRE 2
+#define IONIC_CMB_EXPDB 4
+#define IONIC_CMB_WC 8
+#define IONIC_CMB_UC 16
+
+struct ionic_ctx_req {
+ __u32 rsvd[2];
+};
+
+struct ionic_ctx_resp {
+ __u32 rsvd;
+ __u32 page_shift;
+
+ __aligned_u64 dbell_offset;
+
+ __u16 version;
+ __u8 qp_opcodes;
+ __u8 admin_opcodes;
+
+ __u8 sq_qtype;
+ __u8 rq_qtype;
+ __u8 cq_qtype;
+ __u8 admin_qtype;
+
+ __u8 max_stride;
+ __u8 max_spec;
+ __u8 udma_count;
+ __u8 expdb_mask;
+ __u8 expdb_qtypes;
+
+ __u8 rsvd2[3];
+};
+
+struct ionic_qdesc {
+ __aligned_u64 addr;
+ __u32 size;
+ __u16 mask;
+ __u8 depth_log2;
+ __u8 stride_log2;
+};
+
+struct ionic_ah_resp {
+ __u32 ahid;
+ __u32 pad;
+};
+
+struct ionic_cq_req {
+ struct ionic_qdesc cq[2];
+ __u8 udma_mask;
+ __u8 rsvd[7];
+};
+
+struct ionic_cq_resp {
+ __u32 cqid[2];
+ __u8 udma_mask;
+ __u8 rsvd[7];
+};
+
+struct ionic_qp_req {
+ struct ionic_qdesc sq;
+ struct ionic_qdesc rq;
+ __u8 sq_spec;
+ __u8 rq_spec;
+ __u8 sq_cmb;
+ __u8 rq_cmb;
+ __u8 udma_mask;
+ __u8 rsvd[3];
+};
+
+struct ionic_qp_resp {
+ __u32 qpid;
+ __u8 sq_cmb;
+ __u8 rq_cmb;
+ __u8 udma_idx;
+ __u8 rsvd[1];
+ __aligned_u64 sq_cmb_offset;
+ __aligned_u64 rq_cmb_offset;
+};
+
+struct ionic_srq_req {
+ struct ionic_qdesc rq;
+ __u8 rq_spec;
+ __u8 rq_cmb;
+ __u8 udma_mask;
+ __u8 rsvd[5];
+};
+
+struct ionic_srq_resp {
+ __u32 qpid;
+ __u8 rq_cmb;
+ __u8 udma_idx;
+ __u8 rsvd[2];
+ __aligned_u64 rq_cmb_offset;
+};
+
+#endif /* IONIC_ABI_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/rdma/irdma-abi.h b/lib/libc/include/any-linux-any/rdma/irdma-abi.h
index f4d8f0703e..4fed730222 100644
--- a/lib/libc/include/any-linux-any/rdma/irdma-abi.h
+++ b/lib/libc/include/any-linux-any/rdma/irdma-abi.h
@@ -20,11 +20,14 @@ enum irdma_memreg_type {
IRDMA_MEMREG_TYPE_MEM = 0,
IRDMA_MEMREG_TYPE_QP = 1,
IRDMA_MEMREG_TYPE_CQ = 2,
+ IRDMA_MEMREG_TYPE_SRQ = 3,
};
enum {
IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0,
IRDMA_ALLOC_UCTX_MIN_HW_WQ_SIZE = 1 << 1,
+ IRDMA_ALLOC_UCTX_MAX_HW_SRQ_QUANTA = 1 << 2,
+ IRDMA_SUPPORT_WQE_FORMAT_V2 = 1 << 3,
};
struct irdma_alloc_ucontext_req {
@@ -54,7 +57,8 @@ struct irdma_alloc_ucontext_resp {
__u8 rsvd2;
__aligned_u64 comp_mask;
__u16 min_hw_wq_size;
- __u8 rsvd3[6];
+ __u8 revd3[2];
+ __u32 max_hw_srq_quanta;
};
struct irdma_alloc_pd_resp {
@@ -71,6 +75,16 @@ struct irdma_create_cq_req {
__aligned_u64 user_shadow_area;
};
+struct irdma_create_srq_req {
+ __aligned_u64 user_srq_buf;
+ __aligned_u64 user_shadow_area;
+};
+
+struct irdma_create_srq_resp {
+ __u32 srq_id;
+ __u32 srq_size;
+};
+
struct irdma_create_qp_req {
__aligned_u64 user_wqe_bufs;
__aligned_u64 user_compl_ctx;
diff --git a/lib/libc/include/any-linux-any/rdma/rdma_user_cm.h b/lib/libc/include/any-linux-any/rdma/rdma_user_cm.h
index 3fbf696a34..2d3b7c4f2e 100644
--- a/lib/libc/include/any-linux-any/rdma/rdma_user_cm.h
+++ b/lib/libc/include/any-linux-any/rdma/rdma_user_cm.h
@@ -67,7 +67,9 @@ enum {
RDMA_USER_CM_CMD_QUERY,
RDMA_USER_CM_CMD_BIND,
RDMA_USER_CM_CMD_RESOLVE_ADDR,
- RDMA_USER_CM_CMD_JOIN_MCAST
+ RDMA_USER_CM_CMD_JOIN_MCAST,
+ RDMA_USER_CM_CMD_RESOLVE_IB_SERVICE,
+ RDMA_USER_CM_CMD_WRITE_CM_EVENT,
};
/* See IBTA Annex A11, servies ID bytes 4 & 5 */
@@ -147,7 +149,8 @@ struct rdma_ucm_resolve_route {
enum {
RDMA_USER_CM_QUERY_ADDR,
RDMA_USER_CM_QUERY_PATH,
- RDMA_USER_CM_QUERY_GID
+ RDMA_USER_CM_QUERY_GID,
+ RDMA_USER_CM_QUERY_IB_SERVICE
};
struct rdma_ucm_query {
@@ -187,6 +190,12 @@ struct rdma_ucm_query_path_resp {
struct ib_path_rec_data path_data[];
};
+struct rdma_ucm_query_ib_service_resp {
+ __u32 num_service_recs;
+ __u32 reserved;
+ struct ib_user_service_rec recs[];
+};
+
struct rdma_ucm_conn_param {
__u32 qp_num;
__u32 qkey;
@@ -297,6 +306,7 @@ struct rdma_ucm_event_resp {
union {
struct rdma_ucm_conn_param conn;
struct rdma_ucm_ud_param ud;
+ __u32 arg32[2];
} param;
__u32 reserved;
struct rdma_ucm_ece ece;
@@ -338,4 +348,34 @@ struct rdma_ucm_migrate_resp {
__u32 events_reported;
};
+enum {
+ RDMA_USER_CM_IB_SERVICE_FLAG_ID = 1 << 0,
+ RDMA_USER_CM_IB_SERVICE_FLAG_NAME = 1 << 1,
+};
+
+#define RDMA_USER_CM_IB_SERVICE_NAME_SIZE 64
+struct rdma_ucm_ib_service {
+ __aligned_u64 service_id;
+ __u8 service_name[RDMA_USER_CM_IB_SERVICE_NAME_SIZE];
+ __u32 flags;
+ __u32 reserved;
+};
+
+struct rdma_ucm_resolve_ib_service {
+ __u32 id;
+ __u32 reserved;
+ struct rdma_ucm_ib_service ibs;
+};
+
+struct rdma_ucm_write_cm_event {
+ __u32 id;
+ __u32 reserved;
+ __u32 event;
+ __u32 status;
+ union {
+ struct rdma_ucm_conn_param conn;
+ struct rdma_ucm_ud_param ud;
+ __u64 arg;
+ } param;
+};
#endif /* RDMA_USER_CM_H */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/regulator/regulator.h b/lib/libc/include/any-linux-any/regulator/regulator.h
index e92204bd59..12c357e626 100644
--- a/lib/libc/include/any-linux-any/regulator/regulator.h
+++ b/lib/libc/include/any-linux-any/regulator/regulator.h
@@ -8,7 +8,7 @@
#ifndef _REGULATOR_H
#define _REGULATOR_H
-#include
+#include
/*
* Regulator notifier events.
@@ -58,7 +58,7 @@
struct reg_genl_event {
char reg_name[32];
- uint64_t event;
+ __u64 event;
};
/* attributes of reg_genl_family */
diff --git a/lib/libc/include/any-linux-any/scsi/fc/fc_els.h b/lib/libc/include/any-linux-any/scsi/fc/fc_els.h
index e84bc63e7f..5220bc05d5 100644
--- a/lib/libc/include/any-linux-any/scsi/fc/fc_els.h
+++ b/lib/libc/include/any-linux-any/scsi/fc/fc_els.h
@@ -11,6 +11,8 @@
#include
#include
+#include /* for offsetof */
+
/*
* Fibre Channel Switch - Enhanced Link Services definitions.
* From T11 FC-LS Rev 1.2 June 7, 2005.
@@ -1109,12 +1111,15 @@ struct fc_els_fpin {
/* Diagnostic Function Descriptor - FPIN Registration */
struct fc_df_desc_fpin_reg {
- __be32 desc_tag; /* FPIN Registration (0x00030001) */
- __be32 desc_len; /* Length of Descriptor (in bytes).
- * Size of descriptor excluding
- * desc_tag and desc_len fields.
- */
- __be32 count; /* Number of desc_tags elements */
+ /* New members MUST be added within the __struct_group() macro below. */
+ __struct_group(fc_df_desc_fpin_reg_hdr, __hdr, /* no attrs */,
+ __be32 desc_tag; /* FPIN Registration (0x00030001) */
+ __be32 desc_len; /* Length of Descriptor (in bytes).
+ * Size of descriptor excluding
+ * desc_tag and desc_len fields.
+ */
+ __be32 count; /* Number of desc_tags elements */
+ );
__be32 desc_tags[]; /* Array of Descriptor Tags.
* Each tag indicates a function
* supported by the N_Port (request)
@@ -1124,33 +1129,44 @@ struct fc_df_desc_fpin_reg {
* See ELS_FN_DTAG_xxx for tag values.
*/
};
+_Static_assert(offsetof(struct fc_df_desc_fpin_reg, desc_tags) == sizeof(struct fc_df_desc_fpin_reg_hdr),
+ "struct member likely outside of __struct_group()");
/*
* ELS_RDF - Register Diagnostic Functions
*/
struct fc_els_rdf {
- __u8 fpin_cmd; /* command (0x19) */
- __u8 fpin_zero[3]; /* specified as zero - part of cmd */
- __be32 desc_len; /* Length of Descriptor List (in bytes).
- * Size of ELS excluding fpin_cmd,
- * fpin_zero and desc_len fields.
- */
+ /* New members MUST be added within the __struct_group() macro below. */
+ __struct_group(fc_els_rdf_hdr, __hdr, /* no attrs */,
+ __u8 fpin_cmd; /* command (0x19) */
+ __u8 fpin_zero[3]; /* specified as zero - part of cmd */
+ __be32 desc_len; /* Length of Descriptor List (in bytes).
+ * Size of ELS excluding fpin_cmd,
+ * fpin_zero and desc_len fields.
+ */
+ );
struct fc_tlv_desc desc[]; /* Descriptor list */
};
+_Static_assert(offsetof(struct fc_els_rdf, desc) == sizeof(struct fc_els_rdf_hdr),
+ "struct member likely outside of __struct_group()");
/*
* ELS RDF LS_ACC Response.
*/
struct fc_els_rdf_resp {
- struct fc_els_ls_acc acc_hdr;
- __be32 desc_list_len; /* Length of response (in
- * bytes). Excludes acc_hdr
- * and desc_list_len fields.
- */
- struct fc_els_lsri_desc lsri;
+ /* New members MUST be added within the __struct_group() macro below. */
+ __struct_group(fc_els_rdf_resp_hdr, __hdr, /* no attrs */,
+ struct fc_els_ls_acc acc_hdr;
+ __be32 desc_list_len; /* Length of response (in
+ * bytes). Excludes acc_hdr
+ * and desc_list_len fields.
+ */
+ struct fc_els_lsri_desc lsri;
+ );
struct fc_tlv_desc desc[]; /* Supported Descriptor list */
};
-
+_Static_assert(offsetof(struct fc_els_rdf_resp, desc) == sizeof(struct fc_els_rdf_resp_hdr),
+ "struct member likely outside of __struct_group()");
/*
* Diagnostic Capability Descriptors for EDC ELS
diff --git a/lib/libc/include/any-linux-any/sound/asound.h b/lib/libc/include/any-linux-any/sound/asound.h
index 1054dc2a69..d4f3232039 100644
--- a/lib/libc/include/any-linux-any/sound/asound.h
+++ b/lib/libc/include/any-linux-any/sound/asound.h
@@ -58,7 +58,7 @@ struct snd_cea_861_aud_if {
unsigned char db2_sf_ss; /* sample frequency and size */
unsigned char db3; /* not used, all zeros */
unsigned char db4_ca; /* channel allocation code */
- unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */
+ unsigned char db5_dminh_lsv; /* downmix inhibit & level-shift values */
};
/****************************************************************************
diff --git a/lib/libc/include/any-linux-any/sound/compress_offload.h b/lib/libc/include/any-linux-any/sound/compress_offload.h
index 9832ba3bab..31110f75f3 100644
--- a/lib/libc/include/any-linux-any/sound/compress_offload.h
+++ b/lib/libc/include/any-linux-any/sound/compress_offload.h
@@ -13,8 +13,7 @@
#include
#include
-
-#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0)
+#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 4, 1)
/**
* struct snd_compressed_buffer - compressed buffer
* @fragment_size: size of buffer fragment in bytes
@@ -56,6 +55,25 @@ struct snd_compr_tstamp {
__u32 sampling_rate;
} __attribute__((packed, aligned(4)));
+/**
+ * struct snd_compr_tstamp64 - timestamp descriptor with fields in 64 bit
+ * @byte_offset: Byte offset in ring buffer to DSP
+ * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
+ * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
+ * large steps and should only be used to monitor encoding/decoding
+ * progress. It shall not be used for timing estimates.
+ * @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
+ * output/input. This field should be used for A/V sync or time estimates.
+ * @sampling_rate: sampling rate of audio
+ */
+struct snd_compr_tstamp64 {
+ __u32 byte_offset;
+ __u64 copied_total;
+ __u64 pcm_frames;
+ __u64 pcm_io_frames;
+ __u32 sampling_rate;
+} __attribute__((packed, aligned(4)));
+
/**
* struct snd_compr_avail - avail descriptor
* @avail: Number of bytes available in ring buffer for writing/reading
@@ -66,6 +84,16 @@ struct snd_compr_avail {
struct snd_compr_tstamp tstamp;
} __attribute__((packed, aligned(4)));
+/**
+ * struct snd_compr_avail64 - avail descriptor with tstamp in 64 bit format
+ * @avail: Number of bytes available in ring buffer for writing/reading
+ * @tstamp: timestamp information
+ */
+struct snd_compr_avail64 {
+ __u64 avail;
+ struct snd_compr_tstamp64 tstamp;
+} __attribute__((packed, aligned(4)));
+
enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE,
@@ -189,6 +217,7 @@ struct snd_compr_task_status {
* Note: only codec params can be changed runtime and stream params cant be
* SNDRV_COMPRESS_GET_PARAMS: Query codec params
* SNDRV_COMPRESS_TSTAMP: get the current timestamp value
+ * SNDRV_COMPRESS_TSTAMP64: get the current timestamp value in 64 bit format
* SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
* This also queries the tstamp properties
* SNDRV_COMPRESS_PAUSE: Pause the running stream
@@ -211,6 +240,8 @@ struct snd_compr_task_status {
struct snd_compr_metadata)
#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
+#define SNDRV_COMPRESS_TSTAMP64 _IOR('C', 0x22, struct snd_compr_tstamp64)
+#define SNDRV_COMPRESS_AVAIL64 _IOR('C', 0x23, struct snd_compr_avail64)
#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
#define SNDRV_COMPRESS_START _IO('C', 0x32)
diff --git a/lib/libc/include/any-linux-any/sound/compress_params.h b/lib/libc/include/any-linux-any/sound/compress_params.h
index 6953bbd802..a7254afdce 100644
--- a/lib/libc/include/any-linux-any/sound/compress_params.h
+++ b/lib/libc/include/any-linux-any/sound/compress_params.h
@@ -43,7 +43,8 @@
#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
-#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
+#define SND_AUDIOCODEC_OPUS_RAW ((__u32) 0x00000011)
+#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_OPUS_RAW
/*
* Profile and modes are listed with bit masks. This allows for a
@@ -324,6 +325,43 @@ struct snd_dec_ape {
__u32 seek_table_present;
} __attribute__((packed, aligned(4)));
+/**
+ * struct snd_dec_opus - Opus decoder parameters (raw opus packets)
+ * @version: Usually should be '1' but can be split into major (4 upper bits)
+ * and minor (4 lower bits) sub-fields.
+ * @num_channels: Number of output channels.
+ * @pre_skip: Number of samples to discard at 48 kHz.
+ * @sample_rate: Sample rate of original input.
+ * @output_gain: Gain to apply when decoding (in Q7.8 format).
+ * @mapping_family: Order and meaning of output channels. Only values 0 and 1
+ * are expected; values 2..255 are not recommended for playback.
+ *
+ * @chan_map: Optional channel mapping table. Describes mapping of opus streams
+ * to decoded channels. Fields:
+ * @chan_map.stream_count: Number of streams encoded in each Ogg packet.
+ * @chan_map.coupled_count: Number of streams whose decoders are used
+ * for two channels.
+ * @chan_map.channel_map: Which decoded channel to be used for each one.
+ * Supports only mapping families 0 and 1,
+ * max number of channels is 8.
+ *
+ * These options were extracted from RFC7845 Section 5.
+ */
+
+struct snd_dec_opus {
+ __u8 version;
+ __u8 num_channels;
+ __u16 pre_skip;
+ __u32 sample_rate;
+ __u16 output_gain;
+ __u8 mapping_family;
+ struct snd_dec_opus_ch_map {
+ __u8 stream_count;
+ __u8 coupled_count;
+ __u8 channel_map[8];
+ } chan_map;
+} __attribute__((packed, aligned(4)));
+
union snd_codec_options {
struct snd_enc_wma wma;
struct snd_enc_vorbis vorbis;
@@ -334,6 +372,7 @@ union snd_codec_options {
struct snd_dec_wma wma_d;
struct snd_dec_alac alac_d;
struct snd_dec_ape ape_d;
+ struct snd_dec_opus opus_d;
struct {
__u32 out_sample_rate;
} src_d;
diff --git a/lib/libc/include/any-linux-any/sound/intel/avs/tokens.h b/lib/libc/include/any-linux-any/sound/intel/avs/tokens.h
index c565277b8f..9095eb70dd 100644
--- a/lib/libc/include/any-linux-any/sound/intel/avs/tokens.h
+++ b/lib/libc/include/any-linux-any/sound/intel/avs/tokens.h
@@ -21,6 +21,7 @@ enum avs_tplg_token {
AVS_TKN_MANIFEST_NUM_BINDINGS_U32 = 8,
AVS_TKN_MANIFEST_NUM_CONDPATH_TMPLS_U32 = 9,
AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32 = 10,
+ AVS_TKN_MANIFEST_NUM_NHLT_CONFIGS_U32 = 11,
/* struct avs_tplg_library */
AVS_TKN_LIBRARY_ID_U32 = 101,
@@ -124,6 +125,7 @@ enum avs_tplg_token {
AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,
AVS_TKN_MOD_INIT_CONFIG_NUM_IDS_U32 = 1708,
AVS_TKN_MOD_INIT_CONFIG_ID_U32 = 1709,
+ AVS_TKN_MOD_NHLT_CONFIG_ID_U32 = 1710,
/* struct avs_tplg_path_template */
AVS_TKN_PATH_TMPL_ID_U32 = 1801,
@@ -133,6 +135,21 @@ enum avs_tplg_token {
AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,
AVS_TKN_PATH_BE_FMT_ID_U32 = 1903,
+ /* struct avs_tplg_path_template (conditional) */
+ AVS_TKN_CONDPATH_TMPL_ID_U32 = 1801,
+ AVS_TKN_CONDPATH_TMPL_SOURCE_TPLG_NAME_STRING = 2002,
+ AVS_TKN_CONDPATH_TMPL_SOURCE_PATH_TMPL_ID_U32 = 2003,
+ AVS_TKN_CONDPATH_TMPL_SINK_TPLG_NAME_STRING = 2004,
+ AVS_TKN_CONDPATH_TMPL_SINK_PATH_TMPL_ID_U32 = 2005,
+ AVS_TKN_CONDPATH_TMPL_COND_TYPE_U32 = 2006,
+ AVS_TKN_CONDPATH_TMPL_OVERRIDABLE_BOOL = 2007,
+ AVS_TKN_CONDPATH_TMPL_PRIORITY_U8 = 2008,
+
+ /* struct avs_tplg_path (conditional) */
+ AVS_TKN_CONDPATH_ID_U32 = 1901,
+ AVS_TKN_CONDPATH_SOURCE_PATH_ID_U32 = 2102,
+ AVS_TKN_CONDPATH_SINK_PATH_ID_U32 = 2103,
+
/* struct avs_tplg_pin_format */
AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
@@ -145,6 +162,10 @@ enum avs_tplg_token {
AVS_TKN_INIT_CONFIG_ID_U32 = 2401,
AVS_TKN_INIT_CONFIG_PARAM_U8 = 2402,
AVS_TKN_INIT_CONFIG_LENGTH_U32 = 2403,
+
+ /* struct avs_tplg_nhlt_config */
+ AVS_TKN_NHLT_CONFIG_ID_U32 = 2501,
+ AVS_TKN_NHLT_CONFIG_SIZE_U32 = 2502,
};
#endif
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/sound/snd_ar_tokens.h b/lib/libc/include/any-linux-any/sound/snd_ar_tokens.h
index 8075cd1342..41085ea05f 100644
--- a/lib/libc/include/any-linux-any/sound/snd_ar_tokens.h
+++ b/lib/libc/include/any-linux-any/sound/snd_ar_tokens.h
@@ -3,6 +3,8 @@
#ifndef __SND_AR_TOKENS_H__
#define __SND_AR_TOKENS_H__
+#include
+
#define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
#define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
@@ -118,6 +120,12 @@ enum ar_event_types {
* LPAIF_WSA = 2,
* LPAIF_VA = 3,
* LPAIF_AXI = 4
+ * Possible values for MI2S
+ * I2S_INTF_TYPE_PRIMARY = 0,
+ * I2S_INTF_TYPE_SECONDARY = 1,
+ * I2S_INTF_TYPE_TERTIARY = 2,
+ * I2S_INTF_TYPE_QUATERNARY = 3,
+ * I2S_INTF_TYPE_QUINARY = 4,
*
* %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving
* PCM_INTERLEAVED = 1,
@@ -184,8 +192,8 @@ enum ar_event_types {
#define AR_TKN_U32_MODULE_INSTANCE_ID 201
#define AR_TKN_U32_MODULE_MAX_IP_PORTS 202
#define AR_TKN_U32_MODULE_MAX_OP_PORTS 203
-#define AR_TKN_U32_MODULE_IN_PORTS 204
-#define AR_TKN_U32_MODULE_OUT_PORTS 205
+#define AR_TKN_U32_MODULE_IN_PORTS 204 /* deprecated */
+#define AR_TKN_U32_MODULE_OUT_PORTS 205 /* deprecated */
#define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206
#define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207
#define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208
@@ -232,4 +240,12 @@ enum ar_event_types {
#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
#define AR_TKN_U32_MODULE_LOG_MODE 261
+#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
+struct audioreach_module_priv_data {
+ __le32 size; /* size in bytes of the array, including all elements */
+ __le32 type; /* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
+ __le32 priv[2]; /* Private data for future expansion */
+ __le32 data[0]; /* config data */
+};
+
#endif /* __SND_AR_TOKENS_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/any-linux-any/sound/sof/tokens.h b/lib/libc/include/any-linux-any/sound/sof/tokens.h
index 9bdad9ff27..a52c019fc5 100644
--- a/lib/libc/include/any-linux-any/sound/sof/tokens.h
+++ b/lib/libc/include/any-linux-any/sound/sof/tokens.h
@@ -106,6 +106,8 @@
*/
#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
+#define SOF_TKN_COMP_SCHED_DOMAIN 418
+
/* SSP */
#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
#define SOF_TKN_INTEL_SSP_MCLK_ID 501
diff --git a/lib/libc/include/arc-linux-any/asm/unistd_32.h b/lib/libc/include/arc-linux-any/asm/unistd_32.h
index f4c5c5d809..cb602f509a 100644
--- a/lib/libc/include/arc-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/arc-linux-any/asm/unistd_32.h
@@ -350,6 +350,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/arc-linux-gnu/bits/fcntl.h b/lib/libc/include/arc-linux-gnu/bits/fcntl.h
index e033990adc..000bc72469 100644
--- a/lib/libc/include/arc-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/arc-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for the generic Linux ABI.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/fenv.h b/lib/libc/include/arc-linux-gnu/bits/fenv.h
index 382f0d08c4..fbda571543 100644
--- a/lib/libc/include/arc-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/arc-linux-gnu/bits/fenv.h
@@ -1,5 +1,5 @@
/* Floating point environment. ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/floatn.h b/lib/libc/include/arc-linux-gnu/bits/floatn.h
index 9005dc8601..d3408f1524 100644
--- a/lib/libc/include/arc-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/arc-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/link.h b/lib/libc/include/arc-linux-gnu/bits/link.h
index 594c6c8098..eadaf80a4a 100644
--- a/lib/libc/include/arc-linux-gnu/bits/link.h
+++ b/lib/libc/include/arc-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific declarations for dynamic linker interface, ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/long-double.h b/lib/libc/include/arc-linux-gnu/bits/long-double.h
index d07f1a7418..ffaee6c9be 100644
--- a/lib/libc/include/arc-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/arc-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/procfs.h b/lib/libc/include/arc-linux-gnu/bits/procfs.h
index f5c1a9db48..9d59fd0f31 100644
--- a/lib/libc/include/arc-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/arc-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/rseq.h b/lib/libc/include/arc-linux-gnu/bits/rseq.h
index 90b3e9804a..a844012dd3 100644
--- a/lib/libc/include/arc-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/arc-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences architecture header. Stub version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/arc-linux-gnu/bits/setjmp.h b/lib/libc/include/arc-linux-gnu/bits/setjmp.h
index 232c097bd5..f6273a7471 100644
--- a/lib/libc/include/arc-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/arc-linux-gnu/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type 'jmp_buf'. ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/struct_stat.h b/lib/libc/include/arc-linux-gnu/bits/struct_stat.h
index 724450a667..0462d37a68 100644
--- a/lib/libc/include/arc-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/arc-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/timesize.h b/lib/libc/include/arc-linux-gnu/bits/timesize.h
index 04251ea75c..dff2da5ed6 100644
--- a/lib/libc/include/arc-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/arc-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/bits/wordsize.h b/lib/libc/include/arc-linux-gnu/bits/wordsize.h
index 6b841cc0f5..3f6991890c 100644
--- a/lib/libc/include/arc-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/arc-linux-gnu/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/fpu_control.h b/lib/libc/include/arc-linux-gnu/fpu_control.h
index c4db39e9a6..f2d30f37a9 100644
--- a/lib/libc/include/arc-linux-gnu/fpu_control.h
+++ b/lib/libc/include/arc-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/sys/cachectl.h b/lib/libc/include/arc-linux-gnu/sys/cachectl.h
index 8300c25094..ea9c31999c 100644
--- a/lib/libc/include/arc-linux-gnu/sys/cachectl.h
+++ b/lib/libc/include/arc-linux-gnu/sys/cachectl.h
@@ -1,5 +1,5 @@
/* cacheflush - flush contents of instruction and/or data cache.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/sys/ucontext.h b/lib/libc/include/arc-linux-gnu/sys/ucontext.h
index 299dcfa2cf..998d13adf4 100644
--- a/lib/libc/include/arc-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/arc-linux-gnu/sys/ucontext.h
@@ -1,5 +1,5 @@
/* struct ucontext definition, ARC version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arc-linux-gnu/sys/user.h b/lib/libc/include/arc-linux-gnu/sys/user.h
index f108a30177..661b162872 100644
--- a/lib/libc/include/arc-linux-gnu/sys/user.h
+++ b/lib/libc/include/arc-linux-gnu/sys/user.h
@@ -1,5 +1,5 @@
/* ptrace register data format definitions.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-any/asm/unistd-eabi.h b/lib/libc/include/arm-linux-any/asm/unistd-eabi.h
index c46cb74ed4..24d037cfb0 100644
--- a/lib/libc/include/arm-linux-any/asm/unistd-eabi.h
+++ b/lib/libc/include/arm-linux-any/asm/unistd-eabi.h
@@ -423,5 +423,6 @@
#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)
#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
+#define __NR_listns (__NR_SYSCALL_BASE + 470)
#endif /* _ASM_UNISTD_EABI_H */
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-any/asm/unistd-oabi.h b/lib/libc/include/arm-linux-any/asm/unistd-oabi.h
index 4226cbc2a9..ca50acaf2a 100644
--- a/lib/libc/include/arm-linux-any/asm/unistd-oabi.h
+++ b/lib/libc/include/arm-linux-any/asm/unistd-oabi.h
@@ -435,5 +435,6 @@
#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)
#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
+#define __NR_listns (__NR_SYSCALL_BASE + 470)
#endif /* _ASM_UNISTD_OABI_H */
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-gnu/bits/dl_find_object.h b/lib/libc/include/arm-linux-gnu/bits/dl_find_object.h
index 46912bb1d3..38dad3f062 100644
--- a/lib/libc/include/arm-linux-gnu/bits/dl_find_object.h
+++ b/lib/libc/include/arm-linux-gnu/bits/dl_find_object.h
@@ -1,5 +1,5 @@
/* arm definitions for finding objects.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/fcntl.h b/lib/libc/include/arm-linux-gnu/bits/fcntl.h
index 14a203d050..e0ab5fa082 100644
--- a/lib/libc/include/arm-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/arm-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/fenv.h b/lib/libc/include/arm-linux-gnu/bits/fenv.h
index 4815a06d47..e897e42603 100644
--- a/lib/libc/include/arm-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/arm-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/floatn.h b/lib/libc/include/arm-linux-gnu/bits/floatn.h
index 9005dc8601..d3408f1524 100644
--- a/lib/libc/include/arm-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/arm-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/hwcap.h b/lib/libc/include/arm-linux-gnu/bits/hwcap.h
index 7b16f0e9d6..335e4935c6 100644
--- a/lib/libc/include/arm-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/arm-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP. ARM Linux version.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/link.h b/lib/libc/include/arm-linux-gnu/bits/link.h
index 8060167ec1..6d0cdd0196 100644
--- a/lib/libc/include/arm-linux-gnu/bits/link.h
+++ b/lib/libc/include/arm-linux-gnu/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/long-double.h b/lib/libc/include/arm-linux-gnu/bits/long-double.h
index d07f1a7418..ffaee6c9be 100644
--- a/lib/libc/include/arm-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/arm-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/procfs-id.h b/lib/libc/include/arm-linux-gnu/bits/procfs-id.h
index 58c2162a88..8b0d8a502e 100644
--- a/lib/libc/include/arm-linux-gnu/bits/procfs-id.h
+++ b/lib/libc/include/arm-linux-gnu/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/arm-linux-gnu/bits/procfs.h b/lib/libc/include/arm-linux-gnu/bits/procfs.h
index 2a60d31099..37497a2899 100644
--- a/lib/libc/include/arm-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/arm-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. Arm version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/rseq.h b/lib/libc/include/arm-linux-gnu/bits/rseq.h
index 1d6a163940..8f53196582 100644
--- a/lib/libc/include/arm-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/arm-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux arm architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/arm-linux-gnu/bits/setjmp.h b/lib/libc/include/arm-linux-gnu/bits/setjmp.h
index 7fdd2e4f52..43c5fc77bd 100644
--- a/lib/libc/include/arm-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/arm-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/shmlba.h b/lib/libc/include/arm-linux-gnu/bits/shmlba.h
index c615e20796..b12474c3f1 100644
--- a/lib/libc/include/arm-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/arm-linux-gnu/bits/shmlba.h
@@ -1,5 +1,5 @@
/* Define SHMLBA. ARM version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/struct_stat.h b/lib/libc/include/arm-linux-gnu/bits/struct_stat.h
index 71196f193f..8a057c1633 100644
--- a/lib/libc/include/arm-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/arm-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat. Linux/arm version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/timesize.h b/lib/libc/include/arm-linux-gnu/bits/timesize.h
index 3b50f81112..9b0a0ec2e9 100644
--- a/lib/libc/include/arm-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/arm-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/ARM.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/typesizes.h b/lib/libc/include/arm-linux-gnu/bits/typesizes.h
index 11790d7eac..200578b9f2 100644
--- a/lib/libc/include/arm-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/arm-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. ARM version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/bits/wordsize.h b/lib/libc/include/arm-linux-gnu/bits/wordsize.h
index db32991434..6e4c479fe4 100644
--- a/lib/libc/include/arm-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/arm-linux-gnu/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/fpu_control.h b/lib/libc/include/arm-linux-gnu/fpu_control.h
index 57a0c0548b..4dfc9182f3 100644
--- a/lib/libc/include/arm-linux-gnu/fpu_control.h
+++ b/lib/libc/include/arm-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. ARM VFP version.
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/sys/ptrace.h b/lib/libc/include/arm-linux-gnu/sys/ptrace.h
index 781cc3578d..de859feabc 100644
--- a/lib/libc/include/arm-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/arm-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/ARM version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/arm-linux-gnu/sys/ucontext.h b/lib/libc/include/arm-linux-gnu/sys/ucontext.h
index 56c60d929a..737037437a 100644
--- a/lib/libc/include/arm-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/arm-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/arm-linux-gnu/sys/user.h b/lib/libc/include/arm-linux-gnu/sys/user.h
index 37a8cc78f8..f5669eca1a 100644
--- a/lib/libc/include/arm-linux-gnu/sys/user.h
+++ b/lib/libc/include/arm-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-any/asm/ptrace.h b/lib/libc/include/csky-linux-any/asm/ptrace.h
index cc88df60de..20ca6c24be 100644
--- a/lib/libc/include/csky-linux-any/asm/ptrace.h
+++ b/lib/libc/include/csky-linux-any/asm/ptrace.h
@@ -3,7 +3,7 @@
#ifndef _CSKY_PTRACE_H
#define _CSKY_PTRACE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct pt_regs {
unsigned long tls;
@@ -47,5 +47,5 @@ struct user_fp {
unsigned long reserved;
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _CSKY_PTRACE_H */
\ No newline at end of file
diff --git a/lib/libc/include/csky-linux-any/asm/unistd_32.h b/lib/libc/include/csky-linux-any/asm/unistd_32.h
index 98121e63cb..a3aafb989a 100644
--- a/lib/libc/include/csky-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/csky-linux-any/asm/unistd_32.h
@@ -346,6 +346,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnu/bits/fcntl.h b/lib/libc/include/csky-linux-gnu/bits/fcntl.h
index e033990adc..000bc72469 100644
--- a/lib/libc/include/csky-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/csky-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for the generic Linux ABI.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/fenv.h b/lib/libc/include/csky-linux-gnu/bits/fenv.h
index 474af2596c..0bba924293 100644
--- a/lib/libc/include/csky-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/csky-linux-gnu/bits/fenv.h
@@ -1,5 +1,5 @@
/* Floating point environment. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/floatn.h b/lib/libc/include/csky-linux-gnu/bits/floatn.h
index 9005dc8601..d3408f1524 100644
--- a/lib/libc/include/csky-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/csky-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/link.h b/lib/libc/include/csky-linux-gnu/bits/link.h
index ca027d0e88..9c46039e1b 100644
--- a/lib/libc/include/csky-linux-gnu/bits/link.h
+++ b/lib/libc/include/csky-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific declarations for dynamic linker interface. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/long-double.h b/lib/libc/include/csky-linux-gnu/bits/long-double.h
index d07f1a7418..ffaee6c9be 100644
--- a/lib/libc/include/csky-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/csky-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/procfs.h b/lib/libc/include/csky-linux-gnu/bits/procfs.h
index 91bc54a3fc..a2faeb5fbd 100644
--- a/lib/libc/include/csky-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/csky-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/rseq.h b/lib/libc/include/csky-linux-gnu/bits/rseq.h
index 90b3e9804a..a844012dd3 100644
--- a/lib/libc/include/csky-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/csky-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences architecture header. Stub version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/csky-linux-gnu/bits/setjmp.h b/lib/libc/include/csky-linux-gnu/bits/setjmp.h
index 8edb4c0c1a..5486c273e6 100644
--- a/lib/libc/include/csky-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/csky-linux-gnu/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/shmlba.h b/lib/libc/include/csky-linux-gnu/bits/shmlba.h
index 79e12b8237..5d7d35e3c9 100644
--- a/lib/libc/include/csky-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/csky-linux-gnu/bits/shmlba.h
@@ -1,5 +1,5 @@
/* Define SHMLBA. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/statfs.h b/lib/libc/include/csky-linux-gnu/bits/statfs.h
index 13479a330b..8188a1106b 100644
--- a/lib/libc/include/csky-linux-gnu/bits/statfs.h
+++ b/lib/libc/include/csky-linux-gnu/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/struct_stat.h b/lib/libc/include/csky-linux-gnu/bits/struct_stat.h
index 4064985100..b5693ad4ef 100644
--- a/lib/libc/include/csky-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/csky-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat. Linux/csky version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/timesize.h b/lib/libc/include/csky-linux-gnu/bits/timesize.h
index f97e401df5..7223435134 100644
--- a/lib/libc/include/csky-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/csky-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/csky.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/bits/wordsize.h b/lib/libc/include/csky-linux-gnu/bits/wordsize.h
index db32991434..6e4c479fe4 100644
--- a/lib/libc/include/csky-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/csky-linux-gnu/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/fpu_control.h b/lib/libc/include/csky-linux-gnu/fpu_control.h
index f7a844d2fd..99edc54621 100644
--- a/lib/libc/include/csky-linux-gnu/fpu_control.h
+++ b/lib/libc/include/csky-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/sys/cachectl.h b/lib/libc/include/csky-linux-gnu/sys/cachectl.h
index 13ea674214..1b855735be 100644
--- a/lib/libc/include/csky-linux-gnu/sys/cachectl.h
+++ b/lib/libc/include/csky-linux-gnu/sys/cachectl.h
@@ -1,5 +1,5 @@
/* C-SKY cache flushing interface.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/sys/ucontext.h b/lib/libc/include/csky-linux-gnu/sys/ucontext.h
index 629a841f77..2917185c9f 100644
--- a/lib/libc/include/csky-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/csky-linux-gnu/sys/ucontext.h
@@ -1,5 +1,5 @@
/* struct ucontext definition, C-SKY version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/csky-linux-gnu/sys/user.h b/lib/libc/include/csky-linux-gnu/sys/user.h
index b6b16709f7..8360978ed9 100644
--- a/lib/libc/include/csky-linux-gnu/sys/user.h
+++ b/lib/libc/include/csky-linux-gnu/sys/user.h
@@ -1,6 +1,6 @@
/* This file is not used by C-SKY GDB. ptrace can use pt_regs definition
from linux kernel directly.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/aio.h b/lib/libc/include/generic-glibc/aio.h
index 045f9d0897..3f25c83b31 100644
--- a/lib/libc/include/generic-glibc/aio.h
+++ b/lib/libc/include/generic-glibc/aio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/aliases.h b/lib/libc/include/generic-glibc/aliases.h
index 4198827e07..a74245fd65 100644
--- a/lib/libc/include/generic-glibc/aliases.h
+++ b/lib/libc/include/generic-glibc/aliases.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/alloca.h b/lib/libc/include/generic-glibc/alloca.h
index 86aaae0ed0..eb230b2104 100644
--- a/lib/libc/include/generic-glibc/alloca.h
+++ b/lib/libc/include/generic-glibc/alloca.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ar.h b/lib/libc/include/generic-glibc/ar.h
index b42f96fedd..560897719d 100644
--- a/lib/libc/include/generic-glibc/ar.h
+++ b/lib/libc/include/generic-glibc/ar.h
@@ -1,5 +1,5 @@
/* Header describing `ar' archive file format.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/argp.h b/lib/libc/include/generic-glibc/argp.h
index cd619e4b19..4e510b88e7 100644
--- a/lib/libc/include/generic-glibc/argp.h
+++ b/lib/libc/include/generic-glibc/argp.h
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader .
@@ -518,17 +518,13 @@ extern void *__argp_input (const struct argp *__restrict __argp,
# define __option_is_end _option_is_end
# endif
-# ifndef ARGP_EI
-# define ARGP_EI __extern_inline
-# endif
-
-ARGP_EI void
+__extern_inline void
__argp_usage (const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
-ARGP_EI int
+__extern_inline int
__NTH (__option_is_short (const struct argp_option *__opt))
{
if (__opt->flags & OPTION_DOC)
@@ -540,7 +536,7 @@ __NTH (__option_is_short (const struct argp_option *__opt))
}
}
-ARGP_EI int
+__extern_inline int
__NTH (__option_is_end (const struct argp_option *__opt))
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
diff --git a/lib/libc/include/generic-glibc/argz.h b/lib/libc/include/generic-glibc/argz.h
index dd13743521..6272cbcb56 100644
--- a/lib/libc/include/generic-glibc/argz.h
+++ b/lib/libc/include/generic-glibc/argz.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated arg vectors.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/arpa/inet.h b/lib/libc/include/generic-glibc/arpa/inet.h
index 07113deb0f..f1b39ad7f8 100644
--- a/lib/libc/include/generic-glibc/arpa/inet.h
+++ b/lib/libc/include/generic-glibc/arpa/inet.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/assert.h b/lib/libc/include/generic-glibc/assert.h
index df87736464..73562fec4b 100644
--- a/lib/libc/include/generic-glibc/assert.h
+++ b/lib/libc/include/generic-glibc/assert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,12 +34,36 @@
#define _ASSERT_H 1
#include
+#if __GLIBC_USE (ISOC23)
+# ifndef __STDC_VERSION_ASSERT_H__
+# define __STDC_VERSION_ASSERT_H__ 202311L
+# endif
+#endif
+
#if defined __cplusplus && __GNUC_PREREQ (2,95)
# define __ASSERT_VOID_CAST static_cast
#else
# define __ASSERT_VOID_CAST (void)
#endif
+/* C23 makes assert a variadic macro so that expressions with a comma
+ not between parentheses, but that would still be valid as a single
+ function argument, such as those involving compound literals with a
+ comma in the initializer list, can be passed to assert. This
+ depends on support for variadic macros (added in C99 and GCC 2.95),
+ and on support for _Bool (added in C99 and GCC 3.0) in order to
+ validate that only a single expression is passed as an argument,
+ and is currently implemented only for C. */
+#if (__GLIBC_USE (ISOC23) \
+ && (defined __GNUC__ \
+ ? __GNUC_PREREQ (3, 0) \
+ : defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \
+ && !defined __cplusplus)
+# define __ASSERT_VARIADIC 1
+#else
+# define __ASSERT_VARIADIC 0
+#endif
+
/* void assert (int expression);
If NDEBUG is defined, do nothing.
@@ -47,7 +71,11 @@
#ifdef NDEBUG
-# define assert(expr) (__ASSERT_VOID_CAST (0))
+# if __ASSERT_VARIADIC
+# define assert(...) (__ASSERT_VOID_CAST (0))
+# else
+# define assert(expr) (__ASSERT_VOID_CAST (0))
+# endif
/* void assert_perror (int errnum);
@@ -80,6 +108,13 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
__THROW __attribute__ ((__noreturn__)) __COLD;
+# if __ASSERT_VARIADIC
+/* This function is not defined and is not called outside of an
+ unevaluated sizeof, but serves to verify that the argument to
+ assert is a single expression. */
+extern _Bool __assert_single_arg (_Bool);
+# endif
+
__END_DECLS
/* When possible, define assert so that it does not add extra
@@ -102,23 +137,40 @@ __END_DECLS
: __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \
__ASSERT_FUNCTION))
# elif !defined __GNUC__ || defined __STRICT_ANSI__
-# define assert(expr) \
+# if __ASSERT_VARIADIC
+# define assert(...) \
+ (((void) sizeof (__assert_single_arg (__VA_ARGS__)), __VA_ARGS__) \
+ ? __ASSERT_VOID_CAST (0) \
+ : __assert_fail (#__VA_ARGS__, __FILE__, __LINE__, __ASSERT_FUNCTION))
+# else
+# define assert(expr) \
((expr) \
? __ASSERT_VOID_CAST (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
+# endif
# else
+# if __ASSERT_VARIADIC
+# define assert(...) \
+ ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
+ if (__VA_ARGS__) \
+ ; /* empty */ \
+ else \
+ __assert_fail (#__VA_ARGS__, __FILE__, __LINE__, __ASSERT_FUNCTION); \
+ }))
+# else
/* The first occurrence of EXPR is not evaluated due to the sizeof,
but will trigger any pedantic warnings masked by the __extension__
for the second occurrence. The ternary operator is required to
support function pointers and bit fields in this context, and to
suppress the evaluation of variable length arrays. */
-# define assert(expr) \
+# define assert(expr) \
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
if (expr) \
; /* empty */ \
else \
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
}))
+# endif
# endif
# ifdef __USE_GNU
diff --git a/lib/libc/include/generic-glibc/bits/argp-ldbl.h b/lib/libc/include/generic-glibc/bits/argp-ldbl.h
index 4ebf41e04a..9ea9c2ad05 100644
--- a/lib/libc/include/generic-glibc/bits/argp-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/argp-ldbl.h
@@ -1,5 +1,5 @@
/* Redirections for argp functions for -mlong-double-64.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/atomic_wide_counter.h b/lib/libc/include/generic-glibc/bits/atomic_wide_counter.h
index 57e96b7064..d864d71bcb 100644
--- a/lib/libc/include/generic-glibc/bits/atomic_wide_counter.h
+++ b/lib/libc/include/generic-glibc/bits/atomic_wide_counter.h
@@ -1,5 +1,5 @@
/* Monotonically increasing wide counters (at least 62 bits).
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/byteswap.h b/lib/libc/include/generic-glibc/bits/byteswap.h
index fd956dbd55..b9cdbbc59a 100644
--- a/lib/libc/include/generic-glibc/bits/byteswap.h
+++ b/lib/libc/include/generic-glibc/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros and inline functions to swap the order of bytes in integer values.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/cmathcalls.h b/lib/libc/include/generic-glibc/bits/cmathcalls.h
index 8babe1b32d..66ebc6e478 100644
--- a/lib/libc/include/generic-glibc/bits/cmathcalls.h
+++ b/lib/libc/include/generic-glibc/bits/cmathcalls.h
@@ -1,6 +1,6 @@
/* Prototype declarations for complex math functions;
helper file for .
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/confname.h b/lib/libc/include/generic-glibc/bits/confname.h
index c10efca2fa..8de1e82927 100644
--- a/lib/libc/include/generic-glibc/bits/confname.h
+++ b/lib/libc/include/generic-glibc/bits/confname.h
@@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/cpu-set.h b/lib/libc/include/generic-glibc/bits/cpu-set.h
index b7db570584..4ba1bb97c8 100644
--- a/lib/libc/include/generic-glibc/bits/cpu-set.h
+++ b/lib/libc/include/generic-glibc/bits/cpu-set.h
@@ -1,6 +1,6 @@
/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/dirent.h b/lib/libc/include/generic-glibc/bits/dirent.h
index 149dce4277..493665660d 100644
--- a/lib/libc/include/generic-glibc/bits/dirent.h
+++ b/lib/libc/include/generic-glibc/bits/dirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/dirent_ext.h b/lib/libc/include/generic-glibc/bits/dirent_ext.h
index 34b9472275..481e0b20e5 100644
--- a/lib/libc/include/generic-glibc/bits/dirent_ext.h
+++ b/lib/libc/include/generic-glibc/bits/dirent_ext.h
@@ -1,5 +1,5 @@
/* System-specific extensions of . Linux version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/dl_find_object.h b/lib/libc/include/generic-glibc/bits/dl_find_object.h
index 8bade10008..d9d90e4cba 100644
--- a/lib/libc/include/generic-glibc/bits/dl_find_object.h
+++ b/lib/libc/include/generic-glibc/bits/dl_find_object.h
@@ -1,5 +1,5 @@
/* System dependent definitions for finding objects by address.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/dlfcn.h b/lib/libc/include/generic-glibc/bits/dlfcn.h
index c45163e6ae..a2814450ca 100644
--- a/lib/libc/include/generic-glibc/bits/dlfcn.h
+++ b/lib/libc/include/generic-glibc/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/endian.h b/lib/libc/include/generic-glibc/bits/endian.h
index 871f16a18b..3d88d675e4 100644
--- a/lib/libc/include/generic-glibc/bits/endian.h
+++ b/lib/libc/include/generic-glibc/bits/endian.h
@@ -1,5 +1,5 @@
/* Endian macros for string.h functions
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/environments.h b/lib/libc/include/generic-glibc/bits/environments.h
index bbc4956f1f..c6ecdefcf2 100644
--- a/lib/libc/include/generic-glibc/bits/environments.h
+++ b/lib/libc/include/generic-glibc/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/epoll.h b/lib/libc/include/generic-glibc/bits/epoll.h
index ced9da193c..3a794bfbe7 100644
--- a/lib/libc/include/generic-glibc/bits/epoll.h
+++ b/lib/libc/include/generic-glibc/bits/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/err-ldbl.h b/lib/libc/include/generic-glibc/bits/err-ldbl.h
index 6e9f330d7d..29ad81c340 100644
--- a/lib/libc/include/generic-glibc/bits/err-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/err-ldbl.h
@@ -1,5 +1,5 @@
/* Redirections for err.h functions for -mlong-double-64.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/errno.h b/lib/libc/include/generic-glibc/bits/errno.h
index 492ed3b4ff..5eecdee6de 100644
--- a/lib/libc/include/generic-glibc/bits/errno.h
+++ b/lib/libc/include/generic-glibc/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux specific version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/error-ldbl.h b/lib/libc/include/generic-glibc/bits/error-ldbl.h
index bd1e5ed657..260721848b 100644
--- a/lib/libc/include/generic-glibc/bits/error-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/error-ldbl.h
@@ -1,5 +1,5 @@
/* Redirections for error.h functions for -mlong-double-64.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/error.h b/lib/libc/include/generic-glibc/bits/error.h
index 0713e10a7f..4841dc3364 100644
--- a/lib/libc/include/generic-glibc/bits/error.h
+++ b/lib/libc/include/generic-glibc/bits/error.h
@@ -1,5 +1,5 @@
/* Specializations for error functions.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/eventfd.h b/lib/libc/include/generic-glibc/bits/eventfd.h
index c5d2dbfa31..c0a1d7e3b6 100644
--- a/lib/libc/include/generic-glibc/bits/eventfd.h
+++ b/lib/libc/include/generic-glibc/bits/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/fcntl-linux-fortify.h b/lib/libc/include/generic-glibc/bits/fcntl-linux-fortify.h
new file mode 100644
index 0000000000..86c095b673
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/fcntl-linux-fortify.h
@@ -0,0 +1,49 @@
+/* Checking macros for fcntl functions. Linux version.
+ Copyright (C) 2025-2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+#ifndef _FCNTL_H
+# error "Never include directly; use instead."
+#endif
+
+#ifdef __USE_GNU
+
+extern int __REDIRECT (__openat2_alias, (int __dfd, const char *__filename,
+ const struct open_how *__how,
+ size_t __usize), openat2)
+ __nonnull ((2, 3));
+
+#if !__fortify_use_clang
+__errordecl (__openat2_invalid_size,
+ "the specified size is larger than sizeof (struct open_how)");
+#endif
+
+__fortify_function int
+openat2 (int __dfd, const char *__filename, const struct open_how *__how,
+ size_t __usize)
+ __fortify_clang_warning (__builtin_constant_p (__usize)
+ && __usize > sizeof (struct open_how),
+ "the specified size is larger than sizeof (struct open_how)")
+{
+#if !__fortify_use_clang
+ if (__builtin_constant_p (__usize) && __usize > sizeof (struct open_how))
+ __openat2_invalid_size ();
+#endif
+ return __openat2_alias (__dfd, __filename, __how, __usize);
+}
+
+#endif /* use GNU */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/fcntl-linux.h b/lib/libc/include/generic-glibc/bits/fcntl-linux.h
index 56169a7ba4..b6a2979287 100644
--- a/lib/libc/include/generic-glibc/bits/fcntl-linux.h
+++ b/lib/libc/include/generic-glibc/bits/fcntl-linux.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -219,6 +219,9 @@
/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* Actually anything with low bit set goes */
+#ifdef __USE_GNU
+# define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */
+#endif
#ifndef F_RDLCK
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
@@ -381,6 +384,11 @@ struct file_handle
open_by_handle_at. */
# define AT_HANDLE_MNT_ID_UNIQUE 1 /* Return the 64-bit unique mount
ID. */
+# define AT_HANDLE_CONNECTABLE 2 /* Request a connectable file handle */
+
+/* Flags for execveat2(2). */
+# define AT_EXECVE_CHECK 0x10000 /* Only perform a check if execution
+ would be allowed */
#endif
__BEGIN_DECLS
@@ -455,6 +463,33 @@ extern int name_to_handle_at (int __dfd, const char *__name,
extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
int __flags);
+#ifdef __has_include
+# if __has_include ("linux/openat2.h")
+# include "linux/openat2.h"
+# define __glibc_has_open_how 1
+# endif
+#endif
+
+#include
+
+/* Similar to `openat' but the arguments are packed on HOW with the size
+ USIZE. If flags and mode from HOW are non-zero, then openat2 operates
+ like openat.
+
+ Unlike openat, unknown or invalid flags result in an error (EINVAL),
+ rather than being ignored. The mode must be zero unless one of O_CREAT
+ or O_TMPFILE are set.
+
+ The kernel does not support legacy non-LFS interface. */
+extern int openat2 (int __dfd, const char * __filename,
+ const struct open_how * __how,
+ __SIZE_TYPE__ __usize)
+ __nonnull ((2, 3));
+
#endif /* use GNU */
+#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
+# include
+#endif
+
__END_DECLS
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/fcntl.h b/lib/libc/include/generic-glibc/bits/fcntl.h
index 3f9b254f7d..588d80193f 100644
--- a/lib/libc/include/generic-glibc/bits/fcntl.h
+++ b/lib/libc/include/generic-glibc/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/fcntl2.h b/lib/libc/include/generic-glibc/bits/fcntl2.h
index f09c4a9cc8..9878bd9946 100644
--- a/lib/libc/include/generic-glibc/bits/fcntl2.h
+++ b/lib/libc/include/generic-glibc/bits/fcntl2.h
@@ -1,5 +1,5 @@
/* Checking macros for fcntl functions.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/fenv.h b/lib/libc/include/generic-glibc/bits/fenv.h
index 5dab6355dd..675ec3dc8c 100644
--- a/lib/libc/include/generic-glibc/bits/fenv.h
+++ b/lib/libc/include/generic-glibc/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/floatn-common.h b/lib/libc/include/generic-glibc/bits/floatn-common.h
index 6a70ca5d5d..e0bcddc914 100644
--- a/lib/libc/include/generic-glibc/bits/floatn-common.h
+++ b/lib/libc/include/generic-glibc/bits/floatn-common.h
@@ -1,6 +1,6 @@
/* Macros to control TS 18661-3 glibc features where the same
definitions are appropriate for all platforms.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/generic-glibc/bits/floatn.h
index 45bed17fdd..23dd2abf0a 100644
--- a/lib/libc/include/generic-glibc/bits/floatn.h
+++ b/lib/libc/include/generic-glibc/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/flt-eval-method.h b/lib/libc/include/generic-glibc/bits/flt-eval-method.h
index 5556c5dae7..a64af2fe40 100644
--- a/lib/libc/include/generic-glibc/bits/flt-eval-method.h
+++ b/lib/libc/include/generic-glibc/bits/flt-eval-method.h
@@ -1,5 +1,5 @@
/* Define __GLIBC_FLT_EVAL_METHOD.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/fp-fast.h b/lib/libc/include/generic-glibc/bits/fp-fast.h
index f6ba20a204..ae2d8206e4 100644
--- a/lib/libc/include/generic-glibc/bits/fp-fast.h
+++ b/lib/libc/include/generic-glibc/bits/fp-fast.h
@@ -1,5 +1,5 @@
/* Define FP_FAST_* macros.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/fp-logb.h b/lib/libc/include/generic-glibc/bits/fp-logb.h
index 3a4c9b0c34..ae61591f33 100644
--- a/lib/libc/include/generic-glibc/bits/fp-logb.h
+++ b/lib/libc/include/generic-glibc/bits/fp-logb.h
@@ -1,5 +1,5 @@
/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/getopt_core.h b/lib/libc/include/generic-glibc/bits/getopt_core.h
index 817e7785b5..dfd4920a57 100644
--- a/lib/libc/include/generic-glibc/bits/getopt_core.h
+++ b/lib/libc/include/generic-glibc/bits/getopt_core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/libc/include/generic-glibc/bits/getopt_ext.h b/lib/libc/include/generic-glibc/bits/getopt_ext.h
index ecbfee5409..3d6aef5b43 100644
--- a/lib/libc/include/generic-glibc/bits/getopt_ext.h
+++ b/lib/libc/include/generic-glibc/bits/getopt_ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/libc/include/generic-glibc/bits/getopt_posix.h b/lib/libc/include/generic-glibc/bits/getopt_posix.h
index 7f8096a43c..6374a0778d 100644
--- a/lib/libc/include/generic-glibc/bits/getopt_posix.h
+++ b/lib/libc/include/generic-glibc/bits/getopt_posix.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (POSIX compatibility shim).
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
Unlike the bulk of the getopt implementation, this file is NOT part
of gnulib.
diff --git a/lib/libc/include/generic-glibc/bits/hwcap.h b/lib/libc/include/generic-glibc/bits/hwcap.h
index c978f78936..38f3c42f25 100644
--- a/lib/libc/include/generic-glibc/bits/hwcap.h
+++ b/lib/libc/include/generic-glibc/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/in.h b/lib/libc/include/generic-glibc/bits/in.h
index 0e940cc5a6..e235d43015 100644
--- a/lib/libc/include/generic-glibc/bits/in.h
+++ b/lib/libc/include/generic-glibc/bits/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/indirect-return.h b/lib/libc/include/generic-glibc/bits/indirect-return.h
index 7ba1bd2038..0fc202e8ad 100644
--- a/lib/libc/include/generic-glibc/bits/indirect-return.h
+++ b/lib/libc/include/generic-glibc/bits/indirect-return.h
@@ -1,5 +1,5 @@
/* Definition of __INDIRECT_RETURN. Generic version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/inet-fortified-decl.h b/lib/libc/include/generic-glibc/bits/inet-fortified-decl.h
index a77a0477cd..018e00209f 100644
--- a/lib/libc/include/generic-glibc/bits/inet-fortified-decl.h
+++ b/lib/libc/include/generic-glibc/bits/inet-fortified-decl.h
@@ -1,5 +1,5 @@
/* Declarations of checking macros for inet functions.
- Copyright (C) 2025 Free Software Foundation, Inc.
+ Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/inet-fortified.h b/lib/libc/include/generic-glibc/bits/inet-fortified.h
index 88aafbe8b2..fe404d4d06 100644
--- a/lib/libc/include/generic-glibc/bits/inet-fortified.h
+++ b/lib/libc/include/generic-glibc/bits/inet-fortified.h
@@ -1,5 +1,5 @@
/* Checking macros for inet functions.
- Copyright (C) 2025 Free Software Foundation, Inc.
+ Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,15 +45,17 @@ __NTH (inet_pton (int __af,
__fortify_clang_warning_only_if_bos0_lt
(4, __dst, "inet_pton called with destination buffer size less than 4")
{
- size_t sz = 0;
+#if !__fortify_use_clang
+ size_t __sz = 0;
if (__af == AF_INET)
- sz = sizeof (struct in_addr);
+ __sz = sizeof (struct in_addr);
else if (__af == AF_INET6)
- sz = sizeof (struct in6_addr);
+ __sz = sizeof (struct in6_addr);
else
return __inet_pton_alias (__af, __src, __dst);
+#endif
- return __glibc_fortify (inet_pton, sz, sizeof (char),
+ return __glibc_fortify (inet_pton, __sz, sizeof (char),
__glibc_objsize (__dst),
__af, __src, __dst);
};
diff --git a/lib/libc/include/generic-glibc/bits/inotify.h b/lib/libc/include/generic-glibc/bits/inotify.h
index 4bc5510f71..f646147563 100644
--- a/lib/libc/include/generic-glibc/bits/inotify.h
+++ b/lib/libc/include/generic-glibc/bits/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ioctl-types.h b/lib/libc/include/generic-glibc/bits/ioctl-types.h
index 13c5bc0d45..28bbfa7c2c 100644
--- a/lib/libc/include/generic-glibc/bits/ioctl-types.h
+++ b/lib/libc/include/generic-glibc/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ioctls.h b/lib/libc/include/generic-glibc/bits/ioctls.h
index 84594dd239..7dfc0dc801 100644
--- a/lib/libc/include/generic-glibc/bits/ioctls.h
+++ b/lib/libc/include/generic-glibc/bits/ioctls.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ipc-perm.h b/lib/libc/include/generic-glibc/bits/ipc-perm.h
index e5c8cfb66a..2dc2424579 100644
--- a/lib/libc/include/generic-glibc/bits/ipc-perm.h
+++ b/lib/libc/include/generic-glibc/bits/ipc-perm.h
@@ -1,5 +1,5 @@
/* struct ipc_perm definition.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ipc.h b/lib/libc/include/generic-glibc/bits/ipc.h
index ee51271f89..c44dc1155d 100644
--- a/lib/libc/include/generic-glibc/bits/ipc.h
+++ b/lib/libc/include/generic-glibc/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ipctypes.h b/lib/libc/include/generic-glibc/bits/ipctypes.h
index a747e9c6b7..92e5bca75d 100644
--- a/lib/libc/include/generic-glibc/bits/ipctypes.h
+++ b/lib/libc/include/generic-glibc/bits/ipctypes.h
@@ -1,5 +1,5 @@
/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/iscanonical.h b/lib/libc/include/generic-glibc/bits/iscanonical.h
index 35d241066f..c5295802a2 100644
--- a/lib/libc/include/generic-glibc/bits/iscanonical.h
+++ b/lib/libc/include/generic-glibc/bits/iscanonical.h
@@ -1,5 +1,5 @@
/* Define iscanonical macro.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/libc-header-start.h b/lib/libc/include/generic-glibc/bits/libc-header-start.h
index 874d697a98..4a5cd012a0 100644
--- a/lib/libc/include/generic-glibc/bits/libc-header-start.h
+++ b/lib/libc/include/generic-glibc/bits/libc-header-start.h
@@ -1,5 +1,5 @@
/* Handle feature test macros at the start of a header.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h b/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h
index 15df4ea88f..d3b43f59cc 100644
--- a/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h
+++ b/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h
@@ -1,5 +1,5 @@
/* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h.
- Copyright (C) 2014-2025 Free Software Foundation, Inc.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -187,6 +187,28 @@
#define __DECL_SIMD_expm1f64x
#define __DECL_SIMD_expm1f128x
+#define __DECL_SIMD_exp2m1
+#define __DECL_SIMD_exp2m1f
+#define __DECL_SIMD_exp2m1l
+#define __DECL_SIMD_exp2m1f16
+#define __DECL_SIMD_exp2m1f32
+#define __DECL_SIMD_exp2m1f64
+#define __DECL_SIMD_exp2m1f128
+#define __DECL_SIMD_exp2m1f32x
+#define __DECL_SIMD_exp2m1f64x
+#define __DECL_SIMD_exp2m1f128x
+
+#define __DECL_SIMD_exp10m1
+#define __DECL_SIMD_exp10m1f
+#define __DECL_SIMD_exp10m1l
+#define __DECL_SIMD_exp10m1f16
+#define __DECL_SIMD_exp10m1f32
+#define __DECL_SIMD_exp10m1f64
+#define __DECL_SIMD_exp10m1f128
+#define __DECL_SIMD_exp10m1f32x
+#define __DECL_SIMD_exp10m1f64x
+#define __DECL_SIMD_exp10m1f128x
+
#define __DECL_SIMD_sinh
#define __DECL_SIMD_sinhf
#define __DECL_SIMD_sinhl
@@ -220,6 +242,17 @@
#define __DECL_SIMD_atan2f64x
#define __DECL_SIMD_atan2f128x
+#define __DECL_SIMD_rsqrt
+#define __DECL_SIMD_rsqrtf
+#define __DECL_SIMD_rsqrtl
+#define __DECL_SIMD_rsqrtf16
+#define __DECL_SIMD_rsqrtf32
+#define __DECL_SIMD_rsqrtf64
+#define __DECL_SIMD_rsqrtf128
+#define __DECL_SIMD_rsqrtf32x
+#define __DECL_SIMD_rsqrtf64x
+#define __DECL_SIMD_rsqrtf128x
+
#define __DECL_SIMD_log10
#define __DECL_SIMD_log10f
#define __DECL_SIMD_log10l
@@ -231,6 +264,17 @@
#define __DECL_SIMD_log10f64x
#define __DECL_SIMD_log10f128x
+#define __DECL_SIMD_log10p1
+#define __DECL_SIMD_log10p1f
+#define __DECL_SIMD_log10p1l
+#define __DECL_SIMD_log10p1f16
+#define __DECL_SIMD_log10p1f32
+#define __DECL_SIMD_log10p1f64
+#define __DECL_SIMD_log10p1f128
+#define __DECL_SIMD_log10p1f32x
+#define __DECL_SIMD_log10p1f64x
+#define __DECL_SIMD_log10p1f128x
+
#define __DECL_SIMD_log2
#define __DECL_SIMD_log2f
#define __DECL_SIMD_log2l
@@ -242,6 +286,17 @@
#define __DECL_SIMD_log2f64x
#define __DECL_SIMD_log2f128x
+#define __DECL_SIMD_log2p1
+#define __DECL_SIMD_log2p1f
+#define __DECL_SIMD_log2p1l
+#define __DECL_SIMD_log2p1f16
+#define __DECL_SIMD_log2p1f32
+#define __DECL_SIMD_log2p1f64
+#define __DECL_SIMD_log2p1f128
+#define __DECL_SIMD_log2p1f32x
+#define __DECL_SIMD_log2p1f64x
+#define __DECL_SIMD_log2p1f128x
+
#define __DECL_SIMD_log1p
#define __DECL_SIMD_log1pf
#define __DECL_SIMD_log1pl
diff --git a/lib/libc/include/generic-glibc/bits/link.h b/lib/libc/include/generic-glibc/bits/link.h
index dd48323d42..b3eb6c20bf 100644
--- a/lib/libc/include/generic-glibc/bits/link.h
+++ b/lib/libc/include/generic-glibc/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/link_lavcurrent.h b/lib/libc/include/generic-glibc/bits/link_lavcurrent.h
index dab34fb38d..ee89bde862 100644
--- a/lib/libc/include/generic-glibc/bits/link_lavcurrent.h
+++ b/lib/libc/include/generic-glibc/bits/link_lavcurrent.h
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects. LAV_CURRENT definition.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/local_lim.h b/lib/libc/include/generic-glibc/bits/local_lim.h
index 307c15f46a..ac5116dd31 100644
--- a/lib/libc/include/generic-glibc/bits/local_lim.h
+++ b/lib/libc/include/generic-glibc/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/locale.h b/lib/libc/include/generic-glibc/bits/locale.h
index f327ed10cc..5f2f5d03c6 100644
--- a/lib/libc/include/generic-glibc/bits/locale.h
+++ b/lib/libc/include/generic-glibc/bits/locale.h
@@ -1,5 +1,5 @@
/* Definition of locale category symbol values.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/long-double.h b/lib/libc/include/generic-glibc/bits/long-double.h
index d745334ed3..ebf6ac878f 100644
--- a/lib/libc/include/generic-glibc/bits/long-double.h
+++ b/lib/libc/include/generic-glibc/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. MIPS version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/math-vector.h b/lib/libc/include/generic-glibc/bits/math-vector.h
index eb2bb2a25a..02b8a1a937 100644
--- a/lib/libc/include/generic-glibc/bits/math-vector.h
+++ b/lib/libc/include/generic-glibc/bits/math-vector.h
@@ -1,5 +1,5 @@
/* Platform-specific SIMD declarations of math functions.
- Copyright (C) 2014-2025 Free Software Foundation, Inc.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h b/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h
index d43de427bf..cdfabc8a73 100644
--- a/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h
+++ b/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h
@@ -1,5 +1,5 @@
/* Prototype declarations for math classification macros helpers.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-macros.h b/lib/libc/include/generic-glibc/bits/mathcalls-macros.h
index d5b71472bb..3c2c0a600d 100644
--- a/lib/libc/include/generic-glibc/bits/mathcalls-macros.h
+++ b/lib/libc/include/generic-glibc/bits/mathcalls-macros.h
@@ -1,5 +1,5 @@
/* Macros for math function declarations.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h b/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h
index 9e73c83fe0..fb6ad62951 100644
--- a/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h
+++ b/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h
@@ -1,5 +1,5 @@
/* Declare functions returning a narrower type.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mathcalls.h b/lib/libc/include/generic-glibc/bits/mathcalls.h
index 265c1b8675..7ff83e5acb 100644
--- a/lib/libc/include/generic-glibc/bits/mathcalls.h
+++ b/lib/libc/include/generic-glibc/bits/mathcalls.h
@@ -1,5 +1,5 @@
/* Prototype declarations for math functions; helper file for .
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -136,16 +136,16 @@ __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
__MATHCALL_VEC (exp10,, (_Mdouble_ __x));
/* Return exp2(X) - 1. */
-__MATHCALL (exp2m1,, (_Mdouble_ __x));
+__MATHCALL_VEC (exp2m1,, (_Mdouble_ __x));
/* Return exp10(X) - 1. */
-__MATHCALL (exp10m1,, (_Mdouble_ __x));
+__MATHCALL_VEC (exp10m1,, (_Mdouble_ __x));
/* Return log2(1 + X). */
-__MATHCALL (log2p1,, (_Mdouble_ __x));
+__MATHCALL_VEC (log2p1,, (_Mdouble_ __x));
/* Return log10(1 + X). */
-__MATHCALL (log10p1,, (_Mdouble_ __x));
+__MATHCALL_VEC (log10p1,, (_Mdouble_ __x));
/* Return log(1 + X). */
__MATHCALL_VEC (logp1,, (_Mdouble_ __x));
@@ -203,7 +203,7 @@ __MATHCALL (powr,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (rootn,, (_Mdouble_ __x, long long int __y));
/* Return the reciprocal of the square root of X. */
-__MATHCALL (rsqrt,, (_Mdouble_ __x));
+__MATHCALL_VEC (rsqrt,, (_Mdouble_ __x));
#endif
@@ -400,25 +400,21 @@ __MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
/* Round X to nearest signed integer value, not raising inexact, with
control of rounding direction and width of result. */
-__MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round,
- unsigned int __width));
+__MATHCALL (fromfp,, (_Mdouble_ __x, int __round, unsigned int __width));
/* Round X to nearest unsigned integer value, not raising inexact,
with control of rounding direction and width of result. */
-__MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round,
- unsigned int __width));
+__MATHCALL (ufromfp,, (_Mdouble_ __x, int __round, unsigned int __width));
/* Round X to nearest signed integer value, raising inexact for
non-integers, with control of rounding direction and width of
result. */
-__MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round,
- unsigned int __width));
+__MATHCALL (fromfpx,, (_Mdouble_ __x, int __round, unsigned int __width));
/* Round X to nearest unsigned integer value, raising inexact for
non-integers, with control of rounding direction and width of
result. */
-__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
- unsigned int __width));
+__MATHCALL (ufromfpx,, (_Mdouble_ __x, int __round, unsigned int __width));
/* Canonicalize floating-point representation. */
__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
diff --git a/lib/libc/include/generic-glibc/bits/mathdef.h b/lib/libc/include/generic-glibc/bits/mathdef.h
index 3dfada4812..30700d1f89 100644
--- a/lib/libc/include/generic-glibc/bits/mathdef.h
+++ b/lib/libc/include/generic-glibc/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mman-linux.h b/lib/libc/include/generic-glibc/bits/mman-linux.h
index 2dbd4d3a06..f1813f9f8e 100644
--- a/lib/libc/include/generic-glibc/bits/mman-linux.h
+++ b/lib/libc/include/generic-glibc/bits/mman-linux.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux generic version.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h b/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h
index 6a1390fcba..1c79e35649 100644
--- a/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h
+++ b/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/generic version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mman-shared.h b/lib/libc/include/generic-glibc/bits/mman-shared.h
index 39e82407cd..6081d111d2 100644
--- a/lib/libc/include/generic-glibc/bits/mman-shared.h
+++ b/lib/libc/include/generic-glibc/bits/mman-shared.h
@@ -1,5 +1,5 @@
/* Memory-mapping-related declarations/definitions, not architecture-specific.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,6 +85,16 @@ int pkey_free (int __key) __THROW;
range. */
int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __THROW;
+/* Seal the address range to avoid further modifications, such as remapping to
+ shrink or expand the VMA, changing protection permission with mprotect,
+ unmap with munmap, or destructive semantics such as madvise with
+ MADV_DONTNEED.
+
+ The address range must be a valid VMA, without any gaps (unallocated
+ memory) between the start and end, and ADDR must be page-aligned (LEN will
+ be page-aligned implicitly). */
+int mseal (void *__addr, size_t __len, unsigned long flags) __THROW;
+
__END_DECLS
-#endif /* __USE_GNU */
+#endif /* __USE_GNU */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/mman.h b/lib/libc/include/generic-glibc/bits/mman.h
index de1d81f6dd..d77652012a 100644
--- a/lib/libc/include/generic-glibc/bits/mman.h
+++ b/lib/libc/include/generic-glibc/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/generic version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mman_ext.h b/lib/libc/include/generic-glibc/bits/mman_ext.h
index 20729a0081..35570768ac 100644
--- a/lib/libc/include/generic-glibc/bits/mman_ext.h
+++ b/lib/libc/include/generic-glibc/bits/mman_ext.h
@@ -1,5 +1,5 @@
/* System-specific extensions of , Linux version.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/monetary-ldbl.h b/lib/libc/include/generic-glibc/bits/monetary-ldbl.h
index 5ee13e30a5..4cd6a82d81 100644
--- a/lib/libc/include/generic-glibc/bits/monetary-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/monetary-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for monetary functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mqueue.h b/lib/libc/include/generic-glibc/bits/mqueue.h
index 8bc2e803ed..7922cee1e4 100644
--- a/lib/libc/include/generic-glibc/bits/mqueue.h
+++ b/lib/libc/include/generic-glibc/bits/mqueue.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/mqueue2.h b/lib/libc/include/generic-glibc/bits/mqueue2.h
index 5e00de211d..49d5e4ccf6 100644
--- a/lib/libc/include/generic-glibc/bits/mqueue2.h
+++ b/lib/libc/include/generic-glibc/bits/mqueue2.h
@@ -1,5 +1,5 @@
/* Checking macros for mq functions.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/msq.h b/lib/libc/include/generic-glibc/bits/msq.h
index 8df20c3d39..a5fa185e6e 100644
--- a/lib/libc/include/generic-glibc/bits/msq.h
+++ b/lib/libc/include/generic-glibc/bits/msq.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/netdb.h b/lib/libc/include/generic-glibc/bits/netdb.h
index 17011caa40..e97e5e720a 100644
--- a/lib/libc/include/generic-glibc/bits/netdb.h
+++ b/lib/libc/include/generic-glibc/bits/netdb.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/openat2.h b/lib/libc/include/generic-glibc/bits/openat2.h
new file mode 100644
index 0000000000..4136a17420
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/openat2.h
@@ -0,0 +1,60 @@
+/* openat2 definition. Linux specific.
+ Copyright (C) 2025-2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ . */
+
+#ifndef _FCNTL_H
+# error "Never use directly; include instead."
+#endif
+
+#ifndef __glibc_has_open_how
+/* Arguments for how openat2 should open the target path. */
+struct open_how
+{
+ __uint64_t flags;
+ __uint64_t mode;
+ __uint64_t resolve;
+};
+#endif
+
+/* how->resolve flags for openat2. */
+#ifndef RESOLVE_NO_XDEV
+# define RESOLVE_NO_XDEV 0x01 /* Block mount-point crossings
+ (includes bind-mounts). */
+#endif
+#ifndef RESOLVE_NO_MAGICLINKS
+# define RESOLVE_NO_MAGICLINKS 0x02 /* Block traversal through procfs-style
+ "magic-links". */
+#endif
+#ifndef RESOLVE_NO_SYMLINKS
+# define RESOLVE_NO_SYMLINKS 0x04 /* Block traversal through all symlinks. */
+#endif
+#ifndef RESOLVE_BENEATH
+# define RESOLVE_BENEATH 0x08 /* Block "lexical" trickery like
+ "..", symlinks, and absolute
+ paths which escape the dirfd. */
+#endif
+#ifndef RESOLVE_IN_ROOT
+# define RESOLVE_IN_ROOT 0x10 /* Make all jumps to "/" and ".."
+ be scoped inside the dirfd
+ (similar to chroot). */
+#endif
+#ifndef RESOLVE_CACHED
+# define RESOLVE_CACHED 0x20 /* Only complete if resolution can be
+ completed through cached lookup. May
+ return -EAGAIN if that's not
+ possible. */
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/param.h b/lib/libc/include/generic-glibc/bits/param.h
index e8c5c9da60..9a41566e0c 100644
--- a/lib/libc/include/generic-glibc/bits/param.h
+++ b/lib/libc/include/generic-glibc/bits/param.h
@@ -1,5 +1,5 @@
/* Old-style Unix parameters and limits. Linux version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/platform/features.h b/lib/libc/include/generic-glibc/bits/platform/features.h
index 6123494cf6..e26cbc2b45 100644
--- a/lib/libc/include/generic-glibc/bits/platform/features.h
+++ b/lib/libc/include/generic-glibc/bits/platform/features.h
@@ -1,6 +1,6 @@
/* Inline functions for x86 CPU features.
This file is part of the GNU C Library.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/bits/platform/x86.h b/lib/libc/include/generic-glibc/bits/platform/x86.h
index 5b2ad573fe..f4a94eec54 100644
--- a/lib/libc/include/generic-glibc/bits/platform/x86.h
+++ b/lib/libc/include/generic-glibc/bits/platform/x86.h
@@ -1,6 +1,6 @@
/* Constants and data structures for x86 CPU features.
This file is part of the GNU C Library.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/bits/poll.h b/lib/libc/include/generic-glibc/bits/poll.h
index 50cc20cb09..4ba71517ae 100644
--- a/lib/libc/include/generic-glibc/bits/poll.h
+++ b/lib/libc/include/generic-glibc/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/poll2.h b/lib/libc/include/generic-glibc/bits/poll2.h
index 6e912e6d70..85cd62dbc6 100644
--- a/lib/libc/include/generic-glibc/bits/poll2.h
+++ b/lib/libc/include/generic-glibc/bits/poll2.h
@@ -1,5 +1,5 @@
/* Checking macros for poll functions.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/posix1_lim.h b/lib/libc/include/generic-glibc/bits/posix1_lim.h
index 13d18f5297..63d138f0a4 100644
--- a/lib/libc/include/generic-glibc/bits/posix1_lim.h
+++ b/lib/libc/include/generic-glibc/bits/posix1_lim.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/posix2_lim.h b/lib/libc/include/generic-glibc/bits/posix2_lim.h
index edeab6fc6f..0a22bd055b 100644
--- a/lib/libc/include/generic-glibc/bits/posix2_lim.h
+++ b/lib/libc/include/generic-glibc/bits/posix2_lim.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/posix_opt.h b/lib/libc/include/generic-glibc/bits/posix_opt.h
index 2bd0c183e8..35c13aa7d7 100644
--- a/lib/libc/include/generic-glibc/bits/posix_opt.h
+++ b/lib/libc/include/generic-glibc/bits/posix_opt.h
@@ -1,5 +1,5 @@
/* Define POSIX options for Linux.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,7 +54,7 @@
/* `c_cc' member of 'struct termios' structure can be disabled by
using the value _POSIX_VDISABLE. */
-#define _POSIX_VDISABLE '\0'
+#define _POSIX_VDISABLE 0
/* Filenames are not silently truncated. */
#define _POSIX_NO_TRUNC 1
diff --git a/lib/libc/include/generic-glibc/bits/ppc.h b/lib/libc/include/generic-glibc/bits/ppc.h
index af91d4ca3c..5e98f066e0 100644
--- a/lib/libc/include/generic-glibc/bits/ppc.h
+++ b/lib/libc/include/generic-glibc/bits/ppc.h
@@ -1,5 +1,5 @@
/* Facilities specific to the PowerPC architecture on Linux
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/printf-ldbl.h b/lib/libc/include/generic-glibc/bits/printf-ldbl.h
index c1bd5c3820..034c5c0ce6 100644
--- a/lib/libc/include/generic-glibc/bits/printf-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/printf-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/procfs-extra.h b/lib/libc/include/generic-glibc/bits/procfs-extra.h
index f89b7d8e95..114d9a77a2 100644
--- a/lib/libc/include/generic-glibc/bits/procfs-extra.h
+++ b/lib/libc/include/generic-glibc/bits/procfs-extra.h
@@ -1,5 +1,5 @@
/* Extra sys/procfs.h definitions. Generic Linux version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/procfs-id.h b/lib/libc/include/generic-glibc/bits/procfs-id.h
index 9ad086fe80..ee42fb67e0 100644
--- a/lib/libc/include/generic-glibc/bits/procfs-id.h
+++ b/lib/libc/include/generic-glibc/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/procfs-prregset.h b/lib/libc/include/generic-glibc/bits/procfs-prregset.h
index 2bed448895..2d51ab3fc2 100644
--- a/lib/libc/include/generic-glibc/bits/procfs-prregset.h
+++ b/lib/libc/include/generic-glibc/bits/procfs-prregset.h
@@ -1,5 +1,5 @@
/* Types of prgregset_t and prfpregset_t. Generic Linux version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/procfs.h b/lib/libc/include/generic-glibc/bits/procfs.h
index f32dc14a7b..a0fe6eec91 100644
--- a/lib/libc/include/generic-glibc/bits/procfs.h
+++ b/lib/libc/include/generic-glibc/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. MIPS version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h b/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
index a0420827bd..643fa7e903 100644
--- a/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
+++ b/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN, possibly dynamic.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/pthread_stack_min.h b/lib/libc/include/generic-glibc/bits/pthread_stack_min.h
index ecd3479f6a..5a9a10a0d5 100644
--- a/lib/libc/include/generic-glibc/bits/pthread_stack_min.h
+++ b/lib/libc/include/generic-glibc/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. Linux version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h b/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h
index d86351fd41..1c332be795 100644
--- a/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/pthreadtypes.h b/lib/libc/include/generic-glibc/bits/pthreadtypes.h
index 3510b0a208..a2a29e841c 100644
--- a/lib/libc/include/generic-glibc/bits/pthreadtypes.h
+++ b/lib/libc/include/generic-glibc/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Declaration of common pthread types for all architectures.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ptrace-shared.h b/lib/libc/include/generic-glibc/bits/ptrace-shared.h
index 8016ba27c6..8ce2e90214 100644
--- a/lib/libc/include/generic-glibc/bits/ptrace-shared.h
+++ b/lib/libc/include/generic-glibc/bits/ptrace-shared.h
@@ -1,6 +1,6 @@
/* `ptrace' debugger support interface. Linux version,
not architecture-specific.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/resource.h b/lib/libc/include/generic-glibc/bits/resource.h
index 8711f46164..7ab2550b3c 100644
--- a/lib/libc/include/generic-glibc/bits/resource.h
+++ b/lib/libc/include/generic-glibc/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/rseq.h b/lib/libc/include/generic-glibc/bits/rseq.h
index 60f35a6261..520d973af2 100644
--- a/lib/libc/include/generic-glibc/bits/rseq.h
+++ b/lib/libc/include/generic-glibc/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux mips architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/bits/sched.h b/lib/libc/include/generic-glibc/bits/sched.h
index c0e7cd3ead..aa49876c1c 100644
--- a/lib/libc/include/generic-glibc/bits/sched.h
+++ b/lib/libc/include/generic-glibc/bits/sched.h
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/select-decl.h b/lib/libc/include/generic-glibc/bits/select-decl.h
index fb3a3a6ae9..0796f7f3e4 100644
--- a/lib/libc/include/generic-glibc/bits/select-decl.h
+++ b/lib/libc/include/generic-glibc/bits/select-decl.h
@@ -1,5 +1,5 @@
/* Checking routines for select functions. Declaration only.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/select.h b/lib/libc/include/generic-glibc/bits/select.h
index 2683668a05..36cce0ec34 100644
--- a/lib/libc/include/generic-glibc/bits/select.h
+++ b/lib/libc/include/generic-glibc/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/select2.h b/lib/libc/include/generic-glibc/bits/select2.h
index 0144b4092d..8d82cd5049 100644
--- a/lib/libc/include/generic-glibc/bits/select2.h
+++ b/lib/libc/include/generic-glibc/bits/select2.h
@@ -1,5 +1,5 @@
/* Checking macros for select functions.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sem.h b/lib/libc/include/generic-glibc/bits/sem.h
index 8b2d5f5eb4..5a6afb70eb 100644
--- a/lib/libc/include/generic-glibc/bits/sem.h
+++ b/lib/libc/include/generic-glibc/bits/sem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/generic-glibc/bits/semaphore.h
index c84a8d70a2..bc0b489262 100644
--- a/lib/libc/include/generic-glibc/bits/semaphore.h
+++ b/lib/libc/include/generic-glibc/bits/semaphore.h
@@ -1,5 +1,5 @@
/* Generic POSIX semaphore type layout
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/setjmp.h b/lib/libc/include/generic-glibc/bits/setjmp.h
index 5eefe2f900..f7ba985a9f 100644
--- a/lib/libc/include/generic-glibc/bits/setjmp.h
+++ b/lib/libc/include/generic-glibc/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/setjmp2.h b/lib/libc/include/generic-glibc/bits/setjmp2.h
index 9542c0560d..9f98fe0b7d 100644
--- a/lib/libc/include/generic-glibc/bits/setjmp2.h
+++ b/lib/libc/include/generic-glibc/bits/setjmp2.h
@@ -1,5 +1,5 @@
/* Checking macros for setjmp functions.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/shm.h b/lib/libc/include/generic-glibc/bits/shm.h
index 89562d77a1..59ebb918b0 100644
--- a/lib/libc/include/generic-glibc/bits/shm.h
+++ b/lib/libc/include/generic-glibc/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/shmlba.h b/lib/libc/include/generic-glibc/bits/shmlba.h
index 45a3b0713a..396ac08af1 100644
--- a/lib/libc/include/generic-glibc/bits/shmlba.h
+++ b/lib/libc/include/generic-glibc/bits/shmlba.h
@@ -1,5 +1,5 @@
/* Define SHMLBA. Generic version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigaction.h b/lib/libc/include/generic-glibc/bits/sigaction.h
index 130895b132..64836caa87 100644
--- a/lib/libc/include/generic-glibc/bits/sigaction.h
+++ b/lib/libc/include/generic-glibc/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux's sigaction.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigcontext.h b/lib/libc/include/generic-glibc/bits/sigcontext.h
index ac320c03d0..c551fb8e1e 100644
--- a/lib/libc/include/generic-glibc/bits/sigcontext.h
+++ b/lib/libc/include/generic-glibc/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigevent-consts.h b/lib/libc/include/generic-glibc/bits/sigevent-consts.h
index 93eb14f80a..18a1c9b2a7 100644
--- a/lib/libc/include/generic-glibc/bits/sigevent-consts.h
+++ b/lib/libc/include/generic-glibc/bits/sigevent-consts.h
@@ -1,5 +1,5 @@
/* sigevent constants. Linux version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/siginfo-consts.h b/lib/libc/include/generic-glibc/bits/siginfo-consts.h
index 5958670bfa..f4a1a39f77 100644
--- a/lib/libc/include/generic-glibc/bits/siginfo-consts.h
+++ b/lib/libc/include/generic-glibc/bits/siginfo-consts.h
@@ -1,5 +1,5 @@
/* siginfo constants. Linux version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -168,8 +168,10 @@ enum
# define TRAP_BRANCH TRAP_BRANCH
TRAP_HWBKPT, /* Hardware breakpoint/watchpoint. */
# define TRAP_HWBKPT TRAP_HWBKPT
- TRAP_UNK /* Undiagnosed trap. */
+ TRAP_UNK, /* Undiagnosed trap. */
# define TRAP_UNK TRAP_UNK
+ TRAP_PERF /* Perf event with sigtrap=1. */
+# define TRAP_PERF TRAP_PERF
};
# endif
@@ -209,6 +211,18 @@ enum
};
# endif
+/* The Linux-specific SIGSYS values are all considered GNU extensions. */
+#ifdef __USE_GNU
+/* `si_code' values for SIGSYS signal. */
+enum
+{
+ SYS_SECCOMP = 1, /* Seccomp triggered. */
+# define SYS_SECCOMP SYS_SECCOMP
+ SYS_USER_DISPATCH /* Syscall user dispatch triggered. */
+# define SYS_USER_DISPATCH SYS_USER_DISPATCH
+};
+#endif
+
/* Architectures might also add architecture-specific constants.
These are all considered GNU extensions. */
#ifdef __USE_GNU
diff --git a/lib/libc/include/generic-glibc/bits/signal_ext.h b/lib/libc/include/generic-glibc/bits/signal_ext.h
index e19d2026ba..1e87f9d2eb 100644
--- a/lib/libc/include/generic-glibc/bits/signal_ext.h
+++ b/lib/libc/include/generic-glibc/bits/signal_ext.h
@@ -1,5 +1,5 @@
/* System-specific extensions of , Linux version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/signalfd.h b/lib/libc/include/generic-glibc/bits/signalfd.h
index b54daab562..1cc97d8996 100644
--- a/lib/libc/include/generic-glibc/bits/signalfd.h
+++ b/lib/libc/include/generic-glibc/bits/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/signum-arch.h b/lib/libc/include/generic-glibc/bits/signum-arch.h
index a1e34a3191..5ae8d4973e 100644
--- a/lib/libc/include/generic-glibc/bits/signum-arch.h
+++ b/lib/libc/include/generic-glibc/bits/signum-arch.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/signum-generic.h b/lib/libc/include/generic-glibc/bits/signum-generic.h
index a6f4511a06..7c37e9d402 100644
--- a/lib/libc/include/generic-glibc/bits/signum-generic.h
+++ b/lib/libc/include/generic-glibc/bits/signum-generic.h
@@ -1,5 +1,5 @@
/* Signal number constants. Generic template.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigstack.h b/lib/libc/include/generic-glibc/bits/sigstack.h
index 3f238ad9bd..bd790e0515 100644
--- a/lib/libc/include/generic-glibc/bits/sigstack.h
+++ b/lib/libc/include/generic-glibc/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigstksz.h b/lib/libc/include/generic-glibc/bits/sigstksz.h
index dd535d7208..6210586a24 100644
--- a/lib/libc/include/generic-glibc/bits/sigstksz.h
+++ b/lib/libc/include/generic-glibc/bits/sigstksz.h
@@ -1,5 +1,5 @@
/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sigthread.h b/lib/libc/include/generic-glibc/bits/sigthread.h
index 752c13ccf6..071af39be9 100644
--- a/lib/libc/include/generic-glibc/bits/sigthread.h
+++ b/lib/libc/include/generic-glibc/bits/sigthread.h
@@ -1,5 +1,5 @@
/* Signal handling function for threaded programs.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sockaddr.h b/lib/libc/include/generic-glibc/bits/sockaddr.h
index cc2e91efcc..60095d188f 100644
--- a/lib/libc/include/generic-glibc/bits/sockaddr.h
+++ b/lib/libc/include/generic-glibc/bits/sockaddr.h
@@ -1,5 +1,5 @@
/* Definition of struct sockaddr_* common members and sizes, generic version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/socket-constants.h b/lib/libc/include/generic-glibc/bits/socket-constants.h
index d4efd385d1..fd8897fed1 100644
--- a/lib/libc/include/generic-glibc/bits/socket-constants.h
+++ b/lib/libc/include/generic-glibc/bits/socket-constants.h
@@ -1,5 +1,5 @@
/* Socket constants which vary among Linux architectures.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/socket.h b/lib/libc/include/generic-glibc/bits/socket.h
index 22cdb822c6..62c91e9ba9 100644
--- a/lib/libc/include/generic-glibc/bits/socket.h
+++ b/lib/libc/include/generic-glibc/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/socket2.h b/lib/libc/include/generic-glibc/bits/socket2.h
index 1365126b68..326deaf3aa 100644
--- a/lib/libc/include/generic-glibc/bits/socket2.h
+++ b/lib/libc/include/generic-glibc/bits/socket2.h
@@ -1,5 +1,5 @@
/* Checking macros for socket functions.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/socket_type.h b/lib/libc/include/generic-glibc/bits/socket_type.h
index a958432342..a763872fa9 100644
--- a/lib/libc/include/generic-glibc/bits/socket_type.h
+++ b/lib/libc/include/generic-glibc/bits/socket_type.h
@@ -1,5 +1,5 @@
/* Define enum __socket_type for generic Linux.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/spawn_ext.h b/lib/libc/include/generic-glibc/bits/spawn_ext.h
index 534d1c8fb1..e70b4be563 100644
--- a/lib/libc/include/generic-glibc/bits/spawn_ext.h
+++ b/lib/libc/include/generic-glibc/bits/spawn_ext.h
@@ -1,5 +1,5 @@
/* POSIX spawn extensions. Linux version.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/ss_flags.h b/lib/libc/include/generic-glibc/bits/ss_flags.h
index 642a09231c..2ba640d263 100644
--- a/lib/libc/include/generic-glibc/bits/ss_flags.h
+++ b/lib/libc/include/generic-glibc/bits/ss_flags.h
@@ -1,5 +1,5 @@
/* ss_flags values for stack_t. Linux version.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stab.def b/lib/libc/include/generic-glibc/bits/stab.def
index 2d684acbee..1967bf9983 100644
--- a/lib/libc/include/generic-glibc/bits/stab.def
+++ b/lib/libc/include/generic-glibc/bits/stab.def
@@ -1,5 +1,5 @@
/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stat.h b/lib/libc/include/generic-glibc/bits/stat.h
index 72ff0a8d8b..aba780ffd3 100644
--- a/lib/libc/include/generic-glibc/bits/stat.h
+++ b/lib/libc/include/generic-glibc/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/statfs.h b/lib/libc/include/generic-glibc/bits/statfs.h
index ed77ad1575..15ec2e10ff 100644
--- a/lib/libc/include/generic-glibc/bits/statfs.h
+++ b/lib/libc/include/generic-glibc/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/statvfs.h b/lib/libc/include/generic-glibc/bits/statvfs.h
index 38f11407d5..a10c21ac5e 100644
--- a/lib/libc/include/generic-glibc/bits/statvfs.h
+++ b/lib/libc/include/generic-glibc/bits/statvfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/statx-generic.h b/lib/libc/include/generic-glibc/bits/statx-generic.h
index c197005d8b..6663449e19 100644
--- a/lib/libc/include/generic-glibc/bits/statx-generic.h
+++ b/lib/libc/include/generic-glibc/bits/statx-generic.h
@@ -1,5 +1,5 @@
/* Generic statx-related definitions and declarations.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,6 +48,7 @@
# define STATX_MNT_ID_UNIQUE 0x4000U
# define STATX_SUBVOL 0x8000U
# define STATX_WRITE_ATOMIC 0x00010000U
+# define STATX_DIO_READ_ALIGN 0x00020000U
# define STATX__RESERVED 0x80000000U
# define STATX_ATTR_COMPRESSED 0x0004
diff --git a/lib/libc/include/generic-glibc/bits/statx.h b/lib/libc/include/generic-glibc/bits/statx.h
index 7b2e0ceb7c..e2b325c216 100644
--- a/lib/libc/include/generic-glibc/bits/statx.h
+++ b/lib/libc/include/generic-glibc/bits/statx.h
@@ -1,5 +1,5 @@
/* statx-related definitions and declarations. Linux version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdint-intn.h b/lib/libc/include/generic-glibc/bits/stdint-intn.h
index c66b42ee53..4ce6b7c45b 100644
--- a/lib/libc/include/generic-glibc/bits/stdint-intn.h
+++ b/lib/libc/include/generic-glibc/bits/stdint-intn.h
@@ -1,5 +1,5 @@
/* Define intN_t types.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdint-least.h b/lib/libc/include/generic-glibc/bits/stdint-least.h
index 2aae8a7b14..95ec33cabc 100644
--- a/lib/libc/include/generic-glibc/bits/stdint-least.h
+++ b/lib/libc/include/generic-glibc/bits/stdint-least.h
@@ -1,5 +1,5 @@
/* Define int_leastN_t and uint_leastN types.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdint-uintn.h b/lib/libc/include/generic-glibc/bits/stdint-uintn.h
index 1a53339370..f198de37b1 100644
--- a/lib/libc/include/generic-glibc/bits/stdint-uintn.h
+++ b/lib/libc/include/generic-glibc/bits/stdint-uintn.h
@@ -1,5 +1,5 @@
/* Define uintN_t types.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdio-ldbl.h b/lib/libc/include/generic-glibc/bits/stdio-ldbl.h
index 87bba9b4b8..4efb796751 100644
--- a/lib/libc/include/generic-glibc/bits/stdio-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/stdio-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for stdio functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdio.h b/lib/libc/include/generic-glibc/bits/stdio.h
index 4dd08a8b29..f5d0753a77 100644
--- a/lib/libc/include/generic-glibc/bits/stdio.h
+++ b/lib/libc/include/generic-glibc/bits/stdio.h
@@ -1,5 +1,5 @@
/* Optimizing macros and inline functions for stdio functions.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdio2-decl.h b/lib/libc/include/generic-glibc/bits/stdio2-decl.h
index 8591cafdf5..59a7d14bca 100644
--- a/lib/libc/include/generic-glibc/bits/stdio2-decl.h
+++ b/lib/libc/include/generic-glibc/bits/stdio2-decl.h
@@ -1,5 +1,5 @@
/* Checking macros for stdio functions. Declarations only.
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdio2.h b/lib/libc/include/generic-glibc/bits/stdio2.h
index 355ab080ed..7761b193e3 100644
--- a/lib/libc/include/generic-glibc/bits/stdio2.h
+++ b/lib/libc/include/generic-glibc/bits/stdio2.h
@@ -1,5 +1,5 @@
/* Checking macros for stdio functions.
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdio_lim.h b/lib/libc/include/generic-glibc/bits/stdio_lim.h
index 93fa44af20..71c45757d6 100644
--- a/lib/libc/include/generic-glibc/bits/stdio_lim.h
+++ b/lib/libc/include/generic-glibc/bits/stdio_lim.h
@@ -1,5 +1,5 @@
/* System specific stdio.h definitions. Linux version.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h b/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h
index 959676e3b6..2168bf70d3 100644
--- a/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h
+++ b/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h
@@ -1,5 +1,5 @@
/* Perform binary search - inline version.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdlib-float.h b/lib/libc/include/generic-glibc/bits/stdlib-float.h
index ff5f0a052d..3df3257fcd 100644
--- a/lib/libc/include/generic-glibc/bits/stdlib-float.h
+++ b/lib/libc/include/generic-glibc/bits/stdlib-float.h
@@ -1,5 +1,5 @@
/* Floating-point inline functions for stdlib.h.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h b/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h
index 332a7af8e1..08d0b18d4c 100644
--- a/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/stdlib.h b/lib/libc/include/generic-glibc/bits/stdlib.h
index e159bea9c7..d52a6d18ee 100644
--- a/lib/libc/include/generic-glibc/bits/stdlib.h
+++ b/lib/libc/include/generic-glibc/bits/stdlib.h
@@ -1,5 +1,5 @@
/* Checking macros for stdlib functions.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/string_fortified.h b/lib/libc/include/generic-glibc/bits/string_fortified.h
index 9c36d02fb1..b056dbbbf3 100644
--- a/lib/libc/include/generic-glibc/bits/string_fortified.h
+++ b/lib/libc/include/generic-glibc/bits/string_fortified.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,6 +60,18 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
__glibc_objsize0 (__dest));
}
+#if defined __USE_MISC || __GLIBC_USE (ISOC23)
+void *__memset_explicit_chk (void *__s, int __c, size_t __n, size_t __destlen)
+ __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 3);
+
+__fortify_function void *
+__NTH (memset_explicit (void *__dest, int __ch, size_t __len))
+{
+ return __memset_explicit_chk (__dest, __ch, __len,
+ __glibc_objsize0 (__dest));
+}
+#endif
+
#ifdef __USE_MISC
# include
diff --git a/lib/libc/include/generic-glibc/bits/strings_fortified.h b/lib/libc/include/generic-glibc/bits/strings_fortified.h
index aad1684f89..18c423af17 100644
--- a/lib/libc/include/generic-glibc/bits/strings_fortified.h
+++ b/lib/libc/include/generic-glibc/bits/strings_fortified.h
@@ -1,5 +1,5 @@
/* Fortify macros for strings.h functions.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/struct_mutex.h b/lib/libc/include/generic-glibc/bits/struct_mutex.h
index d794fea0d5..0476a87aa3 100644
--- a/lib/libc/include/generic-glibc/bits/struct_mutex.h
+++ b/lib/libc/include/generic-glibc/bits/struct_mutex.h
@@ -1,5 +1,5 @@
/* Default mutex implementation struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
/* Generic struct for both POSIX and C11 mutexes. New ports are expected
to use the default layout, however architecture can redefine it to
- add arch-specific extension (such as lock-elision). The struct have
- a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. */
+ add arch-specific extension. The struct have a size of 32 bytes on LP32
+ and 40 bytes on LP64 architectures. */
struct __pthread_mutex_s
{
@@ -40,21 +40,7 @@ struct __pthread_mutex_s
PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init.
After a mutex has been initialized, the __kind of a mutex is usually not
- changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can
- be enabled. This is done concurrently in the pthread_mutex_*lock
- functions by using the macro FORCE_ELISION. This macro is only defined
- for architectures which supports lock elision.
-
- For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and
- PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already
- set type of a mutex. Before a mutex is initialized, only
- PTHREAD_MUTEX_NO_ELISION_NP can be set with pthread_mutexattr_settype.
-
- After a mutex has been initialized, the functions pthread_mutex_*lock can
- enable elision - if the mutex-type and the machine supports it - by
- setting the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently.
- Afterwards the lock / unlock functions are using specific elision
- code-paths. */
+ changed. BUT it can be set to -1 in pthread_mutex_destroy. */
int __kind;
#if __WORDSIZE != 64
unsigned int __nusers;
diff --git a/lib/libc/include/generic-glibc/bits/struct_rwlock.h b/lib/libc/include/generic-glibc/bits/struct_rwlock.h
index d1f2e41e34..8fe478d7c8 100644
--- a/lib/libc/include/generic-glibc/bits/struct_rwlock.h
+++ b/lib/libc/include/generic-glibc/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* Default read-write lock implementation struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,8 +23,8 @@
/* Generic struct for both POSIX read-write lock. New ports are expected
to use the default layout, however archictetures can redefine it to add
- arch-specific extensions (such as lock-elision). The struct have a size
- of 32 bytes on both LP32 and LP64 architectures. */
+ arch-specific extensions. The struct have a size of 32 bytes on both LP32
+ and LP64 architectures. */
struct __pthread_rwlock_arch_t
{
diff --git a/lib/libc/include/generic-glibc/bits/struct_stat.h b/lib/libc/include/generic-glibc/bits/struct_stat.h
index c07c9a7660..231c875e7a 100644
--- a/lib/libc/include/generic-glibc/bits/struct_stat.h
+++ b/lib/libc/include/generic-glibc/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h b/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
index 9d927e834f..7dce3ade82 100644
--- a/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
+++ b/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
@@ -1,5 +1,5 @@
/* Definition for helper to define struct stat with 64-bit time.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/syscall.h b/lib/libc/include/generic-glibc/bits/syscall.h
index 3c70ff32d4..43e6645f7d 100644
--- a/lib/libc/include/generic-glibc/bits/syscall.h
+++ b/lib/libc/include/generic-glibc/bits/syscall.h
@@ -1,11 +1,11 @@
/* Generated at libc build time from syscall list. */
-/* The system call list corresponds to kernel 6.15. */
+/* The system call list corresponds to kernel 6.17. */
#ifndef _SYSCALL_H
# error "Never use directly; include instead."
#endif
-#define __GLIBC_LINUX_VERSION_CODE 397056
+#define __GLIBC_LINUX_VERSION_CODE 397568
#ifdef __NR_FAST_atomic_update
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
@@ -411,6 +411,14 @@
# define SYS_fgetxattr __NR_fgetxattr
#endif
+#ifdef __NR_file_getattr
+# define SYS_file_getattr __NR_file_getattr
+#endif
+
+#ifdef __NR_file_setattr
+# define SYS_file_setattr __NR_file_setattr
+#endif
+
#ifdef __NR_finit_module
# define SYS_finit_module __NR_finit_module
#endif
diff --git a/lib/libc/include/generic-glibc/bits/syslog-decl.h b/lib/libc/include/generic-glibc/bits/syslog-decl.h
index a6984dcd2c..25786a5a92 100644
--- a/lib/libc/include/generic-glibc/bits/syslog-decl.h
+++ b/lib/libc/include/generic-glibc/bits/syslog-decl.h
@@ -1,5 +1,5 @@
/* Checking routines for syslog functions. Declaration only.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/syslog-ldbl.h b/lib/libc/include/generic-glibc/bits/syslog-ldbl.h
index 4b038631dc..8d682f900e 100644
--- a/lib/libc/include/generic-glibc/bits/syslog-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/syslog-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for syslog functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/syslog-path.h b/lib/libc/include/generic-glibc/bits/syslog-path.h
index 808f2cb1d5..8ee09d71e0 100644
--- a/lib/libc/include/generic-glibc/bits/syslog-path.h
+++ b/lib/libc/include/generic-glibc/bits/syslog-path.h
@@ -1,5 +1,5 @@
/* -- _PATH_LOG definition
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/syslog.h b/lib/libc/include/generic-glibc/bits/syslog.h
index 322e9ba010..2c691c8abf 100644
--- a/lib/libc/include/generic-glibc/bits/syslog.h
+++ b/lib/libc/include/generic-glibc/bits/syslog.h
@@ -1,5 +1,5 @@
/* Checking macros for syslog functions.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/sysmacros.h b/lib/libc/include/generic-glibc/bits/sysmacros.h
index 3322015c54..cf1a1fc11f 100644
--- a/lib/libc/include/generic-glibc/bits/sysmacros.h
+++ b/lib/libc/include/generic-glibc/bits/sysmacros.h
@@ -1,5 +1,5 @@
/* Definitions of macros to access `dev_t' values.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-baud.h b/lib/libc/include/generic-glibc/bits/termios-baud.h
index cd11a7e55b..c270c9ffa4 100644
--- a/lib/libc/include/generic-glibc/bits/termios-baud.h
+++ b/lib/libc/include/generic-glibc/bits/termios-baud.h
@@ -1,5 +1,5 @@
/* termios baud rate selection definitions. Universal version for sane speed_t.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-c_cc.h b/lib/libc/include/generic-glibc/bits/termios-c_cc.h
index 964069a38e..25b7668a32 100644
--- a/lib/libc/include/generic-glibc/bits/termios-c_cc.h
+++ b/lib/libc/include/generic-glibc/bits/termios-c_cc.h
@@ -1,5 +1,5 @@
/* termios c_cc symbolic constant definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-c_cflag.h b/lib/libc/include/generic-glibc/bits/termios-c_cflag.h
index 7a4c0a53fe..9cd9efe0f1 100644
--- a/lib/libc/include/generic-glibc/bits/termios-c_cflag.h
+++ b/lib/libc/include/generic-glibc/bits/termios-c_cflag.h
@@ -1,5 +1,5 @@
/* termios control mode definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-c_iflag.h b/lib/libc/include/generic-glibc/bits/termios-c_iflag.h
index af8f549e20..62771829ec 100644
--- a/lib/libc/include/generic-glibc/bits/termios-c_iflag.h
+++ b/lib/libc/include/generic-glibc/bits/termios-c_iflag.h
@@ -1,5 +1,5 @@
/* termios input mode definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-c_lflag.h b/lib/libc/include/generic-glibc/bits/termios-c_lflag.h
index 35ff14842b..b407dfd6d5 100644
--- a/lib/libc/include/generic-glibc/bits/termios-c_lflag.h
+++ b/lib/libc/include/generic-glibc/bits/termios-c_lflag.h
@@ -1,5 +1,5 @@
/* termios local mode definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-c_oflag.h b/lib/libc/include/generic-glibc/bits/termios-c_oflag.h
index 0604a35e9a..4cfeff7ba6 100644
--- a/lib/libc/include/generic-glibc/bits/termios-c_oflag.h
+++ b/lib/libc/include/generic-glibc/bits/termios-c_oflag.h
@@ -1,5 +1,5 @@
/* termios output mode definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-cbaud.h b/lib/libc/include/generic-glibc/bits/termios-cbaud.h
index 38bf2ec1aa..9f46d9dde9 100644
--- a/lib/libc/include/generic-glibc/bits/termios-cbaud.h
+++ b/lib/libc/include/generic-glibc/bits/termios-cbaud.h
@@ -1,5 +1,5 @@
/* termios baud rate selection definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-misc.h b/lib/libc/include/generic-glibc/bits/termios-misc.h
index 42382bfc05..f56475588b 100644
--- a/lib/libc/include/generic-glibc/bits/termios-misc.h
+++ b/lib/libc/include/generic-glibc/bits/termios-misc.h
@@ -1,5 +1,5 @@
/* termios baud platform specific definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-struct.h b/lib/libc/include/generic-glibc/bits/termios-struct.h
index 40d20e442d..1c07dc7525 100644
--- a/lib/libc/include/generic-glibc/bits/termios-struct.h
+++ b/lib/libc/include/generic-glibc/bits/termios-struct.h
@@ -1,5 +1,5 @@
/* struct termios definition. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios-tcflow.h b/lib/libc/include/generic-glibc/bits/termios-tcflow.h
index 7c78b3c7c5..dceb13d5b1 100644
--- a/lib/libc/include/generic-glibc/bits/termios-tcflow.h
+++ b/lib/libc/include/generic-glibc/bits/termios-tcflow.h
@@ -1,5 +1,5 @@
/* termios tcflag symbolic constant definitions. Linux/generic version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/termios.h b/lib/libc/include/generic-glibc/bits/termios.h
index 4af6204a30..38a9e0f173 100644
--- a/lib/libc/include/generic-glibc/bits/termios.h
+++ b/lib/libc/include/generic-glibc/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. Linux version.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/thread-shared-types.h b/lib/libc/include/generic-glibc/bits/thread-shared-types.h
index 119dd8ae55..52c533aa70 100644
--- a/lib/libc/include/generic-glibc/bits/thread-shared-types.h
+++ b/lib/libc/include/generic-glibc/bits/thread-shared-types.h
@@ -1,5 +1,5 @@
/* Common threading primitives definitions for both POSIX and C11.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -75,7 +75,7 @@ typedef struct __pthread_internal_slist
#include
-/* Arch-sepecific read-write lock definitions. A generic implementation is
+/* Arch-specific read-write lock definitions. A generic implementation is
provided by struct_rwlock.h. If required, an architecture can override it
by defining:
diff --git a/lib/libc/include/generic-glibc/bits/time.h b/lib/libc/include/generic-glibc/bits/time.h
index 433b755e3b..99bddef7f1 100644
--- a/lib/libc/include/generic-glibc/bits/time.h
+++ b/lib/libc/include/generic-glibc/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/time64.h b/lib/libc/include/generic-glibc/bits/time64.h
index cc81e2c318..df1dc0b475 100644
--- a/lib/libc/include/generic-glibc/bits/time64.h
+++ b/lib/libc/include/generic-glibc/bits/time64.h
@@ -1,5 +1,5 @@
/* bits/time64.h -- underlying types for __time64_t. Generic version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/timerfd.h b/lib/libc/include/generic-glibc/bits/timerfd.h
index b73c8793b8..540e035c92 100644
--- a/lib/libc/include/generic-glibc/bits/timerfd.h
+++ b/lib/libc/include/generic-glibc/bits/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/timesize.h b/lib/libc/include/generic-glibc/bits/timesize.h
index 5e73e22f26..114eea7775 100644
--- a/lib/libc/include/generic-glibc/bits/timesize.h
+++ b/lib/libc/include/generic-glibc/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/MIPS.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/timex.h b/lib/libc/include/generic-glibc/bits/timex.h
index 1d02f8a8b8..35559154b1 100644
--- a/lib/libc/include/generic-glibc/bits/timex.h
+++ b/lib/libc/include/generic-glibc/bits/timex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types.h b/lib/libc/include/generic-glibc/bits/types.h
index 795731e82c..39dabbe819 100644
--- a/lib/libc/include/generic-glibc/bits/types.h
+++ b/lib/libc/include/generic-glibc/bits/types.h
@@ -1,5 +1,5 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/__locale_t.h b/lib/libc/include/generic-glibc/bits/types/__locale_t.h
index 4789e2178d..796d4c88a7 100644
--- a/lib/libc/include/generic-glibc/bits/types/__locale_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/__locale_t.h
@@ -1,5 +1,5 @@
/* Definition of struct __locale_struct and __locale_t.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/__sigval_t.h b/lib/libc/include/generic-glibc/bits/types/__sigval_t.h
index 59ea360f8e..545b2f95f5 100644
--- a/lib/libc/include/generic-glibc/bits/types/__sigval_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/__sigval_t.h
@@ -1,5 +1,5 @@
/* Define __sigval_t.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h b/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h
index 41f1772046..a23b774821 100644
--- a/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/error_t.h b/lib/libc/include/generic-glibc/bits/types/error_t.h
index 89be14ed26..b0486fbc41 100644
--- a/lib/libc/include/generic-glibc/bits/types/error_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/error_t.h
@@ -1,5 +1,5 @@
/* Define error_t.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/locale_t.h b/lib/libc/include/generic-glibc/bits/types/locale_t.h
index 3c64f46684..5d5f2af6b4 100644
--- a/lib/libc/include/generic-glibc/bits/types/locale_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/locale_t.h
@@ -1,5 +1,5 @@
/* Definition of locale_t.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/shmlba.h b/lib/libc/include/generic-glibc/bits/types/once_flag.h
similarity index 72%
rename from lib/libc/include/loongarch-linux-gnu/bits/shmlba.h
rename to lib/libc/include/generic-glibc/bits/types/once_flag.h
index 202e6b6514..becbdc248c 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/generic-glibc/bits/types/once_flag.h
@@ -1,5 +1,5 @@
-/* Define SHMLBA. LoongArch version.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+/* Define once_flag and ONCE_FLAG_INIT.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,9 +16,12 @@
License along with the GNU C Library; if not, see
. */
-#ifndef _SYS_SHM_H
-# error "Never use directly; include instead."
-#endif
+#ifndef __once_flag_defined
+#define __once_flag_defined 1
-/* Segment low boundary address multiple. */
-#define SHMLBA 0x10000
\ No newline at end of file
+#include
+
+typedef __once_flag once_flag;
+#define ONCE_FLAG_INIT __ONCE_FLAG_INIT
+
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/stack_t.h b/lib/libc/include/generic-glibc/bits/types/stack_t.h
index 64abc5138b..40822af706 100644
--- a/lib/libc/include/generic-glibc/bits/types/stack_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/stack_t.h
@@ -1,5 +1,5 @@
/* Define stack_t. Linux version.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_FILE.h b/lib/libc/include/generic-glibc/bits/types/struct_FILE.h
index b02bb0c154..03f67c5a69 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_FILE.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_FILE.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/bits/types/struct___jmp_buf_tag.h b/lib/libc/include/generic-glibc/bits/types/struct___jmp_buf_tag.h
index ade4721247..530da90303 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct___jmp_buf_tag.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct___jmp_buf_tag.h
@@ -1,5 +1,5 @@
/* Define struct __jmp_buf_tag.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_iovec.h b/lib/libc/include/generic-glibc/bits/types/struct_iovec.h
index 28b98cdf1a..3c8b0c3671 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_iovec.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_iovec.h
@@ -1,5 +1,5 @@
/* Define struct iovec.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
index 0f4d5baeab..c1dce5edfd 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the SysV message struct msqid64_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
index 2971aa7bd4..3359bec9bd 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
@@ -1,5 +1,5 @@
/* Common definitions for struct msqid_ds with 64-bit time.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
index d619a22c2b..95c93977ff 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the SysV message struct msqid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_rusage.h b/lib/libc/include/generic-glibc/bits/types/struct_rusage.h
index 75a03e2745..f095b71ef8 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_rusage.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_rusage.h
@@ -1,5 +1,5 @@
/* Define struct rusage.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h b/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h
index 8dc14a02b1..301bdf7134 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h
@@ -1,5 +1,5 @@
/* Sched parameter structure. Generic version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
index c2f60a45b9..ddeed6a9fb 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the semaphore struct semid64_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
index dd5ae895b0..bef6a93f1e 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
@@ -1,5 +1,5 @@
/* Common definitions for struct semid_ds with 64-bit time.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
index 842edeeaed..fbafc46cd8 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the semaphore struct semid_ds.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
index 052eacadcb..c4c255c570 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the shared memory struct shmid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
index d2fb8a3e69..9509db561b 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
@@ -1,5 +1,5 @@
/* Common definitions for struct semid_ds with 64-bit time.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
index 9ec2974b11..ecb80203a1 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
@@ -1,5 +1,5 @@
/* Generic implementation of the shared memory struct shmid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h b/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h
index c24f04a787..c43339e5e0 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h
@@ -1,5 +1,5 @@
/* Define struct sigstack.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_statx.h b/lib/libc/include/generic-glibc/bits/types/struct_statx.h
index 280873cd48..6f8fa4dace 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_statx.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_statx.h
@@ -1,5 +1,5 @@
/* Definition of the generic version of struct statx.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +49,17 @@ struct statx
__uint32_t stx_rdev_minor;
__uint32_t stx_dev_major;
__uint32_t stx_dev_minor;
- __uint64_t __statx_pad2[14];
+ __uint64_t stx_mnt_id;
+ __uint32_t stx_dio_mem_align;
+ __uint32_t stx_dio_offset_align;
+ __uint64_t stx_subvol;
+ __uint32_t stx_atomic_write_unit_min;
+ __uint32_t stx_atomic_write_unit_max;
+ __uint32_t stx_atomic_write_segments_max;
+ __uint32_t stx_dio_read_offset_align;
+ __uint32_t stx_atomic_write_unit_max_opt;
+ __uint32_t __statx_pad2;
+ __uint64_t __statx_pad3[8];
};
#endif /* __statx_defined */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h b/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h
index 7720e9a5c0..3861a3b912 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h
@@ -1,5 +1,5 @@
/* Definition of the generic version of struct statx_timestamp.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/typesizes.h b/lib/libc/include/generic-glibc/bits/typesizes.h
index 13c7a28ac3..6921428cfe 100644
--- a/lib/libc/include/generic-glibc/bits/typesizes.h
+++ b/lib/libc/include/generic-glibc/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/uintn-identity.h b/lib/libc/include/generic-glibc/bits/uintn-identity.h
index b60841a513..658b24e471 100644
--- a/lib/libc/include/generic-glibc/bits/uintn-identity.h
+++ b/lib/libc/include/generic-glibc/bits/uintn-identity.h
@@ -1,5 +1,5 @@
/* Inline functions to return unsigned integer values unchanged.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/uio-ext.h b/lib/libc/include/generic-glibc/bits/uio-ext.h
index 2d27c7d94b..e65cf77f43 100644
--- a/lib/libc/include/generic-glibc/bits/uio-ext.h
+++ b/lib/libc/include/generic-glibc/bits/uio-ext.h
@@ -1,5 +1,5 @@
/* Operating system-specific extensions to sys/uio.h - Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,6 +50,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */
#define RWF_ATOMIC 0x00000040 /* Write is to be issued with torn-write
prevention. */
+#define RWF_DONTCACHE 0x00000080 /* Uncached buffered IO. */
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/bits/uio_lim.h b/lib/libc/include/generic-glibc/bits/uio_lim.h
index 4821731774..af26587e6c 100644
--- a/lib/libc/include/generic-glibc/bits/uio_lim.h
+++ b/lib/libc/include/generic-glibc/bits/uio_lim.h
@@ -1,5 +1,5 @@
/* Implementation limits related to sys/uio.h - Linux version.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/unistd-decl.h b/lib/libc/include/generic-glibc/bits/unistd-decl.h
index fdb6905c0c..eba4d37142 100644
--- a/lib/libc/include/generic-glibc/bits/unistd-decl.h
+++ b/lib/libc/include/generic-glibc/bits/unistd-decl.h
@@ -1,5 +1,5 @@
/* Checking routines for unistd functions. Declaration only.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/unistd.h b/lib/libc/include/generic-glibc/bits/unistd.h
index 4af036619d..b476e58a43 100644
--- a/lib/libc/include/generic-glibc/bits/unistd.h
+++ b/lib/libc/include/generic-glibc/bits/unistd.h
@@ -1,5 +1,5 @@
/* Checking macros for unistd functions.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/unistd_ext.h b/lib/libc/include/generic-glibc/bits/unistd_ext.h
index 691a57e30e..04099e5c58 100644
--- a/lib/libc/include/generic-glibc/bits/unistd_ext.h
+++ b/lib/libc/include/generic-glibc/bits/unistd_ext.h
@@ -1,5 +1,5 @@
/* System-specific extensions of , Linux version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/utmp.h b/lib/libc/include/generic-glibc/bits/utmp.h
index e945937f32..f655ae6d78 100644
--- a/lib/libc/include/generic-glibc/bits/utmp.h
+++ b/lib/libc/include/generic-glibc/bits/utmp.h
@@ -1,5 +1,5 @@
/* The `struct utmp' type, describing entries in the utmp file.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/utmpx.h b/lib/libc/include/generic-glibc/bits/utmpx.h
index ff77f8c4ed..d8eed18156 100644
--- a/lib/libc/include/generic-glibc/bits/utmpx.h
+++ b/lib/libc/include/generic-glibc/bits/utmpx.h
@@ -1,5 +1,5 @@
/* Structures and definitions for the user accounting database. GNU version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/utsname.h b/lib/libc/include/generic-glibc/bits/utsname.h
index 625d7e1be6..0a2e52a784 100644
--- a/lib/libc/include/generic-glibc/bits/utsname.h
+++ b/lib/libc/include/generic-glibc/bits/utsname.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/waitflags.h b/lib/libc/include/generic-glibc/bits/waitflags.h
index 07e69e6004..e393161676 100644
--- a/lib/libc/include/generic-glibc/bits/waitflags.h
+++ b/lib/libc/include/generic-glibc/bits/waitflags.h
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/waitstatus.h b/lib/libc/include/generic-glibc/bits/waitstatus.h
index bbc22daaf7..a6cd056fff 100644
--- a/lib/libc/include/generic-glibc/bits/waitstatus.h
+++ b/lib/libc/include/generic-glibc/bits/waitstatus.h
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wchar-ldbl.h b/lib/libc/include/generic-glibc/bits/wchar-ldbl.h
index d13bf5f5b7..4814b417e5 100644
--- a/lib/libc/include/generic-glibc/bits/wchar-ldbl.h
+++ b/lib/libc/include/generic-glibc/bits/wchar-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for functions.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wchar.h b/lib/libc/include/generic-glibc/bits/wchar.h
index bba9a4687a..936d2d555f 100644
--- a/lib/libc/include/generic-glibc/bits/wchar.h
+++ b/lib/libc/include/generic-glibc/bits/wchar.h
@@ -1,5 +1,5 @@
/* wchar_t type related definitions.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wchar2-decl.h b/lib/libc/include/generic-glibc/bits/wchar2-decl.h
index 2cf2f7baae..ce42c43864 100644
--- a/lib/libc/include/generic-glibc/bits/wchar2-decl.h
+++ b/lib/libc/include/generic-glibc/bits/wchar2-decl.h
@@ -1,5 +1,5 @@
/* Checking macros for wchar functions. Declarations only.
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wchar2.h b/lib/libc/include/generic-glibc/bits/wchar2.h
index 0bf64438d1..f61b3999b8 100644
--- a/lib/libc/include/generic-glibc/bits/wchar2.h
+++ b/lib/libc/include/generic-glibc/bits/wchar2.h
@@ -1,5 +1,5 @@
/* Checking macros for wchar functions.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wctype-wchar.h b/lib/libc/include/generic-glibc/bits/wctype-wchar.h
index 3a73e92364..00947a3bae 100644
--- a/lib/libc/include/generic-glibc/bits/wctype-wchar.h
+++ b/lib/libc/include/generic-glibc/bits/wctype-wchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/wordsize.h b/lib/libc/include/generic-glibc/bits/wordsize.h
index 487102dc9c..209ee56ebe 100644
--- a/lib/libc/include/generic-glibc/bits/wordsize.h
+++ b/lib/libc/include/generic-glibc/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/bits/xopen_lim.h b/lib/libc/include/generic-glibc/bits/xopen_lim.h
index a6c7c2ca67..658583a0bc 100644
--- a/lib/libc/include/generic-glibc/bits/xopen_lim.h
+++ b/lib/libc/include/generic-glibc/bits/xopen_lim.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/byteswap.h b/lib/libc/include/generic-glibc/byteswap.h
index 08f0786799..149dcfbc66 100644
--- a/lib/libc/include/generic-glibc/byteswap.h
+++ b/lib/libc/include/generic-glibc/byteswap.h
@@ -1,5 +1,5 @@
/* Swap byte order for 16, 32 and 64 bit values
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/complex.h b/lib/libc/include/generic-glibc/complex.h
index 294bfb211f..87938c9e0b 100644
--- a/lib/libc/include/generic-glibc/complex.h
+++ b/lib/libc/include/generic-glibc/complex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,10 @@
__BEGIN_DECLS
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_COMPLEX_H__ 202311L
+#endif
+
/* We might need to add support for more compilers here. But since ISO
C99 is out hopefully all maintained compilers will soon provide the data
types `float complex' and `double complex'. */
diff --git a/lib/libc/include/generic-glibc/cpio.h b/lib/libc/include/generic-glibc/cpio.h
index 7671ebd3c1..6ad236eaf2 100644
--- a/lib/libc/include/generic-glibc/cpio.h
+++ b/lib/libc/include/generic-glibc/cpio.h
@@ -1,6 +1,6 @@
/* Extended cpio format from POSIX.1.
This file is part of the GNU C Library.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU cpio.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ctype.h b/lib/libc/include/generic-glibc/ctype.h
index 61a1f174d0..53f76a935a 100644
--- a/lib/libc/include/generic-glibc/ctype.h
+++ b/lib/libc/include/generic-glibc/ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/dirent.h b/lib/libc/include/generic-glibc/dirent.h
index 39457fdd80..2e3f38cc6f 100644
--- a/lib/libc/include/generic-glibc/dirent.h
+++ b/lib/libc/include/generic-glibc/dirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/dlfcn.h b/lib/libc/include/generic-glibc/dlfcn.h
index fe5059b8d5..f12e3d68cd 100644
--- a/lib/libc/include/generic-glibc/dlfcn.h
+++ b/lib/libc/include/generic-glibc/dlfcn.h
@@ -1,5 +1,5 @@
/* User functions for run-time dynamic loading.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/elf.h b/lib/libc/include/generic-glibc/elf.h
index 11dc6453b5..a45dea4121 100644
--- a/lib/libc/include/generic-glibc/elf.h
+++ b/lib/libc/include/generic-glibc/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -924,7 +924,7 @@ typedef struct
#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */
#define DT_RELRSZ 35 /* Total size of RELR relative relocations */
#define DT_RELR 36 /* Address of RELR relative relocations */
-#define DT_RELRENT 37 /* Size of one RELR relative relocaction */
+#define DT_RELRENT 37 /* Size of one RELR relative relocation */
#define DT_NUM 38 /* Number used */
#define DT_LOOS 0x6000000d /* Start of OS-specific */
#define DT_HIOS 0x6ffff000 /* End of OS-specific */
diff --git a/lib/libc/include/generic-glibc/endian.h b/lib/libc/include/generic-glibc/endian.h
index 2636bb8497..e74cf60210 100644
--- a/lib/libc/include/generic-glibc/endian.h
+++ b/lib/libc/include/generic-glibc/endian.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/envz.h b/lib/libc/include/generic-glibc/envz.h
index 8e415b0be3..543b158f43 100644
--- a/lib/libc/include/generic-glibc/envz.h
+++ b/lib/libc/include/generic-glibc/envz.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated environment vectors
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/err.h b/lib/libc/include/generic-glibc/err.h
index fa7e1f0952..015218379c 100644
--- a/lib/libc/include/generic-glibc/err.h
+++ b/lib/libc/include/generic-glibc/err.h
@@ -1,5 +1,5 @@
/* 4.4BSD utility functions for error messages.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/errno.h b/lib/libc/include/generic-glibc/errno.h
index eeb7a227e0..920eb12c99 100644
--- a/lib/libc/include/generic-glibc/errno.h
+++ b/lib/libc/include/generic-glibc/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/error.h b/lib/libc/include/generic-glibc/error.h
index 47b5752843..29191c8255 100644
--- a/lib/libc/include/generic-glibc/error.h
+++ b/lib/libc/include/generic-glibc/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/execinfo.h b/lib/libc/include/generic-glibc/execinfo.h
index 13ee440294..ce6ba95739 100644
--- a/lib/libc/include/generic-glibc/execinfo.h
+++ b/lib/libc/include/generic-glibc/execinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fcntl.h b/lib/libc/include/generic-glibc/fcntl.h
index 51add4e146..d2254d0441 100644
--- a/lib/libc/include/generic-glibc/fcntl.h
+++ b/lib/libc/include/generic-glibc/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -352,4 +352,4 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
__END_DECLS
-#endif /* fcntl.h */
+#endif /* fcntl.h */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/features-time64.h b/lib/libc/include/generic-glibc/features-time64.h
index 5842168a3c..cd6c8d5492 100644
--- a/lib/libc/include/generic-glibc/features-time64.h
+++ b/lib/libc/include/generic-glibc/features-time64.h
@@ -1,5 +1,5 @@
/* Features part to handle 64-bit time_t support.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h
index 8a918c6017..5ef3af3beb 100644
--- a/lib/libc/include/generic-glibc/features.h
+++ b/lib/libc/include/generic-glibc/features.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,9 +44,11 @@
if >=199506L, add IEEE Std 1003.1c-1995;
if >=200112L, all of IEEE 1003.1-2004
if >=200809L, all of IEEE 1003.1-2008
+ if >=202405L, all of IEEE 1003.1-2024
_XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
Single Unix conformance is wanted, to 600 for the
- sixth revision, to 700 for the seventh revision.
+ sixth revision, to 700 for the seventh revision,
+ to 800 for the eighth revision.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_LARGEFILE_SOURCE Some more functions for correct standard I/O.
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
@@ -69,7 +71,7 @@
options such as `-std=c99', define __STRICT_ANSI__. If none of
these are defined, or if _DEFAULT_SOURCE is defined, the default is
to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
- 200809L, as well as enabling miscellaneous functions from BSD and
+ 202405L, as well as enabling miscellaneous functions from BSD and
SVID. If more than one of these are defined, they accumulate. For
example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
give you ISO C, 1003.1, and 1003.2, but nothing else.
@@ -96,6 +98,8 @@
__USE_XOPEN2KXSI Define XPG6 XSI things.
__USE_XOPEN2K8 Define XPG7 things.
__USE_XOPEN2K8XSI Define XPG7 XSI things.
+ __USE_XOPEN2K24 Define XPG8 things.
+ __USE_XOPEN2K24XSI Define XPG8 XSI things.
__USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
__USE_FILE_OFFSET64 Define 64bit interface as default.
@@ -141,6 +145,8 @@
#undef __USE_XOPEN2KXSI
#undef __USE_XOPEN2K8
#undef __USE_XOPEN2K8XSI
+#undef __USE_XOPEN2K24
+#undef __USE_XOPEN2K24XSI
#undef __USE_LARGEFILE
#undef __USE_LARGEFILE64
#undef __USE_FILE_OFFSET64
@@ -162,14 +168,6 @@
# define __KERNEL_STRICT_NAMES
#endif
-/* Major and minor version number of the GNU C library package. Use
- these macros to test for features in specific releases. */
-#define __GLIBC__ 2
-/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
-
-#define __GLIBC_PREREQ(maj, min) \
- ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
-
/* Convenience macro to test the version of gcc.
Use like this:
#if __GNUC_PREREQ (2,8)
@@ -231,9 +229,9 @@
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
+# define _POSIX_C_SOURCE 202405L
# undef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 700
+# define _XOPEN_SOURCE 800
# undef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED 1
# undef _LARGEFILE64_SOURCE
@@ -314,7 +312,7 @@
#endif
/* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
- is defined, use POSIX.1-2008 (or another version depending on
+ is defined, use POSIX.1-2024 (or another version depending on
_XOPEN_SOURCE). */
#ifdef _DEFAULT_SOURCE
# if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE
@@ -323,7 +321,7 @@
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
+# define _POSIX_C_SOURCE 202405L
#endif
#if ((!defined __STRICT_ANSI__ \
@@ -336,8 +334,10 @@
# define _POSIX_C_SOURCE 199506L
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
# define _POSIX_C_SOURCE 200112L
-# else
+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 800
# define _POSIX_C_SOURCE 200809L
+# else
+# define _POSIX_C_SOURCE 202405L
# endif
# define __USE_POSIX_IMPLICITLY 1
#endif
@@ -387,6 +387,10 @@
# define _ATFILE_SOURCE 1
#endif
+#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 202405L
+# define __USE_XOPEN2K24 1
+#endif
+
#ifdef _XOPEN_SOURCE
# define __USE_XOPEN 1
# if (_XOPEN_SOURCE - 0) >= 500
@@ -398,6 +402,10 @@
# if (_XOPEN_SOURCE - 0) >= 700
# define __USE_XOPEN2K8 1
# define __USE_XOPEN2K8XSI 1
+# if (_XOPEN_SOURCE - 0) >= 800
+# define __USE_XOPEN2K24 1
+# define __USE_XOPEN2K24XSI 1
+# endif
# endif
# define __USE_XOPEN2K 1
# define __USE_XOPEN2KXSI 1
@@ -534,6 +542,14 @@
#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__ 6
+/* Major and minor version number of the GNU C library package. Use
+ these macros to test for features in specific releases. */
+#define __GLIBC__ 2
+/* zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
+
+#define __GLIBC_PREREQ(maj, min) \
+ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H
@@ -552,7 +568,7 @@
/* Decide whether we can define 'extern inline' functions in headers. */
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
- && defined __extern_inline
+ && defined __extern_inline && !(defined __clang__ && defined _LIBC)
# define __USE_EXTERN_INLINES 1
#endif
diff --git a/lib/libc/include/generic-glibc/fenv.h b/lib/libc/include/generic-glibc/fenv.h
index 5c9fc5d2c5..e924477486 100644
--- a/lib/libc/include/generic-glibc/fenv.h
+++ b/lib/libc/include/generic-glibc/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -65,6 +65,10 @@
__BEGIN_DECLS
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_FENV_H__ 202311L
+#endif
+
/* Floating-point exception handling. */
/* Clear the supported exceptions represented by EXCEPTS. */
diff --git a/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h b/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h
index 76faab88b4..dc777d841a 100644
--- a/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h
+++ b/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h
@@ -1,5 +1,5 @@
! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
-! Copyright (C) 2019-2025 Free Software Foundation, Inc.
+! Copyright (C) 2019-2026 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
!
! The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fmtmsg.h b/lib/libc/include/generic-glibc/fmtmsg.h
index 3d56c4d30e..8ad0abc1a3 100644
--- a/lib/libc/include/generic-glibc/fmtmsg.h
+++ b/lib/libc/include/generic-glibc/fmtmsg.h
@@ -1,5 +1,5 @@
/* Message display handling.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fnmatch.h b/lib/libc/include/generic-glibc/fnmatch.h
index b13fe45bfe..e7909cc1d9 100644
--- a/lib/libc/include/generic-glibc/fnmatch.h
+++ b/lib/libc/include/generic-glibc/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fpregdef.h b/lib/libc/include/generic-glibc/fpregdef.h
index e4b38635cd..a0a3d5b7d3 100644
--- a/lib/libc/include/generic-glibc/fpregdef.h
+++ b/lib/libc/include/generic-glibc/fpregdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fpu_control.h b/lib/libc/include/generic-glibc/fpu_control.h
index 5a1c515471..5c893891b0 100644
--- a/lib/libc/include/generic-glibc/fpu_control.h
+++ b/lib/libc/include/generic-glibc/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Mips version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/fts.h b/lib/libc/include/generic-glibc/fts.h
index 42cf8da8e9..97d0f4a8a2 100644
--- a/lib/libc/include/generic-glibc/fts.h
+++ b/lib/libc/include/generic-glibc/fts.h
@@ -1,5 +1,5 @@
/* File tree traversal functions declarations.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ftw.h b/lib/libc/include/generic-glibc/ftw.h
index 227a13af6f..9040142e67 100644
--- a/lib/libc/include/generic-glibc/ftw.h
+++ b/lib/libc/include/generic-glibc/ftw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/gconv.h b/lib/libc/include/generic-glibc/gconv.h
index 676935099f..cb8d891822 100644
--- a/lib/libc/include/generic-glibc/gconv.h
+++ b/lib/libc/include/generic-glibc/gconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/getopt.h b/lib/libc/include/generic-glibc/getopt.h
index 33e20a2558..5d68fc3daf 100644
--- a/lib/libc/include/generic-glibc/getopt.h
+++ b/lib/libc/include/generic-glibc/getopt.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Unlike the bulk of the getopt implementation, this file is NOT part
of gnulib; gnulib also has a getopt.h but it is different.
diff --git a/lib/libc/include/generic-glibc/glob.h b/lib/libc/include/generic-glibc/glob.h
index 14340f5fae..81fb643252 100644
--- a/lib/libc/include/generic-glibc/glob.h
+++ b/lib/libc/include/generic-glibc/glob.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/gnu-versions.h b/lib/libc/include/generic-glibc/gnu-versions.h
index e46400d801..e750f1f0c4 100644
--- a/lib/libc/include/generic-glibc/gnu-versions.h
+++ b/lib/libc/include/generic-glibc/gnu-versions.h
@@ -1,5 +1,5 @@
/* Header with interface version macros for library pieces copied elsewhere.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/gnu/libc-version.h b/lib/libc/include/generic-glibc/gnu/libc-version.h
index c432a2c114..95099e7cb4 100644
--- a/lib/libc/include/generic-glibc/gnu/libc-version.h
+++ b/lib/libc/include/generic-glibc/gnu/libc-version.h
@@ -1,5 +1,5 @@
/* Interface to GNU libc specific functions for version information.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/grp.h b/lib/libc/include/generic-glibc/grp.h
index e6367f2252..adf73f2675 100644
--- a/lib/libc/include/generic-glibc/grp.h
+++ b/lib/libc/include/generic-glibc/grp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/gshadow.h b/lib/libc/include/generic-glibc/gshadow.h
index 7e73c0d70c..88f774a491 100644
--- a/lib/libc/include/generic-glibc/gshadow.h
+++ b/lib/libc/include/generic-glibc/gshadow.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/iconv.h b/lib/libc/include/generic-glibc/iconv.h
index 3f45af1968..a4fb9579e5 100644
--- a/lib/libc/include/generic-glibc/iconv.h
+++ b/lib/libc/include/generic-glibc/iconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ieee754.h b/lib/libc/include/generic-glibc/ieee754.h
index 7eb1f762ac..dc8f15e239 100644
--- a/lib/libc/include/generic-glibc/ieee754.h
+++ b/lib/libc/include/generic-glibc/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ifaddrs.h b/lib/libc/include/generic-glibc/ifaddrs.h
index 41bd1048f8..86737f63d3 100644
--- a/lib/libc/include/generic-glibc/ifaddrs.h
+++ b/lib/libc/include/generic-glibc/ifaddrs.h
@@ -1,5 +1,5 @@
/* ifaddrs.h -- declarations for getting network interface addresses
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/inttypes.h b/lib/libc/include/generic-glibc/inttypes.h
index be384f223e..345bed9faa 100644
--- a/lib/libc/include/generic-glibc/inttypes.h
+++ b/lib/libc/include/generic-glibc/inttypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,11 @@
#define _INTTYPES_H 1
#include
+
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_INTTYPES_H__ 202311L
+#endif
+
/* Get the type definitions. */
#include
@@ -51,97 +56,97 @@ typedef wchar_t __gwchar_t;
/* Macros for printing format specifiers. */
/* Decimal notation. */
-# define PRId8 "d"
-# define PRId16 "d"
+# define PRId8 "hhd"
+# define PRId16 "hd"
# define PRId32 "d"
# define PRId64 __PRI64_PREFIX "d"
-# define PRIdLEAST8 "d"
-# define PRIdLEAST16 "d"
+# define PRIdLEAST8 "hhd"
+# define PRIdLEAST16 "hd"
# define PRIdLEAST32 "d"
# define PRIdLEAST64 __PRI64_PREFIX "d"
-# define PRIdFAST8 "d"
+# define PRIdFAST8 "hhd"
# define PRIdFAST16 __PRIPTR_PREFIX "d"
# define PRIdFAST32 __PRIPTR_PREFIX "d"
# define PRIdFAST64 __PRI64_PREFIX "d"
-# define PRIi8 "i"
-# define PRIi16 "i"
+# define PRIi8 "hhi"
+# define PRIi16 "hi"
# define PRIi32 "i"
# define PRIi64 __PRI64_PREFIX "i"
-# define PRIiLEAST8 "i"
-# define PRIiLEAST16 "i"
+# define PRIiLEAST8 "hhi"
+# define PRIiLEAST16 "hi"
# define PRIiLEAST32 "i"
# define PRIiLEAST64 __PRI64_PREFIX "i"
-# define PRIiFAST8 "i"
+# define PRIiFAST8 "hhi"
# define PRIiFAST16 __PRIPTR_PREFIX "i"
# define PRIiFAST32 __PRIPTR_PREFIX "i"
# define PRIiFAST64 __PRI64_PREFIX "i"
/* Octal notation. */
-# define PRIo8 "o"
-# define PRIo16 "o"
+# define PRIo8 "hho"
+# define PRIo16 "ho"
# define PRIo32 "o"
# define PRIo64 __PRI64_PREFIX "o"
-# define PRIoLEAST8 "o"
-# define PRIoLEAST16 "o"
+# define PRIoLEAST8 "hho"
+# define PRIoLEAST16 "ho"
# define PRIoLEAST32 "o"
# define PRIoLEAST64 __PRI64_PREFIX "o"
-# define PRIoFAST8 "o"
+# define PRIoFAST8 "hho"
# define PRIoFAST16 __PRIPTR_PREFIX "o"
# define PRIoFAST32 __PRIPTR_PREFIX "o"
# define PRIoFAST64 __PRI64_PREFIX "o"
/* Unsigned integers. */
-# define PRIu8 "u"
-# define PRIu16 "u"
+# define PRIu8 "hhu"
+# define PRIu16 "hu"
# define PRIu32 "u"
# define PRIu64 __PRI64_PREFIX "u"
-# define PRIuLEAST8 "u"
-# define PRIuLEAST16 "u"
+# define PRIuLEAST8 "hhu"
+# define PRIuLEAST16 "hu"
# define PRIuLEAST32 "u"
# define PRIuLEAST64 __PRI64_PREFIX "u"
-# define PRIuFAST8 "u"
+# define PRIuFAST8 "hhu"
# define PRIuFAST16 __PRIPTR_PREFIX "u"
# define PRIuFAST32 __PRIPTR_PREFIX "u"
# define PRIuFAST64 __PRI64_PREFIX "u"
/* lowercase hexadecimal notation. */
-# define PRIx8 "x"
-# define PRIx16 "x"
+# define PRIx8 "hhx"
+# define PRIx16 "hx"
# define PRIx32 "x"
# define PRIx64 __PRI64_PREFIX "x"
-# define PRIxLEAST8 "x"
-# define PRIxLEAST16 "x"
+# define PRIxLEAST8 "hhx"
+# define PRIxLEAST16 "hx"
# define PRIxLEAST32 "x"
# define PRIxLEAST64 __PRI64_PREFIX "x"
-# define PRIxFAST8 "x"
+# define PRIxFAST8 "hhx"
# define PRIxFAST16 __PRIPTR_PREFIX "x"
# define PRIxFAST32 __PRIPTR_PREFIX "x"
# define PRIxFAST64 __PRI64_PREFIX "x"
/* UPPERCASE hexadecimal notation. */
-# define PRIX8 "X"
-# define PRIX16 "X"
+# define PRIX8 "hhX"
+# define PRIX16 "hX"
# define PRIX32 "X"
# define PRIX64 __PRI64_PREFIX "X"
-# define PRIXLEAST8 "X"
-# define PRIXLEAST16 "X"
+# define PRIXLEAST8 "hhX"
+# define PRIXLEAST16 "hX"
# define PRIXLEAST32 "X"
# define PRIXLEAST64 __PRI64_PREFIX "X"
-# define PRIXFAST8 "X"
+# define PRIXFAST8 "hhX"
# define PRIXFAST16 __PRIPTR_PREFIX "X"
# define PRIXFAST32 __PRIPTR_PREFIX "X"
# define PRIXFAST64 __PRI64_PREFIX "X"
@@ -166,17 +171,17 @@ typedef wchar_t __gwchar_t;
/* Binary notation. */
# if __GLIBC_USE (ISOC23)
-# define PRIb8 "b"
-# define PRIb16 "b"
+# define PRIb8 "hhb"
+# define PRIb16 "hb"
# define PRIb32 "b"
# define PRIb64 __PRI64_PREFIX "b"
-# define PRIbLEAST8 "b"
-# define PRIbLEAST16 "b"
+# define PRIbLEAST8 "hhb"
+# define PRIbLEAST16 "hb"
# define PRIbLEAST32 "b"
# define PRIbLEAST64 __PRI64_PREFIX "b"
-# define PRIbFAST8 "b"
+# define PRIbFAST8 "hhb"
# define PRIbFAST16 __PRIPTR_PREFIX "b"
# define PRIbFAST32 __PRIPTR_PREFIX "b"
# define PRIbFAST64 __PRI64_PREFIX "b"
@@ -184,17 +189,17 @@ typedef wchar_t __gwchar_t;
# define PRIbMAX __PRI64_PREFIX "b"
# define PRIbPTR __PRIPTR_PREFIX "b"
-# define PRIB8 "B"
-# define PRIB16 "B"
+# define PRIB8 "hhB"
+# define PRIB16 "hB"
# define PRIB32 "B"
# define PRIB64 __PRI64_PREFIX "B"
-# define PRIBLEAST8 "B"
-# define PRIBLEAST16 "B"
+# define PRIBLEAST8 "hhB"
+# define PRIBLEAST16 "hB"
# define PRIBLEAST32 "B"
# define PRIBLEAST64 __PRI64_PREFIX "B"
-# define PRIBFAST8 "B"
+# define PRIBFAST8 "hhB"
# define PRIBFAST16 __PRIPTR_PREFIX "B"
# define PRIBFAST32 __PRIPTR_PREFIX "B"
# define PRIBFAST64 __PRI64_PREFIX "B"
@@ -352,7 +357,7 @@ extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
#if __GLIBC_USE (ISOC2Y)
-extern uintmax_t uimaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
+extern uintmax_t umaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
#endif
/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
diff --git a/lib/libc/include/generic-glibc/langinfo.h b/lib/libc/include/generic-glibc/langinfo.h
index 3a5e70bd23..cbaccf9ad2 100644
--- a/lib/libc/include/generic-glibc/langinfo.h
+++ b/lib/libc/include/generic-glibc/langinfo.h
@@ -1,5 +1,5 @@
/* Access to locale-dependent parameters.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/libgen.h b/lib/libc/include/generic-glibc/libgen.h
index 4e489e79e3..981b01cd1e 100644
--- a/lib/libc/include/generic-glibc/libgen.h
+++ b/lib/libc/include/generic-glibc/libgen.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/libintl.h b/lib/libc/include/generic-glibc/libintl.h
index 1032dd899e..4ca85c7bdb 100644
--- a/lib/libc/include/generic-glibc/libintl.h
+++ b/lib/libc/include/generic-glibc/libintl.h
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is derived from the file libgettext.h in the GNU gettext package.
diff --git a/lib/libc/include/generic-glibc/limits.h b/lib/libc/include/generic-glibc/limits.h
index 88a0949f70..f495504af8 100644
--- a/lib/libc/include/generic-glibc/limits.h
+++ b/lib/libc/include/generic-glibc/limits.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -180,7 +180,7 @@
/* The macros for _Bool are not defined by GCC's before GCC
11, or if _GNU_SOURCE is defined rather than enabling C23 support
- with -std. */
+ with -std; likewise for the version macro before GCC 13. */
#if __GLIBC_USE (ISOC23)
# ifndef BOOL_MAX
# define BOOL_MAX 1
@@ -188,6 +188,9 @@
# ifndef BOOL_WIDTH
# define BOOL_WIDTH 1
# endif
+# ifndef __STDC_VERSION_LIMITS_H__
+# define __STDC_VERSION_LIMITS_H__ 202311L
+# endif
#endif
#ifdef __USE_POSIX
diff --git a/lib/libc/include/generic-glibc/link.h b/lib/libc/include/generic-glibc/link.h
index 23fd442437..7c0e06f979 100644
--- a/lib/libc/include/generic-glibc/link.h
+++ b/lib/libc/include/generic-glibc/link.h
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/locale.h b/lib/libc/include/generic-glibc/locale.h
index 405a96d9f2..99b02fcf82 100644
--- a/lib/libc/include/generic-glibc/locale.h
+++ b/lib/libc/include/generic-glibc/locale.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/malloc.h b/lib/libc/include/generic-glibc/malloc.h
index 187457d421..7332af4a72 100644
--- a/lib/libc/include/generic-glibc/malloc.h
+++ b/lib/libc/include/generic-glibc/malloc.h
@@ -1,5 +1,5 @@
/* Prototypes and definition for malloc implementation.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -89,11 +89,11 @@ struct mallinfo
{
int arena; /* non-mmapped space allocated from system */
int ordblks; /* number of free chunks */
- int smblks; /* number of fastbin blocks */
+ int smblks; /* number of fastbin blocks (deprecated) */
int hblks; /* number of mmapped regions */
int hblkhd; /* space in mmapped regions */
int usmblks; /* always 0, preserved for backwards compatibility */
- int fsmblks; /* space available in freed fastbin blocks */
+ int fsmblks; /* space available in freed fastbin blocks (deprecated) */
int uordblks; /* total allocated space */
int fordblks; /* total free space */
int keepcost; /* top-most, releasable (via malloc_trim) space */
@@ -106,11 +106,11 @@ struct mallinfo2
{
size_t arena; /* non-mmapped space allocated from system */
size_t ordblks; /* number of free chunks */
- size_t smblks; /* number of fastbin blocks */
+ size_t smblks; /* number of fastbin blocks (deprecated) */
size_t hblks; /* number of mmapped regions */
size_t hblkhd; /* space in mmapped regions */
size_t usmblks; /* always 0, preserved for backwards compatibility */
- size_t fsmblks; /* space available in freed fastbin blocks */
+ size_t fsmblks; /* space available in freed fastbin blocks (deprecated) */
size_t uordblks; /* total allocated space */
size_t fordblks; /* total free space */
size_t keepcost; /* top-most, releasable (via malloc_trim) space */
@@ -164,4 +164,4 @@ extern void malloc_stats (void) __THROW;
extern int malloc_info (int __options, FILE *__fp) __THROW;
__END_DECLS
-#endif /* malloc.h */
+#endif /* malloc.h */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/math.h b/lib/libc/include/generic-glibc/math.h
index 2260d5d0b4..99e75ab843 100644
--- a/lib/libc/include/generic-glibc/math.h
+++ b/lib/libc/include/generic-glibc/math.h
@@ -1,5 +1,5 @@
/* Declarations for math functions.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,15 +33,16 @@
__BEGIN_DECLS
-/* Get definitions of __intmax_t and __uintmax_t. */
-#include
-
/* Get machine-dependent vector math functions declarations. */
#include
/* Gather machine dependent type support. */
#include
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_MATH_H__ 202311L
+#endif
+
/* Value returned on overflow. With IEEE 754 floating point, this is
+Infinity, otherwise the largest representable positive value. */
#if __GNUC_PREREQ (3, 3)
@@ -162,34 +163,201 @@ __BEGIN_DECLS
to evaluate `float' expressions
double_t floating-point type at least as wide as `double' used
to evaluate `double' expressions
+
+ TS 18661-3 and C23 additionally define long_double_t and _FloatN_t.
*/
-# if __GLIBC_FLT_EVAL_METHOD == 0 || __GLIBC_FLT_EVAL_METHOD == 16
+# if __GLIBC_FLT_EVAL_METHOD == 0
typedef float float_t;
typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef float _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float32 _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 1
typedef double float_t;
typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef double _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef double _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 2
typedef long double float_t;
typedef long double double_t;
-# elif __GLIBC_FLT_EVAL_METHOD == 32
-typedef _Float32 float_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef long double _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef long double _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+# ifdef __NO_LONG_DOUBLE_MATH
+typedef _Float64 _Float64_t;
+# else
+typedef long double _Float64_t;
+# endif
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
+# elif __GLIBC_FLT_EVAL_METHOD == 16
+typedef float float_t;
typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef _Float16 _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float32 _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
+# elif __GLIBC_FLT_EVAL_METHOD == 32
+typedef float float_t;
+typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef _Float32 _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float32 _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 33
typedef _Float32x float_t;
-typedef _Float32x double_t;
+typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef _Float32x _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float32x _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 64
typedef _Float64 float_t;
-typedef _Float64 double_t;
+typedef double double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef _Float64 _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float64 _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 65
typedef _Float64x float_t;
typedef _Float64x double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+typedef long double long_double_t;
+# if __HAVE_FLOAT16
+typedef _Float64x _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float64x _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float64x _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 128
typedef _Float128 float_t;
typedef _Float128 double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+# if __HAVE_FLOAT128_UNLIKE_LDBL && __LDBL_MANT_DIG__ != 106
+typedef _Float128 long_double_t;
+# else
+typedef long double long_double_t;
+# endif
+# if __HAVE_FLOAT16
+typedef _Float128 _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float128 _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float128 _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128 _Float128_t;
+# endif
+# endif
# elif __GLIBC_FLT_EVAL_METHOD == 129
typedef _Float128x float_t;
typedef _Float128x double_t;
+# if __GLIBC_USE (IEC_60559_TYPES_EXT)
+# if __LDBL_MANT_DIG__ != 106
+typedef _Float128x long_double_t;
+# else
+typedef long double long_double_t;
+# endif
+# if __HAVE_FLOAT16
+typedef _Float128x _Float16_t;
+# endif
+# if __HAVE_FLOAT32
+typedef _Float128x _Float32_t;
+# endif
+# if __HAVE_FLOAT64
+typedef _Float128x _Float64_t;
+# endif
+# if __HAVE_FLOAT128
+typedef _Float128x _Float128_t;
+# endif
+# endif
# else
# error "Unknown __GLIBC_FLT_EVAL_METHOD"
# endif
@@ -1265,7 +1433,7 @@ iszero (__T __val)
#endif
#ifdef __USE_ISOC99
-# if __GNUC_PREREQ (3, 1)
+# if __GNUC_PREREQ (3, 1) && !defined __clang__
/* ISO C99 defines some macros to compare number while taking care for
unordered numbers. Many FPUs provide special instructions to support
these operations. Generic support in GCC for these as builtins went
diff --git a/lib/libc/include/generic-glibc/mcheck.h b/lib/libc/include/generic-glibc/mcheck.h
index f8c86b7aea..b189ae1524 100644
--- a/lib/libc/include/generic-glibc/mcheck.h
+++ b/lib/libc/include/generic-glibc/mcheck.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/memory.h b/lib/libc/include/generic-glibc/memory.h
index 9dc8823e45..7c6d7d96e9 100644
--- a/lib/libc/include/generic-glibc/memory.h
+++ b/lib/libc/include/generic-glibc/memory.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/mntent.h b/lib/libc/include/generic-glibc/mntent.h
index 3bd819b322..352739b033 100644
--- a/lib/libc/include/generic-glibc/mntent.h
+++ b/lib/libc/include/generic-glibc/mntent.h
@@ -1,5 +1,5 @@
/* Utilities for reading/writing fstab, mtab, etc.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/monetary.h b/lib/libc/include/generic-glibc/monetary.h
index 348e044f7e..046a7ee1c1 100644
--- a/lib/libc/include/generic-glibc/monetary.h
+++ b/lib/libc/include/generic-glibc/monetary.h
@@ -1,5 +1,5 @@
/* Header file for monetary value formatting functions.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/mqueue.h b/lib/libc/include/generic-glibc/mqueue.h
index 0e5d4bf733..7b9f7a54ee 100644
--- a/lib/libc/include/generic-glibc/mqueue.h
+++ b/lib/libc/include/generic-glibc/mqueue.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/ethernet.h b/lib/libc/include/generic-glibc/net/ethernet.h
index ff9a5250d0..6c2bb4d64d 100644
--- a/lib/libc/include/generic-glibc/net/ethernet.h
+++ b/lib/libc/include/generic-glibc/net/ethernet.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/if.h b/lib/libc/include/generic-glibc/net/if.h
index 71e70c3baf..759016aec6 100644
--- a/lib/libc/include/generic-glibc/net/if.h
+++ b/lib/libc/include/generic-glibc/net/if.h
@@ -1,5 +1,5 @@
/* net/if.h -- declarations for inquiring about network interfaces
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/if_arp.h b/lib/libc/include/generic-glibc/net/if_arp.h
index 59d9a84b53..929a85efbc 100644
--- a/lib/libc/include/generic-glibc/net/if_arp.h
+++ b/lib/libc/include/generic-glibc/net/if_arp.h
@@ -1,5 +1,5 @@
/* Definitions for Address Resolution Protocol.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/if_packet.h b/lib/libc/include/generic-glibc/net/if_packet.h
index f89f7f9d8a..fe64c7cf3e 100644
--- a/lib/libc/include/generic-glibc/net/if_packet.h
+++ b/lib/libc/include/generic-glibc/net/if_packet.h
@@ -1,5 +1,5 @@
/* Definitions for use with Linux SOCK_PACKET sockets.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/if_shaper.h b/lib/libc/include/generic-glibc/net/if_shaper.h
index 51c5716cc9..45b0e17f05 100644
--- a/lib/libc/include/generic-glibc/net/if_shaper.h
+++ b/lib/libc/include/generic-glibc/net/if_shaper.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/if_slip.h b/lib/libc/include/generic-glibc/net/if_slip.h
index a46311d84a..08472f5c2d 100644
--- a/lib/libc/include/generic-glibc/net/if_slip.h
+++ b/lib/libc/include/generic-glibc/net/if_slip.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/net/route.h b/lib/libc/include/generic-glibc/net/route.h
index 3cc87c1715..afeef70e52 100644
--- a/lib/libc/include/generic-glibc/net/route.h
+++ b/lib/libc/include/generic-glibc/net/route.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netash/ash.h b/lib/libc/include/generic-glibc/netash/ash.h
index 465ec38cb3..acf28136f0 100644
--- a/lib/libc/include/generic-glibc/netash/ash.h
+++ b/lib/libc/include/generic-glibc/netash/ash.h
@@ -1,5 +1,5 @@
/* Definitions for use with Linux AF_ASH sockets.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netatalk/at.h b/lib/libc/include/generic-glibc/netatalk/at.h
index d3d5fe50d6..fa25cdc4b1 100644
--- a/lib/libc/include/generic-glibc/netatalk/at.h
+++ b/lib/libc/include/generic-glibc/netatalk/at.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netax25/ax25.h b/lib/libc/include/generic-glibc/netax25/ax25.h
index f08b91f0de..b39eba1afd 100644
--- a/lib/libc/include/generic-glibc/netax25/ax25.h
+++ b/lib/libc/include/generic-glibc/netax25/ax25.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netdb.h b/lib/libc/include/generic-glibc/netdb.h
index 0c7574af8c..f134a0ef3d 100644
--- a/lib/libc/include/generic-glibc/netdb.h
+++ b/lib/libc/include/generic-glibc/netdb.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/neteconet/ec.h b/lib/libc/include/generic-glibc/neteconet/ec.h
index 40d4af82b5..4fa4d659f0 100644
--- a/lib/libc/include/generic-glibc/neteconet/ec.h
+++ b/lib/libc/include/generic-glibc/neteconet/ec.h
@@ -1,5 +1,5 @@
/* Definitions for use with Linux AF_ECONET sockets.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/ether.h b/lib/libc/include/generic-glibc/netinet/ether.h
index 693b4c6f70..20b1f4115d 100644
--- a/lib/libc/include/generic-glibc/netinet/ether.h
+++ b/lib/libc/include/generic-glibc/netinet/ether.h
@@ -1,5 +1,5 @@
/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/icmp6.h b/lib/libc/include/generic-glibc/netinet/icmp6.h
index e45d704e99..0fd25b01f5 100644
--- a/lib/libc/include/generic-glibc/netinet/icmp6.h
+++ b/lib/libc/include/generic-glibc/netinet/icmp6.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/if_ether.h b/lib/libc/include/generic-glibc/netinet/if_ether.h
index 6cf2cacd4b..63f494284d 100644
--- a/lib/libc/include/generic-glibc/netinet/if_ether.h
+++ b/lib/libc/include/generic-glibc/netinet/if_ether.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/if_fddi.h b/lib/libc/include/generic-glibc/netinet/if_fddi.h
index 1d5b50d32e..aaf5559c35 100644
--- a/lib/libc/include/generic-glibc/netinet/if_fddi.h
+++ b/lib/libc/include/generic-glibc/netinet/if_fddi.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/if_tr.h b/lib/libc/include/generic-glibc/netinet/if_tr.h
index 003c33f434..a8abf534c8 100644
--- a/lib/libc/include/generic-glibc/netinet/if_tr.h
+++ b/lib/libc/include/generic-glibc/netinet/if_tr.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/igmp.h b/lib/libc/include/generic-glibc/netinet/igmp.h
index 58df64655c..63e24c6cd0 100644
--- a/lib/libc/include/generic-glibc/netinet/igmp.h
+++ b/lib/libc/include/generic-glibc/netinet/igmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/in.h b/lib/libc/include/generic-glibc/netinet/in.h
index cecb7b9d36..450338576f 100644
--- a/lib/libc/include/generic-glibc/netinet/in.h
+++ b/lib/libc/include/generic-glibc/netinet/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/in_systm.h b/lib/libc/include/generic-glibc/netinet/in_systm.h
index 3f6e4f15c8..bea6cf82f1 100644
--- a/lib/libc/include/generic-glibc/netinet/in_systm.h
+++ b/lib/libc/include/generic-glibc/netinet/in_systm.h
@@ -1,5 +1,5 @@
/* System specific type definitions for networking code.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/ip.h b/lib/libc/include/generic-glibc/netinet/ip.h
index 4ef5f6cd39..eeb5d175f9 100644
--- a/lib/libc/include/generic-glibc/netinet/ip.h
+++ b/lib/libc/include/generic-glibc/netinet/ip.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/ip6.h b/lib/libc/include/generic-glibc/netinet/ip6.h
index 2ef059bea2..e9509ae491 100644
--- a/lib/libc/include/generic-glibc/netinet/ip6.h
+++ b/lib/libc/include/generic-glibc/netinet/ip6.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/ip_icmp.h b/lib/libc/include/generic-glibc/netinet/ip_icmp.h
index c5b386ddfd..5e09c0efea 100644
--- a/lib/libc/include/generic-glibc/netinet/ip_icmp.h
+++ b/lib/libc/include/generic-glibc/netinet/ip_icmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netinet/tcp.h b/lib/libc/include/generic-glibc/netinet/tcp.h
index 357da43712..49764361e7 100644
--- a/lib/libc/include/generic-glibc/netinet/tcp.h
+++ b/lib/libc/include/generic-glibc/netinet/tcp.h
@@ -267,8 +267,93 @@ struct tcp_info
uint32_t tcpi_rcv_space;
uint32_t tcpi_total_retrans;
+
+ uint64_t tcpi_pacing_rate;
+ uint64_t tcpi_max_pacing_rate;
+ uint64_t tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */
+ uint64_t tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
+ uint32_t tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
+ uint32_t tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */
+
+ uint32_t tcpi_notsent_bytes;
+ uint32_t tcpi_min_rtt;
+ uint32_t tcpi_data_segs_in; /* RFC4898 tcpEStatsDataSegsIn */
+ uint32_t tcpi_data_segs_out; /* RFC4898 tcpEStatsDataSegsOut */
+
+ uint64_t tcpi_delivery_rate;
+
+ uint64_t tcpi_busy_time; /* Time (usec) busy sending data */
+ uint64_t tcpi_rwnd_limited; /* Time (usec) limited by receive window */
+ uint64_t tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */
+
+ uint32_t tcpi_delivered;
+ uint32_t tcpi_delivered_ce;
+
+ uint64_t tcpi_bytes_sent; /* RFC4898 tcpEStatsPerfHCDataOctetsOut */
+ uint64_t tcpi_bytes_retrans; /* RFC4898 tcpEStatsPerfOctetsRetrans */
+ uint32_t tcpi_dsack_dups; /* RFC4898 tcpEStatsStackDSACKDups */
+ uint32_t tcpi_reord_seen; /* reordering events seen */
+
+
+ uint32_t tcpi_rcv_ooopack; /* Out-of-order packets received */
+ /* Peer's advertised receive window after scaling (bytes) */
+ uint32_t tcpi_snd_wnd;
+ /* Local advertised receive window after scaling (bytes) */
+ uint32_t tcpi_rcv_wnd;
+
+ uint32_t tcpi_rehash; /* PLB or timeout triggered rehash attempts */
+ /* Total number of RTO timeouts, including
+ * SYN/SYN-ACK and recurring timeouts
+ */
+ uint16_t tcpi_total_rto;
+ /* Total number of RTO recoveries, including any unfinished recovery. */
+ uint16_t tcpi_total_rto_recoveries;
+ /* Total time spent in RTO recoveries in milliseconds, including any
+ * unfinished recovery.
+ */
+ uint32_t tcpi_total_rto_time;
+ uint32_t tcpi_received_ce; /* # of CE marks received */
+ uint32_t tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
+ uint32_t tcpi_delivered_e0_bytes;
+ uint32_t tcpi_delivered_ce_bytes;
+ uint32_t tcpi_received_e1_bytes;
+ uint32_t tcpi_received_e0_bytes;
+ uint32_t tcpi_received_ce_bytes;
+ uint16_t tcpi_accecn_fail_mode;
+ uint16_t tcpi_accecn_opt_seen;
};
+/* Netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
+enum {
+ TCP_NLA_PAD,
+ TCP_NLA_BUSY, /* Time (usec) busy sending data */
+ TCP_NLA_RWND_LIMITED, /* Time (usec) limited by receive window */
+ TCP_NLA_SNDBUF_LIMITED, /* Time (usec) limited by send buffer */
+ TCP_NLA_DATA_SEGS_OUT, /* Data pkts sent including retransmission */
+ TCP_NLA_TOTAL_RETRANS, /* Data pkts retransmitted */
+ TCP_NLA_PACING_RATE, /* Pacing rate in bytes per second */
+ TCP_NLA_DELIVERY_RATE, /* Delivery rate in bytes per second */
+ TCP_NLA_SND_CWND, /* Sending congestion window */
+ TCP_NLA_REORDERING, /* Reordering metric */
+ TCP_NLA_MIN_RTT, /* minimum RTT */
+ TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */
+ TCP_NLA_DELIVERY_RATE_APP_LMT, /* delivery rate application limited ? */
+ TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */
+ TCP_NLA_CA_STATE, /* ca_state of socket */
+ TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */
+ TCP_NLA_DELIVERED, /* Data pkts delivered incl. out-of-order */
+ TCP_NLA_DELIVERED_CE, /* Like above but only ones w/ CE marks */
+ TCP_NLA_BYTES_SENT, /* Data bytes sent including retransmission */
+ TCP_NLA_BYTES_RETRANS, /* Data bytes retransmitted */
+ TCP_NLA_DSACK_DUPS, /* DSACK blocks received */
+ TCP_NLA_REORD_SEEN, /* reordering events seen */
+ TCP_NLA_SRTT, /* smoothed RTT in usecs */
+ TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */
+ TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */
+ TCP_NLA_EDT, /* Earliest departure time (CLOCK_MONOTONIC) */
+ TCP_NLA_TTL, /* TTL or hop limit of a packet received */
+ TCP_NLA_REHASH, /* PLB and timeout triggered rehash attempts */
+};
/* For TCP_MD5SIG socket option. */
#define TCP_MD5SIG_MAXKEYLEN 80
@@ -287,6 +372,114 @@ struct tcp_md5sig
uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
};
+/* INET_DIAG_MD5SIG */
+struct tcp_diag_md5sig {
+ uint8_t tcpm_family;
+ uint8_t tcpm_prefixlen;
+ uint16_t tcpm_keylen;
+ uint32_t tcpm_addr[4];
+ uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
+};
+
+#define TCP_AO_MAXKEYLEN 80
+
+#define TCP_AO_KEYF_IFINDEX (1 << 0) /* L3 ifindex for VRF */
+#define TCP_AO_KEYF_EXCLUDE_OPT (1 << 1) /* Indicates whether TCP options
+ * other than TCP-AO are included
+ * in the MAC calculation
+ */
+
+struct tcp_ao_add { /* setsockopt(TCP_AO_ADD_KEY) */
+ struct sockaddr_storage addr; /* Peer's address for the key */
+ int8_t alg_name[64]; /* Crypto hash algorithm to use */
+ int32_t ifindex; /* L3 dev index for VRF */
+ uint32_t set_current :1, /* Set key as Current_key at once */
+ set_rnext :1, /* Request it from peer with RNext_key */
+ reserved :30; /* Must be 0 */
+ uint16_t reserved2; /* Padding, must be 0 */
+ uint8_t prefix; /* Peer's address prefix */
+ uint8_t sndid; /* SendID for outgoing segments */
+ uint8_t rcvid; /* RecvID to match for incoming seg */
+ uint8_t maclen; /* length of authentication code (hash) */
+ uint8_t keyflags; /* See TCP_AO_KEYF_ */
+ uint8_t keylen; /* Length of ::key */
+ uint8_t key[TCP_AO_MAXKEYLEN];
+} __attribute__((aligned(8)));
+
+struct tcp_ao_del { /* setsockopt(TCP_AO_DEL_KEY) */
+ struct sockaddr_storage addr; /* Peer's address for the key */
+ int32_t ifindex; /* L3 dev index for VRF */
+ uint32_t set_current :1, /* Corresponding ::current_key */
+ set_rnext :1, /* Corresponding ::rnext */
+ del_async :1, /* Only valid for listen sockets */
+ reserved :29; /* Must be 0 */
+ uint16_t reserved2; /* Padding, must be 0 */
+ uint8_t prefix; /* Peer's address prefix */
+ uint8_t sndid; /* SendID for outgoing segments */
+ uint8_t rcvid; /* RecvID to match for incoming seg */
+ uint8_t current_key; /* KeyID to set as Current_key */
+ uint8_t rnext; /* KeyID to set as Rnext_key */
+ uint8_t keyflags; /* See TCP_AO_KEYF_ */
+} __attribute__((aligned(8)));
+
+struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO), getsockopt(TCP_AO_INFO)
+ */
+ /* Here 'in' is for setsockopt(), 'out' is for getsockopt() */
+ uint32_t set_current :1, /* In/out: corresponding ::current_key */
+ set_rnext :1, /* In/out: corresponding ::rnext */
+ ao_required :1, /* In/out: don't accept non-AO connects */
+ set_counters :1, /* In: set/clear ::pkt_* counters */
+ accept_icmps :1, /* In/out: accept incoming ICMPs */
+ reserved :27; /* must be 0 */
+ uint16_t reserved2; /* Padding, must be 0 */
+ uint8_t current_key; /* In/out: KeyID of Current_key */
+ uint8_t rnext; /* In/out: keyid of RNext_key */
+ uint64_t pkt_good; /* In/out: verified segments */
+ uint64_t pkt_bad; /* In/out: failed verification */
+ uint64_t pkt_key_not_found; /* In/out: could not find a key to verify */
+ uint64_t pkt_ao_required; /* In/out: segments missing TCP-AO sign */
+ uint64_t pkt_dropped_icmp; /* In/out: ICMPs that were ignored */
+} __attribute__((aligned(8)));
+
+struct tcp_ao_getsockopt { /* getsockopt(TCP_AO_GET_KEYS) */
+ struct sockaddr_storage addr; /* In/out: dump keys for peer
+ * with this address/prefix
+ */
+ uint8_t alg_name[64]; /* out: crypto hash algorithm */
+ uint8_t key[TCP_AO_MAXKEYLEN];
+ uint32_t nkeys; /* In: size of the userspace buffer
+ * @optval, measured in @optlen - the
+ * sizeof(struct tcp_ao_getsockopt)
+ * Out: number of keys that matched
+ */
+ uint16_t is_current :1, /* In: match and dump Current_key,
+ * Out: the dumped key is Current_key
+ */
+ is_rnext :1, /* In: match and dump RNext_key,
+ * Out: the dumped key is RNext_key
+ */
+ get_all :1, /* In: dump all keys */
+ reserved :13; /* Padding, must be 0 */
+ uint8_t sndid; /* In/out: dump keys with SendID */
+ uint8_t rcvid; /* In/out: dump keys with RecvID */
+ uint8_t prefix; /* In/out: dump keys with address/prefix */
+ uint8_t maclen; /* Out: key's length of authentication
+ * code (hash)
+ */
+ uint8_t keyflags; /* In/out: see TCP_AO_KEYF_ */
+ uint8_t keylen; /* Out: length of ::key */
+ int32_t ifindex; /* In/out: L3 dev index for VRF */
+ uint64_t pkt_good; /* Out: verified segments */
+ uint64_t pkt_bad; /* Out: segments that failed verification */
+} __attribute__((aligned(8)));
+
+struct tcp_ao_repair { /* {s,g}etsockopt(TCP_AO_REPAIR) */
+ uint32_t snt_isn;
+ uint32_t rcv_isn;
+ uint32_t snd_sne;
+ uint32_t rcv_sne;
+} __attribute__((aligned(8)));
+
/* For socket repair options. */
struct tcp_repair_opt
{
@@ -346,6 +539,15 @@ struct tcp_zerocopy_receive
uint64_t address; /* In: address of mapping. */
uint32_t length; /* In/out: number of bytes to map/mapped. */
uint32_t recv_skip_hint; /* Out: amount of bytes to skip. */
+ uint32_t inq; /* Out: amount of bytes in read queue. */
+ int32_t err; /* Out: socket error. */
+ uint64_t copybuf_address; /* On: copybuf address (small reads). */
+ int32_t copybuf_len; /* In/Out: copybuf bytes avail/used or error. */
+ uint32_t flags; /* In: flags. */
+ uint64_t msg_control; /* Ancillary data. */
+ uint64_t msg_controllen;
+ uint32_t msg_flags;
+ uint32_t reserved; /* Set to 0 for now. */
};
#endif /* Misc. */
diff --git a/lib/libc/include/generic-glibc/netinet/udp.h b/lib/libc/include/generic-glibc/netinet/udp.h
index c2fd325082..afc034d3a6 100644
--- a/lib/libc/include/generic-glibc/netinet/udp.h
+++ b/lib/libc/include/generic-glibc/netinet/udp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netipx/ipx.h b/lib/libc/include/generic-glibc/netipx/ipx.h
index d67d3cb86b..f72532980f 100644
--- a/lib/libc/include/generic-glibc/netipx/ipx.h
+++ b/lib/libc/include/generic-glibc/netipx/ipx.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netiucv/iucv.h b/lib/libc/include/generic-glibc/netiucv/iucv.h
index b1125c1c87..27735c0e52 100644
--- a/lib/libc/include/generic-glibc/netiucv/iucv.h
+++ b/lib/libc/include/generic-glibc/netiucv/iucv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netpacket/packet.h b/lib/libc/include/generic-glibc/netpacket/packet.h
index af9f7f49ec..15477efb1b 100644
--- a/lib/libc/include/generic-glibc/netpacket/packet.h
+++ b/lib/libc/include/generic-glibc/netpacket/packet.h
@@ -1,5 +1,5 @@
/* Definitions for use with Linux AF_PACKET sockets.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netrom/netrom.h b/lib/libc/include/generic-glibc/netrom/netrom.h
index 78ab32c0f3..8fd4caf5c4 100644
--- a/lib/libc/include/generic-glibc/netrom/netrom.h
+++ b/lib/libc/include/generic-glibc/netrom/netrom.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/netrose/rose.h b/lib/libc/include/generic-glibc/netrose/rose.h
index d85179ec13..ee864a459b 100644
--- a/lib/libc/include/generic-glibc/netrose/rose.h
+++ b/lib/libc/include/generic-glibc/netrose/rose.h
@@ -1,5 +1,5 @@
/* Definitions for Rose packet radio address family.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/nl_types.h b/lib/libc/include/generic-glibc/nl_types.h
index 87ee5341c0..54577d60a1 100644
--- a/lib/libc/include/generic-glibc/nl_types.h
+++ b/lib/libc/include/generic-glibc/nl_types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/nss.h b/lib/libc/include/generic-glibc/nss.h
index ab632b5b41..a57c1366d3 100644
--- a/lib/libc/include/generic-glibc/nss.h
+++ b/lib/libc/include/generic-glibc/nss.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/obstack.h b/lib/libc/include/generic-glibc/obstack.h
index a80542eb4e..37d0e9b2c8 100644
--- a/lib/libc/include/generic-glibc/obstack.h
+++ b/lib/libc/include/generic-glibc/obstack.h
@@ -1,5 +1,5 @@
/* obstack.h - object stack macros
- Copyright (C) 1988-2025 Free Software Foundation, Inc.
+ Copyright (C) 1988-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/printf.h b/lib/libc/include/generic-glibc/printf.h
index 29d0baaa40..321a337557 100644
--- a/lib/libc/include/generic-glibc/printf.h
+++ b/lib/libc/include/generic-glibc/printf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/proc_service.h b/lib/libc/include/generic-glibc/proc_service.h
index 96fc4872d8..47da4c2a98 100644
--- a/lib/libc/include/generic-glibc/proc_service.h
+++ b/lib/libc/include/generic-glibc/proc_service.h
@@ -1,5 +1,5 @@
/* Callback interface for libthread_db, functions users must define.
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/pthread.h b/lib/libc/include/generic-glibc/pthread.h
index cfce06cef9..638d23c887 100644
--- a/lib/libc/include/generic-glibc/pthread.h
+++ b/lib/libc/include/generic-glibc/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/pty.h b/lib/libc/include/generic-glibc/pty.h
index d6b4b7ee36..9091c17321 100644
--- a/lib/libc/include/generic-glibc/pty.h
+++ b/lib/libc/include/generic-glibc/pty.h
@@ -1,5 +1,5 @@
/* Functions for pseudo TTY handling.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/pwd.h b/lib/libc/include/generic-glibc/pwd.h
index e4b85ac27e..daf70436bf 100644
--- a/lib/libc/include/generic-glibc/pwd.h
+++ b/lib/libc/include/generic-glibc/pwd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/re_comp.h b/lib/libc/include/generic-glibc/re_comp.h
index 807da5a58d..baf343bdc1 100644
--- a/lib/libc/include/generic-glibc/re_comp.h
+++ b/lib/libc/include/generic-glibc/re_comp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/regdef.h b/lib/libc/include/generic-glibc/regdef.h
index db737482b1..55ce5b9f04 100644
--- a/lib/libc/include/generic-glibc/regdef.h
+++ b/lib/libc/include/generic-glibc/regdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/regex.h b/lib/libc/include/generic-glibc/regex.h
index 8bbd92fc4f..29964af5b2 100644
--- a/lib/libc/include/generic-glibc/regex.h
+++ b/lib/libc/include/generic-glibc/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/regexp.h b/lib/libc/include/generic-glibc/regexp.h
index 02ff44637e..3ecab12e76 100644
--- a/lib/libc/include/generic-glibc/regexp.h
+++ b/lib/libc/include/generic-glibc/regexp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/resolv.h b/lib/libc/include/generic-glibc/resolv.h
index 206ff771fb..052341aa37 100644
--- a/lib/libc/include/generic-glibc/resolv.h
+++ b/lib/libc/include/generic-glibc/resolv.h
@@ -336,4 +336,4 @@ void res_nclose (res_state) __THROW;
__END_DECLS
-#endif /* !_RESOLV_H_ */
+#endif /* !_RESOLV_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/sched.h b/lib/libc/include/generic-glibc/sched.h
index 0a44b8d5d8..6a7358c795 100644
--- a/lib/libc/include/generic-glibc/sched.h
+++ b/lib/libc/include/generic-glibc/sched.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/scsi/scsi.h b/lib/libc/include/generic-glibc/scsi/scsi.h
index 925b2d8a31..45ec5e91f3 100644
--- a/lib/libc/include/generic-glibc/scsi/scsi.h
+++ b/lib/libc/include/generic-glibc/scsi/scsi.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h b/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h
index 59f10b7ce1..65ca9f6824 100644
--- a/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h
+++ b/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/scsi/sg.h b/lib/libc/include/generic-glibc/scsi/sg.h
index 6129b0dd62..c82da1ebc2 100644
--- a/lib/libc/include/generic-glibc/scsi/sg.h
+++ b/lib/libc/include/generic-glibc/scsi/sg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/search.h b/lib/libc/include/generic-glibc/search.h
index c28ee21932..5d93024543 100644
--- a/lib/libc/include/generic-glibc/search.h
+++ b/lib/libc/include/generic-glibc/search.h
@@ -1,5 +1,5 @@
/* Declarations for System V style searching functions.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/semaphore.h b/lib/libc/include/generic-glibc/semaphore.h
index 3f856a5ef7..2724da048d 100644
--- a/lib/libc/include/generic-glibc/semaphore.h
+++ b/lib/libc/include/generic-glibc/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/setjmp.h b/lib/libc/include/generic-glibc/setjmp.h
index e28e85dfa9..5d726b389c 100644
--- a/lib/libc/include/generic-glibc/setjmp.h
+++ b/lib/libc/include/generic-glibc/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,10 @@
__BEGIN_DECLS
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_SETJMP_H__ 202311L
+#endif
+
#include /* Get `__jmp_buf'. */
#include
diff --git a/lib/libc/include/generic-glibc/sgidefs.h b/lib/libc/include/generic-glibc/sgidefs.h
index c0ba3fb458..dd5a5f49b5 100644
--- a/lib/libc/include/generic-glibc/sgidefs.h
+++ b/lib/libc/include/generic-glibc/sgidefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sgtty.h b/lib/libc/include/generic-glibc/sgtty.h
index 0b6dc1ac31..1a1dfe28d1 100644
--- a/lib/libc/include/generic-glibc/sgtty.h
+++ b/lib/libc/include/generic-glibc/sgtty.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/shadow.h b/lib/libc/include/generic-glibc/shadow.h
index 090437158e..663365355b 100644
--- a/lib/libc/include/generic-glibc/shadow.h
+++ b/lib/libc/include/generic-glibc/shadow.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/signal.h b/lib/libc/include/generic-glibc/signal.h
index 13a7fed126..9c7d3e87b6 100644
--- a/lib/libc/include/generic-glibc/signal.h
+++ b/lib/libc/include/generic-glibc/signal.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/spawn.h b/lib/libc/include/generic-glibc/spawn.h
index e466dd62d6..b8e1eaee8f 100644
--- a/lib/libc/include/generic-glibc/spawn.h
+++ b/lib/libc/include/generic-glibc/spawn.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/stdbit.h b/lib/libc/include/generic-glibc/stdbit.h
index 7938eb3b5c..fd9252fbcb 100644
--- a/lib/libc/include/generic-glibc/stdbit.h
+++ b/lib/libc/include/generic-glibc/stdbit.h
@@ -1,5 +1,5 @@
/* ISO C23 Standard: 7.18 - Bit and byte utilities .
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/stdc-predef.h b/lib/libc/include/generic-glibc/stdc-predef.h
index 8bf36b70ca..6150a345c7 100644
--- a/lib/libc/include/generic-glibc/stdc-predef.h
+++ b/lib/libc/include/generic-glibc/stdc-predef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/stdint.h b/lib/libc/include/generic-glibc/stdint.h
index 191506080a..4e17612886 100644
--- a/lib/libc/include/generic-glibc/stdint.h
+++ b/lib/libc/include/generic-glibc/stdint.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,10 @@
#include
#include
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_STDINT_H__ 202311L
+#endif
+
/* Exact integral types. */
/* Signed. */
@@ -91,6 +95,8 @@ typedef __intmax_t intmax_t;
typedef __uintmax_t uintmax_t;
+# undef __INT64_C
+# undef __UINT64_C
# if __WORDSIZE == 64
# define __INT64_C(c) c ## L
# define __UINT64_C(c) c ## UL
diff --git a/lib/libc/include/generic-glibc/stdio.h b/lib/libc/include/generic-glibc/stdio.h
index e80e857550..c4a057b552 100644
--- a/lib/libc/include/generic-glibc/stdio.h
+++ b/lib/libc/include/generic-glibc/stdio.h
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -29,6 +29,10 @@
__BEGIN_DECLS
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_STDIO_H__ 202311L
+#endif
+
#define __need_size_t
#define __need_NULL
#include
@@ -168,11 +172,11 @@ extern int renameat (int __oldfd, const char *__old, int __newfd,
#ifdef __USE_GNU
/* Flags for renameat2. */
# define RENAME_NOREPLACE (1 << 0)
-# define AT_RENAME_NOREPLACE RENAME_NOREPLACE
+# define AT_RENAME_NOREPLACE 0x0001
# define RENAME_EXCHANGE (1 << 1)
-# define AT_RENAME_EXCHANGE RENAME_EXCHANGE
+# define AT_RENAME_EXCHANGE 0x0002
# define RENAME_WHITEOUT (1 << 2)
-# define AT_RENAME_WHITEOUT RENAME_WHITEOUT
+# define AT_RENAME_WHITEOUT 0x0004
/* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with
additional flags. */
diff --git a/lib/libc/include/generic-glibc/stdio_ext.h b/lib/libc/include/generic-glibc/stdio_ext.h
index 35ba67d43e..984bac3e37 100644
--- a/lib/libc/include/generic-glibc/stdio_ext.h
+++ b/lib/libc/include/generic-glibc/stdio_ext.h
@@ -1,5 +1,5 @@
/* Functions to access FILE structure internals.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/stdlib.h b/lib/libc/include/generic-glibc/stdlib.h
index b6b4ff601f..3ca2bb1f91 100644
--- a/lib/libc/include/generic-glibc/stdlib.h
+++ b/lib/libc/include/generic-glibc/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -35,6 +35,10 @@ __BEGIN_DECLS
#define _STDLIB_H 1
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_STDLIB_H__ 202311L
+#endif
+
#if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
/* XPG requires a few symbols from being defined. */
# include
@@ -692,6 +696,24 @@ extern void *realloc (void *__ptr, size_t __size)
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
+#if __GLIBC_USE(ISOC23)
+/* Free a block allocated by `malloc', `realloc' or `calloc' but not
+ `aligned_alloc', `memalign', `posix_memalign', `valloc' or
+ `pvalloc'. SIZE must be equal to the original requested size
+ provided to `malloc', `realloc' or `calloc'. For `calloc' SIZE is
+ NMEMB elements * SIZE bytes. It is forbidden to call `free_sized'
+ for allocations which the caller did not directly allocate but
+ must still deallocate, such as `strdup' or `strndup'. Instead
+ continue using `free` for these cases. */
+extern void free_sized (void *__ptr, size_t __size) __THROW;
+
+/* Free a block allocated by `aligned_alloc', `memalign' or
+ `posix_memalign'. ALIGNMENT and SIZE must be the same as the values
+ provided to `aligned_alloc', `memalign' or `posix_memalign'. */
+extern void free_aligned_sized (void *__ptr, size_t __alignment, size_t __size)
+ __THROW;
+#endif
+
/*
* zig patch: reallocarray introduced in glibc 2.26
* https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
@@ -977,6 +999,12 @@ extern void *bsearch (const void *__key, const void *__base,
# include
#endif
+#if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \
+ __glibc_const_generic (BASE, const void *, \
+ bsearch (KEY, BASE, NMEMB, SIZE, COMPAR))
+#endif
+
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
extern void qsort (void *__base, size_t __nmemb, size_t __size,
@@ -1170,6 +1198,19 @@ extern int getloadavg (double __loadavg[], int __nelem)
extern int ttyslot (void) __THROW;
#endif
+#if __GLIBC_USE (ISOC23)
+# ifndef __cplusplus
+# include
+
+/* Call function __FUNC exactly once, even if invoked from several threads.
+ All calls must be made with the same __FLAGS object. */
+extern void call_once (once_flag *__flag, void (*__func)(void));
+# endif /* !__cplusplus */
+
+/* Return the alignment of P. */
+extern size_t memalignment (const void *__p);
+#endif
+
#include
/* Define some macros helping to catch buffer overflows. */
diff --git a/lib/libc/include/generic-glibc/string.h b/lib/libc/include/generic-glibc/string.h
index d6794d21d1..8eb5b75f94 100644
--- a/lib/libc/include/generic-glibc/string.h
+++ b/lib/libc/include/generic-glibc/string.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,10 @@
__BEGIN_DECLS
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_STRING_H__ 202311L
+#endif
+
/* Get size_t and NULL from . */
#define __need_size_t
#define __need_NULL
@@ -60,6 +64,13 @@ extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
/* Set N bytes of S to C. */
extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
+#if defined __USE_MISC || __GLIBC_USE (ISOC23)
+/* Like memset, but the compiler will not delete a call to this
+ function, even if S is dead after the call. */
+extern void *memset_explicit (void *__s, int __c, size_t __n)
+ __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 3);
+#endif
+
/* Compare N bytes of S1 and S2. */
extern int memcmp (const void *__s1, const void *__s2, size_t __n)
__THROW __attribute_pure__ __nonnull ((1, 2));
@@ -106,6 +117,10 @@ memchr (const void *__s, int __c, size_t __n) __THROW
#else
extern void *memchr (const void *__s, int __c, size_t __n)
__THROW __attribute_pure__ __nonnull ((1));
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define memchr(S, C, N) \
+ __glibc_const_generic (S, const void *, memchr (S, C, N))
+# endif
#endif
#ifdef __USE_GNU
@@ -245,6 +260,10 @@ strchr (const char *__s, int __c) __THROW
#else
extern char *strchr (const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define strchr(S, C) \
+ __glibc_const_generic (S, const char *, strchr (S, C))
+# endif
#endif
/* Find the last occurrence of C in S. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
@@ -272,6 +291,10 @@ strrchr (const char *__s, int __c) __THROW
#else
extern char *strrchr (const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define strrchr(S, C) \
+ __glibc_const_generic (S, const char *, strrchr (S, C))
+# endif
#endif
#ifdef __USE_MISC
@@ -322,6 +345,10 @@ strpbrk (const char *__s, const char *__accept) __THROW
#else
extern char *strpbrk (const char *__s, const char *__accept)
__THROW __attribute_pure__ __nonnull ((1, 2));
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define strpbrk(S, ACCEPT) \
+ __glibc_const_generic (S, const char *, strpbrk (S, ACCEPT))
+# endif
#endif
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
@@ -349,6 +376,11 @@ strstr (const char *__haystack, const char *__needle) __THROW
#else
extern char *strstr (const char *__haystack, const char *__needle)
__THROW __attribute_pure__ __nonnull ((1, 2));
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define strstr(HAYSTACK, NEEDLE) \
+ __glibc_const_generic (HAYSTACK, const char *, \
+ strstr (HAYSTACK, NEEDLE))
+# endif
#endif
@@ -557,4 +589,4 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1));
__END_DECLS
-#endif /* string.h */
+#endif /* string.h */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/strings.h b/lib/libc/include/generic-glibc/strings.h
index bcc5399e81..ddd4f467eb 100644
--- a/lib/libc/include/generic-glibc/strings.h
+++ b/lib/libc/include/generic-glibc/strings.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/acct.h b/lib/libc/include/generic-glibc/sys/acct.h
index a0f6fd6ab2..6e603afcaf 100644
--- a/lib/libc/include/generic-glibc/sys/acct.h
+++ b/lib/libc/include/generic-glibc/sys/acct.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/asm.h b/lib/libc/include/generic-glibc/sys/asm.h
index a10baf11ef..4cd32eccbb 100644
--- a/lib/libc/include/generic-glibc/sys/asm.h
+++ b/lib/libc/include/generic-glibc/sys/asm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -478,20 +478,4 @@ symbol = value
# define MTC0 dmtc0
#endif
-/* The MIPS architectures do not have a uniform memory model. Particular
- platforms may provide additional guarantees - for instance, the R4000
- LL and SC instructions implicitly perform a SYNC, and the 4K promises
- strong ordering.
-
- However, in the absence of those guarantees, we must assume weak ordering
- and SYNC explicitly where necessary.
-
- Some obsolete MIPS processors may not support the SYNC instruction. This
- applies to "true" MIPS I processors; most of the processors which compile
- using MIPS I implement parts of MIPS II. */
-
-#ifndef MIPS_SYNC
-# define MIPS_SYNC sync
-#endif
-
#endif /* sys/asm.h */
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/sys/auxv.h b/lib/libc/include/generic-glibc/sys/auxv.h
index ccb6e70ccb..66c0a651ad 100644
--- a/lib/libc/include/generic-glibc/sys/auxv.h
+++ b/lib/libc/include/generic-glibc/sys/auxv.h
@@ -1,5 +1,5 @@
/* Access to the auxiliary vector.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/cachectl.h b/lib/libc/include/generic-glibc/sys/cachectl.h
index d3a4ba4982..daa369ca0b 100644
--- a/lib/libc/include/generic-glibc/sys/cachectl.h
+++ b/lib/libc/include/generic-glibc/sys/cachectl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/cdefs.h b/lib/libc/include/generic-glibc/sys/cdefs.h
index a8315571aa..3970013e72 100644
--- a/lib/libc/include/generic-glibc/sys/cdefs.h
+++ b/lib/libc/include/generic-glibc/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -438,10 +438,10 @@
*/
#endif
-/* GCC and clang have various useful declarations that can be made with
- the '__attribute__' syntax. All of the ways we use this do fine if
- they are omitted for compilers that don't understand it. */
-#if !(defined __GNUC__ || defined __clang__)
+/* GCC, clang, and compatible compilers have various useful declarations
+ that can be made with the '__attribute__' syntax. All of the ways we use
+ this do fine if they are omitted for compilers that don't understand it. */
+#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__)
# define __attribute__(xyz) /* Ignore */
#endif
@@ -606,14 +606,14 @@
# define __attribute_artificial__ /* Ignore */
#endif
-/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
- inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
- or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline
+ semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or
+ __GNUC_GNU_INLINE__ is not a good enough check for gcc because gcc versions
older than 4.3 may define these macros and still not guarantee GNU inlining
semantics.
clang++ identifies itself as gcc-4.2, but has support for GNU inlining
- semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+ semantics, that can be checked for by using the __GNUC_STDC_INLINE__ and
__GNUC_GNU_INLINE__ macro definitions. */
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
|| (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
@@ -828,6 +828,18 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
# define __HAVE_GENERIC_SELECTION 0
#endif
+#if __HAVE_GENERIC_SELECTION
+/* If PTR is a pointer to const, return CALL cast to type CTYPE,
+ otherwise return CALL. Pointers to types with non-const qualifiers
+ are not valid. This should not be defined for C++, as macros are
+ not an appropriate way of implementing such qualifier-generic
+ operations for C++. */
+# define __glibc_const_generic(PTR, CTYPE, CALL) \
+ _Generic (0 ? (PTR) : (void *) 1, \
+ const void *: (CTYPE) (CALL), \
+ default: CALL)
+#endif
+
#if __GNUC_PREREQ (10, 0)
/* Designates a 1-based positional argument ref-index of pointer type
that can be used to access size-index elements of the pointed-to
diff --git a/lib/libc/include/generic-glibc/sys/debugreg.h b/lib/libc/include/generic-glibc/sys/debugreg.h
index 206706490b..0915d533cf 100644
--- a/lib/libc/include/generic-glibc/sys/debugreg.h
+++ b/lib/libc/include/generic-glibc/sys/debugreg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/dir.h b/lib/libc/include/generic-glibc/sys/dir.h
index 26caaf121e..c664312b4b 100644
--- a/lib/libc/include/generic-glibc/sys/dir.h
+++ b/lib/libc/include/generic-glibc/sys/dir.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/elf.h b/lib/libc/include/generic-glibc/sys/elf.h
index 5517dccb2b..aae414e6af 100644
--- a/lib/libc/include/generic-glibc/sys/elf.h
+++ b/lib/libc/include/generic-glibc/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/epoll.h b/lib/libc/include/generic-glibc/sys/epoll.h
index e1beed29ea..0ca1ea780d 100644
--- a/lib/libc/include/generic-glibc/sys/epoll.h
+++ b/lib/libc/include/generic-glibc/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/eventfd.h b/lib/libc/include/generic-glibc/sys/eventfd.h
index dafde87348..d4e89fbdf8 100644
--- a/lib/libc/include/generic-glibc/sys/eventfd.h
+++ b/lib/libc/include/generic-glibc/sys/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/fanotify.h b/lib/libc/include/generic-glibc/sys/fanotify.h
index 371384834e..4155e61af6 100644
--- a/lib/libc/include/generic-glibc/sys/fanotify.h
+++ b/lib/libc/include/generic-glibc/sys/fanotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/file.h b/lib/libc/include/generic-glibc/sys/file.h
index c791c7b8f9..68a1efb13f 100644
--- a/lib/libc/include/generic-glibc/sys/file.h
+++ b/lib/libc/include/generic-glibc/sys/file.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/fpregdef.h b/lib/libc/include/generic-glibc/sys/fpregdef.h
index a72e1868ae..19db3de6bd 100644
--- a/lib/libc/include/generic-glibc/sys/fpregdef.h
+++ b/lib/libc/include/generic-glibc/sys/fpregdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/fsuid.h b/lib/libc/include/generic-glibc/sys/fsuid.h
index 2975d1b8cf..635a57bd18 100644
--- a/lib/libc/include/generic-glibc/sys/fsuid.h
+++ b/lib/libc/include/generic-glibc/sys/fsuid.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/gmon_out.h b/lib/libc/include/generic-glibc/sys/gmon_out.h
index 5e29305736..651c3534ab 100644
--- a/lib/libc/include/generic-glibc/sys/gmon_out.h
+++ b/lib/libc/include/generic-glibc/sys/gmon_out.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/hwprobe.h b/lib/libc/include/generic-glibc/sys/hwprobe.h
index 056a98dc51..6c4c82f9c8 100644
--- a/lib/libc/include/generic-glibc/sys/hwprobe.h
+++ b/lib/libc/include/generic-glibc/sys/hwprobe.h
@@ -1,5 +1,5 @@
/* RISC-V architecture probe interface
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/sys/ifunc.h b/lib/libc/include/generic-glibc/sys/ifunc.h
index c4ca0a983c..324950053e 100644
--- a/lib/libc/include/generic-glibc/sys/ifunc.h
+++ b/lib/libc/include/generic-glibc/sys/ifunc.h
@@ -1,5 +1,5 @@
/* Definitions used by AArch64 indirect function resolvers.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/inotify.h b/lib/libc/include/generic-glibc/sys/inotify.h
index a901da49bf..af9a9bbe18 100644
--- a/lib/libc/include/generic-glibc/sys/inotify.h
+++ b/lib/libc/include/generic-glibc/sys/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/io.h b/lib/libc/include/generic-glibc/sys/io.h
index 6d9f3e8834..c2780ef5c2 100644
--- a/lib/libc/include/generic-glibc/sys/io.h
+++ b/lib/libc/include/generic-glibc/sys/io.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/ioctl.h b/lib/libc/include/generic-glibc/sys/ioctl.h
index c72a90bf78..b0493878d4 100644
--- a/lib/libc/include/generic-glibc/sys/ioctl.h
+++ b/lib/libc/include/generic-glibc/sys/ioctl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/ipc.h b/lib/libc/include/generic-glibc/sys/ipc.h
index ac30bcaba3..84a8b6fe18 100644
--- a/lib/libc/include/generic-glibc/sys/ipc.h
+++ b/lib/libc/include/generic-glibc/sys/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/kd.h b/lib/libc/include/generic-glibc/sys/kd.h
index f59730d247..88bbc25a35 100644
--- a/lib/libc/include/generic-glibc/sys/kd.h
+++ b/lib/libc/include/generic-glibc/sys/kd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/klog.h b/lib/libc/include/generic-glibc/sys/klog.h
index 3d8531cc66..ebc6fd7ea3 100644
--- a/lib/libc/include/generic-glibc/sys/klog.h
+++ b/lib/libc/include/generic-glibc/sys/klog.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/mman.h b/lib/libc/include/generic-glibc/sys/mman.h
index 3577564df0..f8acac9172 100644
--- a/lib/libc/include/generic-glibc/sys/mman.h
+++ b/lib/libc/include/generic-glibc/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/mount.h b/lib/libc/include/generic-glibc/sys/mount.h
index fbb157810e..bf226f5a73 100644
--- a/lib/libc/include/generic-glibc/sys/mount.h
+++ b/lib/libc/include/generic-glibc/sys/mount.h
@@ -1,5 +1,5 @@
/* Header file for mounting/unmount Linux filesystems.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/msg.h b/lib/libc/include/generic-glibc/sys/msg.h
index 8c86c14cf8..4c05ef8910 100644
--- a/lib/libc/include/generic-glibc/sys/msg.h
+++ b/lib/libc/include/generic-glibc/sys/msg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/mtio.h b/lib/libc/include/generic-glibc/sys/mtio.h
index 7c53ec28fe..cdb3899009 100644
--- a/lib/libc/include/generic-glibc/sys/mtio.h
+++ b/lib/libc/include/generic-glibc/sys/mtio.h
@@ -1,5 +1,5 @@
/* Structures and definitions for magnetic tape I/O control commands.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/param.h b/lib/libc/include/generic-glibc/sys/param.h
index e66c19eaae..c4ea4544d4 100644
--- a/lib/libc/include/generic-glibc/sys/param.h
+++ b/lib/libc/include/generic-glibc/sys/param.h
@@ -1,5 +1,5 @@
/* Compatibility header for old-style Unix parameters and limits.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/pci.h b/lib/libc/include/generic-glibc/sys/pci.h
index ec6b7ce780..b5475dd02b 100644
--- a/lib/libc/include/generic-glibc/sys/pci.h
+++ b/lib/libc/include/generic-glibc/sys/pci.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/perm.h b/lib/libc/include/generic-glibc/sys/perm.h
index 5a95dce384..e864375c19 100644
--- a/lib/libc/include/generic-glibc/sys/perm.h
+++ b/lib/libc/include/generic-glibc/sys/perm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/personality.h b/lib/libc/include/generic-glibc/sys/personality.h
index 500950aa5c..54510789bc 100644
--- a/lib/libc/include/generic-glibc/sys/personality.h
+++ b/lib/libc/include/generic-glibc/sys/personality.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/pidfd.h b/lib/libc/include/generic-glibc/sys/pidfd.h
index 406bf2f5fb..3d9ab9430c 100644
--- a/lib/libc/include/generic-glibc/sys/pidfd.h
+++ b/lib/libc/include/generic-glibc/sys/pidfd.h
@@ -1,5 +1,5 @@
/* Wrapper for file descriptors that refers to a process functions.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,6 +45,64 @@
#define PIDFD_GET_USER_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 9)
#define PIDFD_GET_UTS_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 10)
+/* Sentinels to avoid allocating a file descriptor to refer to own process. */
+#define PIDFD_SELF_THREAD -10000
+#define PIDFD_SELF_THREAD_GROUP -10001
+#define PIDFD_SELF PIDFD_SELF_THREAD
+#define PIDFD_SELF_PROCESS PIDFD_SELF_THREAD_GROUP
+
+
+/* Flags for pidfd_info. */
+
+/* Always returned, even if not requested */
+#define PIDFD_INFO_PID (1UL << 0)
+/* Always returned, even if not requested */
+#define PIDFD_INFO_CREDS (1UL << 1)
+/* Always returned if available, even if not requested */
+#define PIDFD_INFO_CGROUPID (1UL << 2)
+/* Only returned if requested. */
+#define PIDFD_INFO_EXIT (1UL << 3)
+/* Only returned if requested. */
+#define PIDFD_INFO_COREDUMP (1UL << 4)
+
+
+/* Value for coredump_mask in pidfd_info. Only valid if PIDFD_INFO_COREDUMP
+ is set in mask. */
+
+/* Did crash and... */
+#define PIDFD_COREDUMPED (1U << 0)
+/* coredumping generation was skipped. */
+#define PIDFD_COREDUMP_SKIP (1U << 1)
+/* coredump was done as the user. */
+#define PIDFD_COREDUMP_USER (1U << 2)
+/* coredump was done as root. */
+#define PIDFD_COREDUMP_ROOT (1U << 3)
+
+struct pidfd_info
+{
+ __uint64_t mask;
+ __uint64_t cgroupid;
+ __uint32_t pid;
+ __uint32_t tgid;
+ __uint32_t ppid;
+ __uint32_t ruid;
+ __uint32_t rgid;
+ __uint32_t euid;
+ __uint32_t egid;
+ __uint32_t suid;
+ __uint32_t sgid;
+ __uint32_t fsuid;
+ __uint32_t fsgid;
+ __int32_t exit_code;
+ __uint32_t coredump_mask;
+ __uint32_t __spare1;
+};
+
+/* sizeof first published struct */
+#define PIDFD_INFO_SIZE_VER0 64
+
+#define PIDFD_GET_INFO _IOWR(PIDFS_IOCTL_MAGIC, 11, struct pidfd_info)
+
/* Returns a file descriptor that refers to the process PID. The
close-on-exec is set on the file descriptor. */
extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW;
diff --git a/lib/libc/include/generic-glibc/sys/platform/ppc.h b/lib/libc/include/generic-glibc/sys/platform/ppc.h
index 9a4dbd6c36..6e7df94235 100644
--- a/lib/libc/include/generic-glibc/sys/platform/ppc.h
+++ b/lib/libc/include/generic-glibc/sys/platform/ppc.h
@@ -1,5 +1,5 @@
/* Facilities specific to the PowerPC architecture
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/platform/x86.h b/lib/libc/include/generic-glibc/sys/platform/x86.h
index 40c91f375f..6ef7dfcec3 100644
--- a/lib/libc/include/generic-glibc/sys/platform/x86.h
+++ b/lib/libc/include/generic-glibc/sys/platform/x86.h
@@ -1,6 +1,6 @@
/* Data structure for x86 CPU features.
This file is part of the GNU C Library.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/sys/poll.h b/lib/libc/include/generic-glibc/sys/poll.h
index 7c4a6caecd..d42c127622 100644
--- a/lib/libc/include/generic-glibc/sys/poll.h
+++ b/lib/libc/include/generic-glibc/sys/poll.h
@@ -1,5 +1,5 @@
/* Compatibility definitions for System V `poll' interface.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/prctl.h b/lib/libc/include/generic-glibc/sys/prctl.h
index 7b9871fa28..e83d37d64d 100644
--- a/lib/libc/include/generic-glibc/sys/prctl.h
+++ b/lib/libc/include/generic-glibc/sys/prctl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/procfs.h b/lib/libc/include/generic-glibc/sys/procfs.h
index 03b03eb154..0cb97976cb 100644
--- a/lib/libc/include/generic-glibc/sys/procfs.h
+++ b/lib/libc/include/generic-glibc/sys/procfs.h
@@ -1,5 +1,5 @@
/* Definitions for core files and libthread_db. Generic Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/sys/profil.h b/lib/libc/include/generic-glibc/sys/profil.h
index aa62432612..7765061385 100644
--- a/lib/libc/include/generic-glibc/sys/profil.h
+++ b/lib/libc/include/generic-glibc/sys/profil.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/ptrace.h b/lib/libc/include/generic-glibc/sys/ptrace.h
index 6a8779c2a3..ff5510d07f 100644
--- a/lib/libc/include/generic-glibc/sys/ptrace.h
+++ b/lib/libc/include/generic-glibc/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/generic-glibc/sys/quota.h b/lib/libc/include/generic-glibc/sys/quota.h
index e057a86392..f9f76f3113 100644
--- a/lib/libc/include/generic-glibc/sys/quota.h
+++ b/lib/libc/include/generic-glibc/sys/quota.h
@@ -1,5 +1,5 @@
/* This just represents the non-kernel parts of .
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/random.h b/lib/libc/include/generic-glibc/sys/random.h
index b1df7f4338..7a2928ba5f 100644
--- a/lib/libc/include/generic-glibc/sys/random.h
+++ b/lib/libc/include/generic-glibc/sys/random.h
@@ -1,5 +1,5 @@
/* Interfaces for obtaining random bytes.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/raw.h b/lib/libc/include/generic-glibc/sys/raw.h
index a215a84c91..e381818034 100644
--- a/lib/libc/include/generic-glibc/sys/raw.h
+++ b/lib/libc/include/generic-glibc/sys/raw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/reboot.h b/lib/libc/include/generic-glibc/sys/reboot.h
index 95819b9cfb..04a13f0b1d 100644
--- a/lib/libc/include/generic-glibc/sys/reboot.h
+++ b/lib/libc/include/generic-glibc/sys/reboot.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/reg.h b/lib/libc/include/generic-glibc/sys/reg.h
index 5cf5759ef5..819876e9cf 100644
--- a/lib/libc/include/generic-glibc/sys/reg.h
+++ b/lib/libc/include/generic-glibc/sys/reg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/regdef.h b/lib/libc/include/generic-glibc/sys/regdef.h
index 947681c6db..82bf4f9558 100644
--- a/lib/libc/include/generic-glibc/sys/regdef.h
+++ b/lib/libc/include/generic-glibc/sys/regdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/resource.h b/lib/libc/include/generic-glibc/sys/resource.h
index 13b06c36e8..0752d50d52 100644
--- a/lib/libc/include/generic-glibc/sys/resource.h
+++ b/lib/libc/include/generic-glibc/sys/resource.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/rseq.h b/lib/libc/include/generic-glibc/sys/rseq.h
index 81856aeddf..f6f18e1b4e 100644
--- a/lib/libc/include/generic-glibc/sys/rseq.h
+++ b/lib/libc/include/generic-glibc/sys/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences exported symbols. Linux header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/sys/select.h b/lib/libc/include/generic-glibc/sys/select.h
index cd8c69ee6d..7308c98432 100644
--- a/lib/libc/include/generic-glibc/sys/select.h
+++ b/lib/libc/include/generic-glibc/sys/select.h
@@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/sem.h b/lib/libc/include/generic-glibc/sys/sem.h
index f0d3b00dbe..7c362679fe 100644
--- a/lib/libc/include/generic-glibc/sys/sem.h
+++ b/lib/libc/include/generic-glibc/sys/sem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/sendfile.h b/lib/libc/include/generic-glibc/sys/sendfile.h
index 46b0f3cc8d..a980436cea 100644
--- a/lib/libc/include/generic-glibc/sys/sendfile.h
+++ b/lib/libc/include/generic-glibc/sys/sendfile.h
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/shm.h b/lib/libc/include/generic-glibc/sys/shm.h
index 54ff00ee99..c7b6bc19d2 100644
--- a/lib/libc/include/generic-glibc/sys/shm.h
+++ b/lib/libc/include/generic-glibc/sys/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/signalfd.h b/lib/libc/include/generic-glibc/sys/signalfd.h
index 33d06ff147..c8da4d7cfd 100644
--- a/lib/libc/include/generic-glibc/sys/signalfd.h
+++ b/lib/libc/include/generic-glibc/sys/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/single_threaded.h b/lib/libc/include/generic-glibc/sys/single_threaded.h
index 5fec9a477c..1e3dbac230 100644
--- a/lib/libc/include/generic-glibc/sys/single_threaded.h
+++ b/lib/libc/include/generic-glibc/sys/single_threaded.h
@@ -1,5 +1,5 @@
/* Support for single-thread optimizations.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/socket.h b/lib/libc/include/generic-glibc/sys/socket.h
index 890b8cd2e6..db2c0d50cd 100644
--- a/lib/libc/include/generic-glibc/sys/socket.h
+++ b/lib/libc/include/generic-glibc/sys/socket.h
@@ -1,5 +1,5 @@
/* Declarations of socket constants, types, and functions.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/stat.h b/lib/libc/include/generic-glibc/sys/stat.h
index 68c2c889e8..38d6719324 100644
--- a/lib/libc/include/generic-glibc/sys/stat.h
+++ b/lib/libc/include/generic-glibc/sys/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/statfs.h b/lib/libc/include/generic-glibc/sys/statfs.h
index 1e7bd78d22..c24106980a 100644
--- a/lib/libc/include/generic-glibc/sys/statfs.h
+++ b/lib/libc/include/generic-glibc/sys/statfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/statvfs.h b/lib/libc/include/generic-glibc/sys/statvfs.h
index 599ac139f4..5877e0d122 100644
--- a/lib/libc/include/generic-glibc/sys/statvfs.h
+++ b/lib/libc/include/generic-glibc/sys/statvfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/swap.h b/lib/libc/include/generic-glibc/sys/swap.h
index f67cfebb1f..a85f64a57a 100644
--- a/lib/libc/include/generic-glibc/sys/swap.h
+++ b/lib/libc/include/generic-glibc/sys/swap.h
@@ -1,5 +1,5 @@
/* Calls to enable and disable swapping on specified locations. Linux version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/syscall.h b/lib/libc/include/generic-glibc/sys/syscall.h
index 20bebd9b72..1b589aa138 100644
--- a/lib/libc/include/generic-glibc/sys/syscall.h
+++ b/lib/libc/include/generic-glibc/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/sysinfo.h b/lib/libc/include/generic-glibc/sys/sysinfo.h
index 2c1456dd16..41634f45dc 100644
--- a/lib/libc/include/generic-glibc/sys/sysinfo.h
+++ b/lib/libc/include/generic-glibc/sys/sysinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/sysmacros.h b/lib/libc/include/generic-glibc/sys/sysmacros.h
index 08c384dbfa..54ae56a2cc 100644
--- a/lib/libc/include/generic-glibc/sys/sysmacros.h
+++ b/lib/libc/include/generic-glibc/sys/sysmacros.h
@@ -1,5 +1,5 @@
/* Definitions of macros to access `dev_t' values.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/sysmips.h b/lib/libc/include/generic-glibc/sys/sysmips.h
index c5ef1a5987..0b25a9fbbc 100644
--- a/lib/libc/include/generic-glibc/sys/sysmips.h
+++ b/lib/libc/include/generic-glibc/sys/sysmips.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/tas.h b/lib/libc/include/generic-glibc/sys/tas.h
index 2f9a9bb665..5af1c307ce 100644
--- a/lib/libc/include/generic-glibc/sys/tas.h
+++ b/lib/libc/include/generic-glibc/sys/tas.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/time.h b/lib/libc/include/generic-glibc/sys/time.h
index 7f9e9e8151..c07530e3a2 100644
--- a/lib/libc/include/generic-glibc/sys/time.h
+++ b/lib/libc/include/generic-glibc/sys/time.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/timeb.h b/lib/libc/include/generic-glibc/sys/timeb.h
index 30cef7dcb7..d7c8381c31 100644
--- a/lib/libc/include/generic-glibc/sys/timeb.h
+++ b/lib/libc/include/generic-glibc/sys/timeb.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/timerfd.h b/lib/libc/include/generic-glibc/sys/timerfd.h
index 4fcf48d27f..f72a5e139b 100644
--- a/lib/libc/include/generic-glibc/sys/timerfd.h
+++ b/lib/libc/include/generic-glibc/sys/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/times.h b/lib/libc/include/generic-glibc/sys/times.h
index eccd085d85..8cd21a5bbc 100644
--- a/lib/libc/include/generic-glibc/sys/times.h
+++ b/lib/libc/include/generic-glibc/sys/times.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/timex.h b/lib/libc/include/generic-glibc/sys/timex.h
index 40e405c0ad..3f8c65443f 100644
--- a/lib/libc/include/generic-glibc/sys/timex.h
+++ b/lib/libc/include/generic-glibc/sys/timex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/types.h b/lib/libc/include/generic-glibc/sys/types.h
index 3e0c7f44e1..595ac4e9e0 100644
--- a/lib/libc/include/generic-glibc/sys/types.h
+++ b/lib/libc/include/generic-glibc/sys/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/ucontext.h b/lib/libc/include/generic-glibc/sys/ucontext.h
index 90543bcf30..3faf674935 100644
--- a/lib/libc/include/generic-glibc/sys/ucontext.h
+++ b/lib/libc/include/generic-glibc/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc. This file is part of the GNU C Library.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/generic-glibc/sys/uio.h b/lib/libc/include/generic-glibc/sys/uio.h
index bfebc145f2..856c15c3a0 100644
--- a/lib/libc/include/generic-glibc/sys/uio.h
+++ b/lib/libc/include/generic-glibc/sys/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/un.h b/lib/libc/include/generic-glibc/sys/un.h
index 0c77b77261..bb7f12b96d 100644
--- a/lib/libc/include/generic-glibc/sys/un.h
+++ b/lib/libc/include/generic-glibc/sys/un.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/user.h b/lib/libc/include/generic-glibc/sys/user.h
index 08a54ee5a4..64d46ba5b2 100644
--- a/lib/libc/include/generic-glibc/sys/user.h
+++ b/lib/libc/include/generic-glibc/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/utsname.h b/lib/libc/include/generic-glibc/sys/utsname.h
index c48a67a105..c9daa88cf9 100644
--- a/lib/libc/include/generic-glibc/sys/utsname.h
+++ b/lib/libc/include/generic-glibc/sys/utsname.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/vlimit.h b/lib/libc/include/generic-glibc/sys/vlimit.h
index 179271da65..4730fc37da 100644
--- a/lib/libc/include/generic-glibc/sys/vlimit.h
+++ b/lib/libc/include/generic-glibc/sys/vlimit.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/vm86.h b/lib/libc/include/generic-glibc/sys/vm86.h
index ff38ebedaf..44d4cdd199 100644
--- a/lib/libc/include/generic-glibc/sys/vm86.h
+++ b/lib/libc/include/generic-glibc/sys/vm86.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/wait.h b/lib/libc/include/generic-glibc/sys/wait.h
index f11f89f7cb..23d689a051 100644
--- a/lib/libc/include/generic-glibc/sys/wait.h
+++ b/lib/libc/include/generic-glibc/sys/wait.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/sys/xattr.h b/lib/libc/include/generic-glibc/sys/xattr.h
index 669781b6a2..736074937f 100644
--- a/lib/libc/include/generic-glibc/sys/xattr.h
+++ b/lib/libc/include/generic-glibc/sys/xattr.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/tar.h b/lib/libc/include/generic-glibc/tar.h
index 68dddef340..f2da3fd9eb 100644
--- a/lib/libc/include/generic-glibc/tar.h
+++ b/lib/libc/include/generic-glibc/tar.h
@@ -1,5 +1,5 @@
/* Extended tar format from POSIX.1.
- Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/termios.h b/lib/libc/include/generic-glibc/termios.h
index ef7b166b4c..cfdf0dfad7 100644
--- a/lib/libc/include/generic-glibc/termios.h
+++ b/lib/libc/include/generic-glibc/termios.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/tgmath.h b/lib/libc/include/generic-glibc/tgmath.h
index 4eae43da5e..d2c5da3436 100644
--- a/lib/libc/include/generic-glibc/tgmath.h
+++ b/lib/libc/include/generic-glibc/tgmath.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,10 @@
#include
#include
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_TGMATH_H__ 202311L
+#endif
+
/* There are two variant implementations of type-generic macros in
this file: one for GCC 8 and later, using __builtin_tgmath and
@@ -386,7 +390,7 @@
# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
__TGMATH_3 (Fct, (Val1), (Val2), (Val3))
# endif
-# define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
+# define __TGMATH_TERNARY_FIRST_REAL_ONLY(Val1, Val2, Val3, Fct) \
__TGMATH_3 (Fct, (Val1), (Val2), (Val3))
# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
__TGMATH_1C (Fct, Cfct, (Val))
@@ -520,14 +524,17 @@
# endif
# if !__HAVE_BUILTIN_TGMATH
-# define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
- (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
- || __builtin_classify_type (Val1) != 8) \
- ? Fct (Val1, Val2, Val3) \
- : (sizeof (+(Val1)) == sizeof (float)) \
- ? Fct##f (Val1, Val2, Val3) \
- : __TGMATH_F128 ((Val1), Fct, (Val1, Val2, Val3)) \
- __tgml(Fct) (Val1, Val2, Val3)))
+# define __TGMATH_TERNARY_FIRST_REAL_ONLY(Val1, Val2, Val3, Fct) \
+ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8) \
+ ? (__tgmath_real_type (Val1)) Fct (Val1, Val2, Val3) \
+ : (sizeof (+(Val1)) == sizeof (float)) \
+ ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2, Val3) \
+ : __TGMATH_F128 ((Val1), \
+ (__tgmath_real_type (Val1)) Fct, \
+ (Val1, Val2, Val3)) \
+ (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2, \
+ Val3)))
/* XXX This definition has to be changed as soon as the compiler understands
the imaginary keyword. */
@@ -1056,17 +1063,17 @@
/* Round X to nearest integer value, rounding halfway cases to even. */
# define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven)
-# define fromfp(Val1, Val2, Val3) \
- __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfp)
+# define fromfp(Val1, Val2, Val3) \
+ __TGMATH_TERNARY_FIRST_REAL_ONLY (Val1, Val2, Val3, fromfp)
-# define ufromfp(Val1, Val2, Val3) \
- __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfp)
+# define ufromfp(Val1, Val2, Val3) \
+ __TGMATH_TERNARY_FIRST_REAL_ONLY (Val1, Val2, Val3, ufromfp)
-# define fromfpx(Val1, Val2, Val3) \
- __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfpx)
+# define fromfpx(Val1, Val2, Val3) \
+ __TGMATH_TERNARY_FIRST_REAL_ONLY (Val1, Val2, Val3, fromfpx)
-# define ufromfpx(Val1, Val2, Val3) \
- __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfpx)
+# define ufromfpx(Val1, Val2, Val3) \
+ __TGMATH_TERNARY_FIRST_REAL_ONLY (Val1, Val2, Val3, ufromfpx)
/* Like ilogb, but returning long int. */
# define llogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llogb)
diff --git a/lib/libc/include/generic-glibc/thread_db.h b/lib/libc/include/generic-glibc/thread_db.h
index 6097635a68..cf14aaf04b 100644
--- a/lib/libc/include/generic-glibc/thread_db.h
+++ b/lib/libc/include/generic-glibc/thread_db.h
@@ -1,5 +1,5 @@
/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread
- Copyright (C) 1999-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/threads.h b/lib/libc/include/generic-glibc/threads.h
index 44febdd5e6..46982cb744 100644
--- a/lib/libc/include/generic-glibc/threads.h
+++ b/lib/libc/include/generic-glibc/threads.h
@@ -1,5 +1,5 @@
/* ISO C11 Standard: 7.26 - Thread support library .
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,6 +31,7 @@
__BEGIN_DECLS
#include
+#include
#include
#if (!defined __STDC_VERSION__ \
@@ -64,9 +65,6 @@ enum
mtx_timed = 2
};
-typedef __once_flag once_flag;
-#define ONCE_FLAG_INIT __ONCE_FLAG_INIT
-
typedef union
{
char __size[__SIZEOF_PTHREAD_MUTEX_T];
diff --git a/lib/libc/include/generic-glibc/time.h b/lib/libc/include/generic-glibc/time.h
index dae39625df..10e59b0fde 100644
--- a/lib/libc/include/generic-glibc/time.h
+++ b/lib/libc/include/generic-glibc/time.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,10 @@
#define __need_NULL
#include
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_TIME_H__ 202311L
+#endif
+
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
ticks per second, and possibly a number of other constants. */
#include
@@ -64,6 +68,11 @@ typedef __pid_t pid_t;
/* Time base values for timespec_get. */
# define TIME_UTC 1
#endif
+#if __GLIBC_USE (ISOC23)
+# define TIME_MONOTONIC 2
+# define TIME_ACTIVE 3
+# define TIME_THREAD_ACTIVE 4
+#endif
__BEGIN_DECLS
diff --git a/lib/libc/include/generic-glibc/uchar.h b/lib/libc/include/generic-glibc/uchar.h
index ba74f0f65b..d982dbd2d4 100644
--- a/lib/libc/include/generic-glibc/uchar.h
+++ b/lib/libc/include/generic-glibc/uchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,6 +31,10 @@
#include
#include
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_UCHAR_H__ 202311L
+#endif
+
/* Declare the C23 char8_t typedef in C23 modes, but only if the C++
__cpp_char8_t feature test macro is not defined. */
#if __GLIBC_USE (ISOC23) && !defined __cpp_char8_t
diff --git a/lib/libc/include/generic-glibc/ucontext.h b/lib/libc/include/generic-glibc/ucontext.h
index a5335fb044..647139a8d2 100644
--- a/lib/libc/include/generic-glibc/ucontext.h
+++ b/lib/libc/include/generic-glibc/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/ulimit.h b/lib/libc/include/generic-glibc/ulimit.h
index 538a824196..2db9cd138f 100644
--- a/lib/libc/include/generic-glibc/ulimit.h
+++ b/lib/libc/include/generic-glibc/ulimit.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/unistd.h b/lib/libc/include/generic-glibc/unistd.h
index 6aaa1bfa90..84c8077a45 100644
--- a/lib/libc/include/generic-glibc/unistd.h
+++ b/lib/libc/include/generic-glibc/unistd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/utime.h b/lib/libc/include/generic-glibc/utime.h
index 104fb07a59..09c1dd44ad 100644
--- a/lib/libc/include/generic-glibc/utime.h
+++ b/lib/libc/include/generic-glibc/utime.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/utmp.h b/lib/libc/include/generic-glibc/utmp.h
index 7d9d41a12d..a6cf1db1da 100644
--- a/lib/libc/include/generic-glibc/utmp.h
+++ b/lib/libc/include/generic-glibc/utmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/utmpx.h b/lib/libc/include/generic-glibc/utmpx.h
index 2409d6049d..708f5b5e9f 100644
--- a/lib/libc/include/generic-glibc/utmpx.h
+++ b/lib/libc/include/generic-glibc/utmpx.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/values.h b/lib/libc/include/generic-glibc/values.h
index af02e71c9a..037e0ff736 100644
--- a/lib/libc/include/generic-glibc/values.h
+++ b/lib/libc/include/generic-glibc/values.h
@@ -1,5 +1,5 @@
/* Old compatibility names for and constants.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/wchar.h b/lib/libc/include/generic-glibc/wchar.h
index b8fb4b832b..ea02fbe93b 100644
--- a/lib/libc/include/generic-glibc/wchar.h
+++ b/lib/libc/include/generic-glibc/wchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,6 +60,10 @@ typedef __gnuc_va_list va_list;
# include
#endif
+#if __GLIBC_USE (ISOC23)
+# define __STDC_VERSION_WCHAR_H__ 202311L
+#endif
+
/* Tell the caller that we provide correct C++ prototypes. */
#if defined __cplusplus && __GNUC_PREREQ (4, 4)
# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
@@ -188,6 +192,10 @@ extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
#else
extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
__THROW __attribute_pure__;
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define wcschr(WCS, WC) \
+ __glibc_const_generic (WCS, const wchar_t *, wcschr (WCS, WC))
+# endif
#endif
/* Find the last occurrence of WC in WCS. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
@@ -198,6 +206,10 @@ extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
#else
extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
__THROW __attribute_pure__;
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define wcsrchr(WCS, WC) \
+ __glibc_const_generic (WCS, const wchar_t *, wcsrchr (WCS, WC))
+# endif
#endif
#ifdef __USE_GNU
@@ -225,6 +237,10 @@ extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs,
#else
extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept)
__THROW __attribute_pure__;
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define wcspbrk(WCS, ACCEPT) \
+ __glibc_const_generic (WCS, const wchar_t *, wcspbrk (WCS, ACCEPT))
+# endif
#endif
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
@@ -236,6 +252,11 @@ extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack,
#else
extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle)
__THROW __attribute_pure__;
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define wcsstr(HAYSTACK, NEEDLE) \
+ __glibc_const_generic (HAYSTACK, const wchar_t *, \
+ wcsstr (HAYSTACK, NEEDLE))
+# endif
#endif
/* Divide WCS into tokens separated by characters in DELIM. */
@@ -277,6 +298,10 @@ extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c,
#else
extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n)
__THROW __attribute_pure__;
+# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
+# define wmemchr(S, C, N) \
+ __glibc_const_generic (S, const wchar_t *, wmemchr (S, C, N))
+# endif
#endif
/* Compare N wide characters of S1 and S2. */
diff --git a/lib/libc/include/generic-glibc/wctype.h b/lib/libc/include/generic-glibc/wctype.h
index 200c96e89d..097703b08e 100644
--- a/lib/libc/include/generic-glibc/wctype.h
+++ b/lib/libc/include/generic-glibc/wctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/wordexp.h b/lib/libc/include/generic-glibc/wordexp.h
index 115723b859..b0db95f471 100644
--- a/lib/libc/include/generic-glibc/wordexp.h
+++ b/lib/libc/include/generic-glibc/wordexp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/hexagon-linux-any/asm/unistd_32.h b/lib/libc/include/hexagon-linux-any/asm/unistd_32.h
index 41f43021fd..9dfd77f518 100644
--- a/lib/libc/include/hexagon-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/hexagon-linux-any/asm/unistd_32.h
@@ -345,6 +345,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/hexagon-linux-musl/bits/hwcap.h b/lib/libc/include/hexagon-linux-musl/bits/hwcap.h
new file mode 100644
index 0000000000..40b13e18f9
--- /dev/null
+++ b/lib/libc/include/hexagon-linux-musl/bits/hwcap.h
@@ -0,0 +1,31 @@
+/* ISA version encoding in bits 0-6 (7 bits) */
+#define HWCAP_HEXAGON_ISA_MASK 0x7F /* ISA version mask */
+
+/* ISA version enumeration values */
+#define HWCAP_HEXAGON_ISA_V2 1 /* Hexagon V2 */
+#define HWCAP_HEXAGON_ISA_V3 2 /* Hexagon V3 */
+#define HWCAP_HEXAGON_ISA_V4 3 /* Hexagon V4 */
+#define HWCAP_HEXAGON_ISA_V5 4 /* Hexagon V5 */
+#define HWCAP_HEXAGON_ISA_V55 5 /* Hexagon V55 */
+#define HWCAP_HEXAGON_ISA_V60 6 /* Hexagon V60 */
+#define HWCAP_HEXAGON_ISA_V62 7 /* Hexagon V62 */
+#define HWCAP_HEXAGON_ISA_V65 8 /* Hexagon V65 */
+#define HWCAP_HEXAGON_ISA_V66 9 /* Hexagon V66 */
+#define HWCAP_HEXAGON_ISA_V67 10 /* Hexagon V67 */
+#define HWCAP_HEXAGON_ISA_V68 11 /* Hexagon V68 */
+#define HWCAP_HEXAGON_ISA_V69 12 /* Hexagon V69 */
+#define HWCAP_HEXAGON_ISA_V71 13 /* Hexagon V71 */
+#define HWCAP_HEXAGON_ISA_V73 14 /* Hexagon V73 */
+#define HWCAP_HEXAGON_ISA_V79 15 /* Hexagon V79 */
+
+/* Essential feature flags */
+#define HWCAP_HEXAGON_HVX (1 << 7) /* HVX (Hexagon Vector eXtensions) */
+#define HWCAP_HEXAGON_CABAC (1 << 8) /* CABAC acceleration */
+#define HWCAP_HEXAGON_HVX_LENGTH_128B (1 << 9) /* HVX 128-byte vector length */
+#define HWCAP_HEXAGON_HVX_IEEE_FP (1 << 10) /* HVX IEEE floating point */
+#define HWCAP_HEXAGON_AUDIO (1 << 11) /* Audio ISA extensions */
+
+/* Utility macros for userspace applications */
+#define HWCAP_HEXAGON_GET_ISA(hwcap) ((hwcap) & HWCAP_HEXAGON_ISA_MASK)
+#define HWCAP_HEXAGON_IS_ISA(hwcap, version) (HWCAP_HEXAGON_GET_ISA(hwcap) == (version))
+#define HWCAP_HEXAGON_HAS_ISA(hwcap, version) (HWCAP_HEXAGON_GET_ISA(hwcap) >= (version))
diff --git a/lib/libc/include/hexagon-linux-musl/bits/signal.h b/lib/libc/include/hexagon-linux-musl/bits/signal.h
index ec67d3ba01..9753066b6d 100644
--- a/lib/libc/include/hexagon-linux-musl/bits/signal.h
+++ b/lib/libc/include/hexagon-linux-musl/bits/signal.h
@@ -31,9 +31,10 @@ typedef struct sigcontext
unsigned long pc;
unsigned long cause;
unsigned long badva;
+ unsigned long cs0;
+ unsigned long cs1;
unsigned long pad1;
- unsigned long long pad2;
-} mcontext_t;
+} __attribute__((__aligned__(8))) mcontext_t;
#else
typedef struct {
unsigned long __regs[48];
@@ -61,7 +62,6 @@ typedef struct __ucontext {
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
#endif
@@ -100,4 +100,4 @@ typedef struct __ucontext {
#define SIGSYS 31
#define SIGUNUSED SIGSYS
-#define _NSIG 65
\ No newline at end of file
+#define _NSIG 65
diff --git a/lib/libc/include/loongarch-linux-any/asm/kvm.h b/lib/libc/include/loongarch-linux-any/asm/kvm.h
index 4d43a769f7..04367ef1bf 100644
--- a/lib/libc/include/loongarch-linux-any/asm/kvm.h
+++ b/lib/libc/include/loongarch-linux-any/asm/kvm.h
@@ -103,6 +103,8 @@ struct kvm_fpu {
#define KVM_LOONGARCH_VM_FEAT_PMU 5
#define KVM_LOONGARCH_VM_FEAT_PV_IPI 6
#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7
+#define KVM_LOONGARCH_VM_FEAT_PTW 8
+#define KVM_LOONGARCH_VM_FEAT_MSGINT 9
/* Device Control API on vcpu fd */
#define KVM_LOONGARCH_VCPU_CPUCFG 0
diff --git a/lib/libc/include/loongarch-linux-any/asm/ptrace.h b/lib/libc/include/loongarch-linux-any/asm/ptrace.h
index 800edc83d5..9001186616 100644
--- a/lib/libc/include/loongarch-linux-any/asm/ptrace.h
+++ b/lib/libc/include/loongarch-linux-any/asm/ptrace.h
@@ -10,8 +10,6 @@
#include
-#include
-
/*
* For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs,
* 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.
@@ -39,44 +37,54 @@ struct user_pt_regs {
} __attribute__((aligned(8)));
struct user_fp_state {
- uint64_t fpr[32];
- uint64_t fcc;
- uint32_t fcsr;
+ __u64 fpr[32];
+ __u64 fcc;
+ __u32 fcsr;
};
struct user_lsx_state {
/* 32 registers, 128 bits width per register. */
- uint64_t vregs[32*2];
+ __u64 vregs[32*2];
};
struct user_lasx_state {
/* 32 registers, 256 bits width per register. */
- uint64_t vregs[32*4];
+ __u64 vregs[32*4];
};
struct user_lbt_state {
- uint64_t scr[4];
- uint32_t eflags;
- uint32_t ftop;
+ __u64 scr[4];
+ __u32 eflags;
+ __u32 ftop;
};
struct user_watch_state {
- uint64_t dbg_info;
+ __u64 dbg_info;
struct {
- uint64_t addr;
- uint64_t mask;
- uint32_t ctrl;
- uint32_t pad;
+#if __BITS_PER_LONG == 32
+ __u32 addr;
+ __u32 mask;
+#else
+ __u64 addr;
+ __u64 mask;
+#endif
+ __u32 ctrl;
+ __u32 pad;
} dbg_regs[8];
};
struct user_watch_state_v2 {
- uint64_t dbg_info;
+ __u64 dbg_info;
struct {
- uint64_t addr;
- uint64_t mask;
- uint32_t ctrl;
- uint32_t pad;
+#if __BITS_PER_LONG == 32
+ __u32 addr;
+ __u32 mask;
+#else
+ __u64 addr;
+ __u64 mask;
+#endif
+ __u32 ctrl;
+ __u32 pad;
} dbg_regs[14];
};
diff --git a/lib/libc/include/loongarch-linux-any/asm/unistd.h b/lib/libc/include/loongarch-linux-any/asm/unistd.h
index 07af3ba94f..37211d5079 100644
--- a/lib/libc/include/loongarch-linux-any/asm/unistd.h
+++ b/lib/libc/include/loongarch-linux-any/asm/unistd.h
@@ -1,3 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#include
\ No newline at end of file
+#include
+
+#if __BITS_PER_LONG == 32
+#include
+#else
+#include
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/loongarch-linux-any/asm/unistd_32.h b/lib/libc/include/loongarch-linux-any/asm/unistd_32.h
new file mode 100644
index 0000000000..ce7914afda
--- /dev/null
+++ b/lib/libc/include/loongarch-linux-any/asm/unistd_32.h
@@ -0,0 +1,320 @@
+#ifndef _ASM_UNISTD_32_H
+#define _ASM_UNISTD_32_H
+
+#define __NR_io_setup 0
+#define __NR_io_destroy 1
+#define __NR_io_submit 2
+#define __NR_io_cancel 3
+#define __NR_setxattr 5
+#define __NR_lsetxattr 6
+#define __NR_fsetxattr 7
+#define __NR_getxattr 8
+#define __NR_lgetxattr 9
+#define __NR_fgetxattr 10
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_flistxattr 13
+#define __NR_removexattr 14
+#define __NR_lremovexattr 15
+#define __NR_fremovexattr 16
+#define __NR_getcwd 17
+#define __NR_lookup_dcookie 18
+#define __NR_eventfd2 19
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_fcntl64 25
+#define __NR_inotify_init1 26
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_rm_watch 28
+#define __NR_ioctl 29
+#define __NR_ioprio_set 30
+#define __NR_ioprio_get 31
+#define __NR_flock 32
+#define __NR_mknodat 33
+#define __NR_mkdirat 34
+#define __NR_unlinkat 35
+#define __NR_symlinkat 36
+#define __NR_linkat 37
+#define __NR_umount2 39
+#define __NR_mount 40
+#define __NR_pivot_root 41
+#define __NR_nfsservctl 42
+#define __NR_statfs64 43
+#define __NR_fstatfs64 44
+#define __NR_truncate64 45
+#define __NR_ftruncate64 46
+#define __NR_fallocate 47
+#define __NR_faccessat 48
+#define __NR_chdir 49
+#define __NR_fchdir 50
+#define __NR_chroot 51
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchownat 54
+#define __NR_fchown 55
+#define __NR_openat 56
+#define __NR_close 57
+#define __NR_vhangup 58
+#define __NR_pipe2 59
+#define __NR_quotactl 60
+#define __NR_getdents64 61
+#define __NR_llseek 62
+#define __NR_read 63
+#define __NR_write 64
+#define __NR_readv 65
+#define __NR_writev 66
+#define __NR_pread64 67
+#define __NR_pwrite64 68
+#define __NR_preadv 69
+#define __NR_pwritev 70
+#define __NR_sendfile64 71
+#define __NR_signalfd4 74
+#define __NR_vmsplice 75
+#define __NR_splice 76
+#define __NR_tee 77
+#define __NR_readlinkat 78
+#define __NR_sync 81
+#define __NR_fsync 82
+#define __NR_fdatasync 83
+#define __NR_sync_file_range 84
+#define __NR_timerfd_create 85
+#define __NR_acct 89
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_personality 92
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_waitid 95
+#define __NR_set_tid_address 96
+#define __NR_unshare 97
+#define __NR_set_robust_list 99
+#define __NR_get_robust_list 100
+#define __NR_getitimer 102
+#define __NR_setitimer 103
+#define __NR_kexec_load 104
+#define __NR_init_module 105
+#define __NR_delete_module 106
+#define __NR_timer_create 107
+#define __NR_timer_getoverrun 109
+#define __NR_timer_delete 111
+#define __NR_syslog 116
+#define __NR_ptrace 117
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_getscheduler 120
+#define __NR_sched_getparam 121
+#define __NR_sched_setaffinity 122
+#define __NR_sched_getaffinity 123
+#define __NR_sched_yield 124
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_restart_syscall 128
+#define __NR_kill 129
+#define __NR_tkill 130
+#define __NR_tgkill 131
+#define __NR_sigaltstack 132
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_setpriority 140
+#define __NR_getpriority 141
+#define __NR_reboot 142
+#define __NR_setregid 143
+#define __NR_setgid 144
+#define __NR_setreuid 145
+#define __NR_setuid 146
+#define __NR_setresuid 147
+#define __NR_getresuid 148
+#define __NR_setresgid 149
+#define __NR_getresgid 150
+#define __NR_setfsuid 151
+#define __NR_setfsgid 152
+#define __NR_times 153
+#define __NR_setpgid 154
+#define __NR_getpgid 155
+#define __NR_getsid 156
+#define __NR_setsid 157
+#define __NR_getgroups 158
+#define __NR_setgroups 159
+#define __NR_uname 160
+#define __NR_sethostname 161
+#define __NR_setdomainname 162
+#define __NR_getrusage 165
+#define __NR_umask 166
+#define __NR_prctl 167
+#define __NR_getcpu 168
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getuid 174
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getegid 177
+#define __NR_gettid 178
+#define __NR_sysinfo 179
+#define __NR_mq_open 180
+#define __NR_mq_unlink 181
+#define __NR_mq_notify 184
+#define __NR_mq_getsetattr 185
+#define __NR_msgget 186
+#define __NR_msgctl 187
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_semget 190
+#define __NR_semctl 191
+#define __NR_semop 193
+#define __NR_shmget 194
+#define __NR_shmctl 195
+#define __NR_shmat 196
+#define __NR_shmdt 197
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_bind 200
+#define __NR_listen 201
+#define __NR_accept 202
+#define __NR_connect 203
+#define __NR_getsockname 204
+#define __NR_getpeername 205
+#define __NR_sendto 206
+#define __NR_recvfrom 207
+#define __NR_setsockopt 208
+#define __NR_getsockopt 209
+#define __NR_shutdown 210
+#define __NR_sendmsg 211
+#define __NR_recvmsg 212
+#define __NR_readahead 213
+#define __NR_brk 214
+#define __NR_munmap 215
+#define __NR_mremap 216
+#define __NR_add_key 217
+#define __NR_request_key 218
+#define __NR_keyctl 219
+#define __NR_clone 220
+#define __NR_execve 221
+#define __NR_mmap2 222
+#define __NR_fadvise64_64 223
+#define __NR_swapon 224
+#define __NR_swapoff 225
+#define __NR_mprotect 226
+#define __NR_msync 227
+#define __NR_mlock 228
+#define __NR_munlock 229
+#define __NR_mlockall 230
+#define __NR_munlockall 231
+#define __NR_mincore 232
+#define __NR_madvise 233
+#define __NR_remap_file_pages 234
+#define __NR_mbind 235
+#define __NR_get_mempolicy 236
+#define __NR_set_mempolicy 237
+#define __NR_migrate_pages 238
+#define __NR_move_pages 239
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_perf_event_open 241
+#define __NR_accept4 242
+#define __NR_prlimit64 261
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_name_to_handle_at 264
+#define __NR_open_by_handle_at 265
+#define __NR_syncfs 267
+#define __NR_setns 268
+#define __NR_sendmmsg 269
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_kcmp 272
+#define __NR_finit_module 273
+#define __NR_sched_setattr 274
+#define __NR_sched_getattr 275
+#define __NR_renameat2 276
+#define __NR_seccomp 277
+#define __NR_getrandom 278
+#define __NR_memfd_create 279
+#define __NR_bpf 280
+#define __NR_execveat 281
+#define __NR_userfaultfd 282
+#define __NR_membarrier 283
+#define __NR_mlock2 284
+#define __NR_copy_file_range 285
+#define __NR_preadv2 286
+#define __NR_pwritev2 287
+#define __NR_pkey_mprotect 288
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_statx 291
+#define __NR_rseq 293
+#define __NR_kexec_file_load 294
+#define __NR_clock_gettime64 403
+#define __NR_clock_settime64 404
+#define __NR_clock_adjtime64 405
+#define __NR_clock_getres_time64 406
+#define __NR_clock_nanosleep_time64 407
+#define __NR_timer_gettime64 408
+#define __NR_timer_settime64 409
+#define __NR_timerfd_gettime64 410
+#define __NR_timerfd_settime64 411
+#define __NR_utimensat_time64 412
+#define __NR_pselect6_time64 413
+#define __NR_ppoll_time64 414
+#define __NR_io_pgetevents_time64 416
+#define __NR_recvmmsg_time64 417
+#define __NR_mq_timedsend_time64 418
+#define __NR_mq_timedreceive_time64 419
+#define __NR_semtimedop_time64 420
+#define __NR_rt_sigtimedwait_time64 421
+#define __NR_futex_time64 422
+#define __NR_sched_rr_get_interval_time64 423
+#define __NR_pidfd_send_signal 424
+#define __NR_io_uring_setup 425
+#define __NR_io_uring_enter 426
+#define __NR_io_uring_register 427
+#define __NR_open_tree 428
+#define __NR_move_mount 429
+#define __NR_fsopen 430
+#define __NR_fsconfig 431
+#define __NR_fsmount 432
+#define __NR_fspick 433
+#define __NR_pidfd_open 434
+#define __NR_clone3 435
+#define __NR_close_range 436
+#define __NR_openat2 437
+#define __NR_pidfd_getfd 438
+#define __NR_faccessat2 439
+#define __NR_process_madvise 440
+#define __NR_epoll_pwait2 441
+#define __NR_mount_setattr 442
+#define __NR_quotactl_fd 443
+#define __NR_landlock_create_ruleset 444
+#define __NR_landlock_add_rule 445
+#define __NR_landlock_restrict_self 446
+#define __NR_process_mrelease 448
+#define __NR_futex_waitv 449
+#define __NR_set_mempolicy_home_node 450
+#define __NR_cachestat 451
+#define __NR_fchmodat2 452
+#define __NR_map_shadow_stack 453
+#define __NR_futex_wake 454
+#define __NR_futex_wait 455
+#define __NR_futex_requeue 456
+#define __NR_statmount 457
+#define __NR_listmount 458
+#define __NR_lsm_get_self_attr 459
+#define __NR_lsm_set_self_attr 460
+#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
+#define __NR_setxattrat 463
+#define __NR_getxattrat 464
+#define __NR_listxattrat 465
+#define __NR_removexattrat 466
+#define __NR_open_tree_attr 467
+#define __NR_file_getattr 468
+#define __NR_file_setattr 469
+#define __NR_listns 470
+
+
+#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/loongarch-linux-any/asm/unistd_64.h b/lib/libc/include/loongarch-linux-any/asm/unistd_64.h
index eafb593448..2cc5f65254 100644
--- a/lib/libc/include/loongarch-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/loongarch-linux-any/asm/unistd_64.h
@@ -322,6 +322,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/fcntl.h b/lib/libc/include/loongarch-linux-gnu/bits/fcntl.h
index 8b96b7a9c2..6c36c9f0bd 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for the generic Linux/LoongArch ABI.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/fenv.h b/lib/libc/include/loongarch-linux-gnu/bits/fenv.h
index 318c579edb..4c19156d32 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/fenv.h
@@ -1,5 +1,5 @@
/* Floating point environment.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/hwcap.h b/lib/libc/include/loongarch-linux-gnu/bits/hwcap.h
index 4cdf84fec8..d6335ffaa9 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP. LoongArch64 Linux version.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/link.h b/lib/libc/include/loongarch-linux-gnu/bits/link.h
index 7875184412..7e963fc047 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/link.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific declarations for dynamic linker interface.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/link_lavcurrent.h b/lib/libc/include/loongarch-linux-gnu/bits/link_lavcurrent.h
index 0d0fcc213e..d9827f7cb5 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/link_lavcurrent.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/link_lavcurrent.h
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects. LAV_CURRENT definition.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/long-double.h b/lib/libc/include/loongarch-linux-gnu/bits/long-double.h
index 57d7be04a6..af7784dbe6 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-128 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/procfs.h b/lib/libc/include/loongarch-linux-gnu/bits/procfs.h
index 757bcd0ffa..82667049ea 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/loongarch-linux-gnu/bits/pthread_stack_min.h
index aea77125cb..856803a17b 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/pthread_stack_min.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. LoongArch Linux version.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/rseq.h b/lib/libc/include/loongarch-linux-gnu/bits/rseq.h
index dd0e4a7f8d..956e00c544 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux LoongArch architecture header.
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/setjmp.h b/lib/libc/include/loongarch-linux-gnu/bits/setjmp.h
index dc384c1717..a22192a8fe 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/sigstack.h b/lib/libc/include/loongarch-linux-gnu/bits/sigstack.h
index ee18b492d1..e1e74c25bf 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/sigstack.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/struct_stat.h b/lib/libc/include/loongarch-linux-gnu/bits/struct_stat.h
index 724450a667..0462d37a68 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/timesize.h b/lib/libc/include/loongarch-linux-gnu/bits/timesize.h
index 04251ea75c..dff2da5ed6 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/bits/wordsize.h b/lib/libc/include/loongarch-linux-gnu/bits/wordsize.h
index 5e7e1d15ee..5038df4947 100644
--- a/lib/libc/include/loongarch-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/loongarch-linux-gnu/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/fpu_control.h b/lib/libc/include/loongarch-linux-gnu/fpu_control.h
index 8b39333ca0..69cd4213c7 100644
--- a/lib/libc/include/loongarch-linux-gnu/fpu_control.h
+++ b/lib/libc/include/loongarch-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-lp64d.h b/lib/libc/include/loongarch-linux-gnu/gnu/lib-names-lp64d.h
similarity index 100%
rename from lib/libc/include/generic-glibc/gnu/lib-names-lp64d.h
rename to lib/libc/include/loongarch-linux-gnu/gnu/lib-names-lp64d.h
diff --git a/lib/libc/include/loongarch-linux-gnu/gnu/lib-names-lp64s.h b/lib/libc/include/loongarch-linux-gnu/gnu/lib-names-lp64s.h
new file mode 100644
index 0000000000..7c8b796194
--- /dev/null
+++ b/lib/libc/include/loongarch-linux-gnu/gnu/lib-names-lp64s.h
@@ -0,0 +1,27 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use directly; include instead."
+#endif
+
+#define LD_LINUX_LOONGARCH_LP64S_SO "ld-linux-loongarch-lp64s.so.1"
+#define LD_SO "ld-linux-loongarch-lp64s.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#define LIBNSS_FILES_SO "libnss_files.so.2"
+#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
+#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/gnu/stubs-lp64d.h b/lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64d.h
similarity index 100%
rename from lib/libc/include/generic-glibc/gnu/stubs-lp64d.h
rename to lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64d.h
diff --git a/lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64s.h b/lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64s.h
index b9af396166..6ce02418e6 100644
--- a/lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64s.h
+++ b/lib/libc/include/loongarch-linux-gnu/gnu/stubs-lp64s.h
@@ -35,4 +35,4 @@
#define __stub_revoke
#define __stub_setlogin
#define __stub_sigreturn
-#define __stub_stty
+#define __stub_stty
\ No newline at end of file
diff --git a/lib/libc/include/loongarch-linux-gnu/ieee754.h b/lib/libc/include/loongarch-linux-gnu/ieee754.h
index a49523c3d8..a19fd8dcd1 100644
--- a/lib/libc/include/loongarch-linux-gnu/ieee754.h
+++ b/lib/libc/include/loongarch-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/sys/asm.h b/lib/libc/include/loongarch-linux-gnu/sys/asm.h
index 9bedcac8e2..973feb6eff 100644
--- a/lib/libc/include/loongarch-linux-gnu/sys/asm.h
+++ b/lib/libc/include/loongarch-linux-gnu/sys/asm.h
@@ -1,5 +1,5 @@
/* Miscellaneous macros.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch-linux-gnu/sys/ucontext.h b/lib/libc/include/loongarch-linux-gnu/sys/ucontext.h
index a36bb8145e..c13e11dcd8 100644
--- a/lib/libc/include/loongarch-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/loongarch-linux-gnu/sys/ucontext.h
@@ -1,5 +1,5 @@
/* struct ucontext definition.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/loongarch-linux-gnu/sys/user.h b/lib/libc/include/loongarch-linux-gnu/sys/user.h
index 122590639e..6a8fed0bb7 100644
--- a/lib/libc/include/loongarch-linux-gnu/sys/user.h
+++ b/lib/libc/include/loongarch-linux-gnu/sys/user.h
@@ -1,5 +1,5 @@
/* struct user_regs_struct definition for LoongArch.
- Copyright (C) 2022-2025 Free Software Foundation, Inc.
+ Copyright (C) 2022-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/loongarch64-linux-musl/bits/fenv.h b/lib/libc/include/loongarch64-linux-musl/bits/fenv.h
index 31a10bb78e..6f98053a0d 100644
--- a/lib/libc/include/loongarch64-linux-musl/bits/fenv.h
+++ b/lib/libc/include/loongarch64-linux-musl/bits/fenv.h
@@ -1,4 +1,4 @@
-#ifdef __longarch_soft_float
+#ifdef __loongarch_soft_float
#define FE_ALL_EXCEPT 0
#define FE_TONEAREST 0
#else
diff --git a/lib/libc/include/m68k-linux-any/asm/unistd_32.h b/lib/libc/include/m68k-linux-any/asm/unistd_32.h
index 99dff7d1f8..00aaaca381 100644
--- a/lib/libc/include/m68k-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/m68k-linux-any/asm/unistd_32.h
@@ -442,6 +442,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fcntl.h b/lib/libc/include/m68k-linux-gnu/bits/fcntl.h
index a9dc395f27..ff8e9ccc93 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fenv.h b/lib/libc/include/m68k-linux-gnu/bits/fenv.h
index 1edbdff774..921c6aa22a 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/floatn.h b/lib/libc/include/m68k-linux-gnu/bits/floatn.h
index 9005dc8601..d3408f1524 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h
index ff2e29d6d8..11283dbeb1 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h
@@ -1,5 +1,5 @@
/* Define __GLIBC_FLT_EVAL_METHOD. M68K version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h b/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h
index 582b38925c..10abc3c0eb 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h
@@ -1,5 +1,5 @@
/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. M68K version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h b/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h
index 4d0b3c8c86..874cd33ddf 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h
@@ -1,5 +1,5 @@
/* Define iscanonical macro. ldbl-96 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/link.h b/lib/libc/include/m68k-linux-gnu/bits/link.h
index f7cff8eea4..8177a2fa8b 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/link.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/long-double.h b/lib/libc/include/m68k-linux-gnu/bits/long-double.h
index 601eef7f1a..aae8ed3891 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-96 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/poll.h b/lib/libc/include/m68k-linux-gnu/bits/poll.h
index 7043ba8468..4a33b3a969 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/poll.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h b/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h
index 29aba43c37..055c426cbf 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. M68K version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/m68k-linux-gnu/bits/procfs.h b/lib/libc/include/m68k-linux-gnu/bits/procfs.h
index b9e8923967..76a9fb4813 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. M68K version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h
index 9fbaf82a37..6e8757a91e 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/rseq.h b/lib/libc/include/m68k-linux-gnu/bits/rseq.h
index 90b3e9804a..a844012dd3 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences architecture header. Stub version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/m68k-linux-gnu/bits/semaphore.h b/lib/libc/include/m68k-linux-gnu/bits/semaphore.h
index a4487453a4..9df365a632 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/setjmp.h b/lib/libc/include/m68k-linux-gnu/bits/setjmp.h
index dd73bb69c2..86550f920b 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h b/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h
index 0c44604c6c..c142853d6c 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h
@@ -1,5 +1,5 @@
/* Definition of struct sockaddr_* members and sizes, Linux/m68k version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
index 4ac869dc17..0ebb90a43c 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/timesize.h b/lib/libc/include/m68k-linux-gnu/bits/timesize.h
index 36ba5733d5..878982d5af 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/m68k.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/typesizes.h b/lib/libc/include/m68k-linux-gnu/bits/typesizes.h
index 74ad928d8e..8771f10085 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. m68k version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/bits/wordsize.h b/lib/libc/include/m68k-linux-gnu/bits/wordsize.h
index db32991434..6e4c479fe4 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/fpu_control.h b/lib/libc/include/m68k-linux-gnu/fpu_control.h
index a9ee0ef254..8c3b4b936b 100644
--- a/lib/libc/include/m68k-linux-gnu/fpu_control.h
+++ b/lib/libc/include/m68k-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* 68k FPU control word definitions.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/sys/reg.h b/lib/libc/include/m68k-linux-gnu/sys/reg.h
index c2477b54f7..59328014e3 100644
--- a/lib/libc/include/m68k-linux-gnu/sys/reg.h
+++ b/lib/libc/include/m68k-linux-gnu/sys/reg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/sys/ucontext.h b/lib/libc/include/m68k-linux-gnu/sys/ucontext.h
index fe4b8b295a..75ea0dd02f 100644
--- a/lib/libc/include/m68k-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/m68k-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/m68k-linux-gnu/sys/user.h b/lib/libc/include/m68k-linux-gnu/sys/user.h
index 577e775b0b..501b9dcbf6 100644
--- a/lib/libc/include/m68k-linux-gnu/sys/user.h
+++ b/lib/libc/include/m68k-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-any/asm/unistd_n32.h b/lib/libc/include/mips-linux-any/asm/unistd_n32.h
index 5709abd8e7..14fafc75ff 100644
--- a/lib/libc/include/mips-linux-any/asm/unistd_n32.h
+++ b/lib/libc/include/mips-linux-any/asm/unistd_n32.h
@@ -398,5 +398,6 @@
#define __NR_open_tree_attr (__NR_Linux + 467)
#define __NR_file_getattr (__NR_Linux + 468)
#define __NR_file_setattr (__NR_Linux + 469)
+#define __NR_listns (__NR_Linux + 470)
#endif /* _ASM_UNISTD_N32_H */
\ No newline at end of file
diff --git a/lib/libc/include/mips-linux-any/asm/unistd_n64.h b/lib/libc/include/mips-linux-any/asm/unistd_n64.h
index 1aa5e2f65f..4b63dbf52b 100644
--- a/lib/libc/include/mips-linux-any/asm/unistd_n64.h
+++ b/lib/libc/include/mips-linux-any/asm/unistd_n64.h
@@ -374,5 +374,6 @@
#define __NR_open_tree_attr (__NR_Linux + 467)
#define __NR_file_getattr (__NR_Linux + 468)
#define __NR_file_setattr (__NR_Linux + 469)
+#define __NR_listns (__NR_Linux + 470)
#endif /* _ASM_UNISTD_N64_H */
\ No newline at end of file
diff --git a/lib/libc/include/mips-linux-any/asm/unistd_o32.h b/lib/libc/include/mips-linux-any/asm/unistd_o32.h
index 635c7ee3c8..3cf8772199 100644
--- a/lib/libc/include/mips-linux-any/asm/unistd_o32.h
+++ b/lib/libc/include/mips-linux-any/asm/unistd_o32.h
@@ -444,5 +444,6 @@
#define __NR_open_tree_attr (__NR_Linux + 467)
#define __NR_file_getattr (__NR_Linux + 468)
#define __NR_file_setattr (__NR_Linux + 469)
+#define __NR_listns (__NR_Linux + 470)
#endif /* _ASM_UNISTD_O32_H */
\ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h b/lib/libc/include/mips-linux-gnu/bits/dlfcn.h
index 65b934d43f..24982842aa 100644
--- a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h
+++ b/lib/libc/include/mips-linux-gnu/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/errno.h b/lib/libc/include/mips-linux-gnu/bits/errno.h
index 73757ea5c3..30e850a337 100644
--- a/lib/libc/include/mips-linux-gnu/bits/errno.h
+++ b/lib/libc/include/mips-linux-gnu/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. MIPS/Linux specific version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/eventfd.h b/lib/libc/include/mips-linux-gnu/bits/eventfd.h
index 9527e5f5c6..399250f328 100644
--- a/lib/libc/include/mips-linux-gnu/bits/eventfd.h
+++ b/lib/libc/include/mips-linux-gnu/bits/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/floatn.h b/lib/libc/include/mips-linux-gnu/bits/floatn.h
index 3a2de29dee..e0957c3d35 100644
--- a/lib/libc/include/mips-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/mips-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/inotify.h b/lib/libc/include/mips-linux-gnu/bits/inotify.h
index 20e56c411d..5b03c30da4 100644
--- a/lib/libc/include/mips-linux-gnu/bits/inotify.h
+++ b/lib/libc/include/mips-linux-gnu/bits/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h b/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h
index 511fe1c96b..6e2a67b789 100644
--- a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h
+++ b/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h b/lib/libc/include/mips-linux-gnu/bits/ipctypes.h
index b7bec61581..5ee3ebe38f 100644
--- a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h
+++ b/lib/libc/include/mips-linux-gnu/bits/ipctypes.h
@@ -1,5 +1,5 @@
/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/mman.h b/lib/libc/include/mips-linux-gnu/bits/mman.h
index ee158cf726..0b5f513e07 100644
--- a/lib/libc/include/mips-linux-gnu/bits/mman.h
+++ b/lib/libc/include/mips-linux-gnu/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/poll.h b/lib/libc/include/mips-linux-gnu/bits/poll.h
index 7043ba8468..4a33b3a969 100644
--- a/lib/libc/include/mips-linux-gnu/bits/poll.h
+++ b/lib/libc/include/mips-linux-gnu/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h
index 6bc4157059..05d4234ed3 100644
--- a/lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h
+++ b/lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h
index 226d51c2a2..53ecb74974 100644
--- a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. MIPS version.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnu/bits/resource.h
index 021ce359dd..0a5a076904 100644
--- a/lib/libc/include/mips-linux-gnu/bits/resource.h
+++ b/lib/libc/include/mips-linux-gnu/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/semaphore.h b/lib/libc/include/mips-linux-gnu/bits/semaphore.h
index b220656c88..eac6ab0e5c 100644
--- a/lib/libc/include/mips-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/mips-linux-gnu/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/shmlba.h b/lib/libc/include/mips-linux-gnu/bits/shmlba.h
index 350b518ba8..7b5b1136f8 100644
--- a/lib/libc/include/mips-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/mips-linux-gnu/bits/shmlba.h
@@ -1,5 +1,5 @@
/* Define SHMLBA. MIPS version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/sigaction.h b/lib/libc/include/mips-linux-gnu/bits/sigaction.h
index 5505891b7a..619d56cbf1 100644
--- a/lib/libc/include/mips-linux-gnu/bits/sigaction.h
+++ b/lib/libc/include/mips-linux-gnu/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/MIPS's sigaction.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h b/lib/libc/include/mips-linux-gnu/bits/sigcontext.h
index f605e22dae..d47e3e7c59 100644
--- a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/mips-linux-gnu/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc. This file is part of the GNU C Library.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/mips-linux-gnu/bits/signalfd.h b/lib/libc/include/mips-linux-gnu/bits/signalfd.h
index af0460ab2a..35bfe6548e 100644
--- a/lib/libc/include/mips-linux-gnu/bits/signalfd.h
+++ b/lib/libc/include/mips-linux-gnu/bits/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h b/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
index f8201472e1..c43e83fcf7 100644
--- a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
+++ b/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/MIPS version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnu/bits/socket-constants.h
index ec96221062..24c30f9d98 100644
--- a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/mips-linux-gnu/bits/socket-constants.h
@@ -1,5 +1,5 @@
/* Socket constants which vary among Linux architectures. Version for MIPS.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnu/bits/socket_type.h
index 50649dcc5f..92f304d2aa 100644
--- a/lib/libc/include/mips-linux-gnu/bits/socket_type.h
+++ b/lib/libc/include/mips-linux-gnu/bits/socket_type.h
@@ -1,5 +1,5 @@
/* Define enum __socket_type for Linux/MIPS.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/statfs.h b/lib/libc/include/mips-linux-gnu/bits/statfs.h
index 179b003f88..9e68db3490 100644
--- a/lib/libc/include/mips-linux-gnu/bits/statfs.h
+++ b/lib/libc/include/mips-linux-gnu/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h b/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h
index fd005c0b9c..804676bebf 100644
--- a/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h
@@ -1,5 +1,5 @@
/* MIPS internal mutex struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h
index f1daa9496d..631c305751 100644
--- a/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* MIPS internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h
index 530680ff2f..a572e88edc 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h
@@ -1,5 +1,5 @@
/* termios c_cc symbolic constant definitions. Linux/mips version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h
index 0920d035c7..1ff38be11d 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h
+++ b/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h
@@ -1,5 +1,5 @@
/* termios local mode definitions. Linux/mips version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h b/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h
index 97705b1887..8ab349de28 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h
+++ b/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h
@@ -1,5 +1,5 @@
/* termios local mode definitions. Linux/mips version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/timerfd.h b/lib/libc/include/mips-linux-gnu/bits/timerfd.h
index 58172ec3af..abcb014125 100644
--- a/lib/libc/include/mips-linux-gnu/bits/timerfd.h
+++ b/lib/libc/include/mips-linux-gnu/bits/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h b/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h
index ca303c5d20..5869efefac 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h
+++ b/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h
@@ -1,5 +1,5 @@
/* Define stack_t. MIPS Linux version.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
index 5539b03f3a..ca9c04ffba 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
@@ -1,5 +1,5 @@
/* Linux/MIPS implementation of the SysV message struct msqid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
index 2545ab9401..dcbc64f74b 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
/* MIPS implementation of the semaphore struct semid_ds
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
index bf252474c1..dfd1415c60 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
@@ -1,5 +1,5 @@
/* Linux/MIPS implementation of the shared memory struct shmid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/bits/typesizes.h b/lib/libc/include/mips-linux-gnu/bits/typesizes.h
index 8e99e59de9..b70c688821 100644
--- a/lib/libc/include/mips-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/mips-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. MIPS version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/mips-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnu/ieee754.h
index b3800f5594..731c2a937e 100644
--- a/lib/libc/include/mips-linux-gnu/ieee754.h
+++ b/lib/libc/include/mips-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-any/asm/opal-prd.h b/lib/libc/include/powerpc-linux-any/asm/opal-prd.h
index 087b068aea..6c9a482525 100644
--- a/lib/libc/include/powerpc-linux-any/asm/opal-prd.h
+++ b/lib/libc/include/powerpc-linux-any/asm/opal-prd.h
@@ -40,7 +40,7 @@
#define OPAL_PRD_SCOM_READ _IOR('o', 0x02, struct opal_prd_scom)
#define OPAL_PRD_SCOM_WRITE _IOW('o', 0x03, struct opal_prd_scom)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct opal_prd_info {
__u64 version;
@@ -54,6 +54,6 @@ struct opal_prd_scom {
__s64 rc;
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_POWERPC_OPAL_PRD_H */
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-any/asm/papr-hvpipe.h b/lib/libc/include/powerpc-linux-any/asm/papr-hvpipe.h
new file mode 100644
index 0000000000..fc54cf5449
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-any/asm/papr-hvpipe.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _PAPR_HVPIPE_H_
+#define _PAPR_HVPIPE_H_
+
+#include
+#include
+#include
+
+/*
+ * This header is included in payload between OS and the user
+ * space.
+ * flags: OS notifies the user space whether the hvpipe is
+ * closed or the buffer has the payload.
+ */
+struct papr_hvpipe_hdr {
+ __u8 version;
+ __u8 reserved[3];
+ __u32 flags;
+ __u8 reserved2[40];
+};
+
+/*
+ * ioctl for /dev/papr-hvpipe
+ */
+#define PAPR_HVPIPE_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 9, __u32)
+
+/*
+ * hvpipe_hdr flags used for read()
+ */
+#define HVPIPE_MSG_AVAILABLE 0x01 /* Payload is available */
+#define HVPIPE_LOST_CONNECTION 0x02 /* Pipe connection is closed/unavailable */
+
+#endif /* _PAPR_HVPIPE_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-any/asm/ptrace.h b/lib/libc/include/powerpc-linux-any/asm/ptrace.h
index 62f6b23535..b3d128a2a2 100644
--- a/lib/libc/include/powerpc-linux-any/asm/ptrace.h
+++ b/lib/libc/include/powerpc-linux-any/asm/ptrace.h
@@ -27,7 +27,7 @@
#include
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct pt_regs
{
@@ -53,7 +53,7 @@ struct pt_regs
unsigned long result; /* Result of a system call */
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
/*
@@ -196,7 +196,7 @@ struct pt_regs
#define PPC_PTRACE_SETHWDEBUG 0x88
#define PPC_PTRACE_DELHWDEBUG 0x87
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct ppc_debug_info {
__u32 version; /* Only version 1 exists to date */
@@ -208,7 +208,7 @@ struct ppc_debug_info {
__u64 features;
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
/*
* features will have bits indication whether there is support for:
@@ -220,7 +220,7 @@ struct ppc_debug_info {
#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x0000000000000010
#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x0000000000000020
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct ppc_hw_breakpoint {
__u32 version; /* currently, version must be 1 */
@@ -232,7 +232,7 @@ struct ppc_hw_breakpoint {
__u64 condition_value; /* contents of the DVC register */
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
/*
* Trigger Type
diff --git a/lib/libc/include/powerpc-linux-any/asm/types.h b/lib/libc/include/powerpc-linux-any/asm/types.h
index f2a0da7f59..b44ffb37f1 100644
--- a/lib/libc/include/powerpc-linux-any/asm/types.h
+++ b/lib/libc/include/powerpc-linux-any/asm/types.h
@@ -28,14 +28,14 @@
# include
#endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
typedef struct {
__u32 u[4];
} __attribute__((aligned(16))) __vector128;
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_POWERPC_TYPES_H */
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-any/asm/unistd_32.h b/lib/libc/include/powerpc-linux-any/asm/unistd_32.h
index d794875830..b633275f54 100644
--- a/lib/libc/include/powerpc-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/powerpc-linux-any/asm/unistd_32.h
@@ -451,6 +451,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-any/asm/unistd_64.h b/lib/libc/include/powerpc-linux-any/asm/unistd_64.h
index ff4437c87e..70aae1ef57 100644
--- a/lib/libc/include/powerpc-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/powerpc-linux-any/asm/unistd_64.h
@@ -423,6 +423,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/environments.h b/lib/libc/include/powerpc-linux-gnu/bits/environments.h
index 5a19b4cbd4..1f7533af49 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/environments.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h b/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h
index 8e255ea462..01a481d7a4 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/PowerPC.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h b/lib/libc/include/powerpc-linux-gnu/bits/fenv.h
index 464f652309..b75483708f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc-linux-gnu/bits/floatn.h
index b07b9abf33..db53131df6 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features on powerpc.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h b/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h
index 4d38958f05..99a9b6a68d 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h
@@ -1,5 +1,5 @@
/* Define FP_FAST_* macros. PowerPC version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
index 5e3ab0182b..17e805f059 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP and AT_HWCAP2.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h b/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h
index ecb6295b24..fa0215e5cf 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
- Copyright (C) 2014-2025 Free Software Foundation, Inc.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h b/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h
index 06ba7e6ca7..2ed12c3136 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h
@@ -1,5 +1,5 @@
/* struct ipc_perm definition. Linux/powerpc version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
index 49ea731c91..b7cfc3ef41 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
@@ -1,5 +1,5 @@
/* Define iscanonical macro. ldbl-128ibm version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/link.h b/lib/libc/include/powerpc-linux-gnu/bits/link.h
index 90aaa912de..251210f7bc 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/link.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific declarations for dynamic linker interface. PowerPC version
- Copyright (C) 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
index ecf2982b04..6c9cf2949f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-opt version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/mman.h b/lib/libc/include/powerpc-linux-gnu/bits/mman.h
index 1fc6762a7a..e68abd8cc9 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/mman.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/PowerPC version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h b/lib/libc/include/powerpc-linux-gnu/bits/procfs.h
index 14652268ec..22d5a4af6b 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. PowerPC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h
index 0b6dcb9131..a54ee42eb0 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/rseq.h b/lib/libc/include/powerpc-linux-gnu/bits/rseq.h
index 5ba280909a..7d44f470b1 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux powerpc architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h b/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h
index b8774299cd..54cff5c6c8 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h b/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h
index cc26e7b543..c72ef19072 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
index b5b6051a0c..c5e8c71cbf 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
@@ -1,5 +1,5 @@
/* Socket constants which vary among Linux architectures. Version for POWER.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h b/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h
index c7f90aa47d..00a85da766 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h
@@ -1,5 +1,5 @@
/* PowerPC internal mutex struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ struct __pthread_mutex_s
int __kind;
#if __WORDSIZE == 64
short __spins;
- short __elision;
+ short __unused;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
@@ -41,11 +41,10 @@ struct __pthread_mutex_s
{
struct
{
- short __espins;
- short __elision;
-# define __spins __elision_data.__espins
-# define __elision __elision_data.__elision
- } __elision_data;
+ short __data_spins;
+ short __data_unused;
+# define __spins __data.__data_spins
+ } __data;
__pthread_slist_t __list;
};
# define __PTHREAD_MUTEX_HAVE_PREV 0
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h
index 6ca8f577e5..d3e18ca54f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* PowerPC internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -31,31 +31,28 @@ struct __pthread_rwlock_arch_t
#if __WORDSIZE == 64
int __cur_writer;
int __shared;
- unsigned char __rwelision;
- unsigned char __pad1[7];
+ unsigned long int __pad1;
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
-# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
#else
- unsigned char __rwelision;
+ unsigned char __pad1;
unsigned char __pad2;
unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __flags;
int __cur_writer;
-# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
#endif
};
#if __WORDSIZE == 64
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
#else
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
#endif
#endif
\ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h b/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h
index 4b2c05e425..053329e24c 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h
index 2a533e982e..47887ecfe1 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h
@@ -1,5 +1,5 @@
/* termios c_cc symbolic constant definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h
index 86d5639c46..37dd83e796 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h
@@ -1,5 +1,5 @@
/* termios control mode definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h
index b19f14d9ea..0c4e341043 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h
@@ -1,5 +1,5 @@
/* termios input mode definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h
index 28d361816d..6c8abad464 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h
@@ -1,5 +1,5 @@
/* termios local mode definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h
index 7884494268..8d6fd3ceb0 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h
@@ -1,5 +1,5 @@
/* termios output mode definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-cbaud.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-cbaud.h
index 6e0257e59d..1f56bad97b 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-cbaud.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-cbaud.h
@@ -1,5 +1,5 @@
/* termios baud rate selection definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h
index 8d3504478d..789236ad31 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h
@@ -1,5 +1,5 @@
/* termios baud platform specific definitions. Linux/powerpc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/timesize.h b/lib/libc/include/powerpc-linux-gnu/bits/timesize.h
index 9cbad9b500..5e47e22bc0 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h
index f6b3e4d655..8624e326dc 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h
@@ -1,5 +1,5 @@
/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h
index 3b208ff2fd..550efd6607 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
/* PowerPC implementation of the semaphore struct semid_ds.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h
index 2ed27e039d..e739d5e857 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h
@@ -1,5 +1,5 @@
/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/typesizes.h b/lib/libc/include/powerpc-linux-gnu/bits/typesizes.h
index 47bb8610e6..dc1da9054a 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. PowerPC version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/fpu_control.h b/lib/libc/include/powerpc-linux-gnu/fpu_control.h
index cdedca96cf..dec65fa010 100644
--- a/lib/libc/include/powerpc-linux-gnu/fpu_control.h
+++ b/lib/libc/include/powerpc-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. PowerPC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/ieee754.h b/lib/libc/include/powerpc-linux-gnu/ieee754.h
index 38008b560f..18b79270e6 100644
--- a/lib/libc/include/powerpc-linux-gnu/ieee754.h
+++ b/lib/libc/include/powerpc-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h
index 99cf115cb6..882a09c350 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/PowerPC version.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h b/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h
index 7d354e529b..df7b7b4a5f 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/user.h b/lib/libc/include/powerpc-linux-gnu/sys/user.h
index 19396e1bc3..706662749f 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/user.h
+++ b/lib/libc/include/powerpc-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-any/asm/hwprobe.h b/lib/libc/include/riscv-linux-any/asm/hwprobe.h
index 8d1f367100..a7d9065a56 100644
--- a/lib/libc/include/riscv-linux-any/asm/hwprobe.h
+++ b/lib/libc/include/riscv-linux-any/asm/hwprobe.h
@@ -82,6 +82,11 @@ struct riscv_hwprobe {
#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
+#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)
+#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
+#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
+#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
+
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
@@ -106,6 +111,8 @@ struct riscv_hwprobe {
#define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 11
#define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE 12
#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13
+#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
+#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
/* Flags */
diff --git a/lib/libc/include/riscv-linux-any/asm/kvm.h b/lib/libc/include/riscv-linux-any/asm/kvm.h
index f74aa1ef8a..cddcfc73f0 100644
--- a/lib/libc/include/riscv-linux-any/asm/kvm.h
+++ b/lib/libc/include/riscv-linux-any/asm/kvm.h
@@ -9,7 +9,7 @@
#ifndef __LINUX_KVM_RISCV_H
#define __LINUX_KVM_RISCV_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
#include
@@ -23,6 +23,8 @@
#define KVM_INTERRUPT_SET -1U
#define KVM_INTERRUPT_UNSET -2U
+#define KVM_EXIT_FAIL_ENTRY_NO_VSFILE (1ULL << 0)
+
/* for KVM_GET_REGS and KVM_SET_REGS */
struct kvm_regs {
};
@@ -56,6 +58,7 @@ struct kvm_riscv_config {
unsigned long mimpid;
unsigned long zicboz_block_size;
unsigned long satp_mode;
+ unsigned long zicbop_block_size;
};
/* CORE registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
@@ -185,6 +188,10 @@ enum KVM_RISCV_ISA_EXT_ID {
KVM_RISCV_ISA_EXT_ZICCRSE,
KVM_RISCV_ISA_EXT_ZAAMO,
KVM_RISCV_ISA_EXT_ZALRSC,
+ KVM_RISCV_ISA_EXT_ZICBOP,
+ KVM_RISCV_ISA_EXT_ZFBFMIN,
+ KVM_RISCV_ISA_EXT_ZVFBFMIN,
+ KVM_RISCV_ISA_EXT_ZVFBFWMA,
KVM_RISCV_ISA_EXT_MAX,
};
@@ -205,6 +212,8 @@ enum KVM_RISCV_SBI_EXT_ID {
KVM_RISCV_SBI_EXT_DBCN,
KVM_RISCV_SBI_EXT_STA,
KVM_RISCV_SBI_EXT_SUSP,
+ KVM_RISCV_SBI_EXT_FWFT,
+ KVM_RISCV_SBI_EXT_MPXY,
KVM_RISCV_SBI_EXT_MAX,
};
@@ -214,6 +223,18 @@ struct kvm_riscv_sbi_sta {
unsigned long shmem_hi;
};
+struct kvm_riscv_sbi_fwft_feature {
+ unsigned long enable;
+ unsigned long flags;
+ unsigned long value;
+};
+
+/* SBI FWFT extension registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
+struct kvm_riscv_sbi_fwft {
+ struct kvm_riscv_sbi_fwft_feature misaligned_deleg;
+ struct kvm_riscv_sbi_fwft_feature pointer_masking;
+};
+
/* Possible states for kvm_riscv_timer */
#define KVM_RISCV_TIMER_STATE_OFF 0
#define KVM_RISCV_TIMER_STATE_ON 1
@@ -297,6 +318,9 @@ struct kvm_riscv_sbi_sta {
#define KVM_REG_RISCV_SBI_STA (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
#define KVM_REG_RISCV_SBI_STA_REG(name) \
(offsetof(struct kvm_riscv_sbi_sta, name) / sizeof(unsigned long))
+#define KVM_REG_RISCV_SBI_FWFT (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_FWFT_REG(name) \
+ (offsetof(struct kvm_riscv_sbi_fwft, name) / sizeof(unsigned long))
/* Device Control API: RISC-V AIA */
#define KVM_DEV_RISCV_APLIC_ALIGN 0x1000
diff --git a/lib/libc/include/riscv-linux-any/asm/ptrace.h b/lib/libc/include/riscv-linux-any/asm/ptrace.h
index 607bb0a8d4..ab55fac5e9 100644
--- a/lib/libc/include/riscv-linux-any/asm/ptrace.h
+++ b/lib/libc/include/riscv-linux-any/asm/ptrace.h
@@ -6,7 +6,7 @@
#ifndef _ASM_RISCV_PTRACE_H
#define _ASM_RISCV_PTRACE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -127,6 +127,6 @@ struct __riscv_v_regset_state {
*/
#define RISCV_MAX_VLENB (8192)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_RISCV_PTRACE_H */
\ No newline at end of file
diff --git a/lib/libc/include/riscv-linux-any/asm/sigcontext.h b/lib/libc/include/riscv-linux-any/asm/sigcontext.h
index 2fec9bd5a4..f134d762a0 100644
--- a/lib/libc/include/riscv-linux-any/asm/sigcontext.h
+++ b/lib/libc/include/riscv-linux-any/asm/sigcontext.h
@@ -15,7 +15,7 @@
/* The size of END signal context header. */
#define END_HDR_SIZE 0x0
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct __sc_riscv_v_state {
struct __riscv_v_ext_state v_state;
@@ -35,6 +35,6 @@ struct sigcontext {
};
};
-#endif /*!__ASSEMBLY__*/
+#endif /*!__ASSEMBLER__*/
#endif /* _ASM_RISCV_SIGCONTEXT_H */
\ No newline at end of file
diff --git a/lib/libc/include/riscv-linux-any/asm/unistd_32.h b/lib/libc/include/riscv-linux-any/asm/unistd_32.h
index 6681c21a63..2bca65239b 100644
--- a/lib/libc/include/riscv-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/riscv-linux-any/asm/unistd_32.h
@@ -317,6 +317,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/riscv-linux-any/asm/unistd_64.h b/lib/libc/include/riscv-linux-any/asm/unistd_64.h
index 28884c9851..6919b204cc 100644
--- a/lib/libc/include/riscv-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/riscv-linux-any/asm/unistd_64.h
@@ -327,6 +327,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/riscv-linux-any/asm/vendor/mips.h b/lib/libc/include/riscv-linux-any/asm/vendor/mips.h
new file mode 100644
index 0000000000..4ada02ab13
--- /dev/null
+++ b/lib/libc/include/riscv-linux-any/asm/vendor/mips.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL BIT(0)
\ No newline at end of file
diff --git a/lib/libc/include/riscv-linux-gnu/bits/environments.h b/lib/libc/include/riscv-linux-gnu/bits/environments.h
index 26a15733b3..5cf0a2c910 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/environments.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2020-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/fcntl.h b/lib/libc/include/riscv-linux-gnu/bits/fcntl.h
index 7a8e74e788..ed62d1829d 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux / RISC-V.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/riscv-linux-gnu/bits/fenv.h b/lib/libc/include/riscv-linux-gnu/bits/fenv.h
index 385b2d6898..aa191274b4 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/fenv.h
@@ -1,5 +1,5 @@
/* Floating point environment, RISC-V version.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/link.h b/lib/libc/include/riscv-linux-gnu/bits/link.h
index 0440777948..c82422106b 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/link.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific declarations for dynamic linker interface. RISC-V version.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/long-double.h b/lib/libc/include/riscv-linux-gnu/bits/long-double.h
index 57d7be04a6..af7784dbe6 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-128 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/procfs.h b/lib/libc/include/riscv-linux-gnu/bits/procfs.h
index 41fe44e0a3..278397840b 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. RISC-V version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/riscv-linux-gnu/bits/pthreadtypes-arch.h
index 1e0839e949..6218317e76 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/pthreadtypes-arch.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. RISC-V version.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/rseq.h b/lib/libc/include/riscv-linux-gnu/bits/rseq.h
index 0300604af9..5b82daaaaa 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux riscv architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/riscv-linux-gnu/bits/setjmp.h b/lib/libc/include/riscv-linux-gnu/bits/setjmp.h
index d3dca3d9b1..75b2d89123 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. RISC-V version.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/sigcontext.h b/lib/libc/include/riscv-linux-gnu/bits/sigcontext.h
index 7634c22cff..004e0bf5bd 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/sigcontext.h
@@ -1,5 +1,5 @@
/* Machine-dependent signal context structure for Linux. RISC-V version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc. This file is part of the GNU C Library.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/riscv-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/riscv-linux-gnu/bits/struct_rwlock.h
index b0674ce80c..41ef083aa0 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* RISC-V internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/riscv-linux-gnu/bits/struct_stat.h b/lib/libc/include/riscv-linux-gnu/bits/struct_stat.h
index 724450a667..0462d37a68 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/time64.h b/lib/libc/include/riscv-linux-gnu/bits/time64.h
index 1f82375244..81476a4ac0 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/time64.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/time64.h
@@ -1,5 +1,5 @@
/* bits/time64.h -- underlying types for __time64_t. RISC-V version.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/timesize.h b/lib/libc/include/riscv-linux-gnu/bits/timesize.h
index 04251ea75c..dff2da5ed6 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, general case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/bits/wordsize.h b/lib/libc/include/riscv-linux-gnu/bits/wordsize.h
index 45cc378a99..3c79368ccc 100644
--- a/lib/libc/include/riscv-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/riscv-linux-gnu/bits/wordsize.h
@@ -1,5 +1,5 @@
/* Determine the wordsize from the preprocessor defines. RISC-V version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/fpu_control.h b/lib/libc/include/riscv-linux-gnu/fpu_control.h
index 6a621ca884..838af6f139 100644
--- a/lib/libc/include/riscv-linux-gnu/fpu_control.h
+++ b/lib/libc/include/riscv-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. RISC-V version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
# define _FPU_DEFAULT 0x00000000
typedef unsigned int fpu_control_t;
# define _FPU_GETCW(cw) (cw) = 0
-# define _FPU_SETCW(cw) do { } while (0)
+# define _FPU_SETCW(cw) (void) (cw)
extern fpu_control_t __fpu_control;
#else /* __riscv_flen */
diff --git a/lib/libc/include/riscv-linux-gnu/ieee754.h b/lib/libc/include/riscv-linux-gnu/ieee754.h
index a49523c3d8..a19fd8dcd1 100644
--- a/lib/libc/include/riscv-linux-gnu/ieee754.h
+++ b/lib/libc/include/riscv-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/sys/asm.h b/lib/libc/include/riscv-linux-gnu/sys/asm.h
index ff8205da63..e66bb6eb5e 100644
--- a/lib/libc/include/riscv-linux-gnu/sys/asm.h
+++ b/lib/libc/include/riscv-linux-gnu/sys/asm.h
@@ -1,5 +1,5 @@
/* Miscellaneous macros.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/sys/cachectl.h b/lib/libc/include/riscv-linux-gnu/sys/cachectl.h
index 599118a8aa..3f25ca7fbb 100644
--- a/lib/libc/include/riscv-linux-gnu/sys/cachectl.h
+++ b/lib/libc/include/riscv-linux-gnu/sys/cachectl.h
@@ -1,5 +1,5 @@
/* RISC-V instruction cache flushing interface
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/riscv-linux-gnu/sys/ucontext.h b/lib/libc/include/riscv-linux-gnu/sys/ucontext.h
index 4a110dbafa..ed06a30fe8 100644
--- a/lib/libc/include/riscv-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/riscv-linux-gnu/sys/ucontext.h
@@ -1,5 +1,5 @@
/* struct ucontext definition, RISC-V version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/riscv-linux-gnu/sys/user.h b/lib/libc/include/riscv-linux-gnu/sys/user.h
index 3b4e3e9452..d8d1d86bfd 100644
--- a/lib/libc/include/riscv-linux-gnu/sys/user.h
+++ b/lib/libc/include/riscv-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-any/asm/bitsperlong.h b/lib/libc/include/s390x-linux-any/asm/bitsperlong.h
index a296696bb7..711368a3ce 100644
--- a/lib/libc/include/s390x-linux-any/asm/bitsperlong.h
+++ b/lib/libc/include/s390x-linux-any/asm/bitsperlong.h
@@ -2,11 +2,7 @@
#ifndef __ASM_S390_BITSPERLONG_H
#define __ASM_S390_BITSPERLONG_H
-#ifndef __s390x__
-#define __BITS_PER_LONG 32
-#else
#define __BITS_PER_LONG 64
-#endif
#include
diff --git a/lib/libc/include/s390x-linux-any/asm/ipcbuf.h b/lib/libc/include/s390x-linux-any/asm/ipcbuf.h
index 967477874d..38ddb143df 100644
--- a/lib/libc/include/s390x-linux-any/asm/ipcbuf.h
+++ b/lib/libc/include/s390x-linux-any/asm/ipcbuf.h
@@ -24,9 +24,6 @@ struct ipc64_perm
__kernel_mode_t mode;
unsigned short __pad1;
unsigned short seq;
-#ifndef __s390x__
- unsigned short __pad2;
-#endif /* ! __s390x__ */
unsigned long __unused1;
unsigned long __unused2;
};
diff --git a/lib/libc/include/s390x-linux-any/asm/ipl.h b/lib/libc/include/s390x-linux-any/asm/ipl.h
index 9d9197ba24..1af0869dc5 100644
--- a/lib/libc/include/s390x-linux-any/asm/ipl.h
+++ b/lib/libc/include/s390x-linux-any/asm/ipl.h
@@ -15,6 +15,7 @@ struct ipl_pl_hdr {
#define IPL_PL_FLAG_IPLPS 0x80
#define IPL_PL_FLAG_SIPL 0x40
#define IPL_PL_FLAG_IPLSR 0x20
+#define IPL_PL_FLAG_SBP 0x10
/* IPL Parameter Block header */
struct ipl_pb_hdr {
diff --git a/lib/libc/include/s390x-linux-any/asm/posix_types.h b/lib/libc/include/s390x-linux-any/asm/posix_types.h
index df0e737305..2ce540b400 100644
--- a/lib/libc/include/s390x-linux-any/asm/posix_types.h
+++ b/lib/libc/include/s390x-linux-any/asm/posix_types.h
@@ -21,17 +21,6 @@ typedef unsigned short __kernel_old_dev_t;
#define __kernel_old_dev_t __kernel_old_dev_t
-#ifndef __s390x__
-
-typedef unsigned long __kernel_ino_t;
-typedef unsigned short __kernel_mode_t;
-typedef unsigned short __kernel_ipc_pid_t;
-typedef unsigned short __kernel_uid_t;
-typedef unsigned short __kernel_gid_t;
-typedef int __kernel_ptrdiff_t;
-
-#else /* __s390x__ */
-
typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef int __kernel_ipc_pid_t;
@@ -40,8 +29,6 @@ typedef unsigned int __kernel_gid_t;
typedef long __kernel_ptrdiff_t;
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
-#endif /* __s390x__ */
-
#define __kernel_ino_t __kernel_ino_t
#define __kernel_mode_t __kernel_mode_t
#define __kernel_ipc_pid_t __kernel_ipc_pid_t
diff --git a/lib/libc/include/s390x-linux-any/asm/ptrace.h b/lib/libc/include/s390x-linux-any/asm/ptrace.h
index 07f4b9ca37..bfe8e69a67 100644
--- a/lib/libc/include/s390x-linux-any/asm/ptrace.h
+++ b/lib/libc/include/s390x-linux-any/asm/ptrace.h
@@ -14,94 +14,6 @@
* Offsets in the user_regs_struct. They are used for the ptrace
* system call and in entry.S
*/
-#ifndef __s390x__
-
-#define PT_PSWMASK 0x00
-#define PT_PSWADDR 0x04
-#define PT_GPR0 0x08
-#define PT_GPR1 0x0C
-#define PT_GPR2 0x10
-#define PT_GPR3 0x14
-#define PT_GPR4 0x18
-#define PT_GPR5 0x1C
-#define PT_GPR6 0x20
-#define PT_GPR7 0x24
-#define PT_GPR8 0x28
-#define PT_GPR9 0x2C
-#define PT_GPR10 0x30
-#define PT_GPR11 0x34
-#define PT_GPR12 0x38
-#define PT_GPR13 0x3C
-#define PT_GPR14 0x40
-#define PT_GPR15 0x44
-#define PT_ACR0 0x48
-#define PT_ACR1 0x4C
-#define PT_ACR2 0x50
-#define PT_ACR3 0x54
-#define PT_ACR4 0x58
-#define PT_ACR5 0x5C
-#define PT_ACR6 0x60
-#define PT_ACR7 0x64
-#define PT_ACR8 0x68
-#define PT_ACR9 0x6C
-#define PT_ACR10 0x70
-#define PT_ACR11 0x74
-#define PT_ACR12 0x78
-#define PT_ACR13 0x7C
-#define PT_ACR14 0x80
-#define PT_ACR15 0x84
-#define PT_ORIGGPR2 0x88
-#define PT_FPC 0x90
-/*
- * A nasty fact of life that the ptrace api
- * only supports passing of longs.
- */
-#define PT_FPR0_HI 0x98
-#define PT_FPR0_LO 0x9C
-#define PT_FPR1_HI 0xA0
-#define PT_FPR1_LO 0xA4
-#define PT_FPR2_HI 0xA8
-#define PT_FPR2_LO 0xAC
-#define PT_FPR3_HI 0xB0
-#define PT_FPR3_LO 0xB4
-#define PT_FPR4_HI 0xB8
-#define PT_FPR4_LO 0xBC
-#define PT_FPR5_HI 0xC0
-#define PT_FPR5_LO 0xC4
-#define PT_FPR6_HI 0xC8
-#define PT_FPR6_LO 0xCC
-#define PT_FPR7_HI 0xD0
-#define PT_FPR7_LO 0xD4
-#define PT_FPR8_HI 0xD8
-#define PT_FPR8_LO 0XDC
-#define PT_FPR9_HI 0xE0
-#define PT_FPR9_LO 0xE4
-#define PT_FPR10_HI 0xE8
-#define PT_FPR10_LO 0xEC
-#define PT_FPR11_HI 0xF0
-#define PT_FPR11_LO 0xF4
-#define PT_FPR12_HI 0xF8
-#define PT_FPR12_LO 0xFC
-#define PT_FPR13_HI 0x100
-#define PT_FPR13_LO 0x104
-#define PT_FPR14_HI 0x108
-#define PT_FPR14_LO 0x10C
-#define PT_FPR15_HI 0x110
-#define PT_FPR15_LO 0x114
-#define PT_CR_9 0x118
-#define PT_CR_10 0x11C
-#define PT_CR_11 0x120
-#define PT_IEEE_IP 0x13C
-#define PT_LASTOFF PT_IEEE_IP
-#define PT_ENDREGS 0x140-1
-
-#define GPR_SIZE 4
-#define CR_SIZE 4
-
-#define STACK_FRAME_OVERHEAD 96 /* size of minimum stack frame */
-
-#else /* __s390x__ */
-
#define PT_PSWMASK 0x00
#define PT_PSWADDR 0x08
#define PT_GPR0 0x10
@@ -166,38 +78,6 @@
#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
-#endif /* __s390x__ */
-
-#ifndef __s390x__
-
-#define PSW_MASK_PER _AC(0x40000000, UL)
-#define PSW_MASK_DAT _AC(0x04000000, UL)
-#define PSW_MASK_IO _AC(0x02000000, UL)
-#define PSW_MASK_EXT _AC(0x01000000, UL)
-#define PSW_MASK_KEY _AC(0x00F00000, UL)
-#define PSW_MASK_BASE _AC(0x00080000, UL) /* always one */
-#define PSW_MASK_MCHECK _AC(0x00040000, UL)
-#define PSW_MASK_WAIT _AC(0x00020000, UL)
-#define PSW_MASK_PSTATE _AC(0x00010000, UL)
-#define PSW_MASK_ASC _AC(0x0000C000, UL)
-#define PSW_MASK_CC _AC(0x00003000, UL)
-#define PSW_MASK_PM _AC(0x00000F00, UL)
-#define PSW_MASK_RI _AC(0x00000000, UL)
-#define PSW_MASK_EA _AC(0x00000000, UL)
-#define PSW_MASK_BA _AC(0x00000000, UL)
-
-#define PSW_MASK_USER _AC(0x0000FF00, UL)
-
-#define PSW_ADDR_AMODE _AC(0x80000000, UL)
-#define PSW_ADDR_INSN _AC(0x7FFFFFFF, UL)
-
-#define PSW_ASC_PRIMARY _AC(0x00000000, UL)
-#define PSW_ASC_ACCREG _AC(0x00004000, UL)
-#define PSW_ASC_SECONDARY _AC(0x00008000, UL)
-#define PSW_ASC_HOME _AC(0x0000C000, UL)
-
-#else /* __s390x__ */
-
#define PSW_MASK_PER _AC(0x4000000000000000, UL)
#define PSW_MASK_DAT _AC(0x0400000000000000, UL)
#define PSW_MASK_IO _AC(0x0200000000000000, UL)
@@ -224,8 +104,6 @@
#define PSW_ASC_SECONDARY _AC(0x0000800000000000, UL)
#define PSW_ASC_HOME _AC(0x0000C00000000000, UL)
-#endif /* __s390x__ */
-
#define NUM_GPRS 16
#define NUM_FPRS 16
#define NUM_CRS 16
@@ -308,9 +186,7 @@ typedef struct {
#define PER_EM_MASK 0xE8000000UL
typedef struct {
-#ifdef __s390x__
unsigned : 32;
-#endif /* __s390x__ */
unsigned em_branching : 1;
unsigned em_instruction_fetch : 1;
/*
diff --git a/lib/libc/include/s390x-linux-any/asm/sigcontext.h b/lib/libc/include/s390x-linux-any/asm/sigcontext.h
index f6e4f24fbe..c1580e10e6 100644
--- a/lib/libc/include/s390x-linux-any/asm/sigcontext.h
+++ b/lib/libc/include/s390x-linux-any/asm/sigcontext.h
@@ -17,24 +17,12 @@
#define __NUM_VXRS_LOW 16
#define __NUM_VXRS_HIGH 16
-#ifndef __s390x__
-
-/* Has to be at least _NSIG_WORDS from asm/signal.h */
-#define _SIGCONTEXT_NSIG 64
-#define _SIGCONTEXT_NSIG_BPW 32
-/* Size of stack frame allocated when calling signal handler. */
-#define __SIGNAL_FRAMESIZE 96
-
-#else /* __s390x__ */
-
/* Has to be at least _NSIG_WORDS from asm/signal.h */
#define _SIGCONTEXT_NSIG 64
#define _SIGCONTEXT_NSIG_BPW 64
/* Size of stack frame allocated when calling signal handler. */
#define __SIGNAL_FRAMESIZE 160
-#endif /* __s390x__ */
-
#define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
#define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
@@ -66,9 +54,6 @@ typedef struct
typedef struct
{
-#ifndef __s390x__
- unsigned long gprs_high[__NUM_GPRS];
-#endif
unsigned long long vxrs_low[__NUM_VXRS_LOW];
__vector128 vxrs_high[__NUM_VXRS_HIGH];
unsigned char __reserved[128];
diff --git a/lib/libc/include/s390x-linux-any/asm/stat.h b/lib/libc/include/s390x-linux-any/asm/stat.h
index d80b769eb8..bc9be64b30 100644
--- a/lib/libc/include/s390x-linux-any/asm/stat.h
+++ b/lib/libc/include/s390x-linux-any/asm/stat.h
@@ -8,74 +8,6 @@
#ifndef _S390_STAT_H
#define _S390_STAT_H
-#ifndef __s390x__
-struct __old_kernel_stat {
- unsigned short st_dev;
- unsigned short st_ino;
- unsigned short st_mode;
- unsigned short st_nlink;
- unsigned short st_uid;
- unsigned short st_gid;
- unsigned short st_rdev;
- unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
-};
-
-struct stat {
- unsigned short st_dev;
- unsigned short __pad1;
- unsigned long st_ino;
- unsigned short st_mode;
- unsigned short st_nlink;
- unsigned short st_uid;
- unsigned short st_gid;
- unsigned short st_rdev;
- unsigned short __pad2;
- unsigned long st_size;
- unsigned long st_blksize;
- unsigned long st_blocks;
- unsigned long st_atime;
- unsigned long st_atime_nsec;
- unsigned long st_mtime;
- unsigned long st_mtime_nsec;
- unsigned long st_ctime;
- unsigned long st_ctime_nsec;
- unsigned long __unused4;
- unsigned long __unused5;
-};
-
-/* This matches struct stat64 in glibc2.1, hence the absolutely
- * insane amounts of padding around dev_t's.
- */
-struct stat64 {
- unsigned long long st_dev;
- unsigned int __pad1;
-#define STAT64_HAS_BROKEN_ST_INO 1
- unsigned long __st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
- unsigned long st_uid;
- unsigned long st_gid;
- unsigned long long st_rdev;
- unsigned int __pad3;
- long long st_size;
- unsigned long st_blksize;
- unsigned char __pad4[4];
- unsigned long __pad5; /* future possible st_blocks high bits */
- unsigned long st_blocks; /* Number 512-byte blocks allocated. */
- unsigned long st_atime;
- unsigned long st_atime_nsec;
- unsigned long st_mtime;
- unsigned long st_mtime_nsec;
- unsigned long st_ctime;
- unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
- unsigned long long st_ino;
-};
-
-#else /* __s390x__ */
-
struct stat {
unsigned long st_dev;
unsigned long st_ino;
@@ -97,8 +29,6 @@ struct stat {
unsigned long __unused[3];
};
-#endif /* __s390x__ */
-
#define STAT_HAVE_NSEC 1
#endif
\ No newline at end of file
diff --git a/lib/libc/include/s390x-linux-any/asm/unistd.h b/lib/libc/include/s390x-linux-any/asm/unistd.h
index ff8aef3f46..e8427e5632 100644
--- a/lib/libc/include/s390x-linux-any/asm/unistd.h
+++ b/lib/libc/include/s390x-linux-any/asm/unistd.h
@@ -8,10 +8,6 @@
#ifndef _ASM_S390_UNISTD_H_
#define _ASM_S390_UNISTD_H_
-#ifdef __s390x__
#include
-#else
-#include
-#endif
#endif /* _ASM_S390_UNISTD_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/s390x-linux-any/asm/unistd_32.h b/lib/libc/include/s390x-linux-any/asm/unistd_32.h
deleted file mode 100644
index c7af184562..0000000000
--- a/lib/libc/include/s390x-linux-any/asm/unistd_32.h
+++ /dev/null
@@ -1,446 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ASM_S390_UNISTD_32_H
-#define _ASM_S390_UNISTD_32_H
-
-#define __NR_exit 1
-#define __NR_fork 2
-#define __NR_read 3
-#define __NR_write 4
-#define __NR_open 5
-#define __NR_close 6
-#define __NR_restart_syscall 7
-#define __NR_creat 8
-#define __NR_link 9
-#define __NR_unlink 10
-#define __NR_execve 11
-#define __NR_chdir 12
-#define __NR_time 13
-#define __NR_mknod 14
-#define __NR_chmod 15
-#define __NR_lchown 16
-#define __NR_lseek 19
-#define __NR_getpid 20
-#define __NR_mount 21
-#define __NR_umount 22
-#define __NR_setuid 23
-#define __NR_getuid 24
-#define __NR_stime 25
-#define __NR_ptrace 26
-#define __NR_alarm 27
-#define __NR_pause 29
-#define __NR_utime 30
-#define __NR_access 33
-#define __NR_nice 34
-#define __NR_sync 36
-#define __NR_kill 37
-#define __NR_rename 38
-#define __NR_mkdir 39
-#define __NR_rmdir 40
-#define __NR_dup 41
-#define __NR_pipe 42
-#define __NR_times 43
-#define __NR_brk 45
-#define __NR_setgid 46
-#define __NR_getgid 47
-#define __NR_signal 48
-#define __NR_geteuid 49
-#define __NR_getegid 50
-#define __NR_acct 51
-#define __NR_umount2 52
-#define __NR_ioctl 54
-#define __NR_fcntl 55
-#define __NR_setpgid 57
-#define __NR_umask 60
-#define __NR_chroot 61
-#define __NR_ustat 62
-#define __NR_dup2 63
-#define __NR_getppid 64
-#define __NR_getpgrp 65
-#define __NR_setsid 66
-#define __NR_sigaction 67
-#define __NR_setreuid 70
-#define __NR_setregid 71
-#define __NR_sigsuspend 72
-#define __NR_sigpending 73
-#define __NR_sethostname 74
-#define __NR_setrlimit 75
-#define __NR_getrlimit 76
-#define __NR_getrusage 77
-#define __NR_gettimeofday 78
-#define __NR_settimeofday 79
-#define __NR_getgroups 80
-#define __NR_setgroups 81
-#define __NR_symlink 83
-#define __NR_readlink 85
-#define __NR_uselib 86
-#define __NR_swapon 87
-#define __NR_reboot 88
-#define __NR_readdir 89
-#define __NR_mmap 90
-#define __NR_munmap 91
-#define __NR_truncate 92
-#define __NR_ftruncate 93
-#define __NR_fchmod 94
-#define __NR_fchown 95
-#define __NR_getpriority 96
-#define __NR_setpriority 97
-#define __NR_statfs 99
-#define __NR_fstatfs 100
-#define __NR_ioperm 101
-#define __NR_socketcall 102
-#define __NR_syslog 103
-#define __NR_setitimer 104
-#define __NR_getitimer 105
-#define __NR_stat 106
-#define __NR_lstat 107
-#define __NR_fstat 108
-#define __NR_lookup_dcookie 110
-#define __NR_vhangup 111
-#define __NR_idle 112
-#define __NR_wait4 114
-#define __NR_swapoff 115
-#define __NR_sysinfo 116
-#define __NR_ipc 117
-#define __NR_fsync 118
-#define __NR_sigreturn 119
-#define __NR_clone 120
-#define __NR_setdomainname 121
-#define __NR_uname 122
-#define __NR_adjtimex 124
-#define __NR_mprotect 125
-#define __NR_sigprocmask 126
-#define __NR_create_module 127
-#define __NR_init_module 128
-#define __NR_delete_module 129
-#define __NR_get_kernel_syms 130
-#define __NR_quotactl 131
-#define __NR_getpgid 132
-#define __NR_fchdir 133
-#define __NR_bdflush 134
-#define __NR_sysfs 135
-#define __NR_personality 136
-#define __NR_afs_syscall 137
-#define __NR_setfsuid 138
-#define __NR_setfsgid 139
-#define __NR__llseek 140
-#define __NR_getdents 141
-#define __NR__newselect 142
-#define __NR_flock 143
-#define __NR_msync 144
-#define __NR_readv 145
-#define __NR_writev 146
-#define __NR_getsid 147
-#define __NR_fdatasync 148
-#define __NR__sysctl 149
-#define __NR_mlock 150
-#define __NR_munlock 151
-#define __NR_mlockall 152
-#define __NR_munlockall 153
-#define __NR_sched_setparam 154
-#define __NR_sched_getparam 155
-#define __NR_sched_setscheduler 156
-#define __NR_sched_getscheduler 157
-#define __NR_sched_yield 158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval 161
-#define __NR_nanosleep 162
-#define __NR_mremap 163
-#define __NR_setresuid 164
-#define __NR_getresuid 165
-#define __NR_query_module 167
-#define __NR_poll 168
-#define __NR_nfsservctl 169
-#define __NR_setresgid 170
-#define __NR_getresgid 171
-#define __NR_prctl 172
-#define __NR_rt_sigreturn 173
-#define __NR_rt_sigaction 174
-#define __NR_rt_sigprocmask 175
-#define __NR_rt_sigpending 176
-#define __NR_rt_sigtimedwait 177
-#define __NR_rt_sigqueueinfo 178
-#define __NR_rt_sigsuspend 179
-#define __NR_pread64 180
-#define __NR_pwrite64 181
-#define __NR_chown 182
-#define __NR_getcwd 183
-#define __NR_capget 184
-#define __NR_capset 185
-#define __NR_sigaltstack 186
-#define __NR_sendfile 187
-#define __NR_getpmsg 188
-#define __NR_putpmsg 189
-#define __NR_vfork 190
-#define __NR_ugetrlimit 191
-#define __NR_mmap2 192
-#define __NR_truncate64 193
-#define __NR_ftruncate64 194
-#define __NR_stat64 195
-#define __NR_lstat64 196
-#define __NR_fstat64 197
-#define __NR_lchown32 198
-#define __NR_getuid32 199
-#define __NR_getgid32 200
-#define __NR_geteuid32 201
-#define __NR_getegid32 202
-#define __NR_setreuid32 203
-#define __NR_setregid32 204
-#define __NR_getgroups32 205
-#define __NR_setgroups32 206
-#define __NR_fchown32 207
-#define __NR_setresuid32 208
-#define __NR_getresuid32 209
-#define __NR_setresgid32 210
-#define __NR_getresgid32 211
-#define __NR_chown32 212
-#define __NR_setuid32 213
-#define __NR_setgid32 214
-#define __NR_setfsuid32 215
-#define __NR_setfsgid32 216
-#define __NR_pivot_root 217
-#define __NR_mincore 218
-#define __NR_madvise 219
-#define __NR_getdents64 220
-#define __NR_fcntl64 221
-#define __NR_readahead 222
-#define __NR_sendfile64 223
-#define __NR_setxattr 224
-#define __NR_lsetxattr 225
-#define __NR_fsetxattr 226
-#define __NR_getxattr 227
-#define __NR_lgetxattr 228
-#define __NR_fgetxattr 229
-#define __NR_listxattr 230
-#define __NR_llistxattr 231
-#define __NR_flistxattr 232
-#define __NR_removexattr 233
-#define __NR_lremovexattr 234
-#define __NR_fremovexattr 235
-#define __NR_gettid 236
-#define __NR_tkill 237
-#define __NR_futex 238
-#define __NR_sched_setaffinity 239
-#define __NR_sched_getaffinity 240
-#define __NR_tgkill 241
-#define __NR_io_setup 243
-#define __NR_io_destroy 244
-#define __NR_io_getevents 245
-#define __NR_io_submit 246
-#define __NR_io_cancel 247
-#define __NR_exit_group 248
-#define __NR_epoll_create 249
-#define __NR_epoll_ctl 250
-#define __NR_epoll_wait 251
-#define __NR_set_tid_address 252
-#define __NR_fadvise64 253
-#define __NR_timer_create 254
-#define __NR_timer_settime 255
-#define __NR_timer_gettime 256
-#define __NR_timer_getoverrun 257
-#define __NR_timer_delete 258
-#define __NR_clock_settime 259
-#define __NR_clock_gettime 260
-#define __NR_clock_getres 261
-#define __NR_clock_nanosleep 262
-#define __NR_fadvise64_64 264
-#define __NR_statfs64 265
-#define __NR_fstatfs64 266
-#define __NR_remap_file_pages 267
-#define __NR_mbind 268
-#define __NR_get_mempolicy 269
-#define __NR_set_mempolicy 270
-#define __NR_mq_open 271
-#define __NR_mq_unlink 272
-#define __NR_mq_timedsend 273
-#define __NR_mq_timedreceive 274
-#define __NR_mq_notify 275
-#define __NR_mq_getsetattr 276
-#define __NR_kexec_load 277
-#define __NR_add_key 278
-#define __NR_request_key 279
-#define __NR_keyctl 280
-#define __NR_waitid 281
-#define __NR_ioprio_set 282
-#define __NR_ioprio_get 283
-#define __NR_inotify_init 284
-#define __NR_inotify_add_watch 285
-#define __NR_inotify_rm_watch 286
-#define __NR_migrate_pages 287
-#define __NR_openat 288
-#define __NR_mkdirat 289
-#define __NR_mknodat 290
-#define __NR_fchownat 291
-#define __NR_futimesat 292
-#define __NR_fstatat64 293
-#define __NR_unlinkat 294
-#define __NR_renameat 295
-#define __NR_linkat 296
-#define __NR_symlinkat 297
-#define __NR_readlinkat 298
-#define __NR_fchmodat 299
-#define __NR_faccessat 300
-#define __NR_pselect6 301
-#define __NR_ppoll 302
-#define __NR_unshare 303
-#define __NR_set_robust_list 304
-#define __NR_get_robust_list 305
-#define __NR_splice 306
-#define __NR_sync_file_range 307
-#define __NR_tee 308
-#define __NR_vmsplice 309
-#define __NR_move_pages 310
-#define __NR_getcpu 311
-#define __NR_epoll_pwait 312
-#define __NR_utimes 313
-#define __NR_fallocate 314
-#define __NR_utimensat 315
-#define __NR_signalfd 316
-#define __NR_timerfd 317
-#define __NR_eventfd 318
-#define __NR_timerfd_create 319
-#define __NR_timerfd_settime 320
-#define __NR_timerfd_gettime 321
-#define __NR_signalfd4 322
-#define __NR_eventfd2 323
-#define __NR_inotify_init1 324
-#define __NR_pipe2 325
-#define __NR_dup3 326
-#define __NR_epoll_create1 327
-#define __NR_preadv 328
-#define __NR_pwritev 329
-#define __NR_rt_tgsigqueueinfo 330
-#define __NR_perf_event_open 331
-#define __NR_fanotify_init 332
-#define __NR_fanotify_mark 333
-#define __NR_prlimit64 334
-#define __NR_name_to_handle_at 335
-#define __NR_open_by_handle_at 336
-#define __NR_clock_adjtime 337
-#define __NR_syncfs 338
-#define __NR_setns 339
-#define __NR_process_vm_readv 340
-#define __NR_process_vm_writev 341
-#define __NR_s390_runtime_instr 342
-#define __NR_kcmp 343
-#define __NR_finit_module 344
-#define __NR_sched_setattr 345
-#define __NR_sched_getattr 346
-#define __NR_renameat2 347
-#define __NR_seccomp 348
-#define __NR_getrandom 349
-#define __NR_memfd_create 350
-#define __NR_bpf 351
-#define __NR_s390_pci_mmio_write 352
-#define __NR_s390_pci_mmio_read 353
-#define __NR_execveat 354
-#define __NR_userfaultfd 355
-#define __NR_membarrier 356
-#define __NR_recvmmsg 357
-#define __NR_sendmmsg 358
-#define __NR_socket 359
-#define __NR_socketpair 360
-#define __NR_bind 361
-#define __NR_connect 362
-#define __NR_listen 363
-#define __NR_accept4 364
-#define __NR_getsockopt 365
-#define __NR_setsockopt 366
-#define __NR_getsockname 367
-#define __NR_getpeername 368
-#define __NR_sendto 369
-#define __NR_sendmsg 370
-#define __NR_recvfrom 371
-#define __NR_recvmsg 372
-#define __NR_shutdown 373
-#define __NR_mlock2 374
-#define __NR_copy_file_range 375
-#define __NR_preadv2 376
-#define __NR_pwritev2 377
-#define __NR_s390_guarded_storage 378
-#define __NR_statx 379
-#define __NR_s390_sthyi 380
-#define __NR_kexec_file_load 381
-#define __NR_io_pgetevents 382
-#define __NR_rseq 383
-#define __NR_pkey_mprotect 384
-#define __NR_pkey_alloc 385
-#define __NR_pkey_free 386
-#define __NR_semget 393
-#define __NR_semctl 394
-#define __NR_shmget 395
-#define __NR_shmctl 396
-#define __NR_shmat 397
-#define __NR_shmdt 398
-#define __NR_msgget 399
-#define __NR_msgsnd 400
-#define __NR_msgrcv 401
-#define __NR_msgctl 402
-#define __NR_clock_gettime64 403
-#define __NR_clock_settime64 404
-#define __NR_clock_adjtime64 405
-#define __NR_clock_getres_time64 406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64 408
-#define __NR_timer_settime64 409
-#define __NR_timerfd_gettime64 410
-#define __NR_timerfd_settime64 411
-#define __NR_utimensat_time64 412
-#define __NR_pselect6_time64 413
-#define __NR_ppoll_time64 414
-#define __NR_io_pgetevents_time64 416
-#define __NR_recvmmsg_time64 417
-#define __NR_mq_timedsend_time64 418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64 420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64 422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal 424
-#define __NR_io_uring_setup 425
-#define __NR_io_uring_enter 426
-#define __NR_io_uring_register 427
-#define __NR_open_tree 428
-#define __NR_move_mount 429
-#define __NR_fsopen 430
-#define __NR_fsconfig 431
-#define __NR_fsmount 432
-#define __NR_fspick 433
-#define __NR_pidfd_open 434
-#define __NR_clone3 435
-#define __NR_close_range 436
-#define __NR_openat2 437
-#define __NR_pidfd_getfd 438
-#define __NR_faccessat2 439
-#define __NR_process_madvise 440
-#define __NR_epoll_pwait2 441
-#define __NR_mount_setattr 442
-#define __NR_quotactl_fd 443
-#define __NR_landlock_create_ruleset 444
-#define __NR_landlock_add_rule 445
-#define __NR_landlock_restrict_self 446
-#define __NR_memfd_secret 447
-#define __NR_process_mrelease 448
-#define __NR_futex_waitv 449
-#define __NR_set_mempolicy_home_node 450
-#define __NR_cachestat 451
-#define __NR_fchmodat2 452
-#define __NR_map_shadow_stack 453
-#define __NR_futex_wake 454
-#define __NR_futex_wait 455
-#define __NR_futex_requeue 456
-#define __NR_statmount 457
-#define __NR_listmount 458
-#define __NR_lsm_get_self_attr 459
-#define __NR_lsm_set_self_attr 460
-#define __NR_lsm_list_modules 461
-#define __NR_mseal 462
-#define __NR_setxattrat 463
-#define __NR_getxattrat 464
-#define __NR_listxattrat 465
-#define __NR_removexattrat 466
-#define __NR_open_tree_attr 467
-#define __NR_file_getattr 468
-#define __NR_file_setattr 469
-
-#endif /* _ASM_S390_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/s390x-linux-any/asm/unistd_64.h b/lib/libc/include/s390x-linux-any/asm/unistd_64.h
index e529dad8b0..bbb2740f95 100644
--- a/lib/libc/include/s390x-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/s390x-linux-any/asm/unistd_64.h
@@ -1,6 +1,5 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ASM_S390_UNISTD_64_H
-#define _ASM_S390_UNISTD_64_H
+#ifndef _ASM_UNISTD_64_H
+#define _ASM_UNISTD_64_H
#define __NR_exit 1
#define __NR_fork 2
@@ -390,5 +389,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
-#endif /* _ASM_S390_UNISTD_64_H */
\ No newline at end of file
+
+#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/s390x-linux-gnu/bits/elfclass.h b/lib/libc/include/s390x-linux-gnu/bits/elfclass.h
index a71bd938e7..325ca0fe4b 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/elfclass.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/elfclass.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/environments.h b/lib/libc/include/s390x-linux-gnu/bits/environments.h
index 2bfd9501fb..6a5d3e997c 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/environments.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/fcntl.h b/lib/libc/include/s390x-linux-gnu/bits/fcntl.h
index 4d58e01a3e..1d209c616c 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/fenv.h b/lib/libc/include/s390x-linux-gnu/bits/fenv.h
index d24ac91812..eafcaa425b 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
index 3c98a2d6a1..7fbcacd2d6 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/link.h b/lib/libc/include/s390x-linux-gnu/bits/link.h
index 059bd60053..96694b37a4 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/link.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/long-double.h b/lib/libc/include/s390x-linux-gnu/bits/long-double.h
index c83ef568eb..eede7634fb 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-opt version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h b/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h
index 166e47492a..7fb00d4146 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h
@@ -1,5 +1,5 @@
/* Extra sys/procfs.h definitions. S/390 version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h b/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h
index cf3fd750a4..9e8570cfe6 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. S/390 version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs.h b/lib/libc/include/s390x-linux-gnu/bits/procfs.h
index b725d09955..2805da7ab7 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. S/390 version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/rseq.h b/lib/libc/include/s390x-linux-gnu/bits/rseq.h
index ec56973f6e..44674e2877 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux s390 architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/s390x-linux-gnu/bits/setjmp.h b/lib/libc/include/s390x-linux-gnu/bits/setjmp.h
index 822f0fb325..7d660921ab 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/sigaction.h b/lib/libc/include/s390x-linux-gnu/bits/sigaction.h
index 5f38a9cb5c..44883efbe7 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/sigaction.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/sigaction.h
@@ -1,5 +1,5 @@
/* Definitions for 31 & 64 bit S/390 sigaction.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/statfs.h b/lib/libc/include/s390x-linux-gnu/bits/statfs.h
index 577bb4eace..b30fb52202 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/statfs.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h b/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h
index 504aec7fef..7fc7332115 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h
@@ -1,5 +1,5 @@
/* S390 internal mutex struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ struct __pthread_mutex_s
int __kind;
#if __WORDSIZE == 64
short __spins;
- short __elision;
+ short __unused;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
@@ -41,11 +41,10 @@ struct __pthread_mutex_s
{
struct
{
- short __espins;
- short __elision;
- } _d;
-# define __spins _d.__espins
-# define __elision _d.__elision
+ short __data_spins;
+ short __data_unused;
+ } __data;
+# define __spins __data.__data_spins
__pthread_slist_t __list;
};
# define __PTHREAD_MUTEX_HAVE_PREV 0
diff --git a/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h
index d7abdf7b31..e532dcddf6 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* S390 internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h b/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
index 95897d90ec..3d77809e22 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/timesize.h b/lib/libc/include/s390x-linux-gnu/bits/timesize.h
index 95574667cb..5c231fe380 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/s390.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/typesizes.h b/lib/libc/include/s390x-linux-gnu/bits/typesizes.h
index 1a9765ac61..5302d79b87 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
- Copyright (C) 2003-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/utmp.h b/lib/libc/include/s390x-linux-gnu/bits/utmp.h
index dfb546be1a..87db119de9 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/utmp.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/utmp.h
@@ -1,5 +1,5 @@
/* The `struct utmp' type, describing entries in the utmp file. GNU version.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/bits/utmpx.h b/lib/libc/include/s390x-linux-gnu/bits/utmpx.h
index 5ee9a5ca3a..00ed2f21a1 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/utmpx.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/utmpx.h
@@ -1,5 +1,5 @@
/* Structures and definitions for the user accounting database. GNU version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/fpu_control.h b/lib/libc/include/s390x-linux-gnu/fpu_control.h
index ed1ced7884..fc58388f4f 100644
--- a/lib/libc/include/s390x-linux-gnu/fpu_control.h
+++ b/lib/libc/include/s390x-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. Stub version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/ieee754.h b/lib/libc/include/s390x-linux-gnu/ieee754.h
index a49523c3d8..a19fd8dcd1 100644
--- a/lib/libc/include/s390x-linux-gnu/ieee754.h
+++ b/lib/libc/include/s390x-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/sys/elf.h b/lib/libc/include/s390x-linux-gnu/sys/elf.h
index ae26bc6b86..70e50aba74 100644
--- a/lib/libc/include/s390x-linux-gnu/sys/elf.h
+++ b/lib/libc/include/s390x-linux-gnu/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
index 524fdcae4b..d1eb596e8f 100644
--- a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/S390 version.
- Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/sys/ucontext.h b/lib/libc/include/s390x-linux-gnu/sys/ucontext.h
index 4e3ece22a7..a766145563 100644
--- a/lib/libc/include/s390x-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/s390x-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/s390x-linux-gnu/sys/user.h b/lib/libc/include/s390x-linux-gnu/sys/user.h
index 6e93a49d11..0155571f74 100644
--- a/lib/libc/include/s390x-linux-gnu/sys/user.h
+++ b/lib/libc/include/s390x-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-any/asm/ptrace.h b/lib/libc/include/sparc-linux-any/asm/ptrace.h
index 7035096cd5..c596b810f4 100644
--- a/lib/libc/include/sparc-linux-any/asm/ptrace.h
+++ b/lib/libc/include/sparc-linux-any/asm/ptrace.h
@@ -15,7 +15,7 @@
*/
#define PT_REGS_MAGIC 0x57ac6c00
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -88,7 +88,7 @@ struct sparc_trapf {
unsigned long _unused;
struct pt_regs *regs;
};
-#endif /* (!__ASSEMBLY__) */
+#endif /* (!__ASSEMBLER__) */
#else
/* 32 bit sparc */
@@ -97,7 +97,7 @@ struct sparc_trapf {
/* This struct defines the way the registers are stored on the
* stack during a system call and basically all traps.
*/
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -125,11 +125,11 @@ struct sparc_stackf {
unsigned long xargs[6];
unsigned long xxargs[1];
};
-#endif /* (!__ASSEMBLY__) */
+#endif /* (!__ASSEMBLER__) */
#endif /* (defined(__sparc__) && defined(__arch64__))*/
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#define TRACEREG_SZ sizeof(struct pt_regs)
#define STACKFRAME_SZ sizeof(struct sparc_stackf)
@@ -137,7 +137,7 @@ struct sparc_stackf {
#define TRACEREG32_SZ sizeof(struct pt_regs32)
#define STACKFRAME32_SZ sizeof(struct sparc_stackf32)
-#endif /* (!__ASSEMBLY__) */
+#endif /* (!__ASSEMBLER__) */
#define UREG_G0 0
#define UREG_G1 1
@@ -161,30 +161,30 @@ struct sparc_stackf {
#if defined(__sparc__) && defined(__arch64__)
/* 64 bit sparc */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
/* For assembly code. */
#define TRACEREG_SZ 0xa0
#define STACKFRAME_SZ 0xc0
#define TRACEREG32_SZ 0x50
#define STACKFRAME32_SZ 0x60
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#else /* (defined(__sparc__) && defined(__arch64__)) */
/* 32 bit sparc */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
-#else /* (!__ASSEMBLY__) */
+#else /* (!__ASSEMBLER__) */
/* For assembly code. */
#define TRACEREG_SZ 0x50
#define STACKFRAME_SZ 0x60
-#endif /* (!__ASSEMBLY__) */
+#endif /* (!__ASSEMBLER__) */
#endif /* (defined(__sparc__) && defined(__arch64__)) */
diff --git a/lib/libc/include/sparc-linux-any/asm/signal.h b/lib/libc/include/sparc-linux-any/asm/signal.h
index cf7a24e531..68db2d506d 100644
--- a/lib/libc/include/sparc-linux-any/asm/signal.h
+++ b/lib/libc/include/sparc-linux-any/asm/signal.h
@@ -105,7 +105,7 @@
#define __old_sigaction32 sigaction32
#endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
typedef unsigned long __old_sigset_t; /* at least 32 bits */
@@ -174,6 +174,6 @@ typedef struct sigaltstack {
} stack_t;
-#endif /* !(__ASSEMBLY__) */
+#endif /* !(__ASSEMBLER__) */
#endif /* __SPARC_SIGNAL_H */
\ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-any/asm/traps.h b/lib/libc/include/sparc-linux-any/asm/traps.h
index f8ea8f6cfb..15dc6894fa 100644
--- a/lib/libc/include/sparc-linux-any/asm/traps.h
+++ b/lib/libc/include/sparc-linux-any/asm/traps.h
@@ -10,8 +10,8 @@
#define NUM_SPARC_TRAPS 255
-#ifndef __ASSEMBLY__
-#endif /* !(__ASSEMBLY__) */
+#ifndef __ASSEMBLER__
+#endif /* !(__ASSEMBLER__) */
/* For patching the trap table at boot time, we need to know how to
* form various common Sparc instructions. Thus these macros...
diff --git a/lib/libc/include/sparc-linux-any/asm/unistd_32.h b/lib/libc/include/sparc-linux-any/asm/unistd_32.h
index c800914ee3..7a72b432c9 100644
--- a/lib/libc/include/sparc-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/sparc-linux-any/asm/unistd_32.h
@@ -439,6 +439,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-any/asm/unistd_64.h b/lib/libc/include/sparc-linux-any/asm/unistd_64.h
index cd8586e657..7509b1c69d 100644
--- a/lib/libc/include/sparc-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/sparc-linux-any/asm/unistd_64.h
@@ -402,6 +402,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-any/asm/utrap.h b/lib/libc/include/sparc-linux-any/asm/utrap.h
index 4bc0f926b3..1b1bedbe21 100644
--- a/lib/libc/include/sparc-linux-any/asm/utrap.h
+++ b/lib/libc/include/sparc-linux-any/asm/utrap.h
@@ -44,9 +44,9 @@
#define UTH_NOCHANGE (-1)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
typedef int utrap_entry_t;
typedef void *utrap_handler_t;
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* !(__ASM_SPARC64_PROCESSOR_H) */
\ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-gnu/bits/environments.h b/lib/libc/include/sparc-linux-gnu/bits/environments.h
index 5a19b4cbd4..1f7533af49 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/environments.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/epoll.h b/lib/libc/include/sparc-linux-gnu/bits/epoll.h
index 424774be93..a941b8d08b 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/epoll.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/errno.h b/lib/libc/include/sparc-linux-gnu/bits/errno.h
index 64526c7bf3..906432afa2 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/errno.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux/Sparc specific version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/eventfd.h b/lib/libc/include/sparc-linux-gnu/bits/eventfd.h
index fac0f29227..df3bb9acdd 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/eventfd.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/fcntl.h b/lib/libc/include/sparc-linux-gnu/bits/fcntl.h
index d51a7873a3..4f14c87748 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/SPARC.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/fenv.h b/lib/libc/include/sparc-linux-gnu/bits/fenv.h
index 2fac04873e..08a73630a1 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/hwcap.h b/lib/libc/include/sparc-linux-gnu/bits/hwcap.h
index 409da7f39c..75283675a0 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/hwcap.h
@@ -1,5 +1,5 @@
/* Defines for bits in AT_HWCAP.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/inotify.h b/lib/libc/include/sparc-linux-gnu/bits/inotify.h
index e68756189b..e40de6bae2 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/inotify.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/ioctls.h b/lib/libc/include/sparc-linux-gnu/bits/ioctls.h
index f35894212f..38af369b12 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/ioctls.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/ioctls.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h b/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h
index cfa9c532fc..13e4fc3db5 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h
@@ -1,5 +1,5 @@
/* struct ipc_perm definition. Linux/sparc version.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/link.h b/lib/libc/include/sparc-linux-gnu/bits/link.h
index b785272609..b42bcae683 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/link.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/link.h
@@ -1,5 +1,5 @@
/* Machine-specific audit interfaces for dynamic linker. SPARC version.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/long-double.h b/lib/libc/include/sparc-linux-gnu/bits/long-double.h
index 608d7e066f..da1ea20fb3 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. SPARC version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/mman.h b/lib/libc/include/sparc-linux-gnu/bits/mman.h
index 28c384b761..1e58534e45 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/mman.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/SPARC version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/poll.h b/lib/libc/include/sparc-linux-gnu/bits/poll.h
index b881b0803f..fedffb047a 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/poll.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h b/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h
index 3149f4c84e..3e02bcfcff 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h
@@ -1,5 +1,5 @@
/* Extra sys/procfs.h definitions. SPARC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h b/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h
index 08db45b76d..e738ed239c 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs.h b/lib/libc/include/sparc-linux-gnu/bits/procfs.h
index f4f204a2bb..14503b5968 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. SPARC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
index baa588c020..355026a739 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
@@ -1,5 +1,5 @@
/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/resource.h b/lib/libc/include/sparc-linux-gnu/bits/resource.h
index c9b20dff54..7947dfc385 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/resource.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux/SPARC version.
- Copyright (C) 1994-2025 Free Software Foundation, Inc.
+ Copyright (C) 1994-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/rseq.h b/lib/libc/include/sparc-linux-gnu/bits/rseq.h
index 90b3e9804a..a844012dd3 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences architecture header. Stub version.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/sparc-linux-gnu/bits/setjmp.h b/lib/libc/include/sparc-linux-gnu/bits/setjmp.h
index 8fb2bb1167..2ed4b06c58 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/shmlba.h b/lib/libc/include/sparc-linux-gnu/bits/shmlba.h
index 49f9ae58af..8bc00d9bd0 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/shmlba.h
@@ -1,5 +1,5 @@
/* Define SHMLBA. SPARC version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigaction.h b/lib/libc/include/sparc-linux-gnu/bits/sigaction.h
index 3ef3e0d97a..9b1925e6a7 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/sigaction.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/SPARC sigaction.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h b/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h
index 20ca9e2435..836c2cf392 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/signalfd.h b/lib/libc/include/sparc-linux-gnu/bits/signalfd.h
index 2dc0e606c9..e4c5fc6615 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/signalfd.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h b/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h
index 152e9a4038..f3bdc98869 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/SPARC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigstack.h b/lib/libc/include/sparc-linux-gnu/bits/sigstack.h
index 42d3c1ba97..54469ca3a6 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/sigstack.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- Copyright (C) 1998-2025 Free Software Foundation, Inc.
+ Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
index e9e2715d00..8f50b2f50a 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
@@ -1,5 +1,5 @@
/* Socket constants which vary among Linux architectures. Version for SPARC.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/socket_type.h b/lib/libc/include/sparc-linux-gnu/bits/socket_type.h
index f9acac3267..d3dcbc2dc4 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/socket_type.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/socket_type.h
@@ -1,5 +1,5 @@
/* Define enum __socket_type for Linux/SPARC.
- Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h
index 4624608724..e9df79b378 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* SPARC internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/sparc-linux-gnu/bits/struct_stat.h b/lib/libc/include/sparc-linux-gnu/bits/struct_stat.h
index a43cb63dde..4fc383d6e0 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h
index 989b895de6..164558d553 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h
@@ -1,5 +1,5 @@
/* termios c_cc symbolic constant definitions. Linux/sparc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h
index 036be52447..51990c0387 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h
@@ -1,5 +1,5 @@
/* termios output mode definitions. Linux/sparc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-cbaud.h b/lib/libc/include/sparc-linux-gnu/bits/termios-cbaud.h
index e848a18538..7e916fddc9 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/termios-cbaud.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/termios-cbaud.h
@@ -1,5 +1,5 @@
/* termios baud rate selection definitions. Linux/sparc version.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/timerfd.h b/lib/libc/include/sparc-linux-gnu/bits/timerfd.h
index 32e03256e3..496aff1cc9 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/timerfd.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/timesize.h b/lib/libc/include/sparc-linux-gnu/bits/timesize.h
index d020c10c6e..06bd725e1e 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, Linux/sparc.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h
index 6d0f2b9a8e..4566442ad0 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h
@@ -1,5 +1,5 @@
/* Linux/SPARC implementation of the SysV message struct msqid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h
index f8db7f00d3..b3f59d96b8 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
/* Sparc implementation of the semaphore struct semid_ds
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h
index 88d72bb4af..678737c3e4 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h
@@ -1,5 +1,5 @@
/* Linux/SPARC implementation of the shared memory struct shmid_ds.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/bits/typesizes.h b/lib/libc/include/sparc-linux-gnu/bits/typesizes.h
index e283787261..2eb70bdf1d 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
- Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/fpu_control.h b/lib/libc/include/sparc-linux-gnu/fpu_control.h
index 94d7424edb..40b1a50e1e 100644
--- a/lib/libc/include/sparc-linux-gnu/fpu_control.h
+++ b/lib/libc/include/sparc-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. SPARC version.
- Copyright (C) 1997-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/ieee754.h b/lib/libc/include/sparc-linux-gnu/ieee754.h
index a49523c3d8..a19fd8dcd1 100644
--- a/lib/libc/include/sparc-linux-gnu/ieee754.h
+++ b/lib/libc/include/sparc-linux-gnu/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/sys/ptrace.h b/lib/libc/include/sparc-linux-gnu/sys/ptrace.h
index 3add6c1188..76ab8464aa 100644
--- a/lib/libc/include/sparc-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/sparc-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/SPARC version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/sys/ucontext.h b/lib/libc/include/sparc-linux-gnu/sys/ucontext.h
index cd5938a754..8b386aa17f 100644
--- a/lib/libc/include/sparc-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/sparc-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/sparc-linux-gnu/sys/user.h b/lib/libc/include/sparc-linux-gnu/sys/user.h
index b45cb81aa6..50bc760406 100644
--- a/lib/libc/include/sparc-linux-gnu/sys/user.h
+++ b/lib/libc/include/sparc-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-any/asm/kvm.h b/lib/libc/include/x86-linux-any/asm/kvm.h
index caf6af2ea1..39dc18a9d2 100644
--- a/lib/libc/include/x86-linux-any/asm/kvm.h
+++ b/lib/libc/include/x86-linux-any/asm/kvm.h
@@ -35,6 +35,11 @@
#define MC_VECTOR 18
#define XM_VECTOR 19
#define VE_VECTOR 20
+#define CP_VECTOR 21
+
+#define HV_VECTOR 28
+#define VC_VECTOR 29
+#define SX_VECTOR 30
/* Select x86 specific features in */
#define __KVM_HAVE_PIT
@@ -409,6 +414,35 @@ struct kvm_xcrs {
__u64 padding[16];
};
+#define KVM_X86_REG_TYPE_MSR 2
+#define KVM_X86_REG_TYPE_KVM 3
+
+#define KVM_X86_KVM_REG_SIZE(reg) \
+({ \
+ reg == KVM_REG_GUEST_SSP ? KVM_REG_SIZE_U64 : 0; \
+})
+
+#define KVM_X86_REG_TYPE_SIZE(type, reg) \
+({ \
+ __u64 type_size = (__u64)type << 32; \
+ \
+ type_size |= type == KVM_X86_REG_TYPE_MSR ? KVM_REG_SIZE_U64 : \
+ type == KVM_X86_REG_TYPE_KVM ? KVM_X86_KVM_REG_SIZE(reg) : \
+ 0; \
+ type_size; \
+})
+
+#define KVM_X86_REG_ID(type, index) \
+ (KVM_REG_X86 | KVM_X86_REG_TYPE_SIZE(type, index) | index)
+
+#define KVM_X86_REG_MSR(index) \
+ KVM_X86_REG_ID(KVM_X86_REG_TYPE_MSR, index)
+#define KVM_X86_REG_KVM(index) \
+ KVM_X86_REG_ID(KVM_X86_REG_TYPE_KVM, index)
+
+/* KVM-defined registers starting from 0 */
+#define KVM_REG_GUEST_SSP 0
+
#define KVM_SYNC_X86_REGS (1UL << 0)
#define KVM_SYNC_X86_SREGS (1UL << 1)
#define KVM_SYNC_X86_EVENTS (1UL << 2)
@@ -466,6 +500,7 @@ struct kvm_sync_regs {
/* vendor-specific groups and attributes for system fd */
#define KVM_X86_GRP_SEV 1
# define KVM_X86_SEV_VMSA_FEATURES 0
+# define KVM_X86_SNP_POLICY_BITS 1
struct kvm_vmx_nested_state_data {
__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
diff --git a/lib/libc/include/x86-linux-any/asm/processor-flags.h b/lib/libc/include/x86-linux-any/asm/processor-flags.h
index ea4a94f637..a84acbaf3d 100644
--- a/lib/libc/include/x86-linux-any/asm/processor-flags.h
+++ b/lib/libc/include/x86-linux-any/asm/processor-flags.h
@@ -136,6 +136,8 @@
#define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT)
#define X86_CR4_CET_BIT 23 /* enable Control-flow Enforcement Technology */
#define X86_CR4_CET _BITUL(X86_CR4_CET_BIT)
+#define X86_CR4_LASS_BIT 27 /* enable Linear Address Space Separation support */
+#define X86_CR4_LASS _BITUL(X86_CR4_LASS_BIT)
#define X86_CR4_LAM_SUP_BIT 28 /* LAM for supervisor pointers */
#define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT)
diff --git a/lib/libc/include/x86-linux-any/asm/sgx.h b/lib/libc/include/x86-linux-any/asm/sgx.h
index e5339772ed..96f549676e 100644
--- a/lib/libc/include/x86-linux-any/asm/sgx.h
+++ b/lib/libc/include/x86-linux-any/asm/sgx.h
@@ -10,7 +10,7 @@
/**
* enum sgx_page_flags - page control flags
- * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of
+ * @SGX_PAGE_MEASURE: Measure the page contents with a sequence of
* ENCLS[EEXTEND] operations.
*/
enum sgx_page_flags {
@@ -143,6 +143,12 @@ struct sgx_enclave_run;
/**
* typedef sgx_enclave_user_handler_t - Exit handler function accepted by
* __vdso_sgx_enter_enclave()
+ * @rdi: RDI at the time of EEXIT, undefined on AEX
+ * @rsi: RSI at the time of EEXIT, undefined on AEX
+ * @rdx: RDX at the time of EEXIT, undefined on AEX
+ * @rsp: RSP (untrusted) at the time of EEXIT or AEX
+ * @r8: R8 at the time of EEXIT, undefined on AEX
+ * @r9: R9 at the time of EEXIT, undefined on AEX
* @run: The run instance given by the caller
*
* The register parameters contain the snapshot of their values at enclave
@@ -166,7 +172,7 @@ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,
* @exception_addr: The address that triggered the exception
* @user_handler: User provided callback run on exception
* @user_data: Data passed to the user handler
- * @reserved Reserved for future extensions
+ * @reserved: Reserved for future extensions
*
* If @user_handler is provided, the handler will be invoked on all return paths
* of the normal flow. The user handler may transfer control, e.g. via a
diff --git a/lib/libc/include/x86-linux-any/asm/svm.h b/lib/libc/include/x86-linux-any/asm/svm.h
index 38b353cb68..eedc7f29f4 100644
--- a/lib/libc/include/x86-linux-any/asm/svm.h
+++ b/lib/libc/include/x86-linux-any/asm/svm.h
@@ -118,6 +118,10 @@
#define SVM_VMGEXIT_AP_CREATE 1
#define SVM_VMGEXIT_AP_DESTROY 2
#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018
+#define SVM_VMGEXIT_SAVIC 0x8000001a
+#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0
+#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1
+#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL
#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe
#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
diff --git a/lib/libc/include/x86-linux-any/asm/unistd_32.h b/lib/libc/include/x86-linux-any/asm/unistd_32.h
index 92b6fe12b9..7657717b82 100644
--- a/lib/libc/include/x86-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/x86-linux-any/asm/unistd_32.h
@@ -460,6 +460,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/include/x86-linux-any/asm/unistd_64.h b/lib/libc/include/x86-linux-any/asm/unistd_64.h
index aa4a20ca85..a2878fea0d 100644
--- a/lib/libc/include/x86-linux-any/asm/unistd_64.h
+++ b/lib/libc/include/x86-linux-any/asm/unistd_64.h
@@ -337,6 +337,7 @@
#define __NR_io_pgetevents 333
#define __NR_rseq 334
#define __NR_uretprobe 335
+#define __NR_uprobe 336
#define __NR_pidfd_send_signal 424
#define __NR_io_uring_setup 425
#define __NR_io_uring_enter 426
@@ -383,6 +384,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
diff --git a/lib/libc/include/x86-linux-any/asm/unistd_x32.h b/lib/libc/include/x86-linux-any/asm/unistd_x32.h
index 56845ed56c..70e4dab302 100644
--- a/lib/libc/include/x86-linux-any/asm/unistd_x32.h
+++ b/lib/libc/include/x86-linux-any/asm/unistd_x32.h
@@ -290,6 +290,7 @@
#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)
#define __NR_rseq (__X32_SYSCALL_BIT + 334)
#define __NR_uretprobe (__X32_SYSCALL_BIT + 335)
+#define __NR_uprobe (__X32_SYSCALL_BIT + 336)
#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424)
#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425)
#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426)
@@ -336,6 +337,7 @@
#define __NR_open_tree_attr (__X32_SYSCALL_BIT + 467)
#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)
#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
+#define __NR_listns (__X32_SYSCALL_BIT + 470)
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
diff --git a/lib/libc/include/x86-linux-any/asm/vmx.h b/lib/libc/include/x86-linux-any/asm/vmx.h
index 252e469b73..e1e6afa2b3 100644
--- a/lib/libc/include/x86-linux-any/asm/vmx.h
+++ b/lib/libc/include/x86-linux-any/asm/vmx.h
@@ -93,7 +93,10 @@
#define EXIT_REASON_TPAUSE 68
#define EXIT_REASON_BUS_LOCK 74
#define EXIT_REASON_NOTIFY 75
+#define EXIT_REASON_SEAMCALL 76
#define EXIT_REASON_TDCALL 77
+#define EXIT_REASON_MSR_READ_IMM 84
+#define EXIT_REASON_MSR_WRITE_IMM 85
#define VMX_EXIT_REASONS \
{ EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \
@@ -158,7 +161,9 @@
{ EXIT_REASON_TPAUSE, "TPAUSE" }, \
{ EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \
{ EXIT_REASON_NOTIFY, "NOTIFY" }, \
- { EXIT_REASON_TDCALL, "TDCALL" }
+ { EXIT_REASON_TDCALL, "TDCALL" }, \
+ { EXIT_REASON_MSR_READ_IMM, "MSR_READ_IMM" }, \
+ { EXIT_REASON_MSR_WRITE_IMM, "MSR_WRITE_IMM" }
#define VMX_EXIT_REASON_FLAGS \
{ VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }
diff --git a/lib/libc/include/x86-linux-gnu/bits/dl_find_object.h b/lib/libc/include/x86-linux-gnu/bits/dl_find_object.h
index dfe01a8651..00095a2f02 100644
--- a/lib/libc/include/x86-linux-gnu/bits/dl_find_object.h
+++ b/lib/libc/include/x86-linux-gnu/bits/dl_find_object.h
@@ -1,5 +1,5 @@
/* x86 definitions for finding objects.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/environments.h b/lib/libc/include/x86-linux-gnu/bits/environments.h
index a7c4ebb29c..77316861ec 100644
--- a/lib/libc/include/x86-linux-gnu/bits/environments.h
+++ b/lib/libc/include/x86-linux-gnu/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/epoll.h b/lib/libc/include/x86-linux-gnu/bits/epoll.h
index 3fd9ba0e8f..7861c15c74 100644
--- a/lib/libc/include/x86-linux-gnu/bits/epoll.h
+++ b/lib/libc/include/x86-linux-gnu/bits/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/fcntl.h b/lib/libc/include/x86-linux-gnu/bits/fcntl.h
index 2fe90f292d..234f66f87c 100644
--- a/lib/libc/include/x86-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/x86-linux-gnu/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/x86.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/fenv.h b/lib/libc/include/x86-linux-gnu/bits/fenv.h
index 9f1b96d90d..698f3f47c3 100644
--- a/lib/libc/include/x86-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/x86-linux-gnu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/floatn.h b/lib/libc/include/x86-linux-gnu/bits/floatn.h
index b0bab474a1..789de21a23 100644
--- a/lib/libc/include/x86-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/x86-linux-gnu/bits/floatn.h
@@ -1,5 +1,5 @@
/* Macros to control TS 18661-3 glibc features on x86.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h
index 633df10484..ff9e1b68a8 100644
--- a/lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h
+++ b/lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h
@@ -1,5 +1,5 @@
/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/fp-logb.h b/lib/libc/include/x86-linux-gnu/bits/fp-logb.h
index fafda47cca..3fc7604558 100644
--- a/lib/libc/include/x86-linux-gnu/bits/fp-logb.h
+++ b/lib/libc/include/x86-linux-gnu/bits/fp-logb.h
@@ -1,5 +1,5 @@
/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/indirect-return.h b/lib/libc/include/x86-linux-gnu/bits/indirect-return.h
index cf42eab6cc..e740865a9c 100644
--- a/lib/libc/include/x86-linux-gnu/bits/indirect-return.h
+++ b/lib/libc/include/x86-linux-gnu/bits/indirect-return.h
@@ -1,5 +1,5 @@
/* Definition of __INDIRECT_RETURN. x86 version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/ipctypes.h b/lib/libc/include/x86-linux-gnu/bits/ipctypes.h
index 312a812c81..8471589f03 100644
--- a/lib/libc/include/x86-linux-gnu/bits/ipctypes.h
+++ b/lib/libc/include/x86-linux-gnu/bits/ipctypes.h
@@ -1,5 +1,5 @@
/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/iscanonical.h b/lib/libc/include/x86-linux-gnu/bits/iscanonical.h
index 4d0b3c8c86..874cd33ddf 100644
--- a/lib/libc/include/x86-linux-gnu/bits/iscanonical.h
+++ b/lib/libc/include/x86-linux-gnu/bits/iscanonical.h
@@ -1,5 +1,5 @@
/* Define iscanonical macro. ldbl-96 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/link.h b/lib/libc/include/x86-linux-gnu/bits/link.h
index 947918ae3c..0682716a3a 100644
--- a/lib/libc/include/x86-linux-gnu/bits/link.h
+++ b/lib/libc/include/x86-linux-gnu/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/long-double.h b/lib/libc/include/x86-linux-gnu/bits/long-double.h
index 601eef7f1a..aae8ed3891 100644
--- a/lib/libc/include/x86-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/x86-linux-gnu/bits/long-double.h
@@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-96 version.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/math-vector.h b/lib/libc/include/x86-linux-gnu/bits/math-vector.h
index 7a0ab12022..fc7dafe11e 100644
--- a/lib/libc/include/x86-linux-gnu/bits/math-vector.h
+++ b/lib/libc/include/x86-linux-gnu/bits/math-vector.h
@@ -1,5 +1,5 @@
/* Platform-specific SIMD declarations of math functions.
- Copyright (C) 2014-2025 Free Software Foundation, Inc.
+ Copyright (C) 2014-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/mman.h b/lib/libc/include/x86-linux-gnu/bits/mman.h
index 7a074b1a41..40cfcd7978 100644
--- a/lib/libc/include/x86-linux-gnu/bits/mman.h
+++ b/lib/libc/include/x86-linux-gnu/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/x86_64 version.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/procfs-id.h b/lib/libc/include/x86-linux-gnu/bits/procfs-id.h
index a56dcacb1a..08758ee957 100644
--- a/lib/libc/include/x86-linux-gnu/bits/procfs-id.h
+++ b/lib/libc/include/x86-linux-gnu/bits/procfs-id.h
@@ -1,5 +1,5 @@
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/x86-linux-gnu/bits/procfs.h b/lib/libc/include/x86-linux-gnu/bits/procfs.h
index 7df2897b5d..a0a5f7cb78 100644
--- a/lib/libc/include/x86-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/x86-linux-gnu/bits/procfs.h
@@ -1,5 +1,5 @@
/* Types for registers for sys/procfs.h. x86 version.
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h
index b13a1e4e3b..97e081118e 100644
--- a/lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/rseq.h b/lib/libc/include/x86-linux-gnu/bits/rseq.h
index 2aeee59139..e2fe6feebe 100644
--- a/lib/libc/include/x86-linux-gnu/bits/rseq.h
+++ b/lib/libc/include/x86-linux-gnu/bits/rseq.h
@@ -1,5 +1,5 @@
/* Restartable Sequences Linux x86 architecture header.
- Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ Copyright (C) 2021-2026 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/x86-linux-gnu/bits/setjmp.h b/lib/libc/include/x86-linux-gnu/bits/setjmp.h
index a447e3ae1e..bd649c9a63 100644
--- a/lib/libc/include/x86-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/x86-linux-gnu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/sigcontext.h b/lib/libc/include/x86-linux-gnu/bits/sigcontext.h
index fb5a9fec67..979232418c 100644
--- a/lib/libc/include/x86-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/x86-linux-gnu/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/struct_mutex.h b/lib/libc/include/x86-linux-gnu/bits/struct_mutex.h
index 408ed99e4a..aecbadb5fd 100644
--- a/lib/libc/include/x86-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/x86-linux-gnu/bits/struct_mutex.h
@@ -1,5 +1,5 @@
/* x86 internal mutex struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ struct __pthread_mutex_s
int __kind;
#ifdef __x86_64__
short __spins;
- short __elision;
+ short __unused;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
@@ -41,11 +41,10 @@ struct __pthread_mutex_s
{
struct
{
- short __espins;
- short __eelision;
-# define __spins __elision_data.__espins
-# define __elision __elision_data.__eelision
- } __elision_data;
+ short __data_spins;
+ short __data_unused;
+# define __spins __data.__data_spins
+ } __data;
__pthread_slist_t __list;
};
# define __PTHREAD_MUTEX_HAVE_PREV 0
diff --git a/lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h
index 9c97ebdb56..b4fd4d691e 100644
--- a/lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h
@@ -1,5 +1,5 @@
/* x86 internal rwlock struct definitions.
- Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Copyright (C) 2019-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -31,14 +31,7 @@ struct __pthread_rwlock_arch_t
#ifdef __x86_64__
int __cur_writer;
int __shared;
- signed char __rwelision;
-# ifdef __ILP32__
- unsigned char __pad1[3];
-# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
-# else
- unsigned char __pad1[7];
-# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
-# endif
+ unsigned long int __pad1;
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
@@ -48,7 +41,7 @@ struct __pthread_rwlock_arch_t
binary compatibility. */
unsigned char __flags;
unsigned char __shared;
- signed char __rwelision;
+ unsigned char __pad1;
unsigned char __pad2;
int __cur_writer;
#endif
@@ -56,7 +49,7 @@ struct __pthread_rwlock_arch_t
#ifdef __x86_64__
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
#else
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
diff --git a/lib/libc/include/x86-linux-gnu/bits/struct_stat.h b/lib/libc/include/x86-linux-gnu/bits/struct_stat.h
index 2978a4dca4..938ab40b49 100644
--- a/lib/libc/include/x86-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/x86-linux-gnu/bits/struct_stat.h
@@ -1,5 +1,5 @@
/* Definition for struct stat.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/timesize.h b/lib/libc/include/x86-linux-gnu/bits/timesize.h
index 88f07ae635..905260617f 100644
--- a/lib/libc/include/x86-linux-gnu/bits/timesize.h
+++ b/lib/libc/include/x86-linux-gnu/bits/timesize.h
@@ -1,5 +1,5 @@
/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h
index 77fcfc080a..aa85084d3b 100644
--- a/lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
/* x86 implementation of the semaphore struct semid_ds.
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/bits/typesizes.h b/lib/libc/include/x86-linux-gnu/bits/typesizes.h
index 3210b86ddc..02fab5a6ca 100644
--- a/lib/libc/include/x86-linux-gnu/bits/typesizes.h
+++ b/lib/libc/include/x86-linux-gnu/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h b/lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h
index 7760ea7a8d..3bb1f569ed 100644
--- a/lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h
+++ b/lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h
@@ -1,5 +1,5 @@
! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
-! Copyright (C) 2019-2025 Free Software Foundation, Inc.
+! Copyright (C) 2019-2026 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
!
! The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/fpu_control.h b/lib/libc/include/x86-linux-gnu/fpu_control.h
index 2765f7b444..64c3614414 100644
--- a/lib/libc/include/x86-linux-gnu/fpu_control.h
+++ b/lib/libc/include/x86-linux-gnu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. x86 version.
- Copyright (C) 1993-2025 Free Software Foundation, Inc.
+ Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/sys/elf.h b/lib/libc/include/x86-linux-gnu/sys/elf.h
index 4a898f9ea5..ca9a4c837d 100644
--- a/lib/libc/include/x86-linux-gnu/sys/elf.h
+++ b/lib/libc/include/x86-linux-gnu/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/sys/ptrace.h b/lib/libc/include/x86-linux-gnu/sys/ptrace.h
index bc58b8168c..1d50aaa769 100644
--- a/lib/libc/include/x86-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/x86-linux-gnu/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/x86 version.
- Copyright (C) 1996-2025 Free Software Foundation, Inc.
+ Copyright (C) 1996-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/libc/include/x86-linux-gnu/sys/ucontext.h b/lib/libc/include/x86-linux-gnu/sys/ucontext.h
index f2526fac2c..d317519d59 100644
--- a/lib/libc/include/x86-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/x86-linux-gnu/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/x86-linux-gnu/sys/user.h b/lib/libc/include/x86-linux-gnu/sys/user.h
index 4572023bfd..02527f2dc8 100644
--- a/lib/libc/include/x86-linux-gnu/sys/user.h
+++ b/lib/libc/include/x86-linux-gnu/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/libc/include/xtensa-linux-any/asm/unistd_32.h b/lib/libc/include/xtensa-linux-any/asm/unistd_32.h
index edf6b3e655..d1af9e2265 100644
--- a/lib/libc/include/xtensa-linux-any/asm/unistd_32.h
+++ b/lib/libc/include/xtensa-linux-any/asm/unistd_32.h
@@ -416,6 +416,7 @@
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
+#define __NR_listns 470
#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
diff --git a/lib/libc/mingw/math/coshf.c b/lib/libc/mingw/math/coshf.c
deleted file mode 100644
index 72147f5bfb..0000000000
--- a/lib/libc/mingw/math/coshf.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-#include
-float coshf (float x)
-{
- return (float) cosh (x);
-}
diff --git a/lib/libc/mingw/math/hypotf.c b/lib/libc/mingw/math/hypotf.c
deleted file mode 100644
index 5cd1a27929..0000000000
--- a/lib/libc/mingw/math/hypotf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER within this package.
- */
-#define _NEW_COMPLEX_FLOAT 1
-
-#include "../complex/complex_internal.h"
-#include
-#include
-
-float hypotf (float x, float y)
-{
- int x_class = fpclassify (x);
- int y_class = fpclassify (y);
-
- if (x_class == FP_INFINITE || y_class == FP_INFINITE)
- return __FLT_HUGE_VAL;
- else if (x_class == FP_NAN || y_class == FP_NAN)
- return __FLT_NAN;
-
- return (float) _hypot (x, y);
-}
-
diff --git a/lib/libc/mingw/math/hypotl.c b/lib/libc/mingw/math/hypotl.c
deleted file mode 100644
index 563aeb4987..0000000000
--- a/lib/libc/mingw/math/hypotl.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-#include
-#include
-#include
-
-/*
-This implementation is based largely on Cephes library
-function cabsl (cmplxl.c), which bears the following notice:
-
-Cephes Math Library Release 2.1: January, 1989
-Copyright 1984, 1987, 1989 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
- Modified for use in libmingwex.a
- 02 Sept 2002 Danny Smith
- Calls to ldexpl replaced by logbl and calls to frexpl replaced
- by scalbnl to avoid duplicated range checks.
-*/
-
-#define PRECL 32
-
-long double
-hypotl (long double x, long double y)
-{
- int exx;
- int eyy;
- int scale;
- long double xx =fabsl(x);
- long double yy =fabsl(y);
- if (!isfinite(xx) || !isfinite(yy))
- {
- /* Annex F.9.4.3, hypot returns +infinity if
- either component is an infinity, even when the
- other component is NaN. */
- return (isinf(xx) || isinf(yy)) ? INFINITY : NAN;
- }
-
- if (xx == 0.0L)
- return yy;
- if (yy == 0.0L)
- return xx;
-
- /* Get exponents */
- exx = logbl (xx);
- eyy = logbl (yy);
-
- /* Check if large differences in scale */
- scale = exx - eyy;
- if ( scale > PRECL)
- return xx;
- if ( scale < -PRECL)
- return yy;
-
- /* Exponent of approximate geometric mean (x 2) */
- scale = (exx + eyy) >> 1;
-
- /* Rescale: Geometric mean is now about 2 */
- x = scalbnl(xx, -scale);
- y = scalbnl(yy, -scale);
-
- xx = sqrtl(x * x + y * y);
-
- /* Check for overflow and underflow */
- exx = logbl(xx);
- exx += scale;
- if (exx > LDBL_MAX_EXP)
- {
- errno = ERANGE;
- return INFINITY;
- }
- if (exx < LDBL_MIN_EXP)
- return 0.0L;
-
- /* Undo scaling */
- return (scalbnl (xx, scale));
-}
diff --git a/lib/libc/mingw/math/roundl.c b/lib/libc/mingw/math/roundl.c
deleted file mode 100644
index 9879a82cc2..0000000000
--- a/lib/libc/mingw/math/roundl.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-#include
-
-long double
-roundl (long double x)
-{
- long double res = 0.0L;
- if (x >= 0.0L)
- {
- res = ceill (x);
- if (res - x > 0.5L)
- res -= 1.0L;
- }
- else
- {
- res = ceill (-x);
- if (res + x > 0.5L)
- res -= 1.0L;
- res = -res;
- }
- return res;
-}
diff --git a/lib/libc/mingw/misc/setjmp.S b/lib/libc/mingw/misc/setjmp.S
deleted file mode 100644
index 2baaae49c8..0000000000
--- a/lib/libc/mingw/misc/setjmp.S
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-
-#include <_mingw_mac.h>
-
-#ifndef __arm64ec__
- .globl __MINGW_USYMBOL(__intrinsic_setjmp)
- .def __MINGW_USYMBOL(__intrinsic_setjmp); .scl 2; .type 32; .endef
-
-#if defined(_WIN64)
- .globl __MINGW_USYMBOL(__intrinsic_setjmpex)
- .def __MINGW_USYMBOL(__intrinsic_setjmpex); .scl 2; .type 32; .endef
-#endif
-
-#if defined(__i386__)
- .globl __MINGW_USYMBOL(_setjmp3)
- .def __MINGW_USYMBOL(_setjmp3); .scl 2; .type 32; .endef
-__MINGW_USYMBOL(_setjmp3):
-__MINGW_USYMBOL(__intrinsic_setjmp):
- movl 4(%esp),%ecx /* jmp_buf */
- movl %ebp,0(%ecx) /* jmp_buf.Ebp */
- movl %ebx,4(%ecx) /* jmp_buf.Ebx */
- movl %edi,8(%ecx) /* jmp_buf.Edi */
- movl %esi,12(%ecx) /* jmp_buf.Esi */
- movl %esp,16(%ecx) /* jmp_buf.Esp */
- movl 0(%esp),%eax
- movl %eax,20(%ecx) /* jmp_buf.Eip */
- xorl %eax, %eax
- retl
-
-#elif defined(__x86_64__)
- .globl __MINGW_USYMBOL(setjmp)
- .def __MINGW_USYMBOL(setjmp); .scl 2; .type 32; .endef
-__MINGW_USYMBOL(setjmp):
-__MINGW_USYMBOL(__intrinsic_setjmp):
- xorq %rdx,%rdx
-__MINGW_USYMBOL(__intrinsic_setjmpex):
- movq %rdx,(%rcx) /* jmp_buf->Frame */
- movq %rbx,0x8(%rcx) /* jmp_buf->Rbx */
- leaq 0x8(%rsp),%rax
- movq %rax,0x10(%rcx) /* jmp_buf->Rsp */
- movq %rbp,0x18(%rcx) /* jmp_buf->Rbp */
- movq %rsi,0x20(%rcx) /* jmp_buf->Rsi */
- movq %rdi,0x28(%rcx) /* jmp_buf->Rdi */
- movq %r12,0x30(%rcx) /* jmp_buf->R12 */
- movq %r13,0x38(%rcx) /* jmp_buf->R13 */
- movq %r14,0x40(%rcx) /* jmp_buf->R14 */
- movq %r15,0x48(%rcx) /* jmp_buf->R15 */
- movq (%rsp),%rax
- movq %rax,0x50(%rcx) /* jmp_buf->Rip */
- stmxcsr 0x58(%rcx) /* jmp_buf->MxCsr */
- fnstcw 0x5c(%rcx) /* jmp_buf->FpCsr */
- movdqa %xmm6,0x60(%rcx) /* jmp_buf->Xmm6 */
- movdqa %xmm7,0x70(%rcx) /* jmp_buf->Xmm7 */
- movdqa %xmm8,0x80(%rcx) /* jmp_buf->Xmm8 */
- movdqa %xmm9,0x90(%rcx) /* jmp_buf->Xmm9 */
- movdqa %xmm10,0xa0(%rcx) /* jmp_buf->Xmm10 */
- movdqa %xmm11,0xb0(%rcx) /* jmp_buf->Xmm11 */
- movdqa %xmm12,0xc0(%rcx) /* jmp_buf->Xmm12 */
- movdqa %xmm13,0xd0(%rcx) /* jmp_buf->Xmm13 */
- movdqa %xmm14,0xe0(%rcx) /* jmp_buf->Xmm14 */
- movdqa %xmm15,0xf0(%rcx) /* jmp_buf->Xmm15 */
- xorq %rax,%rax
- retq
-
-#elif defined(__arm__)
-__MINGW_USYMBOL(__intrinsic_setjmp):
- mov r1, #0
- str r1, [r0] /* jmp_buf->Frame */
- str r4, [r0, #0x4] /* jmp_buf->R4 */
- str r5, [r0, #0x8] /* jmp_buf->R5 */
- str r6, [r0, #0xc] /* jmp_buf->R6 */
- str r7, [r0, #0x10] /* jmp_buf->R7 */
- str r8, [r0, #0x14] /* jmp_buf->R8 */
- str r9, [r0, #0x18] /* jmp_buf->R9 */
- str r10, [r0, #0x1c] /* jmp_buf->R10 */
- str r11, [r0, #0x20] /* jmp_buf->R11 */
- str sp, [r0, #0x24] /* jmp_buf->Sp */
- str lr, [r0, #0x28] /* jmp_buf->Pc */
- vmrs r2, fpscr
- str r2, [r0, #0x2c] /* jmp_buf->Fpscr */
- vstr d8, [r0, #0x30] /* jmp_buf->D[0] */
- vstr d9, [r0, #0x38] /* jmp_buf->D[1] */
- vstr d10, [r0, #0x40] /* jmp_buf->D[2] */
- vstr d11, [r0, #0x48] /* jmp_buf->D[3] */
- vstr d12, [r0, #0x50] /* jmp_buf->D[4] */
- vstr d13, [r0, #0x58] /* jmp_buf->D[5] */
- vstr d14, [r0, #0x60] /* jmp_buf->D[6] */
- vstr d15, [r0, #0x68] /* jmp_buf->D[7] */
- mov r0, #0
- bx lr
-#elif defined(__aarch64__)
-__MINGW_USYMBOL(__intrinsic_setjmp):
- mov x1, #0
-__MINGW_USYMBOL(__intrinsic_setjmpex):
- str x1, [x0] /* jmp_buf->Frame */
- stp x19, x20, [x0, #0x10] /* jmp_buf->X19, X20 */
- stp x21, x22, [x0, #0x20] /* jmp_buf->X21, X22 */
- stp x23, x24, [x0, #0x30] /* jmp_buf->X23, X24 */
- stp x25, x26, [x0, #0x40] /* jmp_buf->X25, X26 */
- stp x27, x28, [x0, #0x50] /* jmp_buf->X27, X28 */
- stp x29, x30, [x0, #0x60] /* jmp_buf->Fp, Lr */
- mov x2, sp
- str x2, [x0, #0x70] /* jmp_buf->Sp */
- mrs x2, fpcr
- str w2, [x0, #0x78] /* jmp_buf->Fpcr */
- mrs x2, fpsr
- str w2, [x0, #0x7c] /* jmp_buf->Fpsr */
- stp d8, d9, [x0, #0x80] /* jmp_buf->D[0-1] */
- stp d10, d11, [x0, #0x90] /* jmp_buf->D[2-3] */
- stp d12, d13, [x0, #0xa0] /* jmp_buf->D[4-5] */
- stp d14, d15, [x0, #0xb0] /* jmp_buf->D[6-7] */
- mov x0, #0
- ret
-#endif
-#endif /* __arm64ec__ */
diff --git a/lib/libc/musl/arch/hexagon/bits/hwcap.h b/lib/libc/musl/arch/hexagon/bits/hwcap.h
new file mode 100644
index 0000000000..40b13e18f9
--- /dev/null
+++ b/lib/libc/musl/arch/hexagon/bits/hwcap.h
@@ -0,0 +1,31 @@
+/* ISA version encoding in bits 0-6 (7 bits) */
+#define HWCAP_HEXAGON_ISA_MASK 0x7F /* ISA version mask */
+
+/* ISA version enumeration values */
+#define HWCAP_HEXAGON_ISA_V2 1 /* Hexagon V2 */
+#define HWCAP_HEXAGON_ISA_V3 2 /* Hexagon V3 */
+#define HWCAP_HEXAGON_ISA_V4 3 /* Hexagon V4 */
+#define HWCAP_HEXAGON_ISA_V5 4 /* Hexagon V5 */
+#define HWCAP_HEXAGON_ISA_V55 5 /* Hexagon V55 */
+#define HWCAP_HEXAGON_ISA_V60 6 /* Hexagon V60 */
+#define HWCAP_HEXAGON_ISA_V62 7 /* Hexagon V62 */
+#define HWCAP_HEXAGON_ISA_V65 8 /* Hexagon V65 */
+#define HWCAP_HEXAGON_ISA_V66 9 /* Hexagon V66 */
+#define HWCAP_HEXAGON_ISA_V67 10 /* Hexagon V67 */
+#define HWCAP_HEXAGON_ISA_V68 11 /* Hexagon V68 */
+#define HWCAP_HEXAGON_ISA_V69 12 /* Hexagon V69 */
+#define HWCAP_HEXAGON_ISA_V71 13 /* Hexagon V71 */
+#define HWCAP_HEXAGON_ISA_V73 14 /* Hexagon V73 */
+#define HWCAP_HEXAGON_ISA_V79 15 /* Hexagon V79 */
+
+/* Essential feature flags */
+#define HWCAP_HEXAGON_HVX (1 << 7) /* HVX (Hexagon Vector eXtensions) */
+#define HWCAP_HEXAGON_CABAC (1 << 8) /* CABAC acceleration */
+#define HWCAP_HEXAGON_HVX_LENGTH_128B (1 << 9) /* HVX 128-byte vector length */
+#define HWCAP_HEXAGON_HVX_IEEE_FP (1 << 10) /* HVX IEEE floating point */
+#define HWCAP_HEXAGON_AUDIO (1 << 11) /* Audio ISA extensions */
+
+/* Utility macros for userspace applications */
+#define HWCAP_HEXAGON_GET_ISA(hwcap) ((hwcap) & HWCAP_HEXAGON_ISA_MASK)
+#define HWCAP_HEXAGON_IS_ISA(hwcap, version) (HWCAP_HEXAGON_GET_ISA(hwcap) == (version))
+#define HWCAP_HEXAGON_HAS_ISA(hwcap, version) (HWCAP_HEXAGON_GET_ISA(hwcap) >= (version))
diff --git a/lib/libc/musl/arch/hexagon/bits/signal.h b/lib/libc/musl/arch/hexagon/bits/signal.h
index 1a2715dd54..9753066b6d 100644
--- a/lib/libc/musl/arch/hexagon/bits/signal.h
+++ b/lib/libc/musl/arch/hexagon/bits/signal.h
@@ -31,9 +31,10 @@ typedef struct sigcontext
unsigned long pc;
unsigned long cause;
unsigned long badva;
+ unsigned long cs0;
+ unsigned long cs1;
unsigned long pad1;
- unsigned long long pad2;
-} mcontext_t;
+} __attribute__((__aligned__(8))) mcontext_t;
#else
typedef struct {
unsigned long __regs[48];
diff --git a/lib/libc/musl/arch/hexagon/crt_arch.h b/lib/libc/musl/arch/hexagon/crt_arch.h
index 9f9428cf19..395b38d158 100644
--- a/lib/libc/musl/arch/hexagon/crt_arch.h
+++ b/lib/libc/musl/arch/hexagon/crt_arch.h
@@ -13,6 +13,7 @@ START ": \n"
" r1 = memw(r2)\n"
" r1 = add(r2, r1)\n"
" r30 = #0 // Signals the end of backtrace\n"
+" r31 = #0\n"
" r0 = r29 // Pointer to argc/argv\n"
" r29 = and(r29, #-16) // Align\n"
" memw(r29+#-8) = r29\n"
diff --git a/lib/libc/musl/src/aio/aio.c b/lib/libc/musl/src/aio/aio.c
index d7e063bf93..5c586260c3 100644
--- a/lib/libc/musl/src/aio/aio.c
+++ b/lib/libc/musl/src/aio/aio.c
@@ -11,11 +11,6 @@
#include "pthread_impl.h"
#include "aio_impl.h"
-#define malloc __libc_malloc
-#define calloc __libc_calloc
-#define realloc __libc_realloc
-#define free __libc_free
-
/* The following is a threads-based implementation of AIO with minimal
* dependence on implementation details. Most synchronization is
* performed with pthread primitives, but atomics and futex operations
diff --git a/lib/libc/musl/src/exit/atexit.c b/lib/libc/musl/src/exit/atexit.c
index 854e9fddbe..2804a1d7ad 100644
--- a/lib/libc/musl/src/exit/atexit.c
+++ b/lib/libc/musl/src/exit/atexit.c
@@ -4,11 +4,6 @@
#include "lock.h"
#include "fork_impl.h"
-#define malloc __libc_malloc
-#define calloc __libc_calloc
-#define realloc undef
-#define free undef
-
/* Ensure that at least 32 atexit handlers can be registered without malloc */
#define COUNT 32
diff --git a/lib/libc/musl/src/include/stdlib.h b/lib/libc/musl/src/include/stdlib.h
index 812b04de2f..1599691fbe 100644
--- a/lib/libc/musl/src/include/stdlib.h
+++ b/lib/libc/musl/src/include/stdlib.h
@@ -10,10 +10,4 @@ hidden int __ptsname_r(int, char *, size_t);
hidden char *__randname(char *);
hidden void __qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *);
-hidden void *__libc_malloc(size_t);
-hidden void *__libc_malloc_impl(size_t);
-hidden void *__libc_calloc(size_t, size_t);
-hidden void *__libc_realloc(void *, size_t);
-hidden void __libc_free(void *);
-
#endif
diff --git a/lib/libc/musl/src/ldso/dlerror.c b/lib/libc/musl/src/ldso/dlerror.c
index dae0f3a9b2..141df3ab13 100644
--- a/lib/libc/musl/src/ldso/dlerror.c
+++ b/lib/libc/musl/src/ldso/dlerror.c
@@ -5,11 +5,6 @@
#include "dynlink.h"
#include "atomic.h"
-#define malloc __libc_malloc
-#define calloc __libc_calloc
-#define realloc __libc_realloc
-#define free __libc_free
-
char *dlerror()
{
pthread_t self = __pthread_self();
diff --git a/lib/libc/musl/src/linux/cap.c b/lib/libc/musl/src/linux/cap.c
deleted file mode 100644
index 8d035e07a4..0000000000
--- a/lib/libc/musl/src/linux/cap.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "syscall.h"
-
-int capset(void *a, void *b)
-{
- return syscall(SYS_capset, a, b);
-}
-
-int capget(void *a, void *b)
-{
- return syscall(SYS_capget, a, b);
-}
diff --git a/lib/libc/musl/src/linux/chroot.c b/lib/libc/musl/src/linux/chroot.c
deleted file mode 100644
index 0e69f145de..0000000000
--- a/lib/libc/musl/src/linux/chroot.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define _GNU_SOURCE
-#include
-#include "syscall.h"
-
-int chroot(const char *path)
-{
- return syscall(SYS_chroot, path);
-}
diff --git a/lib/libc/musl/src/linux/flock.c b/lib/libc/musl/src/linux/flock.c
deleted file mode 100644
index 87aa5cfed2..0000000000
--- a/lib/libc/musl/src/linux/flock.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include
-#include "syscall.h"
-
-int flock(int fd, int op)
-{
- return syscall(SYS_flock, fd, op);
-}
diff --git a/lib/libc/musl/src/linux/reboot.c b/lib/libc/musl/src/linux/reboot.c
deleted file mode 100644
index 7f12af79bc..0000000000
--- a/lib/libc/musl/src/linux/reboot.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include
-#include "syscall.h"
-
-int reboot(int type)
-{
- return syscall(SYS_reboot, 0xfee1dead, 672274793, type);
-}
diff --git a/lib/libc/musl/src/locale/dcngettext.c b/lib/libc/musl/src/locale/dcngettext.c
index 0b53286db7..67e551058c 100644
--- a/lib/libc/musl/src/locale/dcngettext.c
+++ b/lib/libc/musl/src/locale/dcngettext.c
@@ -12,11 +12,6 @@
#include "lock.h"
#include "fork_impl.h"
-#define malloc __libc_malloc
-#define calloc __libc_calloc
-#define realloc undef
-#define free undef
-
struct binding {
struct binding *next;
int dirlen;
diff --git a/lib/libc/musl/src/locale/duplocale.c b/lib/libc/musl/src/locale/duplocale.c
index 5ce33ae6de..030b64cb0e 100644
--- a/lib/libc/musl/src/locale/duplocale.c
+++ b/lib/libc/musl/src/locale/duplocale.c
@@ -3,11 +3,6 @@
#include "locale_impl.h"
#include "libc.h"
-#define malloc __libc_malloc
-#define calloc undef
-#define realloc undef
-#define free undef
-
locale_t __duplocale(locale_t old)
{
locale_t new = malloc(sizeof *new);
diff --git a/lib/libc/musl/src/locale/freelocale.c b/lib/libc/musl/src/locale/freelocale.c
index 385d12069d..802b8bfe1c 100644
--- a/lib/libc/musl/src/locale/freelocale.c
+++ b/lib/libc/musl/src/locale/freelocale.c
@@ -1,11 +1,6 @@
#include
#include "locale_impl.h"
-#define malloc undef
-#define calloc undef
-#define realloc undef
-#define free __libc_free
-
void freelocale(locale_t l)
{
if (__loc_is_allocated(l)) free(l);
diff --git a/lib/libc/musl/src/locale/locale_map.c b/lib/libc/musl/src/locale/locale_map.c
index da61f7fc03..a8c9e7f244 100644
--- a/lib/libc/musl/src/locale/locale_map.c
+++ b/lib/libc/musl/src/locale/locale_map.c
@@ -7,11 +7,6 @@
#include "lock.h"
#include "fork_impl.h"
-#define malloc __libc_malloc
-#define calloc undef
-#define realloc undef
-#define free undef
-
const char *__lctrans_impl(const char *msg, const struct __locale_map *lm)
{
const char *trans = 0;
diff --git a/lib/libc/musl/src/locale/newlocale.c b/lib/libc/musl/src/locale/newlocale.c
index 9ac3cd386f..12ae87d679 100644
--- a/lib/libc/musl/src/locale/newlocale.c
+++ b/lib/libc/musl/src/locale/newlocale.c
@@ -4,11 +4,6 @@
#include "locale_impl.h"
#include "lock.h"
-#define malloc __libc_malloc
-#define calloc undef
-#define realloc undef
-#define free undef
-
static int default_locale_init_done;
static struct __locale_struct default_locale, default_ctype_locale;
diff --git a/lib/libc/musl/src/locale/strcoll.c b/lib/libc/musl/src/locale/strcoll.c
deleted file mode 100644
index dd3cbc480e..0000000000
--- a/lib/libc/musl/src/locale/strcoll.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include
-#include
-#include "locale_impl.h"
-
-int __strcoll_l(const char *l, const char *r, locale_t loc)
-{
- return strcmp(l, r);
-}
-
-int strcoll(const char *l, const char *r)
-{
- return __strcoll_l(l, r, CURRENT_LOCALE);
-}
-
-weak_alias(__strcoll_l, strcoll_l);
diff --git a/lib/libc/musl/src/locale/strxfrm.c b/lib/libc/musl/src/locale/strxfrm.c
deleted file mode 100644
index c66c62039d..0000000000
--- a/lib/libc/musl/src/locale/strxfrm.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include
-#include
-#include "locale_impl.h"
-
-/* collate only by code points */
-size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc)
-{
- size_t l = strlen(src);
- if (n > l) strcpy(dest, src);
- return l;
-}
-
-size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
-{
- return __strxfrm_l(dest, src, n, CURRENT_LOCALE);
-}
-
-weak_alias(__strxfrm_l, strxfrm_l);
diff --git a/lib/libc/musl/src/malloc/calloc.c b/lib/libc/musl/src/malloc/calloc.c
deleted file mode 100644
index bf6bddca3f..0000000000
--- a/lib/libc/musl/src/malloc/calloc.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include
-#include
-#include
-#include
-#include "dynlink.h"
-
-static size_t mal0_clear(char *p, size_t n)
-{
- const size_t pagesz = 4096; /* arbitrary */
- if (n < pagesz) return n;
-#ifdef __GNUC__
- typedef uint64_t __attribute__((__may_alias__)) T;
-#else
- typedef unsigned char T;
-#endif
- char *pp = p + n;
- size_t i = (uintptr_t)pp & (pagesz - 1);
- for (;;) {
- pp = memset(pp - i, 0, i);
- if (pp - p < pagesz) return pp - p;
- for (i = pagesz; i; i -= 2*sizeof(T), pp -= 2*sizeof(T))
- if (((T *)pp)[-1] | ((T *)pp)[-2])
- break;
- }
-}
-
-static int allzerop(void *p)
-{
- return 0;
-}
-weak_alias(allzerop, __malloc_allzerop);
-
-void *calloc(size_t m, size_t n)
-{
- if (n && m > (size_t)-1/n) {
- errno = ENOMEM;
- return 0;
- }
- n *= m;
- void *p = malloc(n);
- if (!p || (!__malloc_replaced && __malloc_allzerop(p)))
- return p;
- n = mal0_clear(p, n);
- return memset(p, 0, n);
-}
diff --git a/lib/libc/musl/src/malloc/free.c b/lib/libc/musl/src/malloc/free.c
deleted file mode 100644
index 3944f7b28f..0000000000
--- a/lib/libc/musl/src/malloc/free.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include
-
-void free(void *p)
-{
- __libc_free(p);
-}
diff --git a/lib/libc/musl/src/malloc/libc_calloc.c b/lib/libc/musl/src/malloc/libc_calloc.c
deleted file mode 100644
index d25eabea47..0000000000
--- a/lib/libc/musl/src/malloc/libc_calloc.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define calloc __libc_calloc
-#define malloc __libc_malloc
-
-#include "calloc.c"
diff --git a/lib/libc/musl/src/malloc/lite_malloc.c b/lib/libc/musl/src/malloc/lite_malloc.c
deleted file mode 100644
index 43a988fbb8..0000000000
--- a/lib/libc/musl/src/malloc/lite_malloc.c
+++ /dev/null
@@ -1,118 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include "libc.h"
-#include "lock.h"
-#include "syscall.h"
-#include "fork_impl.h"
-
-#define ALIGN 16
-
-/* This function returns true if the interval [old,new]
- * intersects the 'len'-sized interval below &libc.auxv
- * (interpreted as the main-thread stack) or below &b
- * (the current stack). It is used to defend against
- * buggy brk implementations that can cross the stack. */
-
-static int traverses_stack_p(uintptr_t old, uintptr_t new)
-{
- const uintptr_t len = 8<<20;
- uintptr_t a, b;
-
- b = (uintptr_t)libc.auxv;
- a = b > len ? b-len : 0;
- if (new>a && old len ? b-len : 0;
- if (new>a && old SIZE_MAX/2) {
- errno = ENOMEM;
- return 0;
- }
-
- if (!n) n++;
- while (align end-cur) {
- size_t req = n - (end-cur) + PAGE_SIZE-1 & -PAGE_SIZE;
-
- if (!cur) {
- brk = __syscall(SYS_brk, 0);
- brk += -brk & PAGE_SIZE-1;
- cur = end = brk;
- }
-
- if (brk == end && req < SIZE_MAX-brk
- && !traverses_stack_p(brk, brk+req)
- && __syscall(SYS_brk, brk+req)==brk+req) {
- brk = end += req;
- } else {
- int new_area = 0;
- req = n + PAGE_SIZE-1 & -PAGE_SIZE;
- /* Only make a new area rather than individual mmap
- * if wasted space would be over 1/8 of the map. */
- if (req-n > req/8) {
- /* Geometric area size growth up to 64 pages,
- * bounding waste by 1/8 of the area. */
- size_t min = PAGE_SIZE<<(mmap_step/2);
- if (min-n > end-cur) {
- if (req < min) {
- req = min;
- if (mmap_step < 12)
- mmap_step++;
- }
- new_area = 1;
- }
- }
- void *mem = __mmap(0, req, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- if (mem == MAP_FAILED || !new_area) {
- UNLOCK(lock);
- return mem==MAP_FAILED ? 0 : mem;
- }
- cur = (uintptr_t)mem;
- end = cur + req;
- }
- }
-
- p = (void *)cur;
- cur += n;
- UNLOCK(lock);
- return p;
-}
-
-weak_alias(__simple_malloc, __libc_malloc_impl);
-
-void *__libc_malloc(size_t n)
-{
- return __libc_malloc_impl(n);
-}
-
-static void *default_malloc(size_t n)
-{
- return __libc_malloc_impl(n);
-}
-
-weak_alias(default_malloc, malloc);
diff --git a/lib/libc/musl/src/malloc/mallocng/aligned_alloc.c b/lib/libc/musl/src/malloc/mallocng/aligned_alloc.c
deleted file mode 100644
index e0862a83ae..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/aligned_alloc.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include
-#include
-#include "meta.h"
-
-void *aligned_alloc(size_t align, size_t len)
-{
- if ((align & -align) != align) {
- errno = EINVAL;
- return 0;
- }
-
- if (len > SIZE_MAX - align || align >= (1ULL<<31)*UNIT) {
- errno = ENOMEM;
- return 0;
- }
-
- if (DISABLE_ALIGNED_ALLOC) {
- errno = ENOMEM;
- return 0;
- }
-
- if (align <= UNIT) align = UNIT;
-
- unsigned char *p = malloc(len + align - UNIT);
- if (!p)
- return 0;
-
- struct meta *g = get_meta(p);
- int idx = get_slot_index(p);
- size_t stride = get_stride(g);
- unsigned char *start = g->mem->storage + stride*idx;
- unsigned char *end = g->mem->storage + stride*(idx+1) - IB;
- size_t adj = -(uintptr_t)p & (align-1);
-
- if (!adj) {
- set_size(p, end, len);
- return p;
- }
- p += adj;
- uint32_t offset = (size_t)(p-g->mem->storage)/UNIT;
- if (offset <= 0xffff) {
- *(uint16_t *)(p-2) = offset;
- p[-4] = 0;
- } else {
- // use a 32-bit offset if 16-bit doesn't fit. for this,
- // 16-bit field must be zero, [-4] byte nonzero.
- *(uint16_t *)(p-2) = 0;
- *(uint32_t *)(p-8) = offset;
- p[-4] = 1;
- }
- p[-3] = idx;
- set_size(p, end, len);
- // store offset to aligned enframing. this facilitates cycling
- // offset and also iteration of heap for debugging/measurement.
- // for extreme overalignment it won't fit but these are classless
- // allocations anyway.
- *(uint16_t *)(start - 2) = (size_t)(p-start)/UNIT;
- start[-3] = 7<<5;
- return p;
-}
diff --git a/lib/libc/musl/src/malloc/mallocng/donate.c b/lib/libc/musl/src/malloc/mallocng/donate.c
deleted file mode 100644
index 41d850f357..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/donate.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "meta.h"
-
-static void donate(unsigned char *base, size_t len)
-{
- uintptr_t a = (uintptr_t)base;
- uintptr_t b = a + len;
- a += -a & (UNIT-1);
- b -= b & (UNIT-1);
- memset(base, 0, len);
- for (int sc=47; sc>0 && b>a; sc-=4) {
- if (b-a < (size_classes[sc]+1)*UNIT) continue;
- struct meta *m = alloc_meta();
- m->avail_mask = 0;
- m->freed_mask = 1;
- m->mem = (void *)a;
- m->mem->meta = m;
- m->last_idx = 0;
- m->freeable = 0;
- m->sizeclass = sc;
- m->maplen = 0;
- *((unsigned char *)m->mem+UNIT-4) = 0;
- *((unsigned char *)m->mem+UNIT-3) = 255;
- m->mem->storage[size_classes[sc]*UNIT-4] = 0;
- queue(&ctx.active[sc], m);
- a += (size_classes[sc]+1)*UNIT;
- }
-}
-
-void __malloc_donate(char *start, char *end)
-{
- donate((void *)start, end-start);
-}
diff --git a/lib/libc/musl/src/malloc/mallocng/free.c b/lib/libc/musl/src/malloc/mallocng/free.c
deleted file mode 100644
index 43f32aade8..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/free.c
+++ /dev/null
@@ -1,151 +0,0 @@
-#define _BSD_SOURCE
-#include
-#include
-
-#include "meta.h"
-
-struct mapinfo {
- void *base;
- size_t len;
-};
-
-static struct mapinfo nontrivial_free(struct meta *, int);
-
-static struct mapinfo free_group(struct meta *g)
-{
- struct mapinfo mi = { 0 };
- int sc = g->sizeclass;
- if (sc < 48) {
- ctx.usage_by_class[sc] -= g->last_idx+1;
- }
- if (g->maplen) {
- step_seq();
- record_seq(sc);
- mi.base = g->mem;
- mi.len = g->maplen*4096UL;
- } else {
- void *p = g->mem;
- struct meta *m = get_meta(p);
- int idx = get_slot_index(p);
- g->mem->meta = 0;
- // not checking size/reserved here; it's intentionally invalid
- mi = nontrivial_free(m, idx);
- }
- free_meta(g);
- return mi;
-}
-
-static int okay_to_free(struct meta *g)
-{
- int sc = g->sizeclass;
-
- if (!g->freeable) return 0;
-
- // always free individual mmaps not suitable for reuse
- if (sc >= 48 || get_stride(g) < UNIT*size_classes[sc])
- return 1;
-
- // always free groups allocated inside another group's slot
- // since recreating them should not be expensive and they
- // might be blocking freeing of a much larger group.
- if (!g->maplen) return 1;
-
- // if there is another non-full group, free this one to
- // consolidate future allocations, reduce fragmentation.
- if (g->next != g) return 1;
-
- // free any group in a size class that's not bouncing
- if (!is_bouncing(sc)) return 1;
-
- size_t cnt = g->last_idx+1;
- size_t usage = ctx.usage_by_class[sc];
-
- // if usage is high enough that a larger count should be
- // used, free the low-count group so a new one will be made.
- if (9*cnt <= usage && cnt < 20)
- return 1;
-
- // otherwise, keep the last group in a bouncing class.
- return 0;
-}
-
-static struct mapinfo nontrivial_free(struct meta *g, int i)
-{
- uint32_t self = 1u<sizeclass;
- uint32_t mask = g->freed_mask | g->avail_mask;
-
- if (mask+self == (2u<last_idx)-1 && okay_to_free(g)) {
- // any multi-slot group is necessarily on an active list
- // here, but single-slot groups might or might not be.
- if (g->next) {
- assert(sc < 48);
- int activate_new = (ctx.active[sc]==g);
- dequeue(&ctx.active[sc], g);
- if (activate_new && ctx.active[sc])
- activate_group(ctx.active[sc]);
- }
- return free_group(g);
- } else if (!mask) {
- assert(sc < 48);
- // might still be active if there were no allocations
- // after last available slot was taken.
- if (ctx.active[sc] != g) {
- queue(&ctx.active[sc], g);
- }
- }
- a_or(&g->freed_mask, self);
- return (struct mapinfo){ 0 };
-}
-
-void free(void *p)
-{
- if (!p) return;
-
- struct meta *g = get_meta(p);
- int idx = get_slot_index(p);
- size_t stride = get_stride(g);
- unsigned char *start = g->mem->storage + stride*idx;
- unsigned char *end = start + stride - IB;
- get_nominal_size(p, end);
- uint32_t self = 1u<last_idx)-1;
- ((unsigned char *)p)[-3] = 255;
- // invalidate offset to group header, and cycle offset of
- // used region within slot if current offset is zero.
- *(uint16_t *)((char *)p-2) = 0;
-
- // release any whole pages contained in the slot to be freed
- // unless it's a single-slot group that will be unmapped.
- if (((uintptr_t)(start-1) ^ (uintptr_t)end) >= 2*PGSZ && g->last_idx) {
- unsigned char *base = start + (-(uintptr_t)start & (PGSZ-1));
- size_t len = (end-base) & -PGSZ;
- if (len && USE_MADV_FREE) {
- int e = errno;
- madvise(base, len, MADV_FREE);
- errno = e;
- }
- }
-
- // atomic free without locking if this is neither first or last slot
- for (;;) {
- uint32_t freed = g->freed_mask;
- uint32_t avail = g->avail_mask;
- uint32_t mask = freed | avail;
- assert(!(mask&self));
- if (!freed || mask+self==all) break;
- if (!MT)
- g->freed_mask = freed+self;
- else if (a_cas(&g->freed_mask, freed, freed+self)!=freed)
- continue;
- return;
- }
-
- wrlock();
- struct mapinfo mi = nontrivial_free(g, idx);
- unlock();
- if (mi.len) {
- int e = errno;
- munmap(mi.base, mi.len);
- errno = e;
- }
-}
diff --git a/lib/libc/musl/src/malloc/mallocng/glue.h b/lib/libc/musl/src/malloc/mallocng/glue.h
deleted file mode 100644
index 77f4c812b2..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/glue.h
+++ /dev/null
@@ -1,95 +0,0 @@
-#ifndef MALLOC_GLUE_H
-#define MALLOC_GLUE_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include "atomic.h"
-#include "syscall.h"
-#include "libc.h"
-#include "lock.h"
-#include "dynlink.h"
-
-// use macros to appropriately namespace these.
-#define size_classes __malloc_size_classes
-#define ctx __malloc_context
-#define alloc_meta __malloc_alloc_meta
-#define is_allzero __malloc_allzerop
-#define dump_heap __dump_heap
-
-#define malloc __libc_malloc_impl
-#define realloc __libc_realloc
-#define free __libc_free
-
-#define USE_MADV_FREE 0
-
-#if USE_REAL_ASSERT
-#include
-#else
-#undef assert
-#define assert(x) do { if (!(x)) a_crash(); } while(0)
-#endif
-
-#define brk(p) ((uintptr_t)__syscall(SYS_brk, p))
-
-#define mmap __mmap
-#define madvise __madvise
-#define mremap __mremap
-
-#define DISABLE_ALIGNED_ALLOC (__malloc_replaced && !__aligned_alloc_replaced)
-
-static inline uint64_t get_random_secret()
-{
- uint64_t secret = (uintptr_t)&secret * 1103515245;
- for (size_t i=0; libc.auxv[i]; i+=2)
- if (libc.auxv[i]==AT_RANDOM)
- memcpy(&secret, (char *)libc.auxv[i+1]+8, sizeof secret);
- return secret;
-}
-
-#ifndef PAGESIZE
-#define PAGESIZE PAGE_SIZE
-#endif
-
-#define MT (libc.need_locks)
-
-#define RDLOCK_IS_EXCLUSIVE 1
-
-__attribute__((__visibility__("hidden")))
-extern int __malloc_lock[1];
-
-#define LOCK_OBJ_DEF \
-int __malloc_lock[1]; \
-void __malloc_atfork(int who) { malloc_atfork(who); }
-
-static inline void rdlock()
-{
- if (MT) LOCK(__malloc_lock);
-}
-static inline void wrlock()
-{
- if (MT) LOCK(__malloc_lock);
-}
-static inline void unlock()
-{
- UNLOCK(__malloc_lock);
-}
-static inline void upgradelock()
-{
-}
-static inline void resetlock()
-{
- __malloc_lock[0] = 0;
-}
-
-static inline void malloc_atfork(int who)
-{
- if (who<0) rdlock();
- else if (who>0) resetlock();
- else unlock();
-}
-
-#endif
diff --git a/lib/libc/musl/src/malloc/mallocng/malloc.c b/lib/libc/musl/src/malloc/mallocng/malloc.c
deleted file mode 100644
index d695ab8ec9..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/malloc.c
+++ /dev/null
@@ -1,387 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "meta.h"
-
-LOCK_OBJ_DEF;
-
-const uint16_t size_classes[] = {
- 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 12, 15,
- 18, 20, 25, 31,
- 36, 42, 50, 63,
- 72, 84, 102, 127,
- 146, 170, 204, 255,
- 292, 340, 409, 511,
- 584, 682, 818, 1023,
- 1169, 1364, 1637, 2047,
- 2340, 2730, 3276, 4095,
- 4680, 5460, 6552, 8191,
-};
-
-static const uint8_t small_cnt_tab[][3] = {
- { 30, 30, 30 },
- { 31, 15, 15 },
- { 20, 10, 10 },
- { 31, 15, 7 },
- { 25, 12, 6 },
- { 21, 10, 5 },
- { 18, 8, 4 },
- { 31, 15, 7 },
- { 28, 14, 6 },
-};
-
-static const uint8_t med_cnt_tab[4] = { 28, 24, 20, 32 };
-
-struct malloc_context ctx = { 0 };
-
-struct meta *alloc_meta(void)
-{
- struct meta *m;
- unsigned char *p;
- if (!ctx.init_done) {
-#ifndef PAGESIZE
- ctx.pagesize = get_page_size();
-#endif
- ctx.secret = get_random_secret();
- ctx.init_done = 1;
- }
- size_t pagesize = PGSZ;
- if (pagesize < 4096) pagesize = 4096;
- if ((m = dequeue_head(&ctx.free_meta_head))) return m;
- if (!ctx.avail_meta_count) {
- int need_unprotect = 1;
- if (!ctx.avail_meta_area_count && ctx.brk!=-1) {
- uintptr_t new = ctx.brk + pagesize;
- int need_guard = 0;
- if (!ctx.brk) {
- need_guard = 1;
- ctx.brk = brk(0);
- // some ancient kernels returned _ebss
- // instead of next page as initial brk.
- ctx.brk += -ctx.brk & (pagesize-1);
- new = ctx.brk + 2*pagesize;
- }
- if (brk(new) != new) {
- ctx.brk = -1;
- } else {
- if (need_guard) mmap((void *)ctx.brk, pagesize,
- PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, 0);
- ctx.brk = new;
- ctx.avail_meta_areas = (void *)(new - pagesize);
- ctx.avail_meta_area_count = pagesize>>12;
- need_unprotect = 0;
- }
- }
- if (!ctx.avail_meta_area_count) {
- size_t n = 2UL << ctx.meta_alloc_shift;
- p = mmap(0, n*pagesize, PROT_NONE,
- MAP_PRIVATE|MAP_ANON, -1, 0);
- if (p==MAP_FAILED) return 0;
- ctx.avail_meta_areas = p + pagesize;
- ctx.avail_meta_area_count = (n-1)*(pagesize>>12);
- ctx.meta_alloc_shift++;
- }
- p = ctx.avail_meta_areas;
- if ((uintptr_t)p & (pagesize-1)) need_unprotect = 0;
- if (need_unprotect)
- if (mprotect(p, pagesize, PROT_READ|PROT_WRITE)
- && errno != ENOSYS)
- return 0;
- ctx.avail_meta_area_count--;
- ctx.avail_meta_areas = p + 4096;
- if (ctx.meta_area_tail) {
- ctx.meta_area_tail->next = (void *)p;
- } else {
- ctx.meta_area_head = (void *)p;
- }
- ctx.meta_area_tail = (void *)p;
- ctx.meta_area_tail->check = ctx.secret;
- ctx.avail_meta_count = ctx.meta_area_tail->nslots
- = (4096-sizeof(struct meta_area))/sizeof *m;
- ctx.avail_meta = ctx.meta_area_tail->slots;
- }
- ctx.avail_meta_count--;
- m = ctx.avail_meta++;
- m->prev = m->next = 0;
- return m;
-}
-
-static uint32_t try_avail(struct meta **pm)
-{
- struct meta *m = *pm;
- uint32_t first;
- if (!m) return 0;
- uint32_t mask = m->avail_mask;
- if (!mask) {
- if (!m) return 0;
- if (!m->freed_mask) {
- dequeue(pm, m);
- m = *pm;
- if (!m) return 0;
- } else {
- m = m->next;
- *pm = m;
- }
-
- mask = m->freed_mask;
-
- // skip fully-free group unless it's the only one
- // or it's a permanently non-freeable group
- if (mask == (2u<last_idx)-1 && m->freeable) {
- m = m->next;
- *pm = m;
- mask = m->freed_mask;
- }
-
- // activate more slots in a not-fully-active group
- // if needed, but only as a last resort. prefer using
- // any other group with free slots. this avoids
- // touching & dirtying as-yet-unused pages.
- if (!(mask & ((2u<mem->active_idx)-1))) {
- if (m->next != m) {
- m = m->next;
- *pm = m;
- } else {
- int cnt = m->mem->active_idx + 2;
- int size = size_classes[m->sizeclass]*UNIT;
- int span = UNIT + size*cnt;
- // activate up to next 4k boundary
- while ((span^(span+size-1)) < 4096) {
- cnt++;
- span += size;
- }
- if (cnt > m->last_idx+1)
- cnt = m->last_idx+1;
- m->mem->active_idx = cnt-1;
- }
- }
- mask = activate_group(m);
- assert(mask);
- decay_bounces(m->sizeclass);
- }
- first = mask&-mask;
- m->avail_mask = mask-first;
- return first;
-}
-
-static int alloc_slot(int, size_t);
-
-static struct meta *alloc_group(int sc, size_t req)
-{
- size_t size = UNIT*size_classes[sc];
- int i = 0, cnt;
- unsigned char *p;
- struct meta *m = alloc_meta();
- if (!m) return 0;
- size_t usage = ctx.usage_by_class[sc];
- size_t pagesize = PGSZ;
- int active_idx;
- if (sc < 9) {
- while (i<2 && 4*small_cnt_tab[sc][i] > usage)
- i++;
- cnt = small_cnt_tab[sc][i];
- } else {
- // lookup max number of slots fitting in power-of-two size
- // from a table, along with number of factors of two we
- // can divide out without a remainder or reaching 1.
- cnt = med_cnt_tab[sc&3];
-
- // reduce cnt to avoid excessive eagar allocation.
- while (!(cnt&1) && 4*cnt > usage)
- cnt >>= 1;
-
- // data structures don't support groups whose slot offsets
- // in units don't fit in 16 bits.
- while (size*cnt >= 65536*UNIT)
- cnt >>= 1;
- }
-
- // If we selected a count of 1 above but it's not sufficient to use
- // mmap, increase to 2. Then it might be; if not it will nest.
- if (cnt==1 && size*cnt+UNIT <= pagesize/2) cnt = 2;
-
- // All choices of size*cnt are "just below" a power of two, so anything
- // larger than half the page size should be allocated as whole pages.
- if (size*cnt+UNIT > pagesize/2) {
- // check/update bounce counter to start/increase retention
- // of freed maps, and inhibit use of low-count, odd-size
- // small mappings and single-slot groups if activated.
- int nosmall = is_bouncing(sc);
- account_bounce(sc);
- step_seq();
-
- // since the following count reduction opportunities have
- // an absolute memory usage cost, don't overdo them. count
- // coarse usage as part of usage.
- if (!(sc&1) && sc<32) usage += ctx.usage_by_class[sc+1];
-
- // try to drop to a lower count if the one found above
- // increases usage by more than 25%. these reduced counts
- // roughly fill an integral number of pages, just not a
- // power of two, limiting amount of unusable space.
- if (4*cnt > usage && !nosmall) {
- if (0);
- else if ((sc&3)==1 && size*cnt>8*pagesize) cnt = 2;
- else if ((sc&3)==2 && size*cnt>4*pagesize) cnt = 3;
- else if ((sc&3)==0 && size*cnt>8*pagesize) cnt = 3;
- else if ((sc&3)==0 && size*cnt>2*pagesize) cnt = 5;
- }
- size_t needed = size*cnt + UNIT;
- needed += -needed & (pagesize-1);
-
- // produce an individually-mmapped allocation if usage is low,
- // bounce counter hasn't triggered, and either it saves memory
- // or it avoids eagar slot allocation without wasting too much.
- if (!nosmall && cnt<=7) {
- req += IB + UNIT;
- req += -req & (pagesize-1);
- if (req=4*pagesize && 2*cnt>usage)) {
- cnt = 1;
- needed = req;
- }
- }
-
- p = mmap(0, needed, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
- if (p==MAP_FAILED) {
- free_meta(m);
- return 0;
- }
- m->maplen = needed>>12;
- ctx.mmap_counter++;
- active_idx = (4096-UNIT)/size-1;
- if (active_idx > cnt-1) active_idx = cnt-1;
- if (active_idx < 0) active_idx = 0;
- } else {
- int j = size_to_class(UNIT+cnt*size-IB);
- int idx = alloc_slot(j, UNIT+cnt*size-IB);
- if (idx < 0) {
- free_meta(m);
- return 0;
- }
- struct meta *g = ctx.active[j];
- p = enframe(g, idx, UNIT*size_classes[j]-IB, ctx.mmap_counter);
- m->maplen = 0;
- p[-3] = (p[-3]&31) | (6<<5);
- for (int i=0; i<=cnt; i++)
- p[UNIT+i*size-4] = 0;
- active_idx = cnt-1;
- }
- ctx.usage_by_class[sc] += cnt;
- m->avail_mask = (2u<freed_mask = (2u<<(cnt-1))-1 - m->avail_mask;
- m->mem = (void *)p;
- m->mem->meta = m;
- m->mem->active_idx = active_idx;
- m->last_idx = cnt-1;
- m->freeable = 1;
- m->sizeclass = sc;
- return m;
-}
-
-static int alloc_slot(int sc, size_t req)
-{
- uint32_t first = try_avail(&ctx.active[sc]);
- if (first) return a_ctz_32(first);
-
- struct meta *g = alloc_group(sc, req);
- if (!g) return -1;
-
- g->avail_mask--;
- queue(&ctx.active[sc], g);
- return 0;
-}
-
-void *malloc(size_t n)
-{
- if (size_overflows(n)) return 0;
- struct meta *g;
- uint32_t mask, first;
- int sc;
- int idx;
- int ctr;
-
- if (n >= MMAP_THRESHOLD) {
- size_t needed = n + IB + UNIT;
- void *p = mmap(0, needed, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANON, -1, 0);
- if (p==MAP_FAILED) return 0;
- wrlock();
- step_seq();
- g = alloc_meta();
- if (!g) {
- unlock();
- munmap(p, needed);
- return 0;
- }
- g->mem = p;
- g->mem->meta = g;
- g->last_idx = 0;
- g->freeable = 1;
- g->sizeclass = 63;
- g->maplen = (needed+4095)/4096;
- g->avail_mask = g->freed_mask = 0;
- // use a global counter to cycle offset in
- // individually-mmapped allocations.
- ctx.mmap_counter++;
- idx = 0;
- goto success;
- }
-
- sc = size_to_class(n);
-
- rdlock();
- g = ctx.active[sc];
-
- // use coarse size classes initially when there are not yet
- // any groups of desired size. this allows counts of 2 or 3
- // to be allocated at first rather than having to start with
- // 7 or 5, the min counts for even size classes.
- if (!g && sc>=4 && sc<32 && sc!=6 && !(sc&1) && !ctx.usage_by_class[sc]) {
- size_t usage = ctx.usage_by_class[sc|1];
- // if a new group may be allocated, count it toward
- // usage in deciding if we can use coarse class.
- if (!ctx.active[sc|1] || (!ctx.active[sc|1]->avail_mask
- && !ctx.active[sc|1]->freed_mask))
- usage += 3;
- if (usage <= 12)
- sc |= 1;
- g = ctx.active[sc];
- }
-
- for (;;) {
- mask = g ? g->avail_mask : 0;
- first = mask&-mask;
- if (!first) break;
- if (RDLOCK_IS_EXCLUSIVE || !MT)
- g->avail_mask = mask-first;
- else if (a_cas(&g->avail_mask, mask, mask-first)!=mask)
- continue;
- idx = a_ctz_32(first);
- goto success;
- }
- upgradelock();
-
- idx = alloc_slot(sc, n);
- if (idx < 0) {
- unlock();
- return 0;
- }
- g = ctx.active[sc];
-
-success:
- ctr = ctx.mmap_counter;
- unlock();
- return enframe(g, idx, n, ctr);
-}
-
-int is_allzero(void *p)
-{
- struct meta *g = get_meta(p);
- return g->sizeclass >= 48 ||
- get_stride(g) < UNIT*size_classes[g->sizeclass];
-}
diff --git a/lib/libc/musl/src/malloc/mallocng/malloc_usable_size.c b/lib/libc/musl/src/malloc/mallocng/malloc_usable_size.c
deleted file mode 100644
index ce6a960c6f..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/malloc_usable_size.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include
-#include "meta.h"
-
-size_t malloc_usable_size(void *p)
-{
- if (!p) return 0;
- struct meta *g = get_meta(p);
- int idx = get_slot_index(p);
- size_t stride = get_stride(g);
- unsigned char *start = g->mem->storage + stride*idx;
- unsigned char *end = start + stride - IB;
- return get_nominal_size(p, end);
-}
diff --git a/lib/libc/musl/src/malloc/mallocng/meta.h b/lib/libc/musl/src/malloc/mallocng/meta.h
deleted file mode 100644
index 61ec53f9a5..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/meta.h
+++ /dev/null
@@ -1,288 +0,0 @@
-#ifndef MALLOC_META_H
-#define MALLOC_META_H
-
-#include
-#include
-#include
-#include "glue.h"
-
-__attribute__((__visibility__("hidden")))
-extern const uint16_t size_classes[];
-
-#define MMAP_THRESHOLD 131052
-
-#define UNIT 16
-#define IB 4
-
-struct group {
- struct meta *meta;
- unsigned char active_idx:5;
- char pad[UNIT - sizeof(struct meta *) - 1];
- unsigned char storage[];
-};
-
-struct meta {
- struct meta *prev, *next;
- struct group *mem;
- volatile int avail_mask, freed_mask;
- uintptr_t last_idx:5;
- uintptr_t freeable:1;
- uintptr_t sizeclass:6;
- uintptr_t maplen:8*sizeof(uintptr_t)-12;
-};
-
-struct meta_area {
- uint64_t check;
- struct meta_area *next;
- int nslots;
- struct meta slots[];
-};
-
-struct malloc_context {
- uint64_t secret;
-#ifndef PAGESIZE
- size_t pagesize;
-#endif
- int init_done;
- unsigned mmap_counter;
- struct meta *free_meta_head;
- struct meta *avail_meta;
- size_t avail_meta_count, avail_meta_area_count, meta_alloc_shift;
- struct meta_area *meta_area_head, *meta_area_tail;
- unsigned char *avail_meta_areas;
- struct meta *active[48];
- size_t usage_by_class[48];
- uint8_t unmap_seq[32], bounces[32];
- uint8_t seq;
- uintptr_t brk;
-};
-
-__attribute__((__visibility__("hidden")))
-extern struct malloc_context ctx;
-
-#ifdef PAGESIZE
-#define PGSZ PAGESIZE
-#else
-#define PGSZ ctx.pagesize
-#endif
-
-__attribute__((__visibility__("hidden")))
-struct meta *alloc_meta(void);
-
-__attribute__((__visibility__("hidden")))
-int is_allzero(void *);
-
-static inline void queue(struct meta **phead, struct meta *m)
-{
- assert(!m->next);
- assert(!m->prev);
- if (*phead) {
- struct meta *head = *phead;
- m->next = head;
- m->prev = head->prev;
- m->next->prev = m->prev->next = m;
- } else {
- m->prev = m->next = m;
- *phead = m;
- }
-}
-
-static inline void dequeue(struct meta **phead, struct meta *m)
-{
- if (m->next != m) {
- m->prev->next = m->next;
- m->next->prev = m->prev;
- if (*phead == m) *phead = m->next;
- } else {
- *phead = 0;
- }
- m->prev = m->next = 0;
-}
-
-static inline struct meta *dequeue_head(struct meta **phead)
-{
- struct meta *m = *phead;
- if (m) dequeue(phead, m);
- return m;
-}
-
-static inline void free_meta(struct meta *m)
-{
- *m = (struct meta){0};
- queue(&ctx.free_meta_head, m);
-}
-
-static inline uint32_t activate_group(struct meta *m)
-{
- assert(!m->avail_mask);
- uint32_t mask, act = (2u<mem->active_idx)-1;
- do mask = m->freed_mask;
- while (a_cas(&m->freed_mask, mask, mask&~act)!=mask);
- return m->avail_mask = mask & act;
-}
-
-static inline int get_slot_index(const unsigned char *p)
-{
- return p[-3] & 31;
-}
-
-static inline struct meta *get_meta(const unsigned char *p)
-{
- assert(!((uintptr_t)p & 15));
- int offset = *(const uint16_t *)(p - 2);
- int index = get_slot_index(p);
- if (p[-4]) {
- assert(!offset);
- offset = *(uint32_t *)(p - 8);
- assert(offset > 0xffff);
- }
- const struct group *base = (const void *)(p - UNIT*offset - UNIT);
- const struct meta *meta = base->meta;
- assert(meta->mem == base);
- assert(index <= meta->last_idx);
- assert(!(meta->avail_mask & (1u<freed_mask & (1u<check == ctx.secret);
- if (meta->sizeclass < 48) {
- assert(offset >= size_classes[meta->sizeclass]*index);
- assert(offset < size_classes[meta->sizeclass]*(index+1));
- } else {
- assert(meta->sizeclass == 63);
- }
- if (meta->maplen) {
- assert(offset <= meta->maplen*4096UL/UNIT - 1);
- }
- return (struct meta *)meta;
-}
-
-static inline size_t get_nominal_size(const unsigned char *p, const unsigned char *end)
-{
- size_t reserved = p[-3] >> 5;
- if (reserved >= 5) {
- assert(reserved == 5);
- reserved = *(const uint32_t *)(end-4);
- assert(reserved >= 5);
- assert(!end[-5]);
- }
- assert(reserved <= end-p);
- assert(!*(end-reserved));
- // also check the slot's overflow byte
- assert(!*end);
- return end-reserved-p;
-}
-
-static inline size_t get_stride(const struct meta *g)
-{
- if (!g->last_idx && g->maplen) {
- return g->maplen*4096UL - UNIT;
- } else {
- return UNIT*size_classes[g->sizeclass];
- }
-}
-
-static inline void set_size(unsigned char *p, unsigned char *end, size_t n)
-{
- int reserved = end-p-n;
- if (reserved) end[-reserved] = 0;
- if (reserved >= 5) {
- *(uint32_t *)(end-4) = reserved;
- end[-5] = 0;
- reserved = 5;
- }
- p[-3] = (p[-3]&31) + (reserved<<5);
-}
-
-static inline void *enframe(struct meta *g, int idx, size_t n, int ctr)
-{
- size_t stride = get_stride(g);
- size_t slack = (stride-IB-n)/UNIT;
- unsigned char *p = g->mem->storage + stride*idx;
- unsigned char *end = p+stride-IB;
- // cycle offset within slot to increase interval to address
- // reuse, facilitate trapping double-free.
- int off = (p[-3] ? *(uint16_t *)(p-2) + 1 : ctr) & 255;
- assert(!p[-4]);
- if (off > slack) {
- size_t m = slack;
- m |= m>>1; m |= m>>2; m |= m>>4;
- off &= m;
- if (off > slack) off -= slack+1;
- assert(off <= slack);
- }
- if (off) {
- // store offset in unused header at offset zero
- // if enframing at non-zero offset.
- *(uint16_t *)(p-2) = off;
- p[-3] = 7<<5;
- p += UNIT*off;
- // for nonzero offset there is no permanent check
- // byte, so make one.
- p[-4] = 0;
- }
- *(uint16_t *)(p-2) = (size_t)(p-g->mem->storage)/UNIT;
- p[-3] = idx;
- set_size(p, end, n);
- return p;
-}
-
-static inline int size_to_class(size_t n)
-{
- n = (n+IB-1)>>4;
- if (n<10) return n;
- n++;
- int i = (28-a_clz_32(n))*4 + 8;
- if (n>size_classes[i+1]) i+=2;
- if (n>size_classes[i]) i++;
- return i;
-}
-
-static inline int size_overflows(size_t n)
-{
- if (n >= SIZE_MAX/2 - 4096) {
- errno = ENOMEM;
- return 1;
- }
- return 0;
-}
-
-static inline void step_seq(void)
-{
- if (ctx.seq==255) {
- for (int i=0; i<32; i++) ctx.unmap_seq[i] = 0;
- ctx.seq = 1;
- } else {
- ctx.seq++;
- }
-}
-
-static inline void record_seq(int sc)
-{
- if (sc-7U < 32) ctx.unmap_seq[sc-7] = ctx.seq;
-}
-
-static inline void account_bounce(int sc)
-{
- if (sc-7U < 32) {
- int seq = ctx.unmap_seq[sc-7];
- if (seq && ctx.seq-seq < 10) {
- if (ctx.bounces[sc-7]+1 < 100)
- ctx.bounces[sc-7]++;
- else
- ctx.bounces[sc-7] = 150;
- }
- }
-}
-
-static inline void decay_bounces(int sc)
-{
- if (sc-7U < 32 && ctx.bounces[sc-7])
- ctx.bounces[sc-7]--;
-}
-
-static inline int is_bouncing(int sc)
-{
- return (sc-7U < 32 && ctx.bounces[sc-7] >= 100);
-}
-
-#endif
diff --git a/lib/libc/musl/src/malloc/mallocng/realloc.c b/lib/libc/musl/src/malloc/mallocng/realloc.c
deleted file mode 100644
index 18769f42d8..0000000000
--- a/lib/libc/musl/src/malloc/mallocng/realloc.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#define _GNU_SOURCE
-#include
-#include
-#include
-#include "meta.h"
-
-void *realloc(void *p, size_t n)
-{
- if (!p) return malloc(n);
- if (size_overflows(n)) return 0;
-
- struct meta *g = get_meta(p);
- int idx = get_slot_index(p);
- size_t stride = get_stride(g);
- unsigned char *start = g->mem->storage + stride*idx;
- unsigned char *end = start + stride - IB;
- size_t old_size = get_nominal_size(p, end);
- size_t avail_size = end-(unsigned char *)p;
- void *new;
-
- // only resize in-place if size class matches
- if (n <= avail_size && n= g->sizeclass) {
- set_size(p, end, n);
- return p;
- }
-
- // use mremap if old and new size are both mmap-worthy
- if (g->sizeclass>=48 && n>=MMAP_THRESHOLD) {
- assert(g->sizeclass==63);
- size_t base = (unsigned char *)p-start;
- size_t needed = (n + base + UNIT + IB + 4095) & -4096;
- new = g->maplen*4096UL == needed ? g->mem :
- mremap(g->mem, g->maplen*4096UL, needed, MREMAP_MAYMOVE);
- if (new!=MAP_FAILED) {
- g->mem = new;
- g->maplen = needed/4096;
- p = g->mem->storage + base;
- end = g->mem->storage + (needed - UNIT) - IB;
- *end = 0;
- set_size(p, end, n);
- return p;
- }
- }
-
- new = malloc(n);
- if (!new) return 0;
- memcpy(new, p, n < old_size ? n : old_size);
- free(p);
- return new;
-}
diff --git a/lib/libc/musl/src/malloc/memalign.c b/lib/libc/musl/src/malloc/memalign.c
deleted file mode 100644
index 32cd87d812..0000000000
--- a/lib/libc/musl/src/malloc/memalign.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#define _BSD_SOURCE
-#include
-
-void *memalign(size_t align, size_t len)
-{
- return aligned_alloc(align, len);
-}
diff --git a/lib/libc/musl/src/malloc/oldmalloc/aligned_alloc.c b/lib/libc/musl/src/malloc/oldmalloc/aligned_alloc.c
deleted file mode 100644
index 4adca3b4f6..0000000000
--- a/lib/libc/musl/src/malloc/oldmalloc/aligned_alloc.c
+++ /dev/null
@@ -1,53 +0,0 @@
-#include
-#include
-#include
-#include "malloc_impl.h"
-
-void *aligned_alloc(size_t align, size_t len)
-{
- unsigned char *mem, *new;
-
- if ((align & -align) != align) {
- errno = EINVAL;
- return 0;
- }
-
- if (len > SIZE_MAX - align ||
- (__malloc_replaced && !__aligned_alloc_replaced)) {
- errno = ENOMEM;
- return 0;
- }
-
- if (align <= SIZE_ALIGN)
- return malloc(len);
-
- if (!(mem = malloc(len + align-1)))
- return 0;
-
- new = (void *)((uintptr_t)mem + align-1 & -align);
- if (new == mem) return mem;
-
- struct chunk *c = MEM_TO_CHUNK(mem);
- struct chunk *n = MEM_TO_CHUNK(new);
-
- if (IS_MMAPPED(c)) {
- /* Apply difference between aligned and original
- * address to the "extra" field of mmapped chunk. */
- n->psize = c->psize + (new-mem);
- n->csize = c->csize - (new-mem);
- return new;
- }
-
- struct chunk *t = NEXT_CHUNK(c);
-
- /* Split the allocated chunk into two chunks. The aligned part
- * that will be used has the size in its footer reduced by the
- * difference between the aligned and original addresses, and
- * the resulting size copied to its header. A new header and
- * footer are written for the split-off part to be freed. */
- n->psize = c->csize = C_INUSE | (new-mem);
- n->csize = t->psize -= new-mem;
-
- __bin_chunk(c);
- return new;
-}
diff --git a/lib/libc/musl/src/malloc/oldmalloc/malloc.c b/lib/libc/musl/src/malloc/oldmalloc/malloc.c
deleted file mode 100644
index 25d00d44de..0000000000
--- a/lib/libc/musl/src/malloc/oldmalloc/malloc.c
+++ /dev/null
@@ -1,556 +0,0 @@
-#define _GNU_SOURCE
-#include
-#include
-#include
-#include
-#include
-#include
-#include "libc.h"
-#include "atomic.h"
-#include "pthread_impl.h"
-#include "malloc_impl.h"
-#include "fork_impl.h"
-
-#define malloc __libc_malloc_impl
-#define realloc __libc_realloc
-#define free __libc_free
-
-#if defined(__GNUC__) && defined(__PIC__)
-#define inline inline __attribute__((always_inline))
-#endif
-
-static struct {
- volatile uint64_t binmap;
- struct bin bins[64];
- volatile int split_merge_lock[2];
-} mal;
-
-/* Synchronization tools */
-
-static inline void lock(volatile int *lk)
-{
- int need_locks = libc.need_locks;
- if (need_locks) {
- while(a_swap(lk, 1)) __wait(lk, lk+1, 1, 1);
- if (need_locks < 0) libc.need_locks = 0;
- }
-}
-
-static inline void unlock(volatile int *lk)
-{
- if (lk[0]) {
- a_store(lk, 0);
- if (lk[1]) __wake(lk, 1, 1);
- }
-}
-
-static inline void lock_bin(int i)
-{
- lock(mal.bins[i].lock);
- if (!mal.bins[i].head)
- mal.bins[i].head = mal.bins[i].tail = BIN_TO_CHUNK(i);
-}
-
-static inline void unlock_bin(int i)
-{
- unlock(mal.bins[i].lock);
-}
-
-static int first_set(uint64_t x)
-{
-#if 1
- return a_ctz_64(x);
-#else
- static const char debruijn64[64] = {
- 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,
- 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,
- 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
- 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12
- };
- static const char debruijn32[32] = {
- 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13,
- 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14
- };
- if (sizeof(long) < 8) {
- uint32_t y = x;
- if (!y) {
- y = x>>32;
- return 32 + debruijn32[(y&-y)*0x076be629 >> 27];
- }
- return debruijn32[(y&-y)*0x076be629 >> 27];
- }
- return debruijn64[(x&-x)*0x022fdd63cc95386dull >> 58];
-#endif
-}
-
-static const unsigned char bin_tab[60] = {
- 32,33,34,35,36,36,37,37,38,38,39,39,
- 40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,
- 44,44,44,44,44,44,44,44,45,45,45,45,45,45,45,45,
- 46,46,46,46,46,46,46,46,47,47,47,47,47,47,47,47,
-};
-
-static int bin_index(size_t x)
-{
- x = x / SIZE_ALIGN - 1;
- if (x <= 32) return x;
- if (x < 512) return bin_tab[x/8-4];
- if (x > 0x1c00) return 63;
- return bin_tab[x/128-4] + 16;
-}
-
-static int bin_index_up(size_t x)
-{
- x = x / SIZE_ALIGN - 1;
- if (x <= 32) return x;
- x--;
- if (x < 512) return bin_tab[x/8-4] + 1;
- return bin_tab[x/128-4] + 17;
-}
-
-#if 0
-void __dump_heap(int x)
-{
- struct chunk *c;
- int i;
- for (c = (void *)mal.heap; CHUNK_SIZE(c); c = NEXT_CHUNK(c))
- fprintf(stderr, "base %p size %zu (%d) flags %d/%d\n",
- c, CHUNK_SIZE(c), bin_index(CHUNK_SIZE(c)),
- c->csize & 15,
- NEXT_CHUNK(c)->psize & 15);
- for (i=0; i<64; i++) {
- if (mal.bins[i].head != BIN_TO_CHUNK(i) && mal.bins[i].head) {
- fprintf(stderr, "bin %d: %p\n", i, mal.bins[i].head);
- if (!(mal.binmap & 1ULL< len ? b-len : 0;
- if (new>a && old len ? b-len : 0;
- if (new>a && old SIZE_MAX/2 - PAGE_SIZE) {
- errno = ENOMEM;
- return 0;
- }
- n += -n & PAGE_SIZE-1;
-
- if (!brk) {
- brk = __syscall(SYS_brk, 0);
- brk += -brk & PAGE_SIZE-1;
- }
-
- if (n < SIZE_MAX-brk && !traverses_stack_p(brk, brk+n)
- && __syscall(SYS_brk, brk+n)==brk+n) {
- *pn = n;
- brk += n;
- return (void *)(brk-n);
- }
-
- size_t min = (size_t)PAGE_SIZE << mmap_step/2;
- if (n < min) n = min;
- void *area = __mmap(0, n, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- if (area == MAP_FAILED) return 0;
- *pn = n;
- mmap_step++;
- return area;
-}
-
-static struct chunk *expand_heap(size_t n)
-{
- static void *end;
- void *p;
- struct chunk *w;
-
- /* The argument n already accounts for the caller's chunk
- * overhead needs, but if the heap can't be extended in-place,
- * we need room for an extra zero-sized sentinel chunk. */
- n += SIZE_ALIGN;
-
- p = __expand_heap(&n);
- if (!p) return 0;
-
- /* If not just expanding existing space, we need to make a
- * new sentinel chunk below the allocated space. */
- if (p != end) {
- /* Valid/safe because of the prologue increment. */
- n -= SIZE_ALIGN;
- p = (char *)p + SIZE_ALIGN;
- w = MEM_TO_CHUNK(p);
- w->psize = 0 | C_INUSE;
- }
-
- /* Record new heap end and fill in footer. */
- end = (char *)p + n;
- w = MEM_TO_CHUNK(end);
- w->psize = n | C_INUSE;
- w->csize = 0 | C_INUSE;
-
- /* Fill in header, which may be new or may be replacing a
- * zero-size sentinel header at the old end-of-heap. */
- w = MEM_TO_CHUNK(p);
- w->csize = n | C_INUSE;
-
- return w;
-}
-
-static int adjust_size(size_t *n)
-{
- /* Result of pointer difference must fit in ptrdiff_t. */
- if (*n-1 > PTRDIFF_MAX - SIZE_ALIGN - PAGE_SIZE) {
- if (*n) {
- errno = ENOMEM;
- return -1;
- } else {
- *n = SIZE_ALIGN;
- return 0;
- }
- }
- *n = (*n + OVERHEAD + SIZE_ALIGN - 1) & SIZE_MASK;
- return 0;
-}
-
-static void unbin(struct chunk *c, int i)
-{
- if (c->prev == c->next)
- a_and_64(&mal.binmap, ~(1ULL<prev->next = c->next;
- c->next->prev = c->prev;
- c->csize |= C_INUSE;
- NEXT_CHUNK(c)->psize |= C_INUSE;
-}
-
-static void bin_chunk(struct chunk *self, int i)
-{
- self->next = BIN_TO_CHUNK(i);
- self->prev = mal.bins[i].tail;
- self->next->prev = self;
- self->prev->next = self;
- if (self->prev == BIN_TO_CHUNK(i))
- a_or_64(&mal.binmap, 1ULL<= n1 - DONTCARE) return;
-
- next = NEXT_CHUNK(self);
- split = (void *)((char *)self + n);
-
- split->psize = n | C_INUSE;
- split->csize = n1-n;
- next->psize = n1-n;
- self->csize = n | C_INUSE;
-
- int i = bin_index(n1-n);
- lock_bin(i);
-
- bin_chunk(split, i);
-
- unlock_bin(i);
-}
-
-void *malloc(size_t n)
-{
- struct chunk *c;
- int i, j;
- uint64_t mask;
-
- if (adjust_size(&n) < 0) return 0;
-
- if (n > MMAP_THRESHOLD) {
- size_t len = n + OVERHEAD + PAGE_SIZE - 1 & -PAGE_SIZE;
- char *base = __mmap(0, len, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- if (base == (void *)-1) return 0;
- c = (void *)(base + SIZE_ALIGN - OVERHEAD);
- c->csize = len - (SIZE_ALIGN - OVERHEAD);
- c->psize = SIZE_ALIGN - OVERHEAD;
- return CHUNK_TO_MEM(c);
- }
-
- i = bin_index_up(n);
- if (i<63 && (mal.binmap & (1ULL<psize;
- char *base = (char *)self - extra;
- size_t oldlen = n0 + extra;
- size_t newlen = n + extra;
- /* Crash on realloc of freed chunk */
- if (extra & 1) a_crash();
- if (newlen < PAGE_SIZE && (new = malloc(n-OVERHEAD))) {
- n0 = n;
- goto copy_free_ret;
- }
- newlen = (newlen + PAGE_SIZE-1) & -PAGE_SIZE;
- if (oldlen == newlen) return p;
- base = __mremap(base, oldlen, newlen, MREMAP_MAYMOVE);
- if (base == (void *)-1)
- goto copy_realloc;
- self = (void *)(base + extra);
- self->csize = newlen - extra;
- return CHUNK_TO_MEM(self);
- }
-
- next = NEXT_CHUNK(self);
-
- /* Crash on corrupted footer (likely from buffer overflow) */
- if (next->psize != self->csize) a_crash();
-
- if (n < n0) {
- int i = bin_index_up(n);
- int j = bin_index(n0);
- if (icsize = split->psize = n | C_INUSE;
- split->csize = next->psize = n0-n | C_INUSE;
- __bin_chunk(split);
- return CHUNK_TO_MEM(self);
- }
-
- lock(mal.split_merge_lock);
-
- size_t nsize = next->csize & C_INUSE ? 0 : CHUNK_SIZE(next);
- if (n0+nsize >= n) {
- int i = bin_index(nsize);
- lock_bin(i);
- if (!(next->csize & C_INUSE)) {
- unbin(next, i);
- unlock_bin(i);
- next = NEXT_CHUNK(next);
- self->csize = next->psize = n0+nsize | C_INUSE;
- trim(self, n);
- unlock(mal.split_merge_lock);
- return CHUNK_TO_MEM(self);
- }
- unlock_bin(i);
- }
- unlock(mal.split_merge_lock);
-
-copy_realloc:
- /* As a last resort, allocate a new chunk and copy to it. */
- new = malloc(n-OVERHEAD);
- if (!new) return 0;
-copy_free_ret:
- memcpy(new, p, (npsize != self->csize) a_crash();
-
- lock(mal.split_merge_lock);
-
- size_t osize = CHUNK_SIZE(self), size = osize;
-
- /* Since we hold split_merge_lock, only transition from free to
- * in-use can race; in-use to free is impossible */
- size_t psize = self->psize & C_INUSE ? 0 : CHUNK_PSIZE(self);
- size_t nsize = next->csize & C_INUSE ? 0 : CHUNK_SIZE(next);
-
- if (psize) {
- int i = bin_index(psize);
- lock_bin(i);
- if (!(self->psize & C_INUSE)) {
- struct chunk *prev = PREV_CHUNK(self);
- unbin(prev, i);
- self = prev;
- size += psize;
- }
- unlock_bin(i);
- }
- if (nsize) {
- int i = bin_index(nsize);
- lock_bin(i);
- if (!(next->csize & C_INUSE)) {
- unbin(next, i);
- next = NEXT_CHUNK(next);
- size += nsize;
- }
- unlock_bin(i);
- }
-
- int i = bin_index(size);
- lock_bin(i);
-
- self->csize = size;
- next->psize = size;
- bin_chunk(self, i);
- unlock(mal.split_merge_lock);
-
- /* Replace middle of large chunks with fresh zero pages */
- if (size > RECLAIM && (size^(size-osize)) > size-osize) {
- uintptr_t a = (uintptr_t)self + SIZE_ALIGN+PAGE_SIZE-1 & -PAGE_SIZE;
- uintptr_t b = (uintptr_t)next - SIZE_ALIGN & -PAGE_SIZE;
- int e = errno;
-#if 1
- __madvise((void *)a, b-a, MADV_DONTNEED);
-#else
- __mmap((void *)a, b-a, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0);
-#endif
- errno = e;
- }
-
- unlock_bin(i);
-}
-
-static void unmap_chunk(struct chunk *self)
-{
- size_t extra = self->psize;
- char *base = (char *)self - extra;
- size_t len = CHUNK_SIZE(self) + extra;
- /* Crash on double free */
- if (extra & 1) a_crash();
- int e = errno;
- __munmap(base, len);
- errno = e;
-}
-
-void free(void *p)
-{
- if (!p) return;
-
- struct chunk *self = MEM_TO_CHUNK(p);
-
- if (IS_MMAPPED(self))
- unmap_chunk(self);
- else
- __bin_chunk(self);
-}
-
-void __malloc_donate(char *start, char *end)
-{
- size_t align_start_up = (SIZE_ALIGN-1) & (-(uintptr_t)start - OVERHEAD);
- size_t align_end_down = (SIZE_ALIGN-1) & (uintptr_t)end;
-
- /* Getting past this condition ensures that the padding for alignment
- * and header overhead will not overflow and will leave a nonzero
- * multiple of SIZE_ALIGN bytes between start and end. */
- if (end - start <= OVERHEAD + align_start_up + align_end_down)
- return;
- start += align_start_up + OVERHEAD;
- end -= align_end_down;
-
- struct chunk *c = MEM_TO_CHUNK(start), *n = MEM_TO_CHUNK(end);
- c->psize = n->csize = C_INUSE;
- c->csize = n->psize = C_INUSE | (end-start);
- __bin_chunk(c);
-}
-
-void __malloc_atfork(int who)
-{
- if (who<0) {
- lock(mal.split_merge_lock);
- for (int i=0; i<64; i++)
- lock(mal.bins[i].lock);
- } else if (!who) {
- for (int i=0; i<64; i++)
- unlock(mal.bins[i].lock);
- unlock(mal.split_merge_lock);
- } else {
- for (int i=0; i<64; i++)
- mal.bins[i].lock[0] = mal.bins[i].lock[1] = 0;
- mal.split_merge_lock[1] = 0;
- mal.split_merge_lock[0] = 0;
- }
-}
diff --git a/lib/libc/musl/src/malloc/oldmalloc/malloc_impl.h b/lib/libc/musl/src/malloc/oldmalloc/malloc_impl.h
deleted file mode 100644
index e1cf4774c1..0000000000
--- a/lib/libc/musl/src/malloc/oldmalloc/malloc_impl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef MALLOC_IMPL_H
-#define MALLOC_IMPL_H
-
-#include
-#include "dynlink.h"
-
-struct chunk {
- size_t psize, csize;
- struct chunk *next, *prev;
-};
-
-struct bin {
- volatile int lock[2];
- struct chunk *head;
- struct chunk *tail;
-};
-
-#define SIZE_ALIGN (4*sizeof(size_t))
-#define SIZE_MASK (-SIZE_ALIGN)
-#define OVERHEAD (2*sizeof(size_t))
-#define MMAP_THRESHOLD (0x1c00*SIZE_ALIGN)
-#define DONTCARE 16
-#define RECLAIM 163840
-
-#define CHUNK_SIZE(c) ((c)->csize & -2)
-#define CHUNK_PSIZE(c) ((c)->psize & -2)
-#define PREV_CHUNK(c) ((struct chunk *)((char *)(c) - CHUNK_PSIZE(c)))
-#define NEXT_CHUNK(c) ((struct chunk *)((char *)(c) + CHUNK_SIZE(c)))
-#define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD)
-#define CHUNK_TO_MEM(c) (void *)((char *)(c) + OVERHEAD)
-#define BIN_TO_CHUNK(i) (MEM_TO_CHUNK(&mal.bins[i].head))
-
-#define C_INUSE ((size_t)1)
-
-#define IS_MMAPPED(c) !((c)->csize & (C_INUSE))
-
-hidden void __bin_chunk(struct chunk *);
-
-#endif
diff --git a/lib/libc/musl/src/malloc/oldmalloc/malloc_usable_size.c b/lib/libc/musl/src/malloc/oldmalloc/malloc_usable_size.c
deleted file mode 100644
index 672b518ad0..0000000000
--- a/lib/libc/musl/src/malloc/oldmalloc/malloc_usable_size.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include
-#include "malloc_impl.h"
-
-hidden void *(*const __realloc_dep)(void *, size_t) = realloc;
-
-size_t malloc_usable_size(void *p)
-{
- return p ? CHUNK_SIZE(MEM_TO_CHUNK(p)) - OVERHEAD : 0;
-}
diff --git a/lib/libc/musl/src/malloc/posix_memalign.c b/lib/libc/musl/src/malloc/posix_memalign.c
deleted file mode 100644
index ad4d8f4730..0000000000
--- a/lib/libc/musl/src/malloc/posix_memalign.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include
-#include
-
-int posix_memalign(void **res, size_t align, size_t len)
-{
- if (align < sizeof(void *)) return EINVAL;
- void *mem = aligned_alloc(align, len);
- if (!mem) return errno;
- *res = mem;
- return 0;
-}
diff --git a/lib/libc/musl/src/malloc/realloc.c b/lib/libc/musl/src/malloc/realloc.c
deleted file mode 100644
index fb0e8b7c47..0000000000
--- a/lib/libc/musl/src/malloc/realloc.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include
-
-void *realloc(void *p, size_t n)
-{
- return __libc_realloc(p, n);
-}
diff --git a/lib/libc/musl/src/malloc/reallocarray.c b/lib/libc/musl/src/malloc/reallocarray.c
deleted file mode 100644
index 4a6ebe4604..0000000000
--- a/lib/libc/musl/src/malloc/reallocarray.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#define _BSD_SOURCE
-#include