arm64 fixes/cleanups:

- Fix the memset() size when re-initialising the SVE state.
 
 - Mark __stack_chk_guard as __ro_after_init.
 
 - Remove duplicate include.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmFEtzEACgkQa9axLQDI
 XvED3Q//WZcsCjZ+1R0BLfJcjsGVAxBS7/Un2ei9JU/lAOFVbWmBgL+jd7W8QxhS
 A4hSTuoF/qRsMvpLbM7VFDPIFxRn0PsIzA5yA2HjEqvTG4zGWTC46qejR2gS3Fod
 VlBX+cgTbYzbh5ZihxtHV+l7Jiu51Cwu70YxUQU+KWS0yE3gatl4kK0rE0GLevYt
 1RfjDYvKtarp0JhraDk0HlgRMgRxWrOSpWOHiQdgbuHnbiwqxp6mzeu9Lf+3sHDU
 yXhfrioR1f/5mvNO4X0RWlMAPox5YimBTuwe56MJWy6gBSgdChIF4DCSwplL9kY1
 uaxVxpoDemK4kz5fJ482FfeKy9wp0cJDFdXvzkgUNcJGygduVYlg8mOPBMFCg71W
 n1+JYAb9R4RwSY3O7p2A0uaEuVlPiMEfLI7Lby6mpmthN5qy/TOZ9Am7gSabbh9F
 bauDJ1NEPiMN6XeibgIpuulpKmbACU8gEFqP68S1nz1xoXvpD0C2x++vrS/QxLBh
 YJjRKQ5q4YN1L4HMWMhCIk2VR6x9VXrMU1AzU0s6I8MRyZViTUzOayjaocSluP9n
 jFw94X9wjiCEXi74EO6jWeuCz6AzWMN5SGQNrCeO7JLelykoReNB3V3Soz+eqte9
 rDIxHDtoY0IFg5ngIzLVZ+VA4m5KgPtIfM++z1aQCKtdrT+jKiY=
 =WVRd
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes and cleanups from Catalin Marinas:

 - Fix the memset() size when re-initialising the SVE state.

 - Mark __stack_chk_guard as __ro_after_init.

 - Remove duplicate include.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Mark __stack_chk_guard as __ro_after_init
  arm64/kernel: remove duplicate include in process.c
  arm64/sve: Use correct size when reinitialising SVE state
This commit is contained in:
Linus Torvalds 2021-09-17 08:59:27 -07:00
commit 7f2cd14129
2 changed files with 2 additions and 3 deletions

View File

@ -513,7 +513,7 @@ size_t sve_state_size(struct task_struct const *task)
void sve_alloc(struct task_struct *task)
{
if (task->thread.sve_state) {
memset(task->thread.sve_state, 0, sve_state_size(current));
memset(task->thread.sve_state, 0, sve_state_size(task));
return;
}

View File

@ -18,7 +18,6 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/nospec.h>
#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/sysctl.h>
#include <linux/unistd.h>
@ -58,7 +57,7 @@
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
#include <linux/stackprotector.h>
unsigned long __stack_chk_guard __read_mostly;
unsigned long __stack_chk_guard __ro_after_init;
EXPORT_SYMBOL(__stack_chk_guard);
#endif