]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoreap_kill_proc(): avoid singlethreading any other process if we are exiting
Konstantin Belousov [Mon, 16 May 2022 23:47:20 +0000 (02:47 +0300)]
reap_kill_proc(): avoid singlethreading any other process if we are exiting

Tested by: pho (whole series MFC)

(cherry picked from commit 1575804961d2ba1768c9a6b28438d364421718f3)

2 years agoreap_kill_subtree(): hold the reaper when entering it into the queue to handle later
Konstantin Belousov [Sun, 15 May 2022 22:52:09 +0000 (01:52 +0300)]
reap_kill_subtree(): hold the reaper when entering it into the queue to handle later

(cherry picked from commit e0343eacf36588bf503c7a59c0cc436294223839)

2 years agoreap_kill_subtree_once(): handle proctree_lock unlock in reap_kill_proc()
Konstantin Belousov [Mon, 9 May 2022 21:41:23 +0000 (00:41 +0300)]
reap_kill_subtree_once(): handle proctree_lock unlock in reap_kill_proc()

(cherry picked from commit 1d4abf2cfa6e71f4e29ab1f1a6d366d11f3d6027)

2 years agoreap_kill_proc: do not retry on thread_single() failure
Konstantin Belousov [Tue, 3 May 2022 19:49:37 +0000 (22:49 +0300)]
reap_kill_proc: do not retry on thread_single() failure

(cherry picked from commit addf103ce6b38583762bcb066f6ac3b160e826bb)

2 years agoMake stop_all_proc_block interruptible to avoid deadlock with parallel suspension
Konstantin Belousov [Sat, 30 Apr 2022 23:29:25 +0000 (02:29 +0300)]
Make stop_all_proc_block interruptible to avoid deadlock with parallel suspension

(cherry picked from commit 008b2e65442a0d65bc5be9ca625616ddfa6f9ce2)

2 years agothread_single_end(): consistently maintain p_boundary_count for ALLPROC mode
Mark Johnston [Thu, 9 Jun 2022 04:17:32 +0000 (07:17 +0300)]
thread_single_end(): consistently maintain p_boundary_count for ALLPROC mode

(cherry picked from commit 2d5ef216b679e0a8d9958f8ce2e2bfc021f5d252)

2 years agothread_unsuspend(): do not unuspend the suspended leader thread doing SINGLE_ALLPROC
Konstantin Belousov [Wed, 8 Jun 2022 01:27:30 +0000 (04:27 +0300)]
thread_unsuspend(): do not unuspend the suspended leader thread doing SINGLE_ALLPROC

(cherry picked from commit 1b4701fe1e840f9ce5dae557b4dd99bda8a85735)

2 years agothread_single(): remove already checked conditional expression
Konstantin Belousov [Thu, 12 May 2022 11:47:40 +0000 (14:47 +0300)]
thread_single(): remove already checked conditional expression

(cherry picked from commit b9009b1789b4641f5dbc9537eb0ca4759e22668e)

2 years agoDo not single-thread itself when the process single-threaded some another process
Konstantin Belousov [Sun, 15 May 2022 21:55:32 +0000 (00:55 +0300)]
Do not single-thread itself when the process single-threaded some another process

(cherry picked from commit 4493a13e3bfbbdf8488993843281ec688057ee0f)

2 years agoweed_inhib(): correct the condition to re-suspend a thread
Konstantin Belousov [Tue, 10 May 2022 23:37:58 +0000 (02:37 +0300)]
weed_inhib(): correct the condition to re-suspend a thread

(cherry picked from commit dd883e9a7e8045d86774fa3f944b53a4f78d0fd0)

2 years agoweed_inhib(): do not double-suspend already suspended thread if the loop reiterates
Konstantin Belousov [Sat, 30 Apr 2022 23:30:13 +0000 (02:30 +0300)]
weed_inhib(): do not double-suspend already suspended thread if the loop reiterates

(cherry picked from commit b9893b353312cc3c75a0ab2ff7ca69dc55864bea)

2 years agothread_single: wait for P_STOPPED_SINGLE to pass
Konstantin Belousov [Tue, 3 May 2022 19:48:50 +0000 (22:48 +0300)]
thread_single: wait for P_STOPPED_SINGLE to pass

(cherry picked from commit d7a9e6e74067f70eeec74dcd64a9bcc851503a6e)

2 years agoissignal(): ignore signals when process is single-threading for exit
Konstantin Belousov [Thu, 26 May 2022 19:18:57 +0000 (22:18 +0300)]
issignal(): ignore signals when process is single-threading for exit

(cherry picked from commit 02a2aacbe2c81be455811fa9d4200101f70a86d2)

2 years agoP2_WEXIT: avoid thread_single() for exiting process earlier
Konstantin Belousov [Wed, 4 May 2022 23:57:26 +0000 (02:57 +0300)]
P2_WEXIT: avoid thread_single() for exiting process earlier

(cherry picked from commit d3000939c7b94fc887f23dd8946861cf0fa1b73b)

2 years agoFix another race between fork(2) and PROC_REAP_KILL subtree
Konstantin Belousov [Thu, 21 Apr 2022 22:39:58 +0000 (01:39 +0300)]
Fix another race between fork(2) and PROC_REAP_KILL subtree

(cherry picked from commit 709783373e57069cc014019a14a806b580e1d62f)

2 years agoFix a race between fork(2) and PROC_REAP_KILL subtree
Konstantin Belousov [Wed, 20 Apr 2022 21:33:51 +0000 (00:33 +0300)]
Fix a race between fork(2) and PROC_REAP_KILL subtree

(cherry picked from commit 39794d80ad900915e5c4940e9917ba5cb59a8634)

2 years agokern_procctl: add possibility to take stop_all_proc_block() around exec
Konstantin Belousov [Wed, 27 Apr 2022 21:18:34 +0000 (00:18 +0300)]
kern_procctl: add possibility to take stop_all_proc_block() around exec

(cherry picked from commit d1df34736888f43e8fe1cdc460eac134d625c777)

2 years agoAdd stop_all_proc_block(9)
Konstantin Belousov [Sat, 23 Apr 2022 22:55:04 +0000 (01:55 +0300)]
Add stop_all_proc_block(9)

(cherry picked from commit 2e7595ef2f53f6debec3c3d89bb9e0cd10394ed3)

2 years agoreap_kill(): split children and subtree killers into helpers
Konstantin Belousov [Wed, 20 Apr 2022 21:12:05 +0000 (00:12 +0300)]
reap_kill(): split children and subtree killers into helpers

(cherry picked from commit 54a11adbd9c2b1fa9b42181ac883ed6ed2a6998c)

2 years agoreap_kill(): rename the reap variable to reaper
Konstantin Belousov [Mon, 25 Apr 2022 22:10:16 +0000 (01:10 +0300)]
reap_kill(): rename the reap variable to reaper

(cherry picked from commit 134529b11b5343aed09e220b49147873d052e4bf)

2 years agoreap_kill(): de-inline LIST_FOREACH(), twice
Konstantin Belousov [Mon, 25 Apr 2022 21:57:13 +0000 (00:57 +0300)]
reap_kill(): de-inline LIST_FOREACH(), twice

(cherry picked from commit e4ce431e2a0255751fee0ad14b08bd006759ce4f)

2 years agoreaper_abandon_children(): upgrade proctree_lock assert to exclusive
Konstantin Belousov [Tue, 26 Apr 2022 14:44:48 +0000 (17:44 +0300)]
reaper_abandon_children(): upgrade proctree_lock assert to exclusive

(cherry picked from commit b9294a3e152b2524497678c8089e2c4abbdceb31)

2 years agovmm: move bumping VMEXIT_USERSPACE stat to the right place
Vitaliy Gusev [Thu, 9 Jun 2022 12:57:25 +0000 (08:57 -0400)]
vmm: move bumping VMEXIT_USERSPACE stat to the right place

Statistic for "number of vm exits handled in userspace" should be
increased in vm_run() instead of vmx_run() because in some cases
vm_run() doesn't exit to userspace and keeps entering the guest.

Also svm_run's implementation even wrongly misses that stat.

Reviewed by: markj

(cherry picked from commit e7d34aeda4e6fba68343dfcaf5e4aeed83a0ec87)

2 years agopam_exec: fix segfault when authtok is null
Yan Ka Chiu [Sun, 22 May 2022 16:33:02 +0000 (12:33 -0400)]
pam_exec: fix segfault when authtok is null

According to pam_exec(8), the `expose_authtok` option should be ignored
when the service function is `pam_sm_setcred`. Currently `pam_exec` only
prevent prompt for anth token when `expose_authtok` is set on
`pam_sm_setcred`. This subsequently led to segfault when there isn't an
existing auth token available.

Bug reported on this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263893

After reading https://reviews.freebsd.org/rS349556 I am not sure if the
default behaviour supposed to be simply not prompt for authentication
token, or is it to ignore the option entirely as stated in the man page.

This patch is therefore only adding an additional NULL check on the item
`pam_get_item` provide, and exit with `PAM_SYSTEM_ERR` when such item is
NULL.

MFC after: 1 week
Reviewed by: des, khng
Differential Revision: https://reviews.freebsd.org/D35169

(cherry picked from commit b75e0eed345d2ab047a6b1b00a9a7c3bf92e992c)

2 years agomodules: Only build MAC modules if options MAC is set
Mitchell Horne [Tue, 14 Jun 2022 16:07:30 +0000 (13:07 -0300)]
modules: Only build MAC modules if options MAC is set

They are not loadable otherwise.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35369

(cherry picked from commit 648a47b85476ed0f8e3c61800b134bd3bb6001ee)

2 years agoddb: namespacing of struct command
Mitchell Horne [Tue, 14 Jun 2022 16:09:11 +0000 (13:09 -0300)]
ddb: namespacing of struct command

'command' is too generic for something specific to the kernel debugger;
change this so it is less likely to collide with local variable names.
Also rename struct command_table to struct db_command_table.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35367

(cherry picked from commit 4ef7db5a7e5c06cd8788e6f653ee955ace44b6c9)

2 years agoUse KERNEL_PANICKED() in more places
Mitchell Horne [Thu, 2 Jun 2022 13:14:41 +0000 (10:14 -0300)]
Use KERNEL_PANICKED() in more places

This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the common idiom.

Reviewed by: mjg
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35373

(cherry picked from commit 35eb9b10c265a27ce1f80a6eb74887240c7f4305)

2 years agoObsoleteFiles.inc: fixup after zpool-features.7.gz got re-introduced
Martin Matuska [Sun, 27 Jun 2021 00:53:51 +0000 (02:53 +0200)]
ObsoleteFiles.inc: fixup after zpool-features.7.gz got re-introduced

PR: 256852
MFC after: 3 days

(cherry picked from commit 2be4a7d508b02a980904378ca7c798fdf8c300d5)

2 years agorelease: arm - increase IMAGE_SIZE
Glen Barber [Wed, 22 Jun 2022 18:23:39 +0000 (14:23 -0400)]
release: arm - increase IMAGE_SIZE

For some reason, while 3072M is sufficient for 14-CURRENT, it is not
for 13-STABLE.  Notably, previous investigations suggest that there
are changes to makefs(8) in main that do not exist in stable/13,
in which 14-CURRENT seems perfectly happy to ignore the target image
size is smaller than the data being populated to it.

I have no futher investigative details at the moment, but as this had
caused arm failures for the past three weeks, this is the more hasty
measure, hence the MFC timeframe noted.

MFC after: 10 minutes
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit cf83038cec6874aafacf56a1cac531d079af016b)

2 years agoarm64: Print per-CPU cache summary
Justin Hibbits [Mon, 13 Jun 2022 19:04:29 +0000 (14:04 -0500)]
arm64: Print per-CPU cache summary

Summary:
It can be useful to see a summary of CPU caches on bootup.  This is done
for most platforms already, so add this to arm64, in the form of (taken
from Apple M1 pro test):

  L1 cache: 192KB (instruction), 128KB (data)
  L2 cache: 12288KB (unified)

