Commit Graph

288069 Commits

Author SHA1 Message Date
yamaguchi 050417271f Fix the wrong timeout event handler for PAP
sppp_auth_to_event() is a implementation of TO+/TO- event for
authentication protocol and it drops TO+ event in Ack-rcvd state.
2021-06-01 05:22:57 +00:00
yamaguchi 8ccc16d5e6 Update test case.
The state of IPCP and IPv6CP is Closed when those are disabled.
2021-06-01 05:18:33 +00:00
yamaguchi a0c48bcbbc Send Up event in tlu action of LCP
When LCP is stopping, the layer send Down event and Close event
(Down -> Close). To align the sequence, Up event is moved
before Open event.
2021-06-01 05:16:46 +00:00
yamaguchi a53bc2f880 Added logs when IPCP and IPv6CP are up or down 2021-06-01 05:11:22 +00:00
yamaguchi c68f0c23b6 Added SPPP_LOG() for refactoring around log 2021-06-01 05:08:46 +00:00
yamaguchi c8891e4be9 Send RTM_IFINFO when a network configuration protocol
is up or down
2021-06-01 05:04:06 +00:00
yamaguchi 6a44efb540 Drop the Open event of LCP to stop the interface
even a reconnection is scheduled

The queue for events in if_spppsubr.c is not possible
to enqueue the same event. So, The close event caused
while a close event and open event are enqueued for
reconnection is not possible to stop interface.
To solve this issue, The open event after
"ifconfig pppoe? down" is dropped.
2021-06-01 04:59:50 +00:00
yamaguchi 63a0a2cb16 remove PP_CISCO that was used in obsoleted drivers e.g. lmc(4) 2021-06-01 04:55:55 +00:00
yamaguchi 143fc24656 Remove open event on tlf of PAP/CHAP when retry of them is over
to prevent that LCP stops at Starting state.

And also remove retry counter check on tls of LCP because of
unnecessary.
2021-06-01 04:45:22 +00:00
yamaguchi 876c307570 Do not if_down() when a down event of the lower layer of LCP is happened
since the layer try to reconnect.
2021-06-01 04:19:57 +00:00
yamaguchi 4910df2e45 Fix not to do if_down() before reconnect
Almost network interface do not use if_down() even when there is no
connectivity. So, pppoe(4) is also made be not used it.
This behavior can be rollbacked by SPPP_IFDOWN_RECONNECT option.
2021-06-01 03:51:33 +00:00
yamaguchi 0c5b42cf15 restart LCP when loopback packets are detected
In if_spppsubr.c down and up do not mean that LCP is stopping
or running, but mean that the lower layer of LCP is up or down.
And, restarting of LCP is had to use close event and open event.
2021-06-01 03:27:23 +00:00
mcf bd85fcf225 Fix initial line hash calculation for subwindows
lp->hash is not initialized at this point. Since the hash is
calculated in chunks using __hash_more(), it needs to be initialized
to 0 first (just as in doupdate()).

Detected with valgrind while running python's test suite when
debugging an unrelated issue.

ok uwe@
2021-06-01 00:59:01 +00:00
rin 78e37e7363 PR port-arm/55790
Fix KASSERT failure with floating-point exception in userland.

Consider the case in which curlwp owns enabled FPU in vfp_handler().
If FPE is raised, we must skip pcu_load(9) rather than just falling
through. Otherwise, KASSERT fires in vfp_state_load(), since curlwp
already owns enabled FPU.

No regression for ATF is introduced.
2021-06-01 00:30:22 +00:00
rin 257ebab675 PR port-arm/55790
Style fix for clarity, in preparation of main fix.

Replace condition ``curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp'' with
``curlwp->l_pcu_cpu[PCU_FPU] == curcpu()''. And add KASSERT to check
the two conditions are equivalent, as done for MI pcu code:

https://nxr.netbsd.org/xref/src/sys/kern/subr_pcu.c#323

No functional changes.
2021-06-01 00:13:19 +00:00
rin c9540f6f13 PR toolchain/55837
Get rid of -O0 hack for GDB for hard-float arm. This was necessary because
libunwind did not support s0-s31. Note that for *most* cases (not all!),
-O0 stops using VFP registers for general purposes.

Also note that this hack was incomplete. We had to compile every functions
with -O0, that can be unwinded. Otherwise, GDB crashed every time exceptions
were raised.
2021-05-31 22:33:19 +00:00
joerg 9a3318469d Stop using -fcommon, xsrc should be fixed. 2021-05-31 21:45:41 +00:00
rin 679d0566e4 PR toolchain/55837
Stop using enum for flags, as per request from joerg.

#define constants and #undef after use.
2021-05-31 21:31:33 +00:00
thorpej 0198267a69 Additional comment about the range (0-1025) that's needed for the PT page
reference count, and thus now many bits we need to scare up.
2021-05-31 17:22:44 +00:00
thorpej 79fd9ddab5 After a comment by joerg@, go back to using a dedicated field for the
PT page reference count, but add an XXX comment stating the desire to
find a safely-unused field in the vm_page structure when pages are in-
use as PT pages, so that we can save the 8 bytes per page needed for
this.
2021-05-31 17:16:04 +00:00
simonb b1b36fc1a1 Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
2021-05-31 14:38:55 +00:00
simonb e1d48e5a8b Use <sys/param.h> in the synopsis rather than <machine/param.h>; an MI
interface should be pulled in via <sys/...>.
2021-05-31 12:24:15 +00:00
rin be367f2780 PR toolchain/55837
Bump LAST_REGISTER and LAST_RESTORE_REG to REGNO_ARM32_S31 for arm.

There are two numbering schemes for VFPv2 registers: s0-s31 and d0-d15.
The former is used by GCC, and the latter is by LLVM. Since libunwind was
derived from LLVM, it has never supported the former. This results in
crashes for GCC-compiled binaries in exception handler of C++, if it
encounters VFPv2 registers when unwinding frames.

This commit adds support for s0-s31 numbering to libunwind. I choose an
implementation in which VFPv2 registers are ``double-counted'' as s0-s31
AND d0-d15. This does not cause real problems, since the former is only
used by GCC, and the later is by LLVM. That is, different numbering
schemes cannot appear in a same frame. To make sure, assertions are added
in order to check this.

I've confirmed that no regression for ATF both for GCC- and LLVM-compiled
userlands.
2021-05-31 12:12:24 +00:00
rin 59bb4ebecd PR toolchain/55837
Fix logic error in copyFloatVectorRegister() for arm; copy s0-s31 or
d0-d31, not both.
2021-05-31 11:57:28 +00:00
rin 6048a3f308 PR toolchain/55837
Fix pointer arithmetic when copying s0-s31 registers for arm.
2021-05-31 11:54:01 +00:00
rin f8fd5b9f7e PR toolchain/55837
Fix DWARF/internal register numbers of s31 for arm.
2021-05-31 11:50:43 +00:00
rin 3c4340442b PR toolchain/55837
Fix for jumpto() armeb; use word-wise load for flags, instead of byte-wise one.
2021-05-31 11:47:18 +00:00
rin 07d38a85f2 PR toolchain/55837
copyFloatVectorRegister(): Assert register number is valid to make sure.
2021-05-31 11:44:06 +00:00
rin 737353f511 PR toolchain/55837
Misc style fixes for clarity:

- Rename lazyVFP1() and lazyVFP3() to lazyVFPv2() and lazyVFPv3(),
  respectively. Note that VFPv1 was obsoleted and replaced by VFPv2.

- Introduce enum for flags.

- Add few comments.

No functional changes.
2021-05-31 11:41:22 +00:00
rin 772d3cdddb Generalize boot.cfg workaround for ISO9660; fallback to default_device
whenever efi_file_path() fails (due to broken firmware), in addition to
the case of ISO9660 (for which efi_file_path() succeeds but does not
work correctly).
2021-05-31 11:12:42 +00:00
riastradh 40892dd9cd uvm: Make uvm_extern.h (more) self-contained, needs sys/types.h. 2021-05-31 10:57:02 +00:00
riastradh 3ed9a215d4 drm: sys/param.h, not machine/param.h, for DELAY. 2021-05-31 10:33:04 +00:00
martin f57f1d679b bump slightly harder 2021-05-31 07:59:02 +00:00
simonb 4439248b19 MIPS n64 dynamic binaries have worked for a while now, remove -static
for these.
2021-05-31 02:10:37 +00:00
joerg b3e06b24c0 Use -fcommon 2021-05-31 00:04:15 +00:00
joerg 729a28aac6 Various X drivers still need -fcommon, so add it. 2021-05-30 22:24:35 +00:00
thorpej 1e5f9ecd1c Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to icmp6 related structures.

PR bin/56199.
2021-05-30 21:48:42 +00:00
rillig 0137ba05b0 make: inline str_concat4
This function is only ever used for forming strings of the form
"archive(member)".

No functional change.
2021-05-30 21:16:54 +00:00
rillig 91c42d4f3a make: fix reported code coverage for *.h
In 'make test-coverage', the number of uncovered lines for inline
functions in headers was reported too high.  The cause for this is that
gcov reports the coverage for these functions multiple times, once per
translation unit.  If some of the translation units don't use these
inline functions, summing the lines containing '#####' quickly leads to
numbers that are obviously too high.
2021-05-30 21:03:08 +00:00
thorpej daed3b997c Minimal change to suppress unaligned access errors on NetBSD/alpha; add
the UNALIGNED decoration to struct icmp.

PR bin/56199.
2021-05-30 21:01:43 +00:00
rillig d327c9edd5 make: uncompress code in ApplyModifier_Unique
The algorithm is easier to understand when each line of code only
focuses on a single topic.

No change to the resulting binary, except for line numbers in assertion
messages.
2021-05-30 20:41:34 +00:00
rillig fd822471a0 make: inline VarUniq into ApplyModifier_Unique
No functional change.
2021-05-30 20:31:03 +00:00
rillig 176007d55e tests/make: test whitespace normalization for modifier ':u' 2021-05-30 20:26:41 +00:00
thorpej 07ee0e9672 Fix DEBUG build. 2021-05-30 19:50:23 +00:00
thorpej 6569c0accd Fix unused variable warning when DIAGNOSTIC is disabled. Pointed out
by jklos.
2021-05-30 19:46:21 +00:00
thorpej 1137e76805 Implement pmap_remove_all(). 2021-05-30 19:41:59 +00:00
chs d5b984e0de avoid dereferencing a constant string address as a UINT32 pointer,
KUBSAN complains about bad alignment.

Reported-by: syzbot+91187f4e33436ce83e56@syzkaller.appspotmail.com
2021-05-30 16:25:35 +00:00
thorpej 20b1178744 When removing mappings, hang PV entries to be freed off of the
pmap_tlb_context structure, and free them back in bulk after we
release all of our locks (as we do with PT pages that are freed).
2021-05-30 14:06:37 +00:00
thorpej 5d772fe619 Keep track of a pmap's PV entries with a list hanging off the pmap. 2021-05-30 13:34:21 +00:00
riastradh 3c5d2f91d8 synaptics(4): New sysctl knob for debug output.
Set hw.synaptics.debug=1 to re-enable it; the compile-time DIAGNOSTIC
option was inappropriate for this.
2021-05-30 13:20:01 +00:00