[Midnightbsd-cvs] [MidnightBSD/src] 58ff85: libthr: add pshared_destroy() helper

Chris Rees noreply at github.com
Wed Sep 6 14:47:46 EDT 2023


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 58ff851cbbde31be599223c6b051eaa92a926db4
      https://github.com/MidnightBSD/src/commit/58ff851cbbde31be599223c6b051eaa92a926db4
  Author: Konstantin Belousov <kib at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M lib/libthr/thread/thr_pshared.c

  Log Message:
  -----------
  libthr: add pshared_destroy() helper

(cherry picked from commit 3cf37d1251bf71b2171e67af8f2ca43cbe3d874d)


  Commit: 80588796d5d6f984e57c0d495d6914e70a75361b
      https://github.com/MidnightBSD/src/commit/80588796d5d6f984e57c0d495d6914e70a75361b
  Author: Konstantin Belousov <kib at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M lib/libthr/thread/thr_pshared.c

  Log Message:
  -----------
  libthr pshared: correct a bug in allocation

PR:	269277

(cherry picked from commit 25c862ae503a1c99458f4e055fd50c878fadbea3)


  Commit: 8107c8bb3fb62076d2b284b7d255eddb0d6e214c
      https://github.com/MidnightBSD/src/commit/8107c8bb3fb62076d2b284b7d255eddb0d6e214c
  Author: Andrey V. Elsukov <ae at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/netinet/ip_carp.c

  Log Message:
  -----------
  carp: delete interface routes on link loss.

Obtained from:	Yandex LLC
MFC after:	10 days
Sponsored by:	Yandex LLC
Differential Revision: https://reviews.freebsd.org/D41290

(cherry picked from commit 600bf006d3f15f170b9209d5d3a37437bfe0850e)


  Commit: dc0be21cdf289b7f7d8ab945fd0ae04d08075e5d
      https://github.com/MidnightBSD/src/commit/dc0be21cdf289b7f7d8ab945fd0ae04d08075e5d
  Author: Zhenlei Huang <zlei at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M share/man/man4/bridge.4

  Log Message:
  -----------
  bridge.4: Document the net.link.bridge.log_mac_flap sysctl variable

It was introduced in 2d3614fb132b (bridge: Log MAC address port flapping).

