From 418a674f869b61586ca23ced1ab9f3f0bc3d5e58 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 15 Dec 2022 03:56:39 +0800 Subject: [PATCH 1/7] generic: fix linux 6.1 flowoffload support --- target/linux/generic/config-6.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index 010688e83b55b6..e3ebd486a2a20c 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -4542,7 +4542,7 @@ CONFIG_NF_NAT_MASQUERADE_IPV6=y # CONFIG_NF_REJECT_IPV6 is not set # CONFIG_NF_SOCKET_IPV4 is not set # CONFIG_NF_SOCKET_IPV6 is not set -# CONFIG_NF_TABLES is not set +CONFIG_NF_TABLES=y CONFIG_NF_TABLES_ARP=y CONFIG_NF_TABLES_BRIDGE=y CONFIG_NF_TABLES_INET=y From e50a86b90f91a8055065c97fa71b29c17b62dc6c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 15 Dec 2022 03:59:10 +0800 Subject: [PATCH 2/7] firewall: set default fullcone to high performance mode --- package/network/config/firewall/Makefile | 2 +- package/network/config/firewall/files/firewall.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index 7f8c655c571b8d..6e99960ec8d2a3 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=firewall -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git diff --git a/package/network/config/firewall/files/firewall.config b/package/network/config/firewall/files/firewall.config index 42f6f6aa315b0d..cdb4d0880a4556 100644 --- a/package/network/config/firewall/files/firewall.config +++ b/package/network/config/firewall/files/firewall.config @@ -3,7 +3,7 @@ config defaults option input ACCEPT option output ACCEPT option forward REJECT - option fullcone 0 + option fullcone 2 # Uncomment this line to disable ipv6 rules # option disable_ipv6 1 From a1b503c6ad5c5a901078a915209b09ef82838095 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 15 Dec 2022 12:09:41 +0800 Subject: [PATCH 3/7] dnsmasq: add logfacility file to jail mounts --- package/network/services/dnsmasq/Makefile | 2 +- .../services/dnsmasq/files/dnsmasq.init | 343 ++++-------------- 2 files changed, 75 insertions(+), 270 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index c6850d0096ce7d..22eb12c1d1987e 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2022 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 3250e0cee762b1..9a7fb92de22dbd 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -19,57 +19,13 @@ BASEDHCPSTAMPFILE="/var/run/dnsmasq" DHCPBOGUSHOSTNAMEFILE="/usr/share/dnsmasq/dhcpbogushostname.conf" RFC6761FILE="/usr/share/dnsmasq/rfc6761.conf" DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh" -DHCPSCRIPT_DEPENDS="/usr/share/libubox/jshn.sh /usr/bin/jshn /bin/ubus" DNSMASQ_DHCP_VER=4 -dnsmasq_ignore_opt() { - local opt="$1" - - if [ -z "$dnsmasq_features" ]; then - dnsmasq_features="$(dnsmasq --version | grep -m1 'Compile time options:' | cut -d: -f2) " - [ "${dnsmasq_features#* DHCP }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp=1 - [ "${dnsmasq_features#* DHCPv6 }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp6=1 - [ "${dnsmasq_features#* DNSSEC }" = "$dnsmasq_features" ] || dnsmasq_has_dnssec=1 - [ "${dnsmasq_features#* TFTP }" = "$dnsmasq_features" ] || dnsmasq_has_tftp=1 - [ "${dnsmasq_features#* ipset }" = "$dnsmasq_features" ] || dnsmasq_has_ipset=1 - [ "${dnsmasq_features#* nftset }" = "$dnsmasq_features" ] || dnsmasq_has_nftset=1 - fi - - case "$opt" in - dhcp-duid|\ - ra-param) - [ -z "$dnsmasq_has_dhcp6" ] ;; - dhcp-*|\ - bootp-*|\ - pxe-*) - [ -z "$dnsmasq_has_dhcp" ] ;; - dnssec*|\ - trust-anchor) - if [ -z "$dnsmasq_has_dnssec" ]; then - echo "dnsmasq: \"$opt\" requested, but dnssec support is not available" >&2 - exit 1 - fi - return 1 - ;; - tftp-*) - [ -z "$dnsmasq_has_tftp" ] ;; - ipset) - [ -z "$dnsmasq_has_ipset" ] ;; - nftset) - [ -z "$dnsmasq_has_nftset" ] ;; - *) - return 1 - esac -} - xappend() { - local value="${1#--}" - local opt="${value%%=*}" + local value="$1" - if ! dnsmasq_ignore_opt "$opt"; then - echo "$value" >>$CONFIGFILE_TMP - fi + echo "${value#--}" >> $CONFIGFILE_TMP } hex_to_hostid() { @@ -111,14 +67,19 @@ dhcp_check() { [ -s "$stamp" ] && return $(cat "$stamp") - # If interface is down, skip it. + # If there's no carrier yet, skip this interface. # The init script will be called again once the link is up - case "$(devstatus "$ifname" | jsonfilter -e @.up)" in + case "$(devstatus "$ifname" | jsonfilter -e @.carrier)" in false) return 1;; esac udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0 + [ $rv -eq 1 ] && \ + logger -t dnsmasq \ + "found already running DHCP-server on interface '$ifname'" \ + "refusing to start, use 'option force 1' to override" + echo $rv > "$stamp" return $rv } @@ -165,15 +126,15 @@ append_server() { } append_rev_server() { - xappend "--rev-server=$1" + xappend "--rev-server=$1" } append_address() { xappend "--address=$1" } -append_connmark_allowlist() { - xappend "--connmark-allowlist=$1" +append_ipset() { + xappend "--ipset=$1" } append_interface() { @@ -190,26 +151,7 @@ append_notinterface() { xappend "--except-interface=$ifname" } -ismounted() { - local filename="$1" - local dirname - for dirname in $EXTRA_MOUNT ; do - case "$filename" in - "${dirname}/"* | "${dirname}" ) - return 0 - ;; - esac - done - - return 1 -} - -append_extramount() { - ismounted "$1" || append EXTRA_MOUNT "$1" -} - append_addnhosts() { - append_extramount "$1" xappend "--addn-hosts=$1" } @@ -230,7 +172,7 @@ filter_dnsmasq() { # use entry when no instance entry set, or if it matches config_get found_cfg "$cfg" "instance" - if [ -z "$found_cfg" ] || [ "$found_cfg" = "$match_cfg" ]; then + if [ -z "$found_cfg" -o "$found_cfg" = "$match_cfg" ]; then $func $cfg fi } @@ -244,7 +186,7 @@ dhcp_subscrid_add() { config_get subscriberid "$cfg" subscriberid [ -n "$subscriberid" ] || return 0 - xappend "--dhcp-subscrid=set:$networkid,$subscriberid" + xappend "--dhcp-subscrid=$networkid,$subscriberid" config_get_bool force "$cfg" force 0 @@ -260,7 +202,7 @@ dhcp_remoteid_add() { config_get remoteid "$cfg" remoteid [ -n "$remoteid" ] || return 0 - xappend "--dhcp-remoteid=set:$networkid,$remoteid" + xappend "--dhcp-remoteid=$networkid,$remoteid" config_get_bool force "$cfg" force 0 @@ -277,7 +219,7 @@ dhcp_circuitid_add() { config_get circuitid "$cfg" circuitid [ -n "$circuitid" ] || return 0 - xappend "--dhcp-circuitid=set:$networkid,$circuitid" + xappend "--dhcp-circuitid=$networkid,$circuitid" config_get_bool force "$cfg" force 0 @@ -293,7 +235,7 @@ dhcp_userclass_add() { config_get userclass "$cfg" userclass [ -n "$userclass" ] || return 0 - xappend "--dhcp-userclass=set:$networkid,$userclass" + xappend "--dhcp-userclass=$networkid,$userclass" config_get_bool force "$cfg" force 0 @@ -310,7 +252,7 @@ dhcp_vendorclass_add() { config_get vendorclass "$cfg" vendorclass [ -n "$vendorclass" ] || return 0 - xappend "--dhcp-vendorclass=set:$networkid,$vendorclass" + xappend "--dhcp-vendorclass=$networkid,$vendorclass" config_get_bool force "$cfg" force 0 @@ -326,7 +268,7 @@ dhcp_match_add() { config_get match "$cfg" match [ -n "$match" ] || return 0 - xappend "--dhcp-match=set:$networkid,$match" + xappend "--dhcp-match=$networkid,$match" config_get_bool force "$cfg" force 0 @@ -335,7 +277,7 @@ dhcp_match_add() { dhcp_host_add() { local cfg="$1" - local hosttag nametime addrs duids macs tags mtags + local hosttag nametime addrs duids macs tags config_get_bool force "$cfg" force 0 @@ -349,10 +291,10 @@ dhcp_host_add() { config_get ip "$cfg" ip config_get hostid "$cfg" hostid - [ -z "$ip" ] && [ -z "$name" ] && [ -z "$hostid" ] && return 0 + [ -n "$ip" -o -n "$name" -o -n "$hostid" ] || return 0 config_get_bool dns "$cfg" dns 0 - [ "$dns" = "1" ] && [ -n "$ip" ] && [ -n "$name" ] && { + [ "$dns" = "1" -a -n "$ip" -a -n "$name" ] && { echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE_TMP } @@ -360,24 +302,19 @@ dhcp_host_add() { config_get duid "$cfg" duid config_get tag "$cfg" tag - add_tag() { - mtags="${mtags}tag:$1," - } - config_list_foreach "$cfg" match_tag add_tag - if [ -n "$mac" ]; then # --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap # many MAC are possible to track a laptop ON/OFF dock for m in $mac; do append macs "$m" ","; done fi - if [ $DNSMASQ_DHCP_VER -eq 6 ] && [ -n "$duid" ]; then + if [ $DNSMASQ_DHCP_VER -eq 6 -a -n "$duid" ]; then # --dhcp-host=id:00:03:00:01:12:00:00:01:02:03,[::beef],lap # one (virtual) machine gets one DUID per RFC3315 duids="id:${duid// */}" fi - if [ -z "$macs" ] && [ -z "$duids" ]; then + if [ -z "$macs" -a -z "$duids" ]; then # --dhcp-host=lap,192.168.0.199,[::beef] [ -n "$name" ] || return 0 macs="$name" @@ -402,9 +339,9 @@ dhcp_host_add() { if [ $DNSMASQ_DHCP_VER -eq 6 ]; then addrs="${ip:+,$ip}${hostid:+,[::$hostid]}" - xappend "--dhcp-host=$mtags$macs${duids:+,$duids}$hosttag$addrs$nametime" + xappend "--dhcp-host=$macs${duids:+,$duids}$hosttag$addrs$nametime" else - xappend "--dhcp-host=$mtags$macs$hosttag${ip:+,$ip}$nametime" + xappend "--dhcp-host=$macs$hosttag${ip:+,$ip}$nametime" fi } @@ -444,7 +381,7 @@ dhcp_this_host_add() { dhcp_domain_add "" "$routername" "$lanaddr" fi - if [ -n "$ulaprefix" ] && [ -n "$lanaddrs6" ] ; then + if [ -n "$ulaprefix" -a -n "$lanaddrs6" ] ; then for lanaddr6 in $lanaddrs6 ; do case "$lanaddr6" in "${ulaprefix%%:/*}"*) @@ -500,7 +437,7 @@ dhcp_boot_add() { config_get servername "$cfg" servername config_get serveraddress "$cfg" serveraddress - [ -n "$serveraddress" ] && [ ! -n "$servername" ] && return 0 + [ -n "$serveraddress" -a ! -n "$servername" ] && return 0 xappend "--dhcp-boot=${networkid:+net:$networkid,}${filename}${servername:+,$servername}${serveraddress:+,$serveraddress}" @@ -545,12 +482,7 @@ dhcp_add() { #check for an already active dhcp server on the interface, unless 'force' is set config_get_bool force "$cfg" force 0 - [ $force -gt 0 ] || dhcp_check "$ifname" || { - logger -t dnsmasq \ - "found already running DHCP-server on interface '$ifname'" \ - "refusing to start, use 'option force 1' to override" - return 0 - } + [ $force -gt 0 ] || dhcp_check "$ifname" || return 0 config_get start "$cfg" start 100 config_get limit "$cfg" limit 150 @@ -599,7 +531,7 @@ dhcp_add() { fi - if [ $DNSMASQ_DHCP_VER -eq 6 ] && [ "$ra" = "server" ] ; then + if [ $DNSMASQ_DHCP_VER -eq 6 -a "$ra" = "server" ] ; then # Note: dnsmasq cannot just be a DHCPv6 server (all-in-1) # and let some other machine(s) send RA pointing to it. @@ -797,83 +729,26 @@ dhcp_relay_add() { fi } -dnsmasq_ipset_add() { - local cfg="$1" - local ipsets nftsets domains - - add_ipset() { - ipsets="${ipsets:+$ipsets,}$1" - } - - add_nftset() { - local IFS=, - for set in $1; do - local fam="$family" - [ -n "$fam" ] || fam=$(echo "$set" | sed -nre \ - 's#^.*[^0-9]([46])$|^.*[-_]([46])[-_].*$|^([46])[^0-9].*$#\1\2\3#p') - [ -n "$fam" ] || \ - fam=$(nft -t list set "$table_family" "$table" "$set" 2>&1 | sed -nre \ - 's#^\t\ttype .*\bipv([46])_addr\b.*$#\1#p') - - [ -n "$fam" ] || \ - logger -t dnsmasq "Cannot infer address family from non-existent nftables set '$set'" - - nftsets="${nftsets:+$nftsets,}${fam:+$fam#}$table_family#$table#$set" - done - } - - add_domain() { - # leading '/' is expected - domains="$domains/$1" - } - - config_get table "$cfg" table 'fw4' - config_get table_family "$cfg" table_family 'inet' - if [ "$table_family" = "ip" ] ; then - family="4" - elif [ "$table_family" = "ip6" ] ; then - family="6" - else - config_get family "$cfg" family - fi - - config_list_foreach "$cfg" "name" add_ipset - config_list_foreach "$cfg" "name" add_nftset - config_list_foreach "$cfg" "domain" add_domain - - if [ -z "$ipsets" ] || [ -z "$nftsets" ] || [ -z "$domains" ]; then - return 0 - fi - - xappend "--ipset=$domains/$ipsets" - xappend "--nftset=$domains/$nftsets" -} - dnsmasq_start() { - local cfg="$1" - local disabled user_dhcpscript logfacility - local resolvfile resolvdir localuse=0 + local cfg="$1" disabled resolvfile user_dhcpscript config_get_bool disabled "$cfg" disabled 0 [ "$disabled" -gt 0 ] && return 0 - # reset list of DOMAINS, DNS servers and EXTRA mounts (for each dnsmasq instance) + # reset list of DOMAINS and DNS servers (for each dnsmasq instance) DNS_SERVERS="" DOMAIN="" - EXTRA_MOUNT="" CONFIGFILE="${BASECONFIGFILE}.${cfg}" CONFIGFILE_TMP="${CONFIGFILE}.$$" HOSTFILE="${BASEHOSTFILE}.${cfg}" HOSTFILE_TMP="${HOSTFILE}.$$" - HOSTFILE_DIR="$(dirname "$HOSTFILE")" BASEDHCPSTAMPFILE_CFG="${BASEDHCPSTAMPFILE}.${cfg}" # before we can call xappend - umask u=rwx,g=rx,o=rx mkdir -p /var/run/dnsmasq/ mkdir -p $(dirname $CONFIGFILE) - mkdir -p "$HOSTFILE_DIR" + mkdir -p $(dirname $HOSTFILE) mkdir -p /var/lib/misc chown dnsmasq:dnsmasq /var/run/dnsmasq @@ -893,13 +768,13 @@ dnsmasq_start() $PROG --version | grep -osqE "^Compile time options:.* DHCPv6( |$)" && DHCPv6CAPABLE=1 || DHCPv6CAPABLE=0 - if [ -x /usr/sbin/odhcpd ] && [ -x /etc/init.d/odhcpd ] ; then + if [ -x /usr/sbin/odhcpd -a -x /etc/init.d/odhcpd ] ; then local odhcpd_is_main odhcpd_is_enabled config_get odhcpd_is_main odhcpd maindhcp 0 /etc/init.d/odhcpd enabled && odhcpd_is_enabled=1 || odhcpd_is_enabled=0 - if [ "$odhcpd_is_enabled" -eq 0 ] && [ "$DHCPv6CAPABLE" -eq 1 ] ; then + if [ "$odhcpd_is_enabled" -eq 0 -a "$DHCPv6CAPABLE" -eq 1 ] ; then # DHCP V4 and V6 in DNSMASQ DNSMASQ_DHCP_VER=6 elif [ "$odhcpd_is_main" -gt 0 ] ; then @@ -922,7 +797,7 @@ dnsmasq_start() if [ -x /etc/init.d/dhcpd ] ; then /etc/init.d/dhcpd enabled && DNSMASQ_DHCP_VER=0 fi - if [ -x /etc/init.d/dhcpd6 ] && [ "$DNSMASQ_DHCP_VER" -gt 0 ] ; then + if [ -x /etc/init.d/dhcpd6 -a "$DNSMASQ_DHCP_VER" -gt 0 ] ; then /etc/init.d/dhcpd6 enabled && DNSMASQ_DHCP_VER=4 fi fi @@ -938,16 +813,8 @@ dnsmasq_start() append_bool "$cfg" noresolv "--no-resolv" append_bool "$cfg" localise_queries "--localise-queries" append_bool "$cfg" readethers "--read-ethers" - - local instance_name="dnsmasq.$cfg" - if [ "$cfg" = "$DEFAULT_INSTANCE" ]; then - instance_name="dnsmasq" - fi - config_get_bool dbus "$cfg" "dbus" 0 - [ $dbus -gt 0 ] && xappend "--enable-dbus=uk.org.thekelleys.$instance_name" - config_get_bool ubus "$cfg" "ubus" 1 - [ $ubus -gt 0 ] && xappend "--enable-ubus=$instance_name" - + append_bool "$cfg" dbus "--enable-dbus" + append_bool "$cfg" ubus "--enable-ubus" 1 append_bool "$cfg" expandhosts "--expand-hosts" config_get tftp_root "$cfg" "tftp_root" [ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp" @@ -961,14 +828,13 @@ dnsmasq_start() append_bool "$cfg" sequential_ip "--dhcp-sequential-ip" append_bool "$cfg" allservers "--all-servers" append_bool "$cfg" noping "--no-ping" - append_bool "$cfg" rapidcommit "--dhcp-rapid-commit" - append_bool "$cfg" scriptarp "--script-arp" - - append_bool "$cfg" filter_aaaa "--filter-AAAA" - append_bool "$cfg" filter_a "--filter-A" + + append_bool "$cfg" filter_aaaa "--filter-aaaa" append_parm "$cfg" logfacility "--log-facility" - config_get logfacility "$cfg" "logfacility" + + append_parm "$cfg" mini_ttl "--min-ttl" + append_parm "$cfg" cachesize "--cache-size" append_parm "$cfg" dnsforwardmax "--dns-forward-max" append_parm "$cfg" port "--port" @@ -978,50 +844,24 @@ dnsmasq_start() append_parm "$cfg" "minport" "--min-port" append_parm "$cfg" "maxport" "--max-port" append_parm "$cfg" "domain" "--domain" - append_parm "$cfg" "local" "--local" + append_parm "$cfg" "local" "--server" config_list_foreach "$cfg" "listen_address" append_listenaddress config_list_foreach "$cfg" "server" append_server config_list_foreach "$cfg" "rev_server" append_rev_server config_list_foreach "$cfg" "address" append_address - - local connmark_allowlist_enable - config_get connmark_allowlist_enable "$cfg" connmark_allowlist_enable 0 - [ "$connmark_allowlist_enable" -gt 0 ] && { - append_parm "$cfg" "connmark_allowlist_enable" "--connmark-allowlist-enable" - config_list_foreach "$cfg" "connmark_allowlist" append_connmark_allowlist - } - + config_list_foreach "$cfg" "ipset" append_ipset [ -n "$BOOT" ] || { config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface } - config_get_bool ignore_hosts_dir "$cfg" ignore_hosts_dir 0 - if [ "$ignore_hosts_dir" = "1" ]; then - xappend "--addn-hosts=$HOSTFILE" - append EXTRA_MOUNT "$HOSTFILE" - else - xappend "--addn-hosts=$HOSTFILE_DIR" - append EXTRA_MOUNT "$HOSTFILE_DIR" - fi config_list_foreach "$cfg" "addnhosts" append_addnhosts config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain append_parm "$cfg" "leasefile" "--dhcp-leasefile" "/tmp/dhcp.leases" - - local serversfile - config_get serversfile "$cfg" "serversfile" - [ -n "$serversfile" ] && { - xappend "--servers-file=$serversfile" - append EXTRA_MOUNT "$serversfile" - } - + append_parm "$cfg" "serversfile" "--servers-file" append_parm "$cfg" "tftp_root" "--tftp-root" append_parm "$cfg" "dhcp_boot" "--dhcp-boot" append_parm "$cfg" "local_ttl" "--local-ttl" - append_parm "$cfg" "max_ttl" "--max-ttl" - append_parm "$cfg" "min_cache_ttl" "--min-cache-ttl" - append_parm "$cfg" "max_cache_ttl" "--max-cache-ttl" append_parm "$cfg" "pxe_prompt" "--pxe-prompt" - append_parm "$cfg" "tftp_unique_root" "--tftp-unique-root" config_list_foreach "$cfg" "pxe_service" append_pxe_service config_get DOMAIN "$cfg" domain @@ -1038,22 +878,20 @@ dnsmasq_start() config_get user_dhcpscript $cfg dhcpscript if has_handler || [ -n "$user_dhcpscript" ]; then xappend "--dhcp-script=$DHCPSCRIPT" - xappend "--script-arp" fi config_get leasefile $cfg leasefile "/tmp/dhcp.leases" - [ -n "$leasefile" ] && [ ! -e "$leasefile" ] && touch "$leasefile" + [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile" config_get_bool cachelocal "$cfg" cachelocal 1 config_get_bool noresolv "$cfg" noresolv 0 if [ "$noresolv" != "1" ]; then - config_get resolvfile "$cfg" resolvfile /tmp/resolv.conf.d/resolv.conf.auto - [ -n "$resolvfile" ] && [ ! -e "$resolvfile" ] && touch "$resolvfile" - xappend "--resolv-file=$resolvfile" - [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto" ] && localuse=1 - resolvdir="$(dirname "$resolvfile")" + config_get resolvfile "$cfg" resolvfile "/tmp/resolv.conf.d/resolv.conf.auto.auto" + # So jail doesn't complain if file missing + [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile" fi - config_get_bool localuse "$cfg" localuse "$localuse" + + [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile" config_get hostsfile "$cfg" dhcphostsfile [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile" @@ -1086,12 +924,12 @@ dnsmasq_start() xappend "--conf-file=$TRUSTANCHORSFILE" xappend "--dnssec" [ -x /etc/init.d/sysntpd ] && { - if /etc/init.d/sysntpd enabled || [ "$(uci_get system.ntp.enabled)" = "1" ] ; then + /etc/init.d/sysntpd enabled + [ "$?" -ne 0 -o "$(uci_get system.ntp.enabled)" = "1" ] && { [ -f "$TIMEVALIDFILE" ] || xappend "--dnssec-no-timecheck" - fi + } } - config_get_bool dnsseccheckunsigned "$cfg" dnsseccheckunsigned 1 - [ "$dnsseccheckunsigned" -eq 0 ] && xappend "--dnssec-check-unsigned=no" + append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned" } config_get addmac "$cfg" addmac 0 @@ -1105,6 +943,7 @@ dnsmasq_start() xappend "--dhcp-broadcast=tag:needs-broadcast" + xappend "--addn-hosts=$(dirname $HOSTFILE)" config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d" xappend "--conf-dir=$dnsmasqconfdir" @@ -1172,62 +1011,46 @@ dnsmasq_start() echo >> $CONFIGFILE_TMP echo >> $CONFIGFILE_TMP - config_foreach filter_dnsmasq ipset dnsmasq_ipset_add "$cfg" - echo >> $CONFIGFILE_TMP - mv -f $CONFIGFILE_TMP $CONFIGFILE mv -f $HOSTFILE_TMP $HOSTFILE - [ "$localuse" -gt 0 ] && { - rm -f /tmp/resolv.conf + [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto.auto" ] && { + rm -f /tmp/resolv.conf.d/resolv.conf.auto [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && { - echo "search $DOMAIN" >> /tmp/resolv.conf + echo "search $DOMAIN" >> /tmp/resolv.conf.d/resolv.conf.auto } DNS_SERVERS="$DNS_SERVERS 127.0.0.1" - [ -e /proc/sys/net/ipv6 ] && DNS_SERVERS="$DNS_SERVERS ::1" for DNS_SERVER in $DNS_SERVERS ; do - echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf + echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf.d/resolv.conf.auto done } - config_list_foreach "$cfg" addnmount append_extramount - procd_open_instance $cfg procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid procd_set_param file $CONFIGFILE [ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript" procd_set_param respawn - local instance_ifc instance_netdev - config_get instance_ifc "$cfg" interface - [ -n "$instance_ifc" ] && network_get_device instance_netdev "$instance_ifc" && - [ -n "$instance_netdev" ] && procd_set_param netdev $instance_netdev - procd_add_jail dnsmasq ubus log - procd_add_jail_mount $CONFIGFILE $DHCPBOGUSHOSTNAMEFILE $DHCPSCRIPT $DHCPSCRIPT_DEPENDS - procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE - procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript - procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers - procd_add_jail_mount_rw /var/run/dnsmasq/ /var/etc/ $leasefile - case "$logfacility" in */*) - [ ! -e "$logfacility" ] && touch "$logfacility" - procd_add_jail_mount_rw "$logfacility" - esac + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT + procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile procd_close_instance } dnsmasq_stop() { - local cfg="$1" - local noresolv resolvfile localuse=0 + local cfg="$1" resolvfile - config_get_bool noresolv "$cfg" noresolv 0 config_get resolvfile "$cfg" "resolvfile" - [ "$noresolv" = 0 ] && [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto" ] && localuse=1 - config_get_bool localuse "$cfg" localuse "$localuse" - [ "$localuse" -gt 0 ] && ln -sf "/tmp/resolv.conf.d/resolv.conf.auto" /tmp/resolv.conf + #relink /tmp/resolve.conf only for main instance + [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto.auto" ] && { + [ -f /tmp/resolv.conf.d/resolv.conf.auto ] && { + rm -f /tmp/resolv.conf.d/resolv.conf.auto + ln -s "$resolvfile" /tmp/resolv.conf.d/resolv.conf.auto + } + } rm -f ${BASEDHCPSTAMPFILE}.${cfg}.*.dhcp } @@ -1239,7 +1062,7 @@ add_interface_trigger() config_get interface "$1" interface config_get_bool ignore "$1" ignore 0 - [ -n "$interface" ] && [ $ignore -eq 0 ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/dnsmasq reload + [ -n "$interface" -a $ignore -eq 0 ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/dnsmasq reload } service_triggers() @@ -1260,7 +1083,6 @@ boot() start_service() { local instance="$1" local instance_found=0 - local first_instance="" . /lib/functions/network.sh @@ -1268,30 +1090,13 @@ start_service() { local type="$1" local name="$2" if [ "$type" = "dnsmasq" ]; then - if [ -n "$instance" ] && [ "$instance" = "$name" ]; then + if [ -n "$instance" -a "$instance" = "$name" ]; then instance_found=1 fi - if [ -z "$DEFAULT_INSTANCE" ]; then - local disabled - config_get_bool disabled "$name" disabled 0 - if [ "$disabled" -eq 0 ]; then - # First enabled section will be assigned default instance name. - # Unnamed sections get precedence over named sections. - if expr "$cfg" : 'cfg[0-9a-f]*$' >/dev/null = "9"; then # See uci_fixup_section. - DEFAULT_INSTANCE="$name" # Unnamed config section. - elif [ -z "$first_instance" ]; then - first_instance="$name" - fi - fi - fi fi } - DEFAULT_INSTANCE="" config_load dhcp - if [ -z "$DEFAULT_INSTANCE" ]; then - DEFAULT_INSTANCE="$first_instance" # No unnamed config section was found. - fi if [ -n "$instance" ]; then [ "$instance_found" -gt 0 ] || return @@ -1314,7 +1119,7 @@ stop_service() { local type="$1" local name="$2" if [ "$type" = "dnsmasq" ]; then - if [ -n "$instance" ] && [ "$instance" = "$name" ]; then + if [ -n "$instance" -a "$instance" = "$name" ]; then instance_found=1 fi fi From 8c172cc7bf07a5dfe473016a95605374c27cbf84 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 15 Dec 2022 12:18:02 +0800 Subject: [PATCH 4/7] dnsmasq: add support for filter-AAAA/A --- package/network/services/dnsmasq/files/dnsmasq.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 9a7fb92de22dbd..b4699147f4b58f 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -829,7 +829,8 @@ dnsmasq_start() append_bool "$cfg" allservers "--all-servers" append_bool "$cfg" noping "--no-ping" - append_bool "$cfg" filter_aaaa "--filter-aaaa" + append_bool "$cfg" filter_aaaa "--filter-AAAA" + append_bool "$cfg" filter_a "--filter-A" append_parm "$cfg" logfacility "--log-facility" From afb7eaa4bb0d68151d96f1777313ad28f1b32d90 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 15 Dec 2022 13:13:15 +0800 Subject: [PATCH 5/7] dnsmasq: drop mini_ttl option --- .../services/dnsmasq/files/dnsmasq.init | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index b4699147f4b58f..317bfbd5dce500 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -833,8 +833,6 @@ dnsmasq_start() append_bool "$cfg" filter_a "--filter-A" append_parm "$cfg" logfacility "--log-facility" - - append_parm "$cfg" mini_ttl "--min-ttl" append_parm "$cfg" cachesize "--cache-size" append_parm "$cfg" dnsforwardmax "--dns-forward-max" @@ -887,7 +885,7 @@ dnsmasq_start() config_get_bool noresolv "$cfg" noresolv 0 if [ "$noresolv" != "1" ]; then - config_get resolvfile "$cfg" resolvfile "/tmp/resolv.conf.d/resolv.conf.auto.auto" + config_get resolvfile "$cfg" resolvfile "/tmp/resolv.conf.d/resolv.conf.auto" # So jail doesn't complain if file missing [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile" fi @@ -1015,14 +1013,14 @@ dnsmasq_start() mv -f $CONFIGFILE_TMP $CONFIGFILE mv -f $HOSTFILE_TMP $HOSTFILE - [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto.auto" ] && { - rm -f /tmp/resolv.conf.d/resolv.conf.auto + [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto" ] && { + rm -f /tmp/resolv.conf [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && { - echo "search $DOMAIN" >> /tmp/resolv.conf.d/resolv.conf.auto + echo "search $DOMAIN" >> /tmp/resolv.conf } DNS_SERVERS="$DNS_SERVERS 127.0.0.1" for DNS_SERVER in $DNS_SERVERS ; do - echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf.d/resolv.conf.auto + echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf done } @@ -1046,10 +1044,10 @@ dnsmasq_stop() config_get resolvfile "$cfg" "resolvfile" #relink /tmp/resolve.conf only for main instance - [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto.auto" ] && { - [ -f /tmp/resolv.conf.d/resolv.conf.auto ] && { - rm -f /tmp/resolv.conf.d/resolv.conf.auto - ln -s "$resolvfile" /tmp/resolv.conf.d/resolv.conf.auto + [ "$resolvfile" = "/tmp/resolv.conf.d/resolv.conf.auto" ] && { + [ -f /tmp/resolv.conf ] && { + rm -f /tmp/resolv.conf + ln -s "$resolvfile" /tmp/resolv.conf } } From 7660f97fb6b76dcc128d4e3a30d327626c148b66 Mon Sep 17 00:00:00 2001 From: lovehackintosh <92633080+lovehackintosh@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:14:31 +0800 Subject: [PATCH 6/7] kernel: bump to 5.4.227, 5.10.159, 5.15.83 (#10619) * kernel: bump 5.15 to 5.15.83 Signed-off-by: Linhui Liu * kernel: bump 5.10 to 5.10.159 Signed-off-by: Linhui Liu * kernel: bump 5.4 to 5.4.227 Signed-off-by: Linhui Liu Signed-off-by: Linhui Liu --- include/kernel-5.10 | 4 +-- include/kernel-5.15 | 4 +-- include/kernel-5.4 | 4 +-- include/kernel-6.1 | 2 +- ...2-Allow-exporting-of-a-struct-dmabuf.patch | 4 +-- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 4 +-- ...-t-prevent-IRQ-usage-of-output-GPIOs.patch | 4 +-- ...2c-Add-driver-for-Sony-IMX477-sensor.patch | 2 +- ...vicetree-Add-documentation-for-imx37.patch | 2 +- ...a-i2c-Add-IMX519-CMOS-sensor-binding.patch | 2 +- .../950-0835-clk-Add-clk_drop_range.patch | 2 +- ...clk-Fix-clk_get_parent-documentation.patch | 2 +- .../950-0865-clk-Add-clk_get_rate_range.patch | 6 ++-- ...b53-Use-dev_-err-info-instead-of-pr_.patch | 4 +-- ...-support-BCM4908-s-integrated-switch.patch | 2 +- ...the-dst-buffer-to-of_get_mac_address.patch | 2 +- ...t-skb-offload_fwd_mark-when-not-offl.patch | 6 ++-- ...-mm-multigenerational-lru-groundwork.patch | 8 ++--- ...multigenerational-lru-mm_struct-list.patch | 6 ++-- ...Support-public-address-configuration.patch | 4 +-- ...Fix-application-of-sizeof-to-pointer.patch | 2 +- ...the-dst-buffer-to-of_get_mac_address.patch | 2 +- ...k-events-support-multiple-registrant.patch | 4 +-- ...k-events-support-multiple-registrant.patch | 6 ++-- ...-Fix-crash-by-zero-initializing-data.patch | 30 ------------------- ...-Fix-crash-by-zero-initializing-data.patch | 30 ------------------- ..._cached-and-pgprot_cached_ns-support.patch | 2 +- ...-spi-mediatek-add-mt7986-spi-support.patch | 14 ++++----- ...an-entry-for-the-IEI-WT61P803-PUZZLE.patch | 2 +- ...-host-by-default-on-rk3399-rock-pi-4.patch | 2 +- ...-phy-Add-driver-for-Motorcomm-yt8521.patch | 2 +- ...399-add-support-for-Rongpin-King3399.patch | 2 +- ...-host-by-default-on-rk3399-rock-pi-4.patch | 2 +- 33 files changed, 57 insertions(+), 117 deletions(-) delete mode 100644 target/linux/generic/pending-5.10/870-ca8210-Fix-crash-by-zero-initializing-data.patch delete mode 100644 target/linux/generic/pending-5.15/870-ca8210-Fix-crash-by-zero-initializing-data.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index b7179b8567e9cd..bd40dc0f40705e 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .158 -LINUX_KERNEL_HASH-5.10.158 = 1e0a24bb5510caa18b3601b25e12cc2a1ce123948de551f4f2cdbb40aea707e7 +LINUX_VERSION-5.10 = .159 +LINUX_KERNEL_HASH-5.10.159 = 1ba9bf57b6bf36d76447d5044b80b746cb5fd61d981c811603dc763b7789cea7 diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 18444aaa84af48..9a619067df000b 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .82 -LINUX_KERNEL_HASH-5.15.82 = fceef6bb79bac494663ccde34453521fc616cd94272fd30564752b3742381b65 +LINUX_VERSION-5.15 = .83 +LINUX_KERNEL_HASH-5.15.83 = 40590843c04c85789105157f69efbd71a4efe87ae2568e40d1b7258c3f747ff3 diff --git a/include/kernel-5.4 b/include/kernel-5.4 index 6822fba0325b3f..b0b5a17660655e 100644 --- a/include/kernel-5.4 +++ b/include/kernel-5.4 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.4 = .226 -LINUX_KERNEL_HASH-5.4.226 = 0c1f552a1d2f63b3ecd4d33189f0003bc91fb8ff79967a7e295d015c280c9a44 +LINUX_VERSION-5.4 = .227 +LINUX_KERNEL_HASH-5.4.227 = 5eefc5037415f31c942d3cfa430b96c2a273246cf7e51db1e51b1d89887f0593 diff --git a/include/kernel-6.1 b/include/kernel-6.1 index c4e086dd9a40cc..cc7e084e70b9bd 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = +LINUX_VERSION-6.1 = LINUX_KERNEL_HASH-6.1 = 2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb diff --git a/target/linux/bcm27xx/patches-5.15/950-0132-media-videobuf2-Allow-exporting-of-a-struct-dmabuf.patch b/target/linux/bcm27xx/patches-5.15/950-0132-media-videobuf2-Allow-exporting-of-a-struct-dmabuf.patch index d9d644a59cac12..04796a589acb0c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0132-media-videobuf2-Allow-exporting-of-a-struct-dmabuf.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0132-media-videobuf2-Allow-exporting-of-a-struct-dmabuf.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c -@@ -2144,12 +2144,12 @@ static int __find_plane_by_offset(struct +@@ -2195,12 +2195,12 @@ static int __find_plane_by_offset(struct return -EINVAL; } @@ -35,7 +35,7 @@ Signed-off-by: Dave Stevenson struct dma_buf *dbuf; if (q->memory != VB2_MEMORY_MMAP) { -@@ -2201,6 +2201,21 @@ int vb2_core_expbuf(struct vb2_queue *q, +@@ -2252,6 +2252,21 @@ int vb2_core_expbuf(struct vb2_queue *q, return -EINVAL; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 99edfa714bbd54..62552a544719fe 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1310,6 +1313,9 @@ +@@ -1313,6 +1316,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -195,6 +196,7 @@ static const struct hid_device_id hid_qu +@@ -198,6 +199,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET }, diff --git a/target/linux/bcm27xx/patches-5.15/950-0238-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch b/target/linux/bcm27xx/patches-5.15/950-0238-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch index ef43c8c73aece9..b7146a27385c5e 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0238-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0238-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell /* Device and char device-related information */ static DEFINE_IDA(gpio_ida); static dev_t gpio_devt; -@@ -2361,8 +2363,8 @@ int gpiod_direction_output(struct gpio_d +@@ -2392,8 +2394,8 @@ int gpiod_direction_output(struct gpio_d value = !!value; /* GPIOs used for enabled IRQs shall not be set as output */ @@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell gpiod_err(desc, "%s: tried to set a GPIO tied to an IRQ as output\n", __func__); -@@ -3180,8 +3182,8 @@ int gpiochip_lock_as_irq(struct gpio_chi +@@ -3211,8 +3213,8 @@ int gpiochip_lock_as_irq(struct gpio_chi } /* To be valid for IRQ the line needs to be input or open drain */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch index 4f94a9f11dcc37..ce18978978951f 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch @@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17526,6 +17526,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -17521,6 +17521,14 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml F: drivers/media/i2c/imx412.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch index 8c75f80baa9783..bf0a69ffe5b8a3 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch @@ -132,7 +132,7 @@ Signed-off-by: David Plowman +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17540,6 +17540,7 @@ M: Raspberry Pi Kernel Maintenance +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17544,6 +17544,14 @@ F: Documentation/devicetree/bindings/med +@@ -17539,6 +17539,14 @@ F: Documentation/devicetree/bindings/med F: Documentation/devicetree/bindings/media/i2c/imx477.yaml F: drivers/media/i2c/imx477.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0835-clk-Add-clk_drop_range.patch b/target/linux/bcm27xx/patches-5.15/950-0835-clk-Add-clk_drop_range.patch index ce3831d3f9e637..cc6ca7ddae532d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0835-clk-Add-clk_drop_range.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0835-clk-Add-clk_drop_range.patch @@ -37,7 +37,7 @@ Signed-off-by: Maxime Ripard rate = clk_get_rate(clk); --- a/include/linux/clk.h +++ b/include/linux/clk.h -@@ -987,6 +987,17 @@ static inline void clk_bulk_disable_unpr +@@ -1096,6 +1096,17 @@ static inline void clk_bulk_disable_unpr } /** diff --git a/target/linux/bcm27xx/patches-5.15/950-0845-clk-Fix-clk_get_parent-documentation.patch b/target/linux/bcm27xx/patches-5.15/950-0845-clk-Fix-clk_get_parent-documentation.patch index 9b8214421601dd..b5339cf4377ca4 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0845-clk-Fix-clk_get_parent-documentation.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0845-clk-Fix-clk_get_parent-documentation.patch @@ -55,7 +55,7 @@ Signed-off-by: Maxime Ripard KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified), --- a/include/linux/clk.h +++ b/include/linux/clk.h -@@ -744,8 +744,9 @@ int clk_set_parent(struct clk *clk, stru +@@ -829,8 +829,9 @@ int clk_set_parent(struct clk *clk, stru * clk_get_parent - get the parent clock source for this clock * @clk: clock source * diff --git a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch index 09d5dc4bce4252..b861cb3264296f 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch @@ -55,7 +55,7 @@ Signed-off-by: Maxime Ripard * --- a/include/linux/clk.h +++ b/include/linux/clk.h -@@ -714,6 +714,17 @@ bool clk_has_parent(struct clk *clk, str +@@ -799,6 +799,17 @@ bool clk_has_parent(struct clk *clk, str int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max); /** @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard * clk_set_min_rate - set a minimum clock rate for a clock source * @clk: clock source * @rate: desired minimum clock rate in Hz, inclusive -@@ -909,6 +920,16 @@ static inline int clk_set_rate_range(str +@@ -1018,6 +1029,16 @@ static inline int clk_set_rate_range(str return 0; } @@ -90,7 +90,7 @@ Signed-off-by: Maxime Ripard static inline int clk_set_min_rate(struct clk *clk, unsigned long rate) { return 0; -@@ -999,6 +1020,44 @@ static inline int clk_drop_range(struct +@@ -1108,6 +1129,44 @@ static inline int clk_drop_range(struct } /** diff --git a/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch b/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch index be09ab9e7dba82..23e54f449eb7af 100644 --- a/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch +++ b/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller #include #include #include -@@ -2475,8 +2473,9 @@ int b53_switch_detect(struct b53_device +@@ -2476,8 +2474,9 @@ int b53_switch_detect(struct b53_device dev->chip_id = id32; break; default: @@ -38,7 +38,7 @@ Signed-off-by: David S. Miller return -ENODEV; } } -@@ -2506,7 +2505,8 @@ int b53_switch_register(struct b53_devic +@@ -2507,7 +2506,8 @@ int b53_switch_register(struct b53_devic if (ret) return ret; diff --git a/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch b/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch index 766db3e6418846..b90895527581da 100644 --- a/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch +++ b/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch @@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c -@@ -2271,6 +2271,22 @@ static const struct b53_chip_data b53_sw +@@ -2272,6 +2272,22 @@ static const struct b53_chip_data b53_sw .jumbo_pm_reg = B53_JUMBO_PORT_MASK, .jumbo_size_reg = B53_JUMBO_MAX_SIZE, }, diff --git a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index d8a40c7a599f94..ca7a5f8fa67bf6 100644 --- a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller mdio = of_find_node_by_phandle(*ph); --- a/drivers/net/ethernet/aeroflex/greth.c +++ b/drivers/net/ethernet/aeroflex/greth.c -@@ -1449,10 +1449,10 @@ static int greth_of_probe(struct platfor +@@ -1450,10 +1450,10 @@ static int greth_of_probe(struct platfor break; } if (i == 6) { diff --git a/target/linux/generic/backport-5.10/744-v5.15-net-dsa-don-t-set-skb-offload_fwd_mark-when-not-offl.patch b/target/linux/generic/backport-5.10/744-v5.15-net-dsa-don-t-set-skb-offload_fwd_mark-when-not-offl.patch index ab4fdf85093a90..51f87904ef18d1 100644 --- a/target/linux/generic/backport-5.10/744-v5.15-net-dsa-don-t-set-skb-offload_fwd_mark-when-not-offl.patch +++ b/target/linux/generic/backport-5.10/744-v5.15-net-dsa-don-t-set-skb-offload_fwd_mark-when-not-offl.patch @@ -82,9 +82,9 @@ Signed-off-by: David S. Miller memmove(skb->data - ETH_HLEN, --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c -@@ -24,7 +24,7 @@ static struct sk_buff *ksz_common_rcv(st - - pskb_trim_rcsum(skb, skb->len - len); +@@ -25,7 +25,7 @@ static struct sk_buff *ksz_common_rcv(st + if (pskb_trim_rcsum(skb, skb->len - len)) + return NULL; - skb->offload_fwd_mark = true; + dsa_default_offload_fwd_mark(skb); diff --git a/target/linux/generic/backport-5.15/020-v6.1-04-mm-multigenerational-lru-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-04-mm-multigenerational-lru-groundwork.patch index 533ea2aa200422..e057b29c470428 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-04-mm-multigenerational-lru-groundwork.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-04-mm-multigenerational-lru-groundwork.patch @@ -92,7 +92,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7 } --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h -@@ -432,6 +432,18 @@ static inline void cgroup_put(struct cgr +@@ -433,6 +433,18 @@ static inline void cgroup_put(struct cgr css_put(&cgrp->self); } @@ -111,7 +111,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7 /** * task_css_set_check - obtain a task's css_set with extra access conditions * @task: the task to obtain css_set for -@@ -446,7 +458,6 @@ static inline void cgroup_put(struct cgr +@@ -447,7 +459,6 @@ static inline void cgroup_put(struct cgr * as locks used during the cgroup_subsys::attach() methods. */ #ifdef CONFIG_PROVE_RCU @@ -119,7 +119,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7 extern spinlock_t css_set_lock; #define task_css_set_check(task, __c) \ rcu_dereference_check((task)->cgroups, \ -@@ -707,6 +718,8 @@ struct cgroup; +@@ -708,6 +719,8 @@ struct cgroup; static inline u64 cgroup_id(const struct cgroup *cgrp) { return 1; } static inline void css_get(struct cgroup_subsys_state *css) {} static inline void css_put(struct cgroup_subsys_state *css) {} @@ -593,7 +593,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7 VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING, --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -5226,6 +5226,7 @@ static struct mem_cgroup *mem_cgroup_all +@@ -5237,6 +5237,7 @@ static struct mem_cgroup *mem_cgroup_all memcg->deferred_split_queue.split_queue_len = 0; #endif idr_replace(&mem_cgroup_idr, memcg, memcg->id.id); diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multigenerational-lru-mm_struct-list.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multigenerational-lru-mm_struct-list.patch index 736b4f5152e4d5..53dce95ffb209b 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multigenerational-lru-mm_struct-list.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multigenerational-lru-mm_struct-list.patch @@ -339,7 +339,7 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8 /* will mmdrop() in finish_task_switch(). */ --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -5163,6 +5163,7 @@ static void __mem_cgroup_free(struct mem +@@ -5174,6 +5174,7 @@ static void __mem_cgroup_free(struct mem static void mem_cgroup_free(struct mem_cgroup *memcg) { @@ -347,7 +347,7 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8 memcg_wb_domain_exit(memcg); __mem_cgroup_free(memcg); } -@@ -6195,6 +6196,29 @@ static void mem_cgroup_move_task(void) +@@ -6206,6 +6207,29 @@ static void mem_cgroup_move_task(void) } #endif @@ -377,7 +377,7 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8 static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value) { if (value == PAGE_COUNTER_MAX) -@@ -6538,6 +6562,7 @@ struct cgroup_subsys memory_cgrp_subsys +@@ -6549,6 +6573,7 @@ struct cgroup_subsys memory_cgrp_subsys .css_reset = mem_cgroup_css_reset, .css_rstat_flush = mem_cgroup_css_rstat_flush, .can_attach = mem_cgroup_can_attach, diff --git a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch index daa3cac4eff5c8..cf39ba1abd81ff 100644 --- a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch +++ b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch @@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2263,6 +2263,23 @@ struct btmtk_section_map { +@@ -2268,6 +2268,23 @@ struct btmtk_section_map { }; } __packed; @@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann static void btusb_mtk_wmt_recv(struct urb *urb) { struct hci_dev *hdev = urb->context; -@@ -3914,6 +3931,7 @@ static int btusb_probe(struct usb_interf +@@ -3919,6 +3936,7 @@ static int btusb_probe(struct usb_interf hdev->shutdown = btusb_mtk_shutdown; hdev->manufacturer = 70; hdev->cmd_timeout = btusb_mtk_cmd_timeout; diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch index b324cb1aa80b20..9b8d8635a855d0 100644 --- a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch +++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch @@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2268,7 +2268,7 @@ static int btusb_set_bdaddr_mtk(struct h +@@ -2273,7 +2273,7 @@ static int btusb_set_bdaddr_mtk(struct h struct sk_buff *skb; long ret; diff --git a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 69643236cb09a8..f9b1f0d7a061e3 100644 --- a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller mdio = of_find_node_by_phandle(*ph); --- a/drivers/net/ethernet/aeroflex/greth.c +++ b/drivers/net/ethernet/aeroflex/greth.c -@@ -1451,10 +1451,10 @@ static int greth_of_probe(struct platfor +@@ -1452,10 +1452,10 @@ static int greth_of_probe(struct platfor break; } if (i == 6) { diff --git a/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch index 8bf6e53a2b505b..3f5167a04cac46 100644 --- a/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.10/952-net-conntrack-events-support-multiple-registrant.patch @@ -274,7 +274,7 @@ Signed-off-by: Zhi Chen int nf_ct_expect_register_notifier(struct net *net, --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c -@@ -701,12 +701,19 @@ static size_t ctnetlink_nlmsg_size(const +@@ -706,12 +706,19 @@ static size_t ctnetlink_nlmsg_size(const } static int @@ -294,7 +294,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3756,9 +3763,15 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3757,9 +3764,15 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/hack-5.15/952-add-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-5.15/952-add-net-conntrack-events-support-multiple-registrant.patch index 380f91c74beb51..a1e8e52246b9e2 100644 --- a/target/linux/generic/hack-5.15/952-add-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-5.15/952-add-net-conntrack-events-support-multiple-registrant.patch @@ -286,7 +286,7 @@ Signed-off-by: Zhi Chen void nf_conntrack_ecache_work(struct net *net, enum nf_ct_ecache_state state) --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c -@@ -706,12 +706,19 @@ static size_t ctnetlink_nlmsg_size(const +@@ -711,12 +711,19 @@ static size_t ctnetlink_nlmsg_size(const } static int @@ -306,7 +306,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3765,11 +3772,17 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3766,11 +3773,17 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -324,7 +324,7 @@ Signed-off-by: Zhi Chen static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = { [IPCTNL_MSG_CT_NEW] = { -@@ -3868,8 +3881,12 @@ static int __net_init ctnetlink_net_init +@@ -3869,8 +3882,12 @@ static int __net_init ctnetlink_net_init static void ctnetlink_net_pre_exit(struct net *net) { #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/pending-5.10/870-ca8210-Fix-crash-by-zero-initializing-data.patch b/target/linux/generic/pending-5.10/870-ca8210-Fix-crash-by-zero-initializing-data.patch deleted file mode 100644 index 3f14988d9a4f96..00000000000000 --- a/target/linux/generic/pending-5.10/870-ca8210-Fix-crash-by-zero-initializing-data.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1e24c54da257ab93cff5826be8a793b014a5dc9c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 21 Nov 2022 01:22:01 +0100 -Subject: ca8210: Fix crash by zero initializing data - -The struct cas_control embeds multiple generic SPI structures and we -have to make sure these structures are initialized to default values. -This driver does not set all attributes. When using kmalloc before some -attributes were not initialized and contained random data which caused -random crashes at bootup. - -Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") -Signed-off-by: Hauke Mehrtens -Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@hauke-m.de -Signed-off-by: Stefan Schmidt ---- - drivers/net/ieee802154/ca8210.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ieee802154/ca8210.c -+++ b/drivers/net/ieee802154/ca8210.c -@@ -926,7 +926,7 @@ static int ca8210_spi_transfer( - - dev_dbg(&spi->dev, "%s called\n", __func__); - -- cas_ctl = kmalloc(sizeof(*cas_ctl), GFP_ATOMIC); -+ cas_ctl = kzalloc(sizeof(*cas_ctl), GFP_ATOMIC); - if (!cas_ctl) - return -ENOMEM; - diff --git a/target/linux/generic/pending-5.15/870-ca8210-Fix-crash-by-zero-initializing-data.patch b/target/linux/generic/pending-5.15/870-ca8210-Fix-crash-by-zero-initializing-data.patch deleted file mode 100644 index 1fbf78dd3d8369..00000000000000 --- a/target/linux/generic/pending-5.15/870-ca8210-Fix-crash-by-zero-initializing-data.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1e24c54da257ab93cff5826be8a793b014a5dc9c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 21 Nov 2022 01:22:01 +0100 -Subject: ca8210: Fix crash by zero initializing data - -The struct cas_control embeds multiple generic SPI structures and we -have to make sure these structures are initialized to default values. -This driver does not set all attributes. When using kmalloc before some -attributes were not initialized and contained random data which caused -random crashes at bootup. - -Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") -Signed-off-by: Hauke Mehrtens -Link: https://lore.kernel.org/r/20221121002201.1339636-1-hauke@hauke-m.de -Signed-off-by: Stefan Schmidt ---- - drivers/net/ieee802154/ca8210.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ieee802154/ca8210.c -+++ b/drivers/net/ieee802154/ca8210.c -@@ -927,7 +927,7 @@ static int ca8210_spi_transfer( - - dev_dbg(&spi->dev, "%s called\n", __func__); - -- cas_ctl = kmalloc(sizeof(*cas_ctl), GFP_ATOMIC); -+ cas_ctl = kzalloc(sizeof(*cas_ctl), GFP_ATOMIC); - if (!cas_ctl) - return -ENOMEM; - diff --git a/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch b/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch index 1f990734c84960..d4bce52a44f1ed 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0009-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Jianhua Xie --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h -@@ -116,6 +116,13 @@ extern pgprot_t pgprot_s2_device; +@@ -125,6 +125,13 @@ extern pgprot_t pgprot_s2_device; #define pgprot_noncached(prot) \ __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) diff --git a/target/linux/mediatek/patches-5.15/213-spi-mediatek-add-mt7986-spi-support.patch b/target/linux/mediatek/patches-5.15/213-spi-mediatek-add-mt7986-spi-support.patch index f10d57a785364b..04da1765f37873 100644 --- a/target/linux/mediatek/patches-5.15/213-spi-mediatek-add-mt7986-spi-support.patch +++ b/target/linux/mediatek/patches-5.15/213-spi-mediatek-add-mt7986-spi-support.patch @@ -816,7 +816,7 @@ Signed-off-by: Sam Shih err_put_master: spi_master_put(master); -@@ -917,8 +1296,10 @@ static int mtk_spi_remove(struct platfor +@@ -920,8 +1299,10 @@ static int mtk_spi_remove(struct platfor mtk_spi_reset(mdata); @@ -826,9 +826,9 @@ Signed-off-by: Sam Shih + clk_unprepare(mdata->spi_hclk); + } - return 0; - } -@@ -934,8 +1315,10 @@ static int mtk_spi_suspend(struct device + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_disable(&pdev->dev); +@@ -940,8 +1321,10 @@ static int mtk_spi_suspend(struct device if (ret) return ret; @@ -840,7 +840,7 @@ Signed-off-by: Sam Shih return ret; } -@@ -952,11 +1335,20 @@ static int mtk_spi_resume(struct device +@@ -958,11 +1341,20 @@ static int mtk_spi_resume(struct device dev_err(dev, "failed to enable spi_clk (%d)\n", ret); return ret; } @@ -862,7 +862,7 @@ Signed-off-by: Sam Shih return ret; } -@@ -968,10 +1360,13 @@ static int mtk_spi_runtime_suspend(struc +@@ -974,10 +1366,13 @@ static int mtk_spi_runtime_suspend(struc struct spi_master *master = dev_get_drvdata(dev); struct mtk_spi *mdata = spi_master_get_devdata(master); @@ -878,7 +878,7 @@ Signed-off-by: Sam Shih return 0; } -@@ -982,13 +1377,31 @@ static int mtk_spi_runtime_resume(struct +@@ -988,13 +1383,31 @@ static int mtk_spi_runtime_resume(struct struct mtk_spi *mdata = spi_master_get_devdata(master); int ret; diff --git a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch index f2f4748e00144f..b8accf180bb005 100644 --- a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch +++ b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -16,7 +16,7 @@ Cc: Robert Marko --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9066,6 +9066,22 @@ F: include/net/nl802154.h +@@ -9063,6 +9063,22 @@ F: include/net/nl802154.h F: net/ieee802154/ F: net/mac802154/ diff --git a/target/linux/rockchip/patches-5.10/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch b/target/linux/rockchip/patches-5.10/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch index da87227564dfed..56166783a5815a 100644 --- a/target/linux/rockchip/patches-5.10/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch +++ b/target/linux/rockchip/patches-5.10/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch @@ -21,7 +21,7 @@ Signed-off-by: Heiko Stuebner --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi -@@ -680,7 +680,7 @@ +@@ -679,7 +679,7 @@ &usbdrd_dwc3_0 { status = "okay"; diff --git a/target/linux/rockchip/patches-5.15/072-v6.2-net-phy-Add-driver-for-Motorcomm-yt8521.patch b/target/linux/rockchip/patches-5.15/072-v6.2-net-phy-Add-driver-for-Motorcomm-yt8521.patch index 8dd5e6338d74a6..31efb55e817634 100644 --- a/target/linux/rockchip/patches-5.15/072-v6.2-net-phy-Add-driver-for-Motorcomm-yt8521.patch +++ b/target/linux/rockchip/patches-5.15/072-v6.2-net-phy-Add-driver-for-Motorcomm-yt8521.patch @@ -21,7 +21,7 @@ Signed-off-by: David S. Miller --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -12694,6 +12694,7 @@ F: include/uapi/linux/meye.h +@@ -12689,6 +12689,7 @@ F: include/uapi/linux/meye.h MOTORCOMM PHY DRIVER M: Peter Geis diff --git a/target/linux/rockchip/patches-5.15/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch b/target/linux/rockchip/patches-5.15/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch index eff742904c76b2..f84f48219b6f29 100644 --- a/target/linux/rockchip/patches-5.15/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch +++ b/target/linux/rockchip/patches-5.15/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch @@ -6,5 +6,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-pi-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb diff --git a/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch b/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch index 1abab5e2eb6283..9046a8df6690f7 100644 --- a/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch +++ b/target/linux/rockchip/patches-5.4/104-rockchip-use-USB-host-by-default-on-rk3399-rock-pi-4.patch @@ -21,7 +21,7 @@ Signed-off-by: Heiko Stuebner --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts -@@ -684,7 +684,7 @@ +@@ -683,7 +683,7 @@ &usbdrd_dwc3_0 { status = "okay"; From 4952f51d178715894f187f210fc9fa9fbe807881 Mon Sep 17 00:00:00 2001 From: Albert Xu <19632674+1582130940@users.noreply.github.com> Date: Thu, 15 Dec 2022 18:26:27 +0800 Subject: [PATCH 7/7] tools/dosfstools: fix PKG_SOURCE (#10620) Both mirrors provided in the Makefile only serve gzipped tarballs. Fixes: #10871 Fixes: 9edfe7dd13d9 ("source: Switch to xz for packages and tools where possible") Signed-off-by: Stijn Tintel Signed-off-by: Stijn Tintel Co-authored-by: Stijn Tintel --- tools/dosfstools/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/dosfstools/Makefile b/tools/dosfstools/Makefile index 7c834dfd497806..b332efdb96cab9 100644 --- a/tools/dosfstools/Makefile +++ b/tools/dosfstools/Makefile @@ -11,10 +11,10 @@ PKG_NAME:=dosfstools PKG_CPE_ID:=cpe:/a:dosfstools_project:dosfstools PKG_VERSION:=4.2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \ http://fossies.org/linux/misc -PKG_HASH:=ba7c716ff9b8208a3bba5094a77584a7dc814141de09ab4ce1ae9b84bbcd7844 +PKG_HASH:=64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527 HOST_FIXUP:=autoreconf