diff options
author | Miguel Ojeda <[email protected]> | 2022-12-13 19:03:55 +0100 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2023-01-16 00:54:35 +0100 |
commit | 6618d69aa129a8fc613e64775d5019524c6f231b (patch) | |
tree | eb85b88e3ab361b8b7e534bbc1941d3ef4d79d7a /include/linux/overflow.h | |
parent | 5dc4c995db9eb45f6373a956eb1f69460e69e6d4 (diff) |
rust: print: avoid evaluating arguments in `pr_*` macros in `unsafe` blocks
At the moment it is possible to perform unsafe operations in
the arguments of `pr_*` macros since they are evaluated inside
an `unsafe` block:
let x = &10u32 as *const u32;
pr_info!("{}", *x);
In other words, this is a soundness issue.
Fix it so that it requires an explicit `unsafe` block.
Reported-by: Wedson Almeida Filho <[email protected]>
Reported-by: Domen Puncer Kugler <[email protected]>
Link: https://github.com/Rust-for-Linux/linux/issues/479
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Reviewed-by: Gary Guo <[email protected]>
Reviewed-by: Björn Roy Baron <[email protected]>
Reviewed-by: Vincenzo Palazzo <[email protected]>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions