diff options
author | Kees Cook <[email protected]> | 2018-08-17 15:44:11 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-08-17 16:20:27 -0700 |
commit | 2c27ce915078a5822aefb5db7bc2481664b26044 (patch) | |
tree | 7c735100cf589ffd9f00d8cd7b8b07c54dc9408f /tools/perf/scripts/python/mem-phys-addr.py | |
parent | ac4ecf968acb9e54c335f99d842d56d6b90e28fb (diff) |
ntfs: decompress: remove VLA usage
In the quest to remove all stack VLA usage from the kernel[1], this
moves the stack buffer used during decompression to be allocated
externally.
The existing "dest_max_index" used in the VLA is bounded by cb_max_page.
cb_max_page is bounded by max_page, and max_page is bounded by nr_pages.
Since nr_pages is used for the "pages" allocation, it can similarly be
used for the "completed_pages" allocation and passed into the
decompression function. The error paths are updated to free the new
allocation.
[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Cc: Anton Altaparmakov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions