Re: [PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-12 Thread Baoquan He
On 11/12/21 at 10:08am, David Hildenbrand wrote: > > > "that allows supervisor mode programs to optionally set user-space > > > memory mappings so that access to those mappings from supervisor mode > > > will cause a trap. This makes it harder for malicious programs to > > > "trick" the kernel

Re: [PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-12 Thread David Hildenbrand
> > "that allows supervisor mode programs to optionally set user-space > > memory mappings so that access to those mappings from supervisor mode > > will cause a trap. This makes it harder for malicious programs to > > "trick" the kernel into using instructions or data from a user-space > >

Re: [PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-12 Thread Baoquan He
On 11/12/21 at 09:16am, David Hildenbrand wrote: > On 12.11.21 08:01, Baoquan He wrote: > > On 11/11/21 at 08:18pm, David Hildenbrand wrote: > >> To clear a user buffer we cannot simply use memset, we have to use > >> clear_user(). Using a kernel config based on rawhide Fedora and a > >>

Re: [PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-12 Thread David Hildenbrand
On 12.11.21 08:01, Baoquan He wrote: > On 11/11/21 at 08:18pm, David Hildenbrand wrote: >> To clear a user buffer we cannot simply use memset, we have to use >> clear_user(). Using a kernel config based on rawhide Fedora and a >> virtio-mem device that registers a vmcore_cb, I can easily trigger:

Re: [PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-11 Thread Baoquan He
On 11/11/21 at 08:18pm, David Hildenbrand wrote: > To clear a user buffer we cannot simply use memset, we have to use > clear_user(). Using a kernel config based on rawhide Fedora and a > virtio-mem device that registers a vmcore_cb, I can easily trigger: > > [ 11.327580] systemd[1]: Starting

[PATCH v1] proc/vmcore: fix clearing user buffer by properly using clear_user()

2021-11-11 Thread David Hildenbrand
To clear a user buffer we cannot simply use memset, we have to use clear_user(). Using a kernel config based on rawhide Fedora and a virtio-mem device that registers a vmcore_cb, I can easily trigger: [ 11.327580] systemd[1]: Starting Kdump Vmcore Save Service... [ 11.339697] kdump[420]: