[PATCH 5.17 009/772] riscv: Move alternative length validation into subsection