Commit 09c4656
codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations
If slabobj_ext vector allocation for a slab object fails and later on it
succeeds for another object in the same slab, the slabobj_ext for the
original object will be NULL and will be flagged in case when
CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled.
Mark failed slabobj_ext vector allocations using a new objext_flags flag
stored in the lower bits of slab->obj_exts. When new allocation succeeds
it marks all tag references in the same slabobj_ext vector as empty to
avoid warnings implemented by CONFIG_MEM_ALLOC_PROFILING_DEBUG checks.
Link: https://lkml.kernel.org/r/20240321163705.3067592-36-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Tested-by: Kees Cook <keescook@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alex Gaynor <alex.gaynor@gmail.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Andreas Hindborg <a.hindborg@samsung.com>
Cc: Benno Lossin <benno.lossin@proton.me>
Cc: "Björn Roy Baron" <bjorn3_gh@protonmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Gary Guo <gary@garyguo.net>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent d224eb0 commit 09c4656
2 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
369 | 371 | | |
370 | | - | |
| 372 | + | |
371 | 373 | | |
372 | 374 | | |
373 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1894 | 1915 | | |
1895 | 1916 | | |
1896 | 1917 | | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1897 | 1921 | | |
1898 | 1922 | | |
1899 | 1923 | | |
| |||
1909 | 1933 | | |
1910 | 1934 | | |
1911 | 1935 | | |
1912 | | - | |
1913 | | - | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
1914 | 1939 | | |
1915 | 1940 | | |
1916 | 1941 | | |
1917 | 1942 | | |
1918 | 1943 | | |
1919 | 1944 | | |
1920 | | - | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1921 | 1950 | | |
| 1951 | + | |
1922 | 1952 | | |
1923 | | - | |
| 1953 | + | |
1924 | 1954 | | |
1925 | | - | |
| 1955 | + | |
1926 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
1927 | 1959 | | |
1928 | 1960 | | |
1929 | 1961 | | |
1930 | 1962 | | |
1931 | 1963 | | |
1932 | 1964 | | |
1933 | | - | |
1934 | | - | |
| 1965 | + | |
| 1966 | + | |
1935 | 1967 | | |
1936 | 1968 | | |
1937 | 1969 | | |
| |||
0 commit comments