TWx Linux Repository
Go to file
Guillaume Nault 661c63cb34 ipv4: Convert ip_route_input() to dscp_t.
[ Upstream commit 7e863e5db6185b1add0df4cb01b31a4ed1c4b738 ]

Pass a dscp_t variable to ip_route_input(), instead of a plain u8, to
prevent accidental setting of ECN bits in ->flowi4_tos.

Callers of ip_route_input() to consider are:

  * input_action_end_dx4_finish() and input_action_end_dt4() in
    net/ipv6/seg6_local.c. These functions set the tos parameter to 0,
    which is already a valid dscp_t value, so they don't need to be
    adjusted for the new prototype.

  * icmp_route_lookup(), which already has a dscp_t variable to pass as
    parameter. We just need to remove the inet_dscp_to_dsfield()
    conversion.

  * br_nf_pre_routing_finish(), ip_options_rcv_srr() and ip4ip6_err(),
    which get the DSCP directly from IPv4 headers. Define a helper to
    read the .tos field of struct iphdr as dscp_t, so that these
    function don't have to do the conversion manually.

While there, declare *iph as const in br_nf_pre_routing_finish(),
declare its local variables in reverse-christmas-tree order and move
the "err = ip_route_input()" assignment out of the conditional to avoid
checkpatch warning.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/e9d40781d64d3d69f4c79ac8a008b8d67a033e8d.1727807926.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 27843ce6ba3d ("ipvlan: ensure network headers are in skb linear part")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-07 16:45:39 +01:00
arch x86/cpu/kvm: SRSO: Fix possible missing IBPB on VM-Exit 2025-02-27 04:10:54 -08:00
block partitions: mac: fix handling of bogus partition table 2025-02-21 13:57:18 +01:00
certs certs: Reference revocation list for all keyrings 2023-08-17 20:12:41 +00:00
crypto crypto: ecc - Prevent ecc_digits_from_bytes from reading too many bytes 2025-01-09 13:31:52 +01:00
Documentation strparser: Add read_sock callback 2025-02-27 04:10:50 -08:00
drivers ipvlan: Unmask upper DSCP bits in ipvlan_process_v4_outbound() 2025-03-07 16:45:39 +01:00
fs afs: Fix the server_list to unuse a displaced server rather than putting it 2025-03-07 16:45:38 +01:00
include ipv4: Convert ip_route_input() to dscp_t. 2025-03-07 16:45:39 +01:00
init Compiler Attributes: disable __counted_by for clang < 19.1.3 2024-12-09 10:32:46 +01:00
io_uring io_uring: prevent opcode speculation 2025-02-27 04:10:51 -08:00
ipc ipc: fix memleak if msg_init_ns failed in create_ipc_ns 2024-12-09 10:32:54 +01:00
kernel ftrace: Do not add duplicate entries in subops manager ops 2025-02-27 04:10:53 -08:00
lib lib/iov_iter: fix import_iovec_ubuf iovec management 2025-02-27 04:10:52 -08:00
LICENSES
mm mm,madvise,hugetlb: check for 0-length range after end address adjustment 2025-02-27 04:10:52 -08:00
net ipv4: Convert ip_route_input() to dscp_t. 2025-03-07 16:45:39 +01:00
rust rust: init: use explicit ABI to clean warning in future compilers 2025-02-17 09:40:27 +01:00
samples samples/landlock: Fix possible NULL dereference in parse_path() 2025-02-08 09:51:57 +01:00
scripts scripts/gdb: fix aarch64 userspace detection in get_current_task 2025-02-17 09:40:39 +01:00
security tomoyo: don't emit warning in tomoyo_write_control() 2025-02-17 09:40:07 +01:00
sound ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports 2025-03-07 16:45:37 +01:00
tools selftests: rtnetlink: update netdevsim ipsec output format 2025-02-21 13:57:25 +01:00
usr
virt KVM: Use dedicated mutex to protect kvm_usage_count to avoid deadlock 2024-10-04 16:29:47 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-10-04 16:29:44 +02:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml
COPYING
CREDITS USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
Kbuild
Kconfig
MAINTAINERS membarrier: riscv: Add full memory barrier in switch_mm() 2024-09-12 11:11:45 +02:00
Makefile Linux 6.6.80 2025-02-27 04:10:54 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.