From owner-svn-src-all@FreeBSD.ORG Sun May 24 11:24:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE5BFF59; Sun, 24 May 2015 11:24:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D0431450; Sun, 24 May 2015 11:24:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4OBOFbf030453; Sun, 24 May 2015 11:24:15 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4OBOFe6030452; Sun, 24 May 2015 11:24:15 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505241124.t4OBOFe6030452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 24 May 2015 11:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283364 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 11:24:15 -0000 Author: melifaro Date: Sun May 24 11:24:14 2015 New Revision: 283364 URL: https://svnweb.freebsd.org/changeset/base/283364 Log: Fix SIOCGI2C structure requirement. In reality, SIOCGI2C ioctl requires struct ifreq as many other ioctls. Doing copyin() on (significantly) larger struct ifstat sometimes triggered EFAULT. Reported by: Olivier Cochard-Labbé MFC after: 1 week Modified: head/sys/sys/sockio.h Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Sun May 24 11:08:06 2015 (r283363) +++ head/sys/sys/sockio.h Sun May 24 11:24:14 2015 (r283364) @@ -96,7 +96,7 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ -#define SIOCGI2C _IOWR('i', 61, struct ifstat) /* get I2C data */ +#define SIOCGI2C _IOWR('i', 61, struct ifreq) /* get I2C data */ #define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */ #define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */