Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp441881ybl; Wed, 14 Aug 2019 00:06:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+xG2YbLMo6Is1MrV5zkMI2Cl8PsiiC4wUWZZbL+upEgaWgdYBNSTFtWNCcnmlUg/CthCT X-Received: by 2002:a17:902:b084:: with SMTP id p4mr17471969plr.309.1565766396761; Wed, 14 Aug 2019 00:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565766396; cv=none; d=google.com; s=arc-20160816; b=N6FcWH7MFl55W+7MnBWh0NXG0bQ9oTwFL4vCj9FiLW15mS7PmYU2IjLZAfLxTfEugG sZJ8knq/tKf7c+19rWLIkMV8UQS0a9Q8S5dWInMqiDuiYF9PxHj2AbokV9cIAJkOJUij QcOm6rCSWc1xJwR+MjXM/aaWUVN1n/XNzgM/jhNJizEeyEuz41AtE/wcSqOqQzjO496N Esbbqko+B5e2Tj+rDx6vGo5qVgRPQA6/E8hmteKNrVuH2HH+AuJY3HkDO2GfHyKG+jsi LA4GRxR1oJNa/XCFBbUylOzv+aMA8g0mjhqzhKaVuesoL7UfXFIIn9wdZhj+tY65aWey benA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=0RPUrnDpJiSo6+lGBteDBY9RCKWdapxbzNKXz3ltHJA=; b=RI3ieKJcdmZFaRcTRFtDgITUBxKxfNXWwlolMCtEU5DlgxVkIXS6RSiWCwA1ViSAlD U5PrPVE8X8lsqLcHwUnzTC+Rst05AbJL07WzG2p4AjGC+BSSX1/JQ0OCD7+xy8r9fw4m TgKCWRNOag5JcW5dozEvD6dzUPB8wDchG9Uf0Az7Lc4ZWtyagH3E+/ExeRhkIFijb4qu DduLucsoiPsTP7ynECAqPWFRasr5mwOxyQqVACXu2DUogklpCxuE27AH9oxOU4F5EJdm aRp01K/QOzvM3Yis5adae37gTxt7YaKbplKU/XvhCOVDLg2Vbi1YshCwQPfA30NyJ4hQ cUlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si2382658pjj.28.2019.08.14.00.06.20; Wed, 14 Aug 2019 00:06:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727254AbfHNHFn (ORCPT + 99 others); Wed, 14 Aug 2019 03:05:43 -0400 Received: from mga18.intel.com ([134.134.136.126]:58296 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbfHNHFn (ORCPT ); Wed, 14 Aug 2019 03:05:43 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 00:05:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,384,1559545200"; d="asc'?scan'208";a="184152538" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by FMSMGA003.fm.intel.com with ESMTP; 14 Aug 2019 00:05:38 -0700 From: Felipe Balbi To: Richard Cochran Cc: netdev@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, "Christopher S . Hall" Subject: Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output In-Reply-To: <20190813180628.GA4069@localhost> References: <20190716072038.8408-1-felipe.balbi@linux.intel.com> <20190716072038.8408-5-felipe.balbi@linux.intel.com> <20190716163927.GA2125@localhost> <87k1ch2m1i.fsf@linux.intel.com> <20190717173645.GD1464@localhost> <87ftn3iuqp.fsf@linux.intel.com> <20190718164121.GB1533@localhost> <87tvalxzzi.fsf@gmail.com> <20190813174821.GC3207@localhost> <20190813180628.GA4069@localhost> Date: Wed, 14 Aug 2019 10:05:34 +0300 Message-ID: <87ef1ob51d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Richard Cochran writes: > On Tue, Aug 13, 2019 at 10:48:21AM -0700, Richard Cochran wrote: >> > + if (copy_from_user(&req.extts, (void __user *)arg, >> > + sizeof(req.extts))) { >> > + err =3D -EFAULT; >> > + break; >> > + } >> > + if (req.extts.flags || req.extts.rsv[0] >> > + || req.extts.rsv[1]) { >> > + err =3D -EINVAL; >>=20 >> Since the code is mostly the same as in the PTP_EXTTS_REQUEST case, >> maybe just double up the case statements (like in the other) and add >> an extra test for (cmd =3D=3D PTP_EXTTS_REQUEST2) for this if-block. > > Thinking about the drivers, in the case of the legacy ioctls, let's > also be sure to clear the flags and reserved fields before passing > them to the drivers. makes sense to me. I'll update per your requests and send only this patch officially. Thanks for the pointers. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl1Tsr4ACgkQzL64meEa mQY/fBAA1obiuJSATwvkuWN25olDVsu1Y+uAYGYOtjTp80GHFrIuxBDIUVMLQHLD y4rBjB/TZIHzPwDdyPsOVXKzAgmTalTIqqlTBwcNX8RsaBYl2QShxal60kKKUOLo 8kpAZwqFq4X0uts3iESlDOHsoLz1+aywKzrpevXCYLH8QjRg4I6ZmWxzmrIBUZca 6gskf00KydB5H7VyUa4PHEVUMM/vbF/JSkxKZao7py0J1fNdUH0AfQDhiMlBDjGI MOBf5Qubn5lLvJgXstBDDhGkpiFMqY/+E1LiB05P6b2IpeC31y4cuNqV0bInXhHo l8A2pzvhh8FlmPj4JEvO/k+3IKlqYew9ESKwcA1SL8ijK0oVcWk4evvva1202eKI RLFamaD6+nO+HuLxp1/8h45PRkWMw0EDg+vM8gwsm/tP0EmV3YNe2C4oCqI82WBu ZoDHJPy0eGgW97vr3R3YymwP5vwzrZMDSHgtsLPYFzYx2ScJysgqnwwYhflP8bv0 WSFtshQMCPbi2aTBv91MsEWiyizQtFzkFqGFciXmfV9e9iElol8v+lFgfcQRBGkR gwvH7hiS7oCYqmhzkWdnsUDJZ6zDpwiA6jwCEtSg/Uswm9lHGc1wfa7U2qkgvdS1 Z0X61581VgGsRRWRrdjonf926wh9I1dzi72N+UdHoFyHrT4uuFY= =ReYO -----END PGP SIGNATURE----- --=-=-=--