From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759112Ab2CaAv1 (ORCPT ); Fri, 30 Mar 2012 20:51:27 -0400 Received: from shards.monkeyblade.net ([198.137.202.13]:57662 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753506Ab2CaAvZ (ORCPT ); Fri, 30 Mar 2012 20:51:25 -0400 Date: Fri, 30 Mar 2012 20:51:20 -0400 (EDT) Message-Id: <20120330.205120.2221145622131588797.davem@davemloft.net> To: drepper@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: sendmmsg: put_user vs __put_user From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.4 on Emacs 23.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (shards.monkeyblade.net [198.137.202.13]); Fri, 30 Mar 2012 17:51:23 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulrich Drepper Date: Fri, 30 Mar 2012 09:36:11 -0400 > Shouldn't the compat code in the sendmmsg implementation use the same > code as the normal code? In which case you probably want something > like this: Compat processes are not able to generate virtual addresses anywhere near the range where the kernel resides, so the address range verification done by put_user() is completely superfluous and therefore not necessary. The normal exception handling done by the access is completely sufficient.