* updated maddy (0.7.1 -> 0.8.1), untested
[t2sde.git] / package / kernel / linux-header / fixed-cmdline-limit.patch
blobebf93b342834efb7c22cdef3bca68b87c34051ee
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux-header/fixed-cmdline-limit.patch
3 # Copyright (C) 2024 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Don't dynamically and unnecessarily scale the cmdline arg strlen
15 w/ 16...64k page sizes for consistency.
17 diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h
18 index c6f9450efc12..7b1d5fb54009 100644
19 --- a/include/uapi/linux/binfmts.h
20 +++ b/include/uapi/linux/binfmts.h
21 @@ -12,7 +12,7 @@ struct pt_regs;
22 * prevent the kernel from being unduly impacted by misaddressed pointers.
23 * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
25 -#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
26 +#define MAX_ARG_STRLEN (4096 * 32)
27 #define MAX_ARG_STRINGS 0x7FFFFFFF
29 /* sizeof(linux_binprm->buf) */