created | 2023-01-17T09:54:02Z |
---|---|
begin | 2023-01-06T00:00:00Z |
end | 2023-01-07T00:00:00Z |
path | src/sys |
commits | 12 |
date | 2023-01-06T14:17:15Z | |||
---|---|---|---|---|
author | kn | |||
files | src/sys/netinet6/nd6_nbr.c | log | diff | annotate |
message |
Merge common code into new nd6_dad_destroy() The current code wrt. stopping DAD for and removing a particular IP from the list is flawed. Introduce a single nd6_dad_destroy() to the cleanup, so that there's only one place to fix. This is just a mechanical deduplication without significant behaviour change; in case a duplicated address was found, RTM_CHGADDRATTR now goes out before cleanup, which should be no problem. The nd6_dad_create() pendant could be done as well, but the end of nd6_dad_start() is currently the only place where a new IP/DAD entry is set up, so little gain besides function name symmetry. OK claudio |
date | 2023-01-06T14:24:36Z | |||
---|---|---|---|---|
author | kn | |||
files | src/sys/netinet6/nd6.c | log | diff | annotate |
message |
Simplify nd6_options() initialise logic nd_opts_{search,last,done} are exlusively used in the internal option handling machinery; the only two nd6_options() callers only use nd_opts_{src,tgt}_lladdr. nd6_options() always zeroes and initialises the caller's struct nd_opts. If icmp6len is zero, i.e. if there are no ICMP6 header options left, everything inside *ndopts is zero, except nd_opts_done=1 which is not used by the callers. Set the internal nd_opts_{search,last,done} members only when needed. OK claudio |
date | 2023-01-06T14:29:47Z | |||
---|---|---|---|---|
author | kn | |||
files | src/sys/netinet6/nd6.c | log | diff | annotate |
message |
Clarify nd6_option() return semantics nd_opts_last is set only once in nd6_options() during struct init and guaranteed non-NULL as it is set to the function's argument *opt which is passed in as (struct_ptr + 1) in both callers. nd6_option(), the internal helper, returns a pointer to the next option or NULL, which means either "no option, ok" or "invalid option, fail". Failure is signaled through nd_opts_last being NULL after nd6_option() returned, which only happens if nd6_option() zeroed the whole *ndopts. Move the two cases under mnemonic labels and zap the now obviously redundant bzero() call in nd6_options(). OK claudio |
date | 2023-01-06T14:32:55Z | |||
---|---|---|---|---|
author | kn | |||
files | src/sys/netinet6/nd6.c | log | diff | annotate |
message |
Inline nd6_option() helper, remove indirections Move the function body into the while loop, merge identical variables, pull the `invalid' label out of the loop and straighten `skip' into the `skip1' label. Merging nd6_option() into nd6_options() is now much clearer after the previous clean up. nd_opts_{search,last,done} are now clearly "private" to n6_options() and can be cleaned up from struct nd_opts next. OK claudio |
date | 2023-01-06T14:35:34Z | |||
---|---|---|---|---|
author | kn | |||
files | src/sys/netinet6/nd6.c | log | diff | annotate |
src/sys/netinet6/nd6.h | log | diff | annotate | |
message |
Clean up struct nd_opts, use nd6_options() function local variables nd_opts_search is really the next option, so call it next_opt. nd_opts_done == 1 means next_opt == NULL, i.e. no more option to handle, so zap the former and use the latter to stop. Finally drop the useless struct members, all under _KERNEL. OK claudio |
date | 2023-01-06T17:44:34Z | |||
---|---|---|---|---|
author | sashan | |||
files | src/sys/net/pf.c | log | diff | annotate |
src/sys/net/pf_ioctl.c | log | diff | annotate | |
src/sys/net/pfvar.h | log | diff | annotate | |
src/sys/net/pfvar_priv.h | log | diff | annotate | |
message |
PF_ANCHOR_STACK_MAX is insufficient protection against stack overflow. On amd64 stack overflows for anchor rule with depth ~30. The tricky thing is the 'safe' depth varies depending on kind of packet processed by pf_match_rule(). For example for local outbound TCP packet stack overflows when recursion if pf_match_rule() reaches depth 24. Instead of lowering PF_ANCHOR_STACK_MAX to 20 and hoping it will be enough on all platforms and for all packets I'd like to stop calling pf_match_rule() recursively. This commit brings back pf_anchor_stackframe array we used to have back in 2017. It also revives patrick@'s idea to pre-allocate stack frame arrays from per-cpu. OK kn@ |
date | 2023-01-06T19:05:46Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/arch/hppa/stand/libsa/pdc.c | log | diff | annotate |
message | Remove unused local variables as well as the dependency on <machine/nvm.h>. |
date | 2023-01-06T19:07:17Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/arch/hppa/include/Attic/nvm.h | log | diff | annotate |
message | Remove no longer needed and quite worthless header. |
date | 2023-01-06T19:08:36Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/kern/vfs_lookup.c | log | diff | annotate |
message | Replace last user of copystr() with strlcpy(). NFCI |
date | 2023-01-06T19:10:18Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/arch/alpha/alpha/locore.s | log | diff | annotate |
src/sys/arch/amd64/amd64/copy.S | log | diff | annotate | |
src/sys/arch/arm/arm/copystr.S | log | diff | annotate | |
src/sys/arch/arm64/arm64/copystr.S | log | diff | annotate | |
src/sys/arch/hppa/hppa/machdep.c | log | diff | annotate | |
src/sys/arch/i386/i386/locore.s | log | diff | annotate | |
src/sys/arch/m88k/m88k/m88k_machdep.c | log | diff | annotate | |
src/sys/arch/powerpc/conf/files.powerpc | log | diff | annotate | |
src/sys/arch/powerpc/powerpc/Attic/copystr.c | log | diff | annotate | |
src/sys/arch/riscv64/riscv64/copystr.S | log | diff | annotate | |
src/sys/arch/sh/sh/locore_c.c | log | diff | annotate | |
src/sys/arch/sparc64/sparc64/locore.s | log | diff | annotate | |
src/sys/sys/systm.h | log | diff | annotate | |
message | Remove copystr(9), unless used internally by copy{in,out}str. |
date | 2023-01-06T19:12:12Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/arch/powerpc/powerpc/Attic/copystr.c | log | diff | annotate |
message | Oops, forgot to cvs rm |
date | 2023-01-06T19:23:53Z | |||
---|---|---|---|---|
author | miod | |||
files | src/sys/arch/arm/arm/undefined.c | log | diff | annotate |
message |
Use copyin32() to fetch a faulting instruction rather than short-circuit it with a comment saying that we really ought to use copyin* here. |