This is printed out per-CPU, only under bootverbose.

Future refinements could instead determine if a cache level is shared
with other cores (L2 is shared among cores on some SoCs, for instance),
and perform a better calculation to the full true cache sizes.  For
instance, it's known that the M1 pro, on which this test was done, has 2
12MB L2 clusters, for a total of 24MB.  Seeing each CPU with 12288KB L2
would make one think that there's 12MB * NCPUs, for possibly 120MB
cache, which is incorrect.

Sponsored by: Juniper Networks, Inc.
Reviewed by: #arm64, andrew
Differential Revision: https://reviews.freebsd.org/D35366

(cherry picked from commit 139ba152c9c91fad9b63ccd2382a80f753f217b9)

2 years agolinux: plug a set-but-not-used var
Mateusz Guzik [Tue, 19 Apr 2022 12:29:46 +0000 (12:29 +0000)]
linux: plug a set-but-not-used var

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 93494e425b95e3b08e11389c877b71298b6a244e)

2 years agoOpenSSL: Regen manual pages for OpenSSL 1.1.1p
Jung-uk Kim [Tue, 21 Jun 2022 18:22:28 +0000 (14:22 -0400)]
OpenSSL: Regen manual pages for OpenSSL 1.1.1p

(cherry picked from commit b4bdc8f9253d9db46f598f17cc546c2fe0f8038d)

2 years agoOpenSSL: Regen assembly file for OpenSSSL 1.1.1p
Jung-uk Kim [Tue, 21 Jun 2022 18:20:33 +0000 (14:20 -0400)]
OpenSSL: Regen assembly file for OpenSSSL 1.1.1p

(cherry picked from commit ec4d9b059ededda578be479c1d043c921907ed11)

2 years agoOpenSSL: Merge OpenSSL 1.1.1p
Jung-uk Kim [Tue, 21 Jun 2022 17:33:01 +0000 (13:33 -0400)]
OpenSSL: Merge OpenSSL 1.1.1p

Merge commit '54ae8e38f717f22963c2a87f48af6ecefc6b3e9b'

(cherry picked from commit 83eaf7ae0a7b502de1b08850324b447591bd6916)

2 years agoAdd a whole bunch of missed obsolete manpages to ObsoleteFiles.inc
Dimitry Andric [Mon, 3 May 2021 20:24:27 +0000 (22:24 +0200)]
Add a whole bunch of missed obsolete manpages to ObsoleteFiles.inc

(cherry picked from commit b9ec6f2ef9d6e3783a66e9e954b58226f06f565c)

2 years agoRemove usr/lib/libssp.a.
John Baldwin [Thu, 13 Jan 2022 22:49:14 +0000 (14:49 -0800)]
Remove usr/lib/libssp.a.

GNU's libssp installed this (in addition to libssp_nonshared.a), but
the libc-based libssp does not.

Reviewed by: kevans, emaste
Fixes: cd0d51baaa45 Provide libssp based on libc
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33852

(cherry picked from commit 900a792250c2e8824ce7ebc49fef59ba6e82c9a4)

2 years agoAdd a few missed gnuregex libraries to ObsoleteFiles.inc
Dimitry Andric [Mon, 3 May 2021 20:40:11 +0000 (22:40 +0200)]
Add a few missed gnuregex libraries to ObsoleteFiles.inc

(cherry picked from commit d134e496151e8103ca8acc7bb1696babe07576a7)

2 years agoBump __FreeBSD_version after linuxkpi mfc
Emmanuel Vadot [Tue, 21 Jun 2022 15:23:27 +0000 (17:23 +0200)]
Bump __FreeBSD_version after linuxkpi mfc

2 years agolinuxkpi: Acquire giant when adding/removing i2c adapters
Emmanuel Vadot [Tue, 14 Jun 2022 11:23:26 +0000 (13:23 +0200)]
linuxkpi: Acquire giant when adding/removing i2c adapters

We need Giant as we run in a taskqueue_thread via linux_work.
This fix detaching amdgpu and i915kms.

Reviewed by: bz, hselasky, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35478

(cherry picked from commit d87fad36330b6faf657e7ee8faaa52feeaaff68a)

2 years agolinuxkpi: Rework detach function
Emmanuel Vadot [Fri, 13 May 2022 11:56:36 +0000 (13:56 +0200)]
linuxkpi: Rework detach function

We need to detach the matching i2c adapter so look for the right one.
While here add some locks to protect multiple add/del at the same time.

Fixes: 1961a14a47 ("linuxkpi: Add i2c support")
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 25d21a845223ffad189fd2a7831ebf5e298b628a)

2 years agoLinuxKPI: Allow lkpi_iic driver to be a child of drm device.
Vladimir Kondratyev [Tue, 17 May 2022 12:10:19 +0000 (15:10 +0300)]
LinuxKPI: Allow lkpi_iic driver to be a child of drm device.

i915kms exposes "AUX #/port #" I2C adapters as drm children

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D35046

(cherry picked from commit f49cddbda67d6f49f1794c93270d3d923140d620)

2 years agolinuxkpi: Remove write only variable from lkpi_iicbb_reset
Warner Losh [Tue, 5 Apr 2022 05:05:52 +0000 (23:05 -0600)]
linuxkpi: Remove write only variable from lkpi_iicbb_reset

Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34770

(cherry picked from commit 58e6719ca06991a92b67630b634ddd25a9c2c3bf)

2 years agolinuxkpi: i2c: Add MODULE_DEPEND for iicbus
Emmanuel Vadot [Wed, 26 Jan 2022 09:42:20 +0000 (10:42 +0100)]
linuxkpi: i2c: Add MODULE_DEPEND for iicbus

MFC after: 1 month
MFC with: 1961a14a4743
Fixes: 1961a14a4743 ("linuxkpi: Add i2c support")
Reported by: GregV
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 81de556105b2fb0f85ece868b2289c53b8c3e6ca)

2 years agolinuxkpi: Add i2c support
Emmanuel Vadot [Thu, 4 Nov 2021 09:42:37 +0000 (10:42 +0100)]
linuxkpi: Add i2c support

Add i2c support to linuxkpi. This is needed by drm-kmod.
For every i2c_adapter added by i2c_add_adapter we add a child to the
device named "lkpi_iic". This child handle the conversion between
Linux i2c_msgs to FreeBSD iic_msgs.
For every i2c_adapter added by i2c_bit_add_bus we add a child to the
device named "lkpi_iicbb". This child handle the conversion between
Linux i2c_msgs to FreeBSD iic_msgs.
With the help of iic(4), this expose the i2c controller to userspace
allowing a user to query DDC information from a monitor.
e.g.: i2c -f /dev/iic0 -a 0x28 -c 128 -d r
will query the standard EDID from the monitor if plugged.

The bitbang part (lkpi_iicbb) isn't tested at all for now as I don't have
compatible hardware (all my hardware have native i2c controller).

Tested on: Intel (SandyBridge, Skylake, ApolloLake)
Tested on: AMD (Picasso, Polaris (amd64 and arm64))

MFC after: 1 month
Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33053

(cherry picked from commit 1961a14a47437595fb7fcdc20e327440e3eb51e2)

2 years agoCreate wrapper for Giant taken for newbus
Warner Losh [Fri, 10 Dec 2021 00:04:45 +0000 (17:04 -0700)]
Create wrapper for Giant taken for newbus

Create a wrapper for newbus to take giant and for busses to take it too.
bus_topo_lock() should be called before interacting with newbus routines
and unlocked with bus_topo_unlock(). If you need the topology lock for
some reason, bus_topo_mtx() will provide that.

Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D31831

(cherry picked from commit c6df6f5322f7004c71216391e1c0b374d853704a)

2 years agorip6: Fix a lock order reversal in rip6_bind()
Mark Johnston [Tue, 14 Jun 2022 15:27:38 +0000 (11:27 -0400)]
rip6: Fix a lock order reversal in rip6_bind()

See also commit 71a1539e3783.

Reported by: syzbot+9b461b6a07a83cc10daa@syzkaller.appspotmail.com
Reported by: syzbot+b6ce0aec16f5fdab3282@syzkaller.appspotmail.com
Reviewed by: glebius
Sponsored by: The FreeBSD Foundation

(cherry picked from commit a14465e1b9a53d6abf58f42e113c1888ffeebe42)

2 years agovm_object: Use the vm_object_(set|clear)_flag() helpers
Mark Johnston [Tue, 14 Jun 2022 15:35:20 +0000 (11:35 -0400)]
vm_object: Use the vm_object_(set|clear)_flag() helpers

... rather than setting and clearing flags inline.  No functional change
intended.

Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 630f633f2a7618e7726ceb6ff4bff1c442919250)

2 years agonull_vptocnp(): busy nullfs mp instead of refing it
Konstantin Belousov [Fri, 10 Jun 2022 11:35:45 +0000 (14:35 +0300)]
null_vptocnp(): busy nullfs mp instead of refing it

(cherry picked from commit 7fd37611b92b5f365f33435bb725b335c2f10ba8)

2 years agoifconfig.8: reflect removal of FDDI and Token Ring
Zhenlei Huang [Wed, 15 Jun 2022 17:49:27 +0000 (18:49 +0100)]
ifconfig.8: reflect removal of FDDI and Token Ring

Reviewed By: pauamma
Differential Revision: https://reviews.freebsd.org/D35409

(cherry picked from commit 030f3ee99583bc367b37c43c921cd9220667185e)

2 years agovmm: add tunable to trap WBINVD
Corvin Köhne [Mon, 30 May 2022 08:02:52 +0000 (10:02 +0200)]
vmm: add tunable to trap WBINVD

x86 is cache coherent. However, there are special cases where cache
coherency isn't ensured (e.g. when switching the caching mode). In these
cases, WBINVD can be used. WBINVD writes all cache lines back into main
memory and invalidates the whole cache.

Due to the invalidation of the whole cache, WBINVD is a very heavy
instruction and degrades the performance on all cores. So, we should
minimize the use of WBINVD as much as possible.

In a virtual environment, the WBINVD call is mostly useless. The guest
isn't able to break cache coherency because he can't switch the physical
cache mode. When using pci passthrough WBINVD might be useful.

Nevertheless, trapping and ignoring WBINVD is an unsafe operation. For
that reason, we implement it as tunable.

Reviewed by: jhb
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35253

(cherry picked from commit 3ba952e1a2179c232402c82d5c7587159b15a8dd)

2 years agobhyve: use bhyve_config for SMBIOS strings
Corvin Köhne [Mon, 30 May 2022 08:01:36 +0000 (10:01 +0200)]
bhyve: use bhyve_config for SMBIOS strings

Some software uses SMBIOS entries to identify the system on which it's
running. In order to make it possible to use such software inside a VM,
SMBIOS entries should be configurable. Therefore, bhyve_config can be
used. While only a few SMBIOS entries might be of interest, it makes
sense that all SMBIOS entries are configurable. This way all SMBIOS
tables are build the same way and there's no special handling for some
tables.

Reviewed by: jhb
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34465

(cherry picked from commit 8284799a232941c164acec425a881b5abb976751)

2 years agopkg-bootstrap: use latest package set on arm64 stable branches
Ed Maste [Thu, 9 Jun 2022 23:53:24 +0000 (19:53 -0400)]
pkg-bootstrap: use latest package set on arm64 stable branches

As with i386 and amd64, "latest" packages are available on stable
branches for arm64/aarch64.

Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35445

(cherry picked from commit f92e0d6acda3abd16c6d411bf90ef26c4e3c40c4)

2 years agomlx5ib: Fix memory leak in clean_mr() error path
Hans Petter Selasky [Mon, 13 Jun 2022 14:46:47 +0000 (16:46 +0200)]
mlx5ib: Fix memory leak in clean_mr() error path

In the clean_mr() error path the 'mr' should be freed.

Linux commit:
5942d8ae411775b76e5e1ab0cce57b0666516f2d

PR: 264653
Sponsored by: NVIDIA Networking

(cherry picked from commit e4d178d093281419c5ad9dea1c497bceb54d0018)

