[LTP] [PATCH v7 0/3] syscalls/modify_ldt: Refactor into new API

Ricardo B. Marlière rbm@suse.com
Mon Apr 7 14:03:03 CEST 2025


This series is available at:

https://github.com/rbmarliere/ltp/tree/conversions/modify_ldt

CI is green:

https://github.com/rbmarliere/ltp/actions/runs/14308437153

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Changes in v7:
- Added back the check for asm/ldt.h in configure.ac
- Added back the fallback definition of struct user_desc
- Link to v6: https://lore.kernel.org/r/20250402-conversions-modify_ldt-v6-0-2e4b0e27870e@suse.com

Changes in v6:
- Removed unnecessary includes
- Made modify_ldt wrappers static inline
- Used const struct user_desc *ptr instead of void *ptr in modify_ldt()
- Fixed modify_ldt01 test description
- Added explanation on removal of "asm/ldt.h" check in commit message
- Removed run_child() in modify_ldt02 - instead, removed unused "int val"
- Renamed "entry" to "invalid_entry" in modify_ldt01
- Link to v5: https://lore.kernel.org/r/20250331-conversions-modify_ldt-v5-0-fd6ea1491956@suse.com

Changes in v5:
- Removed unnecessary #error
- Removed const specifier in cve-2015-3290.c
- Improved modify_ldt02 test description
- Added run_child() in modify_ldt02
- Removed unnecessary #include "lapi/ldt.h" in files that include common.h
- Extended coverage in modify_ldt01
- Link to v4: https://lore.kernel.org/r/20250328-conversions-modify_ldt-v4-0-a5ee7b8d82aa@suse.com

Changes in v4:
- Re-added the asm/ldt.h include directive
- Link to v3: https://lore.kernel.org/r/20250328-conversions-modify_ldt-v3-0-f6b6ee1c9144@suse.com

Changes in v3:
- Dropped the set_thread_area01 patch for a later series
- Squashed modify_ldt03 commit into modify_ldt01
- Renamed struct tst_case to tcase
- Removed fallback definition of struct user_desc
- Link to v2: https://lore.kernel.org/r/20250327-conversions-modify_ldt-v2-0-2907d4d3f6c0@suse.com

Changes in v2:
- Also refactored set_thread_area01
- Merged simple tests (including the existing modify_ldt03) into
modify_ldt01 instead of splitting it
- Added SAFE_MODIFY_LDT() macro
- Removed check to asm/ldt.h in configure.ac
- Used tst_syscall() instead of syscall() in modify_ldt() @ lapi/ldt.h
- Link to v1: https://lore.kernel.org/r/20250324-conversions-modify_ldt-v1-0-8d6d82f10768@suse.com

---
Ricardo B. Marlière (3):
      syscalls/modify_ldt: Add lapi/ldt.h
      syscalls/modify_ldt02: Refactor into new API
      syscalls/modify_ldt01: Refactor into new API

 include/lapi/ldt.h                                 |  54 +++++
 testcases/cve/cve-2015-3290.c                      |  26 +-
 testcases/cve/cve-2017-17053.c                     |   6 +-
 testcases/kernel/syscalls/fork/fork05.c            |   5 +-
 testcases/kernel/syscalls/modify_ldt/.gitignore    |   5 +-
 testcases/kernel/syscalls/modify_ldt/common.h      |  30 +++
 .../kernel/syscalls/modify_ldt/modify_ldt01.c      | 264 +++++----------------
 .../kernel/syscalls/modify_ldt/modify_ldt02.c      | 221 ++++-------------
 .../kernel/syscalls/modify_ldt/modify_ldt03.c      | 105 --------
 9 files changed, 194 insertions(+), 522 deletions(-)
---
base-commit: 40576d40f7ed93fafae99ad78431cd8fc81490e2
change-id: 20250324-conversions-modify_ldt-816329223f6e

Best regards,
-- 
Ricardo B. Marlière <rbm@suse.com>



More information about the ltp mailing list