1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

222320 Commits

Author SHA1 Message Date
jsg
dcc5d0ad5b remove unused var 2022-10-11 03:37:14 +00:00
kettenis
725f26169b Add support for the RK817 PMIC.
ok patrick@, mlarkin@
2022-10-10 17:45:35 +00:00
bket
33c43c6d64 Recalculate checksum of normalised packet
In 2011, henning@ removed fiddling with the ip checksum of normalised
packets in r1.131 of sys/net/pf_norm.c. Rationale was that the checksum
is always recalculated in all output paths anyway. In 2016, procter@
reintroduced checksum modification to preserve end-to-end checksums in
r1.189 of sys/net/pf_norm.c. Likely soomewhere in that timeslot checksum
recalculation of normalised packets was broken.

With input from bluhm@.

OK sashan@, bluhm@
2022-10-10 16:43:12 +00:00
krw
6e8568b906 Use warnx(), not warn(), when 'errno' is not relevant. 2022-10-10 15:04:09 +00:00
kn
f8c806b8e6 Trigger ERR trap on permanent I/O redirection failure
The following three cases behave identical in bash(1), but our ksh
(ksh93 also) fails to run the trap in the last case:

(non-zero exit code is trigger, no redirection)
	$ ksh -c 'trap "echo ERR" ERR ; false'
	ERR

(failed redirection is trigger, 'echo' was not executed)
	$ ksh -c 'trap "echo ERR" ERR ; echo >/'
	ksh: cannot create /: Is a directory
	ERR

(failed redirection, no execution, trap was NOT triggered)
	$ ksh -c 'trap "echo ERR" ERR ; exec >/'
	ksh: cannot create /: Is a directory


bash(1) prints "ERR" in all three cases, as expected.
ksh93 behaves like our ksh(1).

In ksh `exec' is a builtin (CSHELL), but also special (SPEC_BI):
	$ type alias
	alias is a shell builtin
	$ type exec
	exec is a special shell builtin

Without command and redirection alone, `exec' permanently redirects I/O for
the shell itself, not executing anything;  it is the only (special) builtin
with such a special use-case, implemented as c_sh.c:c_exec().

This corner-case is overlooked in exec.c:execute() which handles iosetup()
failure for all commands, incl. builtins.

Exclude c_exec() from the rest of special builtins to ensure it runs the
ERR trap as expected:

	$ ./obj/ksh -c 'trap "echo ERR" ERR ; exec >/'
	ksh: cannot create /: Is a directory
	ERR

Also add three new regress cases covering this;  rest keep passing.

OK millert
2022-10-10 14:57:48 +00:00
krw
80203c1b92 Don't leak 'sec' in error path. 2022-10-10 14:52:02 +00:00
kn
1dd3101c0d Enable configtest
OK solene
2022-10-10 12:07:53 +00:00
tobhe
ac3a69471f Move enabling the policy refcounting from policy_ref() to config_free_policy().
In config_free_policy() the refcounting is unchanged and each SA linked to the
policy will trigger a call to policy_ref() and increase the references as
before the change.  This allows unconditional calls to policy_ref() and
policy_unref() and the callers no longer have to check if IKED_POLICY_REFCNT
is set.

From and ok markus@
2022-10-10 11:33:55 +00:00
kn
94fe43e28b Continue tests is the mountpoint already exists
regress should be resilient against partially cleaned obj/.

Feedback bluhm
2022-10-10 11:06:14 +00:00
kn
0f65f7fdb1 Discard stdout/err only where needed in check_unattendedupgrade()
We should be fine silencing only the test condition which produces legit
output and warnings.

All else produces no output and should not error out;  if it does, those
warnings should be printed and fixed.

Feedback OK halex
2022-10-10 11:04:17 +00:00
jsg
2f996bf0d6 consistently use IPv4/IPv6 2022-10-10 10:42:42 +00:00
jsg
0d928c48d0 consistently use IPv4/IPv6; from jmc@ 2022-10-10 09:13:43 +00:00
nicm
45169fcdce ncurses wide character functions should be available with _XOPEN_SOURCE
of 500 or greater and not require _XOPEN_SOURCE_EXTENDED. Bring in
changes from upstream ncurses patches 20100403 and 20111030 to take this
into account. Reported by Grigory Kirillov via jmc@.

ok millert jmc
2022-10-10 09:03:08 +00:00
anton
d0098cda83 two tests are now expected to fail since the introduction of mimmutable 2022-10-10 05:26:11 +00:00
jsg
81f959c32b add references to 10h 12h revision guides 2022-10-10 03:01:11 +00:00
jsg
3f780f4af4 revert amdgpu dirty fb helper changes from 5.15.71
drm/amdgpu: don't register a dirty callback for non-atomic
drm/amdgpu: use dirty framebuffer helper

kettenis found that these changes made xpdf slow on x395 (picasso).
I can not reproduce this on renoir.
2022-10-10 01:58:36 +00:00
jsg
f0e35aeda4 Ipv6 -> IPv6 2022-10-10 00:12:45 +00:00
kn
ad0375c232 Drop fattr promise unless file creation is allowed
This is only required for the single fchmod(2) ensuring default permissions
which only happens in the -c code path.

