From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: KVM: s390: Use memdup_user() rather than duplicating code Date: Mon, 3 Oct 2016 16:25:34 +0200 Message-ID: References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> <73d5a586-2178-a311-f19c-c16c6e8cbb22@users.sourceforge.net> <9ee60162-110b-1305-5a97-624de425d072@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: Geert Uytterhoeven Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, =?UTF-8?Q?Christian_Borntr=c3=a4ger?= , Cornelia Huck , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Walter Harms List-ID: >> * Does there really a probability remain that an inappropriate product >> would be calculated here (as the situation was before my two update steps >> for this software module)? > > Perhaps not. Hence my "Probably not an issue here, ...". Thanks for your clarification. >> * Can it be that you are looking for a variant of a function like "memdup_user" >> where values can be passed as separate parameters "count" and "size" so that >> the needed multiplication and corresponding overflow check would be performed >> together as desired? > > If there are enough uses, and people like it, adding memdup_user_array() > may be a good idea... How are the chances of such an addition for the Linux programming interface? > P.S. Why do your questions make me think of a scientific paper? ;-) Would you like to recommend any for further reading? ;-) Regards, Markus