Commit 2e3272b
KVM: x86: Copy filter arg outside kvm_vm_ioctl_set_msr_filter()
In the next patch we want to introduce a second caller to
set_msr_filter() which constructs its own filter list on the stack.
Refactor the original function so it takes it as argument instead of
reading it through copy_from_user().
Signed-off-by: Alexander Graf <graf@amazon.com>
Message-Id: <20221017184541.2658-3-graf@amazon.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent ed51862 commit 2e3272b
1 file changed
Lines changed: 17 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6442 | 6442 | | |
6443 | 6443 | | |
6444 | 6444 | | |
6445 | | - | |
| 6445 | + | |
| 6446 | + | |
6446 | 6447 | | |
6447 | | - | |
6448 | 6448 | | |
6449 | | - | |
6450 | 6449 | | |
6451 | 6450 | | |
6452 | 6451 | | |
6453 | 6452 | | |
6454 | 6453 | | |
6455 | | - | |
6456 | | - | |
6457 | | - | |
6458 | | - | |
| 6454 | + | |
6459 | 6455 | | |
6460 | 6456 | | |
6461 | | - | |
6462 | | - | |
| 6457 | + | |
| 6458 | + | |
6463 | 6459 | | |
6464 | | - | |
| 6460 | + | |
6465 | 6461 | | |
6466 | 6462 | | |
6467 | 6463 | | |
6468 | 6464 | | |
6469 | 6465 | | |
6470 | 6466 | | |
6471 | 6467 | | |
6472 | | - | |
6473 | | - | |
| 6468 | + | |
| 6469 | + | |
6474 | 6470 | | |
6475 | 6471 | | |
6476 | 6472 | | |
| |||
6915 | 6911 | | |
6916 | 6912 | | |
6917 | 6913 | | |
6918 | | - | |
6919 | | - | |
| 6914 | + | |
| 6915 | + | |
| 6916 | + | |
| 6917 | + | |
| 6918 | + | |
| 6919 | + | |
| 6920 | + | |
| 6921 | + | |
6920 | 6922 | | |
| 6923 | + | |
6921 | 6924 | | |
6922 | 6925 | | |
6923 | 6926 | | |
| |||
0 commit comments