2 years agoibcore: Fix use-after-free access in ucma_close()
Hans Petter Selasky [Mon, 13 Jun 2022 14:55:14 +0000 (16:55 +0200)]
ibcore: Fix use-after-free access in ucma_close()

The error in ucma_create_id() left ctx in the list of contexts belong
to ucma file descriptor. The attempt to close this file descriptor causes
to use-after-free accesses while iterating over such list.

Linux commit:
ed65a4dc22083e73bac599ded6a262318cad7baf

PR: 264650
Sponsored by: NVIDIA Networking

(cherry picked from commit 66a0bc2105e43e54abfaa9f48b76c28371fa2d62)

2 years agouchcom(4): Add new USB ID.
Hans Petter Selasky [Sun, 12 Jun 2022 14:40:36 +0000 (16:40 +0200)]
uchcom(4): Add new USB ID.

PR: 260783
PR: 264634
Sponsored by: NVIDIA Networking

(cherry picked from commit f25a0a0f21183a52eeb4a860a88114aebec5f249)

2 years agorb_tree: drop needless tests from rb_next, rb_prev
Doug Moore [Fri, 10 Jun 2022 21:53:16 +0000 (16:53 -0500)]
rb_tree: drop needless tests from rb_next, rb_prev

In RB_NEXT, when there is no RB_RIGHT node, the search must proceed
through the parent node.

There is code written to handle the case when the parent is non-NULL
and the current element is the left child of that parent. If you
assume that the current element is either the left child of its
parent, or the right child of its parent, but not both, then this test
is not necessary. Instead of assigning RB_PARENT(elm, field) to elm
when elm == RB_LEFT, removing the test has the code assign
RB_PARENT(elm, field) to elm when elm != RB_RIGHT. There's no need to
examine the RB_LEFT field at all.

This change removes that needless RB_LEFT test, and makes a similar
change to the RB_PREV implementation.

Reviewed by: alc
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35450

(cherry picked from commit 36447829aee545ad9eafbfff3a783ee58cfb28fd)

2 years agomakefs: fix calculation of file sizes
Alan Somers [Mon, 16 May 2022 22:32:10 +0000 (16:32 -0600)]
makefs: fix calculation of file sizes

When a new FS image is created we need to calculate how much space each
file is going to consume.
Fix two bugs in that logic:

1) Count the space needed for indirect blocks for large files.
1) Normally the trailing data of a file is written to a block of frag
   size, 4 kB by default.

However for files that use indirect blocks a full block is allocated,
32kB by default.  Take that into account.

Adjust size calculations to match what is done in ffs_mkfs routine:

* Depending on the UFS version the superblock is stored at a different
  offset. Take that into account.
* Add the cylinder group block size.
* All of the above has to be aligned to the block size.

Finally, Remove "ncg" variable. It's always 1 and it was used to
multiply stuff.

PR: 229929
Reviewed by: mckusick
Sponsored by: Semihalf
Submitted by: Kornel Dulęba <mindal@semihalf.com>
Differential Revision: https://reviews.freebsd.org/D35131
Differential Revision: https://reviews.freebsd.org/D35132

(cherry picked from commit ecdc04d006de93eb343ce3b77208abd937d4f8ac)

2 years agofusefs: handle evil servers that return illegal inode numbers
Alan Somers [Wed, 4 May 2022 23:36:17 +0000 (17:36 -0600)]
fusefs: handle evil servers that return illegal inode numbers

* If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same
  inode number for the new file as for its parent directory, reject it.
  Previously this would triggers a recurse-on-non-recursive lock panic.

* If during FUSE_LINK the server returns a different inode number for
  the new name as for the old one, reject it.  Obviously, that can't be
  a hard link.

* If during FUSE_LOOKUP the server returns the same inode number for the
  new file as for its parent directory, reject it.  Nothing good can
  come of this.

PR: 263662
Reported by: Robert Morris <rtm@lcs.mit.edu>
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D35128

(cherry picked from commit 0bef4927ea858bb18b6f679bc0a36cff264dc842)

2 years agofusefs: make the mknod.cc tests a bit more general.
Alan Somers [Tue, 3 May 2022 22:53:20 +0000 (16:53 -0600)]
fusefs: make the mknod.cc tests a bit more general.

Reviewed by:    pfg

(cherry picked from commit 8b582b16402102df10a715c626e212bbbc8e9d7c)

2 years agopf tests: pfsync and route_to test case
Thomas Pasqualini [Sat, 4 Jun 2022 10:43:48 +0000 (12:43 +0200)]
pf tests: pfsync and route_to test case

Test pfsync in a more realistic scenario with carp and route_to rules.

Build this topology and initiate a single ping session from client to
server:
   ┌──────┐
   │client│
   └───┬──┘
       │
   ┌───┴───┐
   │bridge0│
   └┬─────┬┘
    │     │
   ┌────────────────┴─┐ ┌─┴────────────────┐
   │gw_route_to_master├─┤gw_route_to_backup│
   └────────────────┬─┘ └─┬────────────────┘
    │     │
   ┌┴─────┴┐
   │bridge1│
   └┬─────┬┘
    │     │
   ┌────────────────┴─┐ ┌─┴────────────────┐
   │gw_reply_to_master├─┤gw_reply_to_backup│
   └────────────────┬─┘ └─┬────────────────┘
    │     │
   ┌┴─────┴┐
   │bridge2│
   └───┬───┘
       │
   ┌───┴──┐
   │server│
   └──────┘

gw* jails forward traffic through pf route-to rules, not fib lookups.
If backup_promotion arg is given (as in the pfsync_pbr test case), a
carp failover event occurs during the ping session on both gateways.

Verify that ping messages still go where we expect them to go.

MFC after: 2 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 536e1da18bae91c74561498b3f484b27a89e13d7)

2 years agopf: Improve route-to handling of pfsync'd states
Kristof Provost [Sat, 4 Jun 2022 10:38:40 +0000 (12:38 +0200)]
pf: Improve route-to handling of pfsync'd states

When a state if pfsync’d to a different host it doesn’t get all of the
expected pointers, including the pointer to the struct pfi_kif / struct
ifnet rt_kif pointer. (I.e. the interface to route out on).

That in turn means that pf_route() ends up dropping the packet.

Use the rule's struct pfi_kif pointer so we can still route out of the
expected interface.

MFC after: 2 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 81ef217ad428c29be669aac2166d194db31817a7)

2 years agoFix e013e369 mismerge which is causes i386 LINT fails to build.
Dmitry Chagin [Sat, 18 Jun 2022 07:06:58 +0000 (10:06 +0300)]
Fix e013e369 mismerge which is causes i386 LINT fails to build.

This is a direct commit to the stable/13.

2 years agoCut out leftover of the sv_transtrap hook from the struct sysentvec on
Dmitry Chagin [Fri, 17 Jun 2022 21:35:52 +0000 (00:35 +0300)]
Cut out leftover of the sv_transtrap hook from the struct sysentvec on
mips. The hook is deleted by commit eca368ec from the main, but since
mips is retired from main, it is left after merge.

This is a direct commit to the stable/13.

2 years agovfs: Consistently validate AT_* flags in kern_* functions.
John Baldwin [Tue, 9 Nov 2021 17:42:12 +0000 (09:42 -0800)]
vfs: Consistently validate AT_* flags in kern_* functions.

Some syscalls checked for invalid AT_* flags in sys_* and others in
kern_*.

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D32864

(cherry picked from commit 57093f9366b7eeb48054ff2fa77b9d01d2b3cfc2)

2 years agolinux(4): bump osrelease to 4.4.0.
Edward Tomasz Napierala [Mon, 19 Apr 2021 10:37:47 +0000 (11:37 +0100)]
linux(4): bump osrelease to 4.4.0.

This is required for the current Arch Linux binaries to work.

PR: 254112
Reviewed By: emaste
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29218

(cherry picked from commit 156da725d3ef6bbafdb0389aada57cf268f44b1e)

2 years agolinux(4): Return EINVAL when the clockid has invalid bits are set
Dmitry Chagin [Tue, 31 May 2022 08:46:15 +0000 (11:46 +0300)]
linux(4): Return EINVAL when the clockid has invalid bits are set

Linux forbids PERTHREAD bit set for CLOCKFD clock.

MFC after: 2 weeks

(cherry picked from commit 539fadb493d34e6607f7492f018365bdc2abc23a)

2 years agolinux(4): Return ENOTSUP for unsupported clockid
Dmitry Chagin [Tue, 31 May 2022 08:43:00 +0000 (11:43 +0300)]
linux(4): Return ENOTSUP for unsupported clockid

It's much better from the user perspective to get a sane error code.

MFC after: 2 weeks

(cherry picked from commit 452f4636c3ba1f51f2f549ccc31fd4177254fb6d)

2 years agolinprocfs: Add /proc/vm/max_map_count
Dmitry Chagin [Tue, 31 May 2022 08:42:06 +0000 (11:42 +0300)]
linprocfs: Add /proc/vm/max_map_count

On Linux this limits the number of maps per mm struct.
We don't limit mappings, return a suitable large value.

Reviewed by: emaste
Differential revision: https://reviews.freebsd.org/D35351
MFC after: 2 weeks

(cherry picked from commit 7e2a451119373b7d3f2b3fd062d4ccb099dde022)

2 years agolinux(4): Properly restore the thread signal mask after signal delivery on i386
Dmitry Chagin [Mon, 30 May 2022 17:03:49 +0000 (20:03 +0300)]
linux(4): Properly restore the thread signal mask after signal delivery on i386

Replace sigframe sf_extramask by native sigset_t and use it to
store/restore the thread signal mask without conversion to/from
Linux signal mask.

Pointy hat to: dchagin
MFC after: 2 weeks

(cherry picked from commit 4a6c2d075da0c5105269e6edcbe57bf6aaa0a0ae)

2 years agolinux(4): Prefer sizeof(object) vs sizeof(type)
Dmitry Chagin [Mon, 30 May 2022 17:03:14 +0000 (20:03 +0300)]
linux(4): Prefer sizeof(object) vs sizeof(type)

MFC after: 2 weeks

(cherry picked from commit 2722e515ac8d0232cd80e5e8848715e27d222902)

2 years agolinux(4): Error is not a bool, use proper comparison
Dmitry Chagin [Mon, 30 May 2022 17:00:30 +0000 (20:00 +0300)]
linux(4): Error is not a bool, use proper comparison

MFC afer: 2 weeks

(cherry picked from commit 5573143777dd45d77163e208dc54426ac93896af)

2 years agolinux(4): Use the copyin_sigset() in the remaining places
Dmitry Chagin [Mon, 30 May 2022 16:59:45 +0000 (19:59 +0300)]
linux(4): Use the copyin_sigset() in the remaining places

MFC after: 2 weeks

(cherry picked from commit 5e872c279aecd169df34602669ee9c86ae9e9f18)

2 years agolinux(4): Refactor SIGPWR mapping
Dmitry Chagin [Mon, 30 May 2022 16:55:49 +0000 (19:55 +0300)]
linux(4): Refactor SIGPWR mapping

Map Linux RT signals to the native RT signals starting from SIGRTMIN,
and Linux SIGPWR signal map to after the last RT signal.

MFC after: 2 weeks

(cherry picked from commit 7a7cee558501a27e5b7437d012a1139ca77d97f2)

2 years agolinux(4): Fix the type of a constant in the signal mask macro
Dmitry Chagin [Mon, 30 May 2022 16:53:52 +0000 (19:53 +0300)]
linux(4): Fix the type of a constant in the signal mask macro

Since l_sigset_t is 64-bit unsigned on all Linuxulators, fix the type
of a constant in the signal mask manipulation macro.
The suffix L indicates type long which is 32-bit on i386, therefore,
bitwise operations between a 32-bit constant and 64-bit signal mask
lead to the wrong result.

Pointy hat to: dchagin
MFC after: 2 weeks

(cherry picked from commit 669516a1a16efe51f85ef203c3b93e6db7a3ed51)

2 years agolinux(4): Properly build argument list for the signal handler
Dmitry Chagin [Mon, 30 May 2022 16:53:12 +0000 (19:53 +0300)]
linux(4): Properly build argument list for the signal handler

Provide arguments 2 and 3 if signal handler installed with SA_SIGINFO.

MFC after: 2 weeks

(cherry picked from commit 109fd18ad96957c25cfaa78da2f825c729e33fef)

2 years agolinux(4): Microoptimize rt_sendsig(), convert signal mask once
Dmitry Chagin [Mon, 30 May 2022 16:49:45 +0000 (19:49 +0300)]
linux(4): Microoptimize rt_sendsig(), convert signal mask once

On amd64 Linux saves the thread signal mask in both contexts, in the machine
dependent and in the machine independent. Both contexts are user accessible.
Convert the mask once, then copy it.

MFC after: 2 weeks

(cherry picked from commit c30a767c6fd6d3f19e897fb800513e75175249b9)

2 years agolinux(4): Avoid direct manipulation of td_sigmask
Dmitry Chagin [Mon, 30 May 2022 16:48:20 +0000 (19:48 +0300)]
linux(4): Avoid direct manipulation of td_sigmask

Use kern_sigprocmask() instead of direct manipulation of td_sigmask
to reschedule newly blocked signals.

MFC after: 2 weeks

(cherry picked from commit 2ab9b59faafb68402dbebc285b424cfb06b59cf3)

2 years agolinux(4): Reduce duplication between MD parts of the Linuxulator
Dmitry Chagin [Mon, 30 May 2022 16:47:26 +0000 (19:47 +0300)]
linux(4): Reduce duplication between MD parts of the Linuxulator

Move sigprocmask actions defines under compat/linux,
they are identical across all Linux architectures.

MFC after: 2 weeks

(cherry picked from commit 2ca34847e7288fba6b2a15e64648238bc12e4960)

2 years agolinux(4): Handle multiple mbufs in a control message chain in recvmsg
Dmitry Chagin [Sat, 28 May 2022 20:48:45 +0000 (23:48 +0300)]
linux(4): Handle multiple mbufs in a control message chain in recvmsg

PR: 230274
MFC after: 2 weeks

(cherry picked from commit 3735f9cff1e8a7ce7079b957bc3b37f0f886caed)

2 years agolinux(4): Ratelimit message about unupported cmsg
Dmitry Chagin [Sat, 28 May 2022 20:48:16 +0000 (23:48 +0300)]
linux(4): Ratelimit message about unupported cmsg

MFC after: 2 weeks

(cherry picked from commit 31d7f3e9ce2d0d69123f3d20453f4fa41ac434d7)

2 years agolinux(4): Handle IP_ORIGDSTADDR socket option for IPPROTO_IP protocol level
Dmitry Chagin [Sat, 28 May 2022 20:47:40 +0000 (23:47 +0300)]
linux(4): Handle IP_ORIGDSTADDR socket option for IPPROTO_IP protocol level

MFC after: 2 weeks

(cherry picked from commit f8a6615064badb76b6cb301163697cf99ac4f180)

2 years agolinux(4): Add LINUX_RATELIMIT_MSG_OPT2 for future use
Dmitry Chagin [Sat, 28 May 2022 20:47:23 +0000 (23:47 +0300)]
linux(4): Add LINUX_RATELIMIT_MSG_OPT2 for future use

MFC after: 2 weeks

(cherry picked from commit 4f02a4f48c080ad56f0d7c745ace4d2f7dacf928)

2 years agolinux(4): Overwrite SO_TIMESTAMP counterpart
Dmitry Chagin [Sat, 28 May 2022 20:46:38 +0000 (23:46 +0300)]
linux(4): Overwrite SO_TIMESTAMP counterpart

A socket cannot mix SO_TIMESTAMP and SO_TIMESTAMPNS: the two modes
are mutually exclusive.

MFC after: 2 weeks

(cherry picked from commit 53494b918d63a5b31793ce7f66569d4bd03f5817)

2 years agolinux(4): Refactor linux_common_recvmsg()
Dmitry Chagin [Sat, 28 May 2022 20:46:22 +0000 (23:46 +0300)]
linux(4): Refactor linux_common_recvmsg()

To improve readability lower nesting level, better naming for variables.
No functional changes.

MFC after: 2 weeks

(cherry picked from commit 0eda2ceab7820aeba79029b59b3fe9b28a66c766)

2 years agolinux(4): Handle SO_TIMESTAMPNS socket option
Dmitry Chagin [Sat, 28 May 2022 20:46:05 +0000 (23:46 +0300)]
linux(4): Handle SO_TIMESTAMPNS socket option

The SO_TIMESTAMPNS enables or disables the receiving of the SCM_TIMESTAMPNS
control message. The cmsg_data field is a struct timespec.
To distinguish between SO_TIMESTAMP and SO_TIMESTAMPNS in the recvmsg()
map the last one to the SO_BINTIME and convert bintime to the timespec.
In the rest, implementation is identical to the SO_TIMESTAMP.

MFC after: 2 weeks

(cherry picked from commit 71bc8bcf660b437b99af1e3d382f7bfdaea5fa9c)

2 years agolinux(4): Handle 64-bit SO_TIMESTAMP for 32-bit binaries
Dmitry Chagin [Sat, 28 May 2022 20:45:39 +0000 (23:45 +0300)]
linux(4): Handle 64-bit SO_TIMESTAMP for 32-bit binaries

To solve y2k38 problem in the recvmsg syscall the new SO_TIMESTAMP
constant were added on v5.1 Linux kernel. So, old 32-bit binaries
that knows only 32-bit time_t uses the old value of the constant,
and binaries that knows 64-bit time_t uses the new constant.

To determine what size of time_t type is expected by the user-space,
store requested value (SO_TIMESTAMP) in the process emuldata structure.

MFC after: 2 weeks

(cherry picked from commit 0e26e54bdfa2859908150011a4a165e9dd3de9ac)

2 years agolinux(4): For future use replace malloc type for l_sockaddr by M_LINUX
Dmitry Chagin [Sat, 28 May 2022 20:44:48 +0000 (23:44 +0300)]
linux(4): For future use replace malloc type for l_sockaddr by M_LINUX

