Skip to content

Commit f05aa13

Browse files
committed
msg-filter: tweak kernel path fixup for z-stream releases
The original rule was able to translate: `kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/` -> `kernel-4.18.0-552.el8/` ... but it did not work for z-stream releases, where the paths are unnecessarily inconsistent (`el8_9` on the first level vs. `el8` on the second level): `kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/` Related: https://issues.redhat.com/browse/OSH-563 Closes: #171
1 parent 920c047 commit f05aa13

8 files changed

+24
-1
lines changed

src/lib/msg-filter.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct MsgFilter::Private {
6666
TSubstMap fileSubsts;
6767

6868
const std::string strKrn = "^[a-zA-Z+]+";
69-
const RE reKrn = RE(strKrn);
69+
const RE reKrn = RE(strKrn + /* convert el8_9 -> el8 */ "|_[0-9]+$");
7070
const RE reDir = RE("^([^:]*/)");
7171
const RE reFile = RE("[^/]+$");
7272
const RE rePath = RE("^(?:/builddir/build/BUILD/)?([^/]+)/(.*)(\\.[ly])?$");

tests/csdiff/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ test_csdiff(diff-misc 17-cov-parser-key-event)
8585
test_csdiff(diff-misc 18-cov-parser-key-event)
8686
test_csdiff(diff-misc 19-cov-parser-key-event)
8787
test_csdiff(diff-misc 21-kernel-shell-code)
88+
test_csdiff(diff-misc 22-kernel-zstream-path)
8889
test_csdiff(diff-misc 23-cov-parser-key-event)
8990

9091
add_subdirectory(filter-file)

tests/csdiff/diff-misc/22-kernel-zstream-path-add-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/22-kernel-zstream-path-add.err

Whitespace-only changes.

tests/csdiff/diff-misc/22-kernel-zstream-path-fix-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/22-kernel-zstream-path-fix.err

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Error: UNINIT (CWE-457):
2+
kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/arch/x86/crypto/chacha20_glue.c:71:2: var_decl: Declaring variable "walk" without initializer.
3+
kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/arch/x86/crypto/chacha20_glue.c:74:2: path: Condition "__cond", taking false branch.
4+
kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/arch/x86/crypto/chacha20_glue.c:77:2: path: Condition "req->cryptlen <= 64", taking false branch.
5+
kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/arch/x86/crypto/chacha20_glue.c:77:2: path: Condition "!may_use_simd()", taking false branch.
6+
kernel-4.18.0-552.el8/linux-4.18.0-552.el8.x86_64/arch/x86/crypto/chacha20_glue.c:80:2: uninit_use_in_call: Using uninitialized value "walk.flags" when calling "skcipher_walk_virt".
7+
# 78| return crypto_chacha20_crypt(req);
8+
# 79|
9+
# 80|-> err = skcipher_walk_virt(&walk, req, true);
10+
# 81|
11+
# 82| crypto_chacha20_init(state, ctx, walk.iv);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Error: UNINIT (CWE-457):
2+
kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/arch/x86/crypto/chacha20_glue.c:71: var_decl: Declaring variable "walk" without initializer.
3+
kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/arch/x86/crypto/chacha20_glue.c:74: path: Condition "__cond", taking false branch.
4+
kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/arch/x86/crypto/chacha20_glue.c:77: path: Condition "req->cryptlen <= 64", taking false branch.
5+
kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/arch/x86/crypto/chacha20_glue.c:77: path: Condition "!may_use_simd()", taking false branch.
6+
kernel-4.18.0-513.5.1.el8_9/linux-4.18.0-513.5.1.el8.x86_64/arch/x86/crypto/chacha20_glue.c:80: uninit_use_in_call: Using uninitialized value "walk.flags" when calling "skcipher_walk_virt".
7+
# 78| return crypto_chacha20_crypt(req);
8+
# 79|
9+
# 80|-> err = skcipher_walk_virt(&walk, req, true);
10+
# 81|
11+
# 82| crypto_chacha20_init(state, ctx, walk.iv);

0 commit comments

Comments
 (0)