Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494855
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code |
| Date | 2016-10-03 14:30 +0200 |
| Message-ID | <soaxA-4S2-7@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <s7dBv-4DV-9@gated-at.bofh.it> <s9I8a-42y-35@gated-at.bofh.it> <s9LfI-66o-11@gated-at.bofh.it> <s9Lpn-69M-19@gated-at.bofh.it> <soanT-4OL-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>> - if (!bp_data) {
>> - ret = -ENOMEM;
>> - goto error;
>> - }
>> -
>> - if (copy_from_user(bp_data,
>> - dbg->arch.hw_bp,
>> - sizeof(*bp_data) * dbg->arch.nr_hw_bp)) {
>> - ret = -EFAULT;
>> - goto error;
>> - }
>> + bp_data = memdup_user(dbg->arch.hw_bp,
>> + sizeof(*bp_data) * dbg->arch.nr_hw_bp);
>
> ... while this would continue silently,
How do you think about to explain this information a bit more?
> and corrupt memory.
I wonder about this conclusion at the moment.
Did you notice the check "IS_ERR(bp_data)" and the corresponding reaction
in this update suggestion?
How does your feedback fit to the tag "Acked-by: Cornelia Huck"
from 2016-08-25?
Regards,
Markus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-03 14:20 +0200
Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-03 14:30 +0200
Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-03 15:20 +0200
Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-03 15:50 +0200
Re: [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating code Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-03 16:10 +0200
Re: KVM: s390: Use memdup_user() rather than duplicating code SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-03 16:30 +0200
csiph-web