Reviewed by:	gbe (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D39465

(cherry picked from commit 3fdb40d1befe7b561e7e5fa0b5c80aac41adc50d)
(cherry picked from commit 5a3f517110ef2d076274ca0cc41668740d62e9c7)


  Commit: 77ccf73ab822404b710ee1af726a1f0242b2e79f
      https://github.com/MidnightBSD/src/commit/77ccf73ab822404b710ee1af726a1f0242b2e79f
  Author: Zhenlei Huang <zlei.huang at gmail.com>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/geom/part/g_part_gpt.c

  Log Message:
  -----------
  geom_part: Check number of GPT entries and size of GPT entry

Current specification does not have upper limit of the number of
partition entries and the size of partition entry. In
799eac8c3df597179bbb3b078362f3ff03993a1a Andrey V. Elsukov introduced a
limit maximum number of GPT entries to 4k, but that is for write routine
(gpart create) only. When attaching disks that have large number of GPT
entries exceeding the limit, or disks with large size of partition
entry, it is still possible to exhaust kernel memory.

1. Reuse the limit of the maximum number of partition entries.
2. Limit the maximum size of GPT entry to 1k.

In current specification (2.10) the size of GPT entry is 128 *
2^n while n >= 0, and the size - 128 is reserved. 1k should be
sufficient enough for foreseen future.

PR:		266548
Discussed with:	imp
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D36717

(cherry picked from commit 5be5d0d5cb2657d7668f4ca0f8543198cf8d759b)
(cherry picked from commit e8c769b22d42fd66d0916e2a04af32ad9d306db1)


  Commit: dd6c7e3dc1017e26e2228cb9318bc61dc6b12289
      https://github.com/MidnightBSD/src/commit/dd6c7e3dc1017e26e2228cb9318bc61dc6b12289
  Author: Zhenlei Huang <zlei at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/geom/part/g_part_gpt.c

  Log Message:
  -----------
  geom_part: Fix potential integer overflow when checking size of the table

`hdr_entries` and `hdr_entsz` are both uint32_t as defined in UEFI spec.
Current spec does not have upper limit of the number of partition
entries and the size of partition entry, it is potential that malicious
or corrupted GPT header read from untrusted source contains large size of
entry number or size.

PR:		266548
Reviewed by:	oshogbo, cem, imp, markj
Approved by:	kp (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36709

(cherry picked from commit 2e543af13ab3746c7626c53293c007c8747eff9d)
(cherry picked from commit 3070bedd3dc54196f48645966eb34bd3a9bf131d)


  Commit: 8604b14a854fb8624189641e50093b2260244c7a
      https://github.com/MidnightBSD/src/commit/8604b14a854fb8624189641e50093b2260244c7a
  Author: Zhenlei Huang <zlei at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/geom/linux_lvm/g_linux_lvm.c

  Log Message:
  -----------
  geom_linux_lvm: Check the offset of physical volume header

The LVM label is stored on any of the first four sectors, and the
PV (physical volume) header is stored within the same sector following
the LVM label. The current implementation does not fully check the
offset of PV header, when attaching a bad formatted LVM PV the kernel
may crash due to out-of-bounds memory read.

PR:		266562
Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36773

(cherry picked from commit c941b82e1c31a67a025c43cc7bd31f269fa62588)
(cherry picked from commit 809450c4b53109b6ca8a87054452f2b3b8f711aa)


  Commit: 16a64e5106ee151737321b66481ebe83388bf6ca
      https://github.com/MidnightBSD/src/commit/16a64e5106ee151737321b66481ebe83388bf6ca
  Author: Zhenlei Huang <zlei at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/net/if_ethersubr.c

  Log Message:
  -----------
  net: Remove vlan metadata on pcp / vlan encapsulation

For oubound traffic, the flag M_VLANTAG is set in mbuf packet header to
indicate the underlaying interface do hardware VLAN tag insertion if
capable, otherwise the net stack will do 802.1Q encapsulation instead.

Commit 868aabb4708d introduced per-flow priority which set the priority ID
in the mbuf packet header. There's a corner case that when the driver is
disabled to do hardware VLAN tag insertion, and the net stack do 802.1Q
encapsulation, then it will result double tagged packets if the driver do
not check the enabled capability (hardware VLAN tag insertion).

Unfortunately some drivers, currently known cxgbe(4) re(4) ure(4) igc(4)
and vmx(4), have this issue. From a quick review for other interface
drivers I believe a lot more drivers have the same issue. It makes more
sense to fix in net stack than to try to change every single driver.

PR:		270736
Reviewed by:	kp
Fixes:	868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D39499

(cherry picked from commit b22aae410bc7e4e9a6b43e556dc34be72deadb65)
(cherry picked from commit 494de30b63de9ef31587dcc3fb8e7249535e840a)
(cherry picked from commit 337475505b4cdf40510bd2e2788fdce5c0c47367)


  Commit: fc5b17da05072ac60ea66d8124f0d89ce9639420
      https://github.com/MidnightBSD/src/commit/fc5b17da05072ac60ea66d8124f0d89ce9639420
  Author: Zhenlei Huang <zlei at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M sys/netinet/tcp_fastopen.c

  Log Message:
  -----------
  tcp: Initialize the maximum number of entries in a client cookie cache bucket

This vnet loader tunable is defined with SYSCTL_PROC, thus will not be
initialized by kernel on vnet creating and will always have the default
value TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT.

Fix by fetching the value from the corresponding kernel environment during
vnet constructing.

PR:		273509
Reviewed by:	#transport, tuexen
Fixes:	c560df6f12f1 This is an implementation of the client side of TCP Fast Open (TFO) [RFC7413]
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41691

(cherry picked from commit 224aec05e732bb97a0d3c91142973b98a91238d1)
(cherry picked from commit 144851777edad9522390036d3073ea656d7b648d)
(cherry picked from commit 3fc299d68897a0748d96510de5f191f5a8249216)


  Commit: 87098822088bd6f48f7abdb359c483b2f80fe5b5
      https://github.com/MidnightBSD/src/commit/87098822088bd6f48f7abdb359c483b2f80fe5b5
  Author: Chris Rees <crees at FreeBSD.org>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M contrib/elftoolchain/elfcopy/archive.c
    M contrib/elftoolchain/elfcopy/elfcopy.h
    M contrib/elftoolchain/elfcopy/main.c

  Log Message:
  -----------
  elftoolchain: stop leaving tempfiles on error

Temporary files were not cleaned up, resulting in $TMPDIR or even
the current directory becoming littered with ecp.* files.

This happened with error and even sometimes on success!

Approved by:		dim
MFC after:		4 weeks
Accepted upstream:	https://sourceforge.net/p/elftoolchain/code/3918/
Differential Revision:	https://reviews.freebsd.org/D28651

(cherry picked from commit 5ac70383c8b32eeec80426e837960977971c7c2b)


Compare: https://github.com/MidnightBSD/src/compare/1831abf6ef78...87098822088b


More information about the Midnightbsd-cvs mailing list