OK millert
2022-10-09 23:04:57 +00:00
kettenis
33081393a0 RK3566/RK3568 support.
ok mlarkin@, patrick@
2022-10-09 20:31:30 +00:00
kettenis
cc99722165 RK3566/RK3568 support.
ok patrick@
2022-10-09 20:30:59 +00:00
op
e6cfdc7731 allow newlines inside the `alternative names' block in acme-client.conf
ok florian
2022-10-09 09:59:31 +00:00
anton
2f0de8220a remove by now unwanted extra space in output 2022-10-09 05:54:40 +00:00
kevlo
7802cc488d Fix typo in debug messages.
ok deraadt@
2022-10-09 02:32:02 +00:00
kettenis
050951347a Add PNP ID to make this attach on Qualcomm SoCs.
ok mglocker@, patrick@
2022-10-08 19:46:52 +00:00
kevlo
721f596233 List SIMCom SIM8262E-M2 as supported for umb(4)
ok jmc@
2022-10-08 17:08:55 +00:00
deraadt
14839093e1 The stack can also be marked immutable, because we expect no sane program
to try to change the permissions of it.  We won't know who's trying that
until we enable it and see what breaks.
A tricky piece relating to setrlimit stack size changing was previously commited.
ok kettenis
2022-10-08 17:03:09 +00:00
deraadt
8db818c7f4 The signal trampoline and timekeep regions can be marked immutable at
execve() time
ok kettenis
2022-10-08 16:58:34 +00:00
kettenis
2dac1912a8 Since the PF_MUTABLE flag is an OpenBSD-specific flag, rename it to
PF_OPENBSD_MUTABLE.  While there, add the missing PF_MASKOS, which makes
it obvious this bit is indeed in the space reserved for OS-specific bits.

ok deraadt@
2022-10-08 16:42:41 +00:00
mglocker
26860ab61f regen 2022-10-08 06:55:49 +00:00
mglocker
f58d75a9b8 Add Wacom One M CTL-672 USB tablet. 2022-10-08 06:53:06 +00:00
krw
5cb1d9dce1 Fix some error output, replacing some silly 'warnx("\n...")' with
fprintf(stderr, "\n...").

Reported by Michael Siegel via bugs@. ok tb@ (with some further suggestions)
2022-10-07 19:59:19 +00:00
krw
c45c688b6d Nuke GPTDOSACTIVE which specified the wrong bit. It was superseded by
GPTPARTATTR_BOOTABLE which specifies the correct one.

Reminded by drahn@
2022-10-07 19:34:40 +00:00
jmc
1584d61186 sort SEE ALSO; 2022-10-07 16:31:36 +00:00
deraadt
695ad9628b sync 2022-10-07 15:43:41 +00:00
deraadt
e45a0bdddd Show the entry immutable bit in the various output formats. 2022-10-07 15:22:10 +00:00
deraadt
f4d4d691ec Add mimmutable(2) libc stub, add & adjust manual pages, and crank the minor.
ok kettenis
2022-10-07 15:21:04 +00:00
deraadt
bd249b5664 In the linkers, collect objects in section "openbsd.mutable" and place
them into a page-aligned region in the bss, with the right markers for
kernel/ld.so to identify the region and skip making it immutable.
While here, fix readelf/objdump versions to show all of this.
ok miod kettenis
2022-10-07 15:04:51 +00:00
deraadt
0ef731a0e2 sync 2022-10-07 15:00:12 +00:00
deraadt
8c7187e8f9 Add mimmutable(2) system call which locks the permissions (PROT_*) of
memory mappings so they cannot be changed by a later mmap(), mprotect(),
or munmap(), which will error with EPERM instead.
ok kettenis
2022-10-07 14:59:39 +00:00
claudio
21a4cd7f21 Kill extra space in ext community ovs output.
Noticed by job@, OK tb@
2022-10-07 09:20:30 +00:00
jmc
98c57f17f7 ssh-agent.1:
- use Nm not Xr for self-ref
- while here, wrap a long line

ssh-agent.c:
- add -O to usage()
2022-10-07 06:00:58 +00:00
deraadt
98e0f20952 new UVM_ET_IMMUTABLE flag marks a uvm entry as immutable. 2022-10-07 05:01:44 +00:00
djm
f8e7299e0e document "-O no-restrict-websafe"; spotted by Ross L Richardson 2022-10-07 04:06:26 +00:00
deraadt
6995d7ef16 Add identifiers for the new "mutable bss" section, ".openbsd.mutable" is
0x65a3dbe5.  Also add PF_MUTABLE as a segment flag for later use.
2022-10-07 03:20:58 +00:00
jsg
f90624e841 unstub intel_guc_send_busy_loop() ct_send() 2022-10-07 03:12:22 +00:00
jsg
db6c8e65f1 add msleep_interruptible() 2022-10-07 03:09:26 +00:00
jsg
26bd93c02a unstub guc_ct_buffer_reset() h2g_has_room() 2022-10-07 03:05:28 +00:00
jsg
693b3b5aa3 add CIRC_SPACE() 2022-10-07 03:00:44 +00:00
jsg
63ed71374f unstub guc_mmio_reg_add() 2022-10-07 02:59:25 +00:00
jsg
8f28b91ca7 add bsearch() from libc 2022-10-07 02:58:01 +00:00