MFC after: 2 weeks

(cherry picked from commit 6335583990d8691ab01cd4fa92390f82f07e3d75)

2 years agolinux(4): Improve recvmsg() readability
Dmitry Chagin [Sat, 28 May 2022 20:44:02 +0000 (23:44 +0300)]
linux(4): Improve recvmsg() readability

To improve recvmsg() readability SCM_ handlers moved to a separate
functions.

MFC after: 2 weeks

(cherry picked from commit b408788d6b7edf91a6c4b9e2e8d1b34fe5d41525)

2 years agolinux(4): For future use move SCM definitions below socket options
Dmitry Chagin [Sat, 28 May 2022 20:42:23 +0000 (23:42 +0300)]
linux(4): For future use move SCM definitions below socket options

MFC after: 2 weeks

(cherry picked from commit f409a7c5386a30edccf2b26a5612cab99fdff045)

2 years agolinux(4): Avoid EISCONN if addr is specified for sendto()
Dmitry Chagin [Sat, 28 May 2022 20:42:09 +0000 (23:42 +0300)]
linux(4): Avoid EISCONN if addr is specified for sendto()

If the socket is in a connected state, the target address should be
ignored.

MFC after: 2 weeks

(cherry picked from commit db48fa8319825b4428795fcef9fb5458ac34c1a9)

2 years agolinux(4): Fix SO_LINGER l_onoff value
Dmitry Chagin [Sat, 28 May 2022 20:31:06 +0000 (23:31 +0300)]
linux(4): Fix SO_LINGER l_onoff value

On Linux l_onoff should be 1 when linger is used.

MFC after: 2 weeks

(cherry picked from commit e8d9d8082be339d046826e543e8e835c61e2d4b0)

2 years agolinux(4): Add a helper to copyout getsockopt value
Dmitry Chagin [Sat, 28 May 2022 20:30:22 +0000 (23:30 +0300)]
linux(4): Add a helper to copyout getsockopt value

For getsockopt(), optlen is a value-result argument, which is modified
on return to indicate the actual size of the value returned.
For some cases this was missed, fixed.

MFC after: 2 weeks

(cherry picked from commit e92b9a9eaa646bc1037af2a838270c43ea607d55)

2 years agolinux(4): Check the socket before any others sanity checks
Dmitry Chagin [Sat, 28 May 2022 20:29:12 +0000 (23:29 +0300)]
linux(4): Check the socket before any others sanity checks

Strictly speaking, this check is performed by the kern_recvit(), but in
the Linux emulation layer before calling the kernel we do other sanity
checks and conversions from Linux types to the native types. This changes
an order of the error returning that is critical for some buggy Linux
applications.

For recvmmsg() syscall this fixes a panic in case when the user-supplied
vlen value is 0, then error is not initialized and garbage passed to the
bsd_to_linux_errno().

MFC after: 2 weeks

(cherry picked from commit 3a99aac66f8d12386e8382aaf29d2e82e6b5353b)

2 years agoFinish cpuset_getaffinity() after f35093f8
Dmitry Chagin [Sat, 28 May 2022 17:53:08 +0000 (20:53 +0300)]
Finish cpuset_getaffinity() after f35093f8

Split cpuset_getaffinity() into a two counterparts, where the
user_cpuset_getaffinity() is intended to operate on the cpuset_t from
user va, while kern_cpuset_getaffinity() expects the cpuset from kernel
va.
Accordingly, the code that clears the high bits is moved to the
user_cpuset_getaffinity(). Linux sched_getaffinity() syscall returns
the size of set copied to the user-space and then glibc wrapper clears
the high bits.

MFC after: 2 weeks

(cherry picked from commit d46174cd8838b86b9fe956b80c82bd238c302b2e)

2 years agosysent: Get rid of bogus sys/sysent.h include.
Dmitry Chagin [Sat, 28 May 2022 17:52:17 +0000 (20:52 +0300)]
sysent: Get rid of bogus sys/sysent.h include.

Where appropriate hide sysent.h under proper condition.

MFC after: 2 weeks

(cherry picked from commit 31d1b816fe139f46083f8609c34b7d129a6e2ee0)

2 years agolinux(4): Fix unlinkat() after a125ed50
Dmitry Chagin [Mon, 23 May 2022 10:19:34 +0000 (13:19 +0300)]
linux(4): Fix unlinkat() after a125ed50

MFC after: 2 weeks

(cherry picked from commit 1bb3faed29cf1f451bcdc396eaa4f8cc476f9159)

2 years agolinux(4); Move vdso_selector_x86.c to the linux_common module
Dmitry Chagin [Mon, 23 May 2022 10:19:07 +0000 (13:19 +0300)]
linux(4); Move vdso_selector_x86.c to the linux_common module

MFC after: 2 weeks

(cherry picked from commit 2b378d59a98a4eb1dab173c4db3b48f385c47728)

2 years agolinux(4): Deduplicate execve
Dmitry Chagin [Fri, 17 Jun 2022 19:35:30 +0000 (22:35 +0300)]
linux(4): Deduplicate execve

As linux_execve is common across archs, except amd64 32-bit Linuxulator,
move it under compat/linux.

Noted by:               andrew@
MFC after:              2 weeks

(cherry picked from commit 26700ac0c4d0466c00f944bde9613d18625d1f91)

2 years agolinux(4): Fix unlink() after a125ed50
Dmitry Chagin [Mon, 23 May 2022 10:18:07 +0000 (13:18 +0300)]
linux(4): Fix unlink() after a125ed50

MFC after: 2 weeks

(cherry picked from commit e0aef0d62d2b14e754f25ef4f3582ae5faf8579c)

2 years agolinux(4): Fix execve() on amd64/linux32 after a125ed50
Dmitry Chagin [Mon, 23 May 2022 10:17:39 +0000 (13:17 +0300)]
linux(4): Fix execve() on amd64/linux32 after a125ed50

MFC after: 2 weeks

(cherry picked from commit 53726a1f1ed75a6788f5235833597e78781fffba)