linux/Documentation/arch
Vegard Nossum e961f8c696 docs: kernel_feat.py: fix potential command injection
[ Upstream commit c48a7c44a1 ]

The kernel-feat directive passes its argument straight to the shell.
This is unfortunate and unnecessary.

Let's always use paths relative to $srctree/Documentation/ and use
subprocess.check_call() instead of subprocess.Popen(shell=True).

This also makes the code shorter.

This is analogous to commit 3231dd5862 ("docs: kernel_abi.py: fix
command injection") where we did exactly the same thing for
kernel_abi.py, somehow I completely missed this one.

Link: https://fosstodon.org/@jani/111676532203641247
Reported-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240110174758.3680506-1-vegard.nossum@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-01-31 16:18:46 -08:00
..
arc docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
arm docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
arm64 docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
ia64 docs: move ia64 architecture docs under Documentation/arch/ 2023-04-10 16:45:52 -06:00
loongarch docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
m68k docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
mips docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
nios2 docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
openrisc docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
parisc docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
s390 docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
sh docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
sparc docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
x86 docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
xtensa docs: kernel_feat.py: fix potential command injection 2024-01-31 16:18:46 -08:00
index.rst Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00