diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index de5bf4008..a80a30691 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.119 2024/06/11 15:44:55 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.120 2024/06/21 01:52:17 jsg Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -103,6 +103,7 @@ #define CPU_PART_X_GENE 0x000 /* Qualcomm */ +#define CPU_PART_ORYON 0x001 #define CPU_PART_KRYO400_GOLD 0x804 #define CPU_PART_KRYO400_SILVER 0x805 @@ -194,6 +195,7 @@ struct cpu_cores cpu_cores_amcc[] = { struct cpu_cores cpu_cores_qcom[] = { { CPU_PART_KRYO400_GOLD, "Kryo 400 Gold" }, { CPU_PART_KRYO400_SILVER, "Kryo 400 Silver" }, + { CPU_PART_ORYON, "Oryon" }, { 0, NULL }, }; diff --git a/sys/net/pf.c b/sys/net/pf.c index 47ec92d4b..2a462280b 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1198 2024/06/20 19:25:42 bluhm Exp $ */ +/* $OpenBSD: pf.c,v 1.1199 2024/06/21 12:51:29 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -3666,8 +3666,8 @@ pf_anchor_stack_top(void) } int -pf_anchor_stack_push(struct pf_ruleset *rs, struct pf_rule *r, - struct pf_anchor *child, int jump_target) +pf_anchor_stack_push(struct pf_ruleset *rs, struct pf_rule *anchor, + struct pf_rule *r, struct pf_anchor *child, int jump_target) { struct pf_anchor_stackframe *stack; struct pf_anchor_stackframe *top_sf = pf_anchor_stack_top(); @@ -3677,6 +3677,7 @@ pf_anchor_stack_push(struct pf_ruleset *rs, struct pf_rule *r, return (-1); top_sf->sf_rs = rs; + top_sf->sf_anchor = anchor; top_sf->sf_r = r; top_sf->sf_child = child; top_sf->sf_jump_target = jump_target; @@ -3693,8 +3694,8 @@ pf_anchor_stack_push(struct pf_ruleset *rs, struct pf_rule *r, } int -pf_anchor_stack_pop(struct pf_ruleset **rs, struct pf_rule **r, - struct pf_anchor **child, int *jump_target) +pf_anchor_stack_pop(struct pf_ruleset **rs, struct pf_rule **anchor, + struct pf_rule **r, struct pf_anchor **child, int *jump_target) { struct pf_anchor_stackframe *top_sf = pf_anchor_stack_top(); struct pf_anchor_stackframe *stack; @@ -3710,6 +3711,7 @@ pf_anchor_stack_pop(struct pf_ruleset **rs, struct pf_rule **r, __func__); *rs = top_sf->sf_rs; + *anchor = top_sf->sf_anchor; *r = top_sf->sf_r; *child = top_sf->sf_child; *jump_target = top_sf->sf_jump_target; @@ -4306,25 +4308,27 @@ enter_ruleset: if (r->quick) return (PF_TEST_QUICK); } else { - ctx->a = r; ctx->aruleset = &r->anchor->ruleset; if (r->anchor_wildcard) { RB_FOREACH(child, pf_anchor_node, &r->anchor->children) { - if (pf_anchor_stack_push(ruleset, r, - child, PF_NEXT_CHILD) != 0) + if (pf_anchor_stack_push(ruleset, + ctx->a, r, child, + PF_NEXT_CHILD) != 0) return (PF_TEST_FAIL); + ctx->a = r; ruleset = &child->ruleset; goto enter_ruleset; next_child: continue; /* with RB_FOREACH() */ } } else { - if (pf_anchor_stack_push(ruleset, r, child, - PF_NEXT_RULE) != 0) + if (pf_anchor_stack_push(ruleset, ctx->a, + r, child, PF_NEXT_RULE) != 0) return (PF_TEST_FAIL); + ctx->a = r; ruleset = &r->anchor->ruleset; child = NULL; goto enter_ruleset; @@ -4335,7 +4339,9 @@ next_rule: r = TAILQ_NEXT(r, entries); } - if (pf_anchor_stack_pop(&ruleset, &r, &child, &target) == 0) { + if (pf_anchor_stack_pop(&ruleset, &ctx->a, &r, &child, + &target) == 0) { + /* stop if any rule matched within quick anchors. */ if (r->quick == PF_TEST_QUICK && *ctx->am == r) return (PF_TEST_QUICK); diff --git a/sys/net/pfvar_priv.h b/sys/net/pfvar_priv.h index 1b94e9790..563efd08e 100644 --- a/sys/net/pfvar_priv.h +++ b/sys/net/pfvar_priv.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar_priv.h,v 1.36 2024/04/22 13:30:22 bluhm Exp $ */ +/* $OpenBSD: pfvar_priv.h,v 1.37 2024/06/21 12:51:29 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -321,6 +321,7 @@ struct pf_pdesc { struct pf_anchor_stackframe { struct pf_ruleset *sf_rs; + struct pf_rule *sf_anchor; union { struct pf_rule *u_r; struct pf_anchor_stackframe *u_stack_top;