summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGustavo Sousa <gustavo.sousa@intel.com>2026-05-22 05:45:21 -0300
committerGustavo Sousa <gustavo.sousa@intel.com>2026-05-22 10:52:29 -0300
commit0da9ab6c4e12e66dbd2e8f54481662225a79b7f5 (patch)
treea5b46429a34af745f9269f2762ff7c244e5ba5a0 /include/linux
parent3f1b68f370ce1c35014f9c04f781b497fb0a7dd2 (diff)
drm/xe/rtp: Fully parse the ruleset
The function rule_matches() short-circuits evaluation of the implicit conjunctions (each substring of rules not containing OR) and the explicit disjunctions (implicit conjunctions joined by OR). In other words: - in a conjunction, once a rule evaluate to false, we skip to the next OR (if any) to evaluate the next conjunction; - in a disjunction, once a conjunction evaluates to true, we return true and skip evaluating all the remaining rules. While this behavior results in a correct logical value, due to how the "OR" short-circuiting is implemented, it has the side-effect that rule set does not get fully "parsed", allowing incomplete constructs like (rule1, OR) to evaluate to true when rule1 is true. We should treat such constructs as invalid and treat them the same way we do for stuff like (OR, rule1). As such, update rule_matches() to "parse" the whole rule set, and that while keeping the short-circuit aspect of evaluation. With that, we can fix the FIXME test cases that cover that behavior. v2: - Do not change short-circuit *evaluation* behavior. (Matt) Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Violet Monti <violet.monti@intel.com> Link: https://patch.msgid.link/20260522-rtp-rule-parser-v3-6-0c51039899f4@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions