mbox series

[v3,0/3] slab: fix and cleanup of slub_debug

Message ID 20240607-b4-slab-debug-v3-0-bb2a326c4ceb@linux.dev (mailing list archive)
Headers show
Series slab: fix and cleanup of slub_debug | expand

Message

Chengming Zhou June 7, 2024, 8:40 a.m. UTC
Changes in v3:
- Fix slub_kunit tests failures by using new introduced
  slab_in_kunit_test(), which doesn't increase slab_errors.
- Fix the condition of whether to check free pointer and
  set "ret" correctly.
- Collect Reviewed-by tags from Vlastimil Babka.
- Link to v2: https://lore.kernel.org/r/20240605-b4-slab-debug-v2-0-c535b9cd361c@linux.dev

Changes in v2:
- Change check_object() to do all the checks without skipping, report
  their specific error findings in check_bytes_and_report() but not
  print_trailer(). Once all checks were done, if any found an error,
  print the trailer once from check_object(), suggested by Vlastimil.
- Consolidate the two cases with flags & SLAB_RED_ZONE and make the
  complex conditional expressions a little prettier and add comments
  about extending right redzone, per Vlastimil.
- Add Reviewed-by from Feng Tang.
- Link to v1: https://lore.kernel.org/r/20240528-b4-slab-debug-v1-0-8694ef4802df@linux.dev

Hello,

This series includes minor fix and cleanup of slub_debug, please see
the commits for details.

Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
---
Chengming Zhou (3):
      slab: make check_object() more consistent
      slab: don't put freepointer outside of object if only orig_size
      slab: delete useless RED_INACTIVE and RED_ACTIVE

 include/linux/poison.h       |  7 ++--
 mm/slub.c                    | 77 ++++++++++++++++++++++++++++----------------
 tools/include/linux/poison.h |  7 ++--
 3 files changed, 53 insertions(+), 38 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240528-b4-slab-debug-1d8179fc996a

Best regards,

Comments

Vlastimil Babka June 7, 2024, 9:27 a.m. UTC | #1
On 6/7/24 10:40 AM, Chengming Zhou wrote:
> Changes in v3:
> - Fix slub_kunit tests failures by using new introduced
>   slab_in_kunit_test(), which doesn't increase slab_errors.
> - Fix the condition of whether to check free pointer and
>   set "ret" correctly.
> - Collect Reviewed-by tags from Vlastimil Babka.
> - Link to v2: https://lore.kernel.org/r/20240605-b4-slab-debug-v2-0-c535b9cd361c@linux.dev
> 
> Changes in v2:
> - Change check_object() to do all the checks without skipping, report
>   their specific error findings in check_bytes_and_report() but not
>   print_trailer(). Once all checks were done, if any found an error,
>   print the trailer once from check_object(), suggested by Vlastimil.
> - Consolidate the two cases with flags & SLAB_RED_ZONE and make the
>   complex conditional expressions a little prettier and add comments
>   about extending right redzone, per Vlastimil.
> - Add Reviewed-by from Feng Tang.
> - Link to v1: https://lore.kernel.org/r/20240528-b4-slab-debug-v1-0-8694ef4802df@linux.dev
> 
> Hello,
> 
> This series includes minor fix and cleanup of slub_debug, please see
> the commits for details.
> 
> Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>

applied to slab/for-next, thanks

> ---
> Chengming Zhou (3):
>       slab: make check_object() more consistent
>       slab: don't put freepointer outside of object if only orig_size
>       slab: delete useless RED_INACTIVE and RED_ACTIVE
> 
>  include/linux/poison.h       |  7 ++--
>  mm/slub.c                    | 77 ++++++++++++++++++++++++++++----------------
>  tools/include/linux/poison.h |  7 ++--
>  3 files changed, 53 insertions(+), 38 deletions(-)
> ---
> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
> change-id: 20240528-b4-slab-debug-1d8179fc996a
> 
> Best regards,