1. 15 Nov, 2019 2 commits
  2. 27 Sep, 2019 1 commit
    • Jacob Keller's avatar
      ptp: correctly disable flags on old ioctls · 2df4de16
      Jacob Keller authored
      Commit 41560658
       ("PTP: introduce new versions of IOCTLs",
      2019-09-13) introduced new versions of the PTP ioctls which actually
      validate that the flags are acceptable values.
      As part of this, it cleared the flags value using a bitwise
      and+negation, in an attempt to prevent the old ioctl from accidentally
      enabling new features.
      This is incorrect for a couple of reasons. First, it results in
      accidentally preventing previously working flags on the request ioctl.
      By clearing the "valid" flags, we now no longer allow setting the
      enable, rising edge, or falling edge flags.
      Second, if we add new additional flags in the future, they must not be
      set by the old ioctl. (Since the flag wasn't checked before, we could
      potentially break userspace programs which sent garbage flag data.
      The correct way to resolve this is to check for and clear all but the
      originally valid flags.
      Create defines indicating which flags are correctly checked and
      interpreted by the original ioctls. Use these to clear any bits which
      will not be correctly interpreted by the original ioctls.
      In the future, new flags must be added to the VALID_FLAGS macros, but
      *not* to the V1_VALID_FLAGS macros. In this way, new features may be
      exposed over the v2 ioctls, but without breaking previous userspace
      which happened to not clear the flags value properly. The old ioctl will
      continue to behave the same way, while the new ioctl gains the benefit
      of using the flags fields.
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Christopher Hall <christopher.s.hall@intel.com>
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  3. 13 Sep, 2019 1 commit
  4. 24 May, 2019 1 commit
  5. 08 Jan, 2019 1 commit
  6. 10 Nov, 2018 4 commits
  7. 18 Oct, 2018 1 commit
  8. 18 Jul, 2018 1 commit
  9. 19 Jun, 2018 1 commit
  10. 11 Feb, 2018 1 commit
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
      with de-mangling cleanups yet to come.
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  11. 28 Nov, 2017 1 commit
  12. 13 Oct, 2016 1 commit
  13. 30 May, 2016 1 commit
  14. 23 May, 2016 1 commit
  15. 03 Mar, 2016 1 commit
    • Christopher S. Hall's avatar
      ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping · 719f1aa4
      Christopher S. Hall authored
      Currently, network /system cross-timestamping is performed in the
      PTP_SYS_OFFSET ioctl. The PTP clock driver reads gettimeofday() and
      the gettime64() callback provided by the driver. The cross-timestamp
      is best effort where the latency between the capture of system time
      (getnstimeofday()) and the device time (driver callback) may be
      The getcrosststamp() callback and corresponding PTP_SYS_OFFSET_PRECISE
      ioctl allows the driver to perform this device/system correlation when
      for example cross timestamp hardware is available. Modern Intel
      systems can do this for onboard Ethernet controllers using the ART
      counter. There is virtually zero latency between captures of the ART
      and network device clock.
      The capabilities ioctl (PTP_CLOCK_GETCAPS), is augmented allowing
      applications to query whether or not drivers implement the
      getcrosststamp callback, providing more precise cross timestamping.
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: kevin.b.stanton@intel.com
      Cc: kevin.j.clarke@intel.com
      Cc: hpa@zytor.com
      Cc: jeffrey.t.kirsher@intel.com
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarChristopher S. Hall <christopher.s.hall@intel.com>
      [jstultz: Commit subject tweaks]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
  16. 31 Mar, 2015 2 commits
  17. 02 Jul, 2014 1 commit
  18. 21 Mar, 2014 1 commit
  19. 26 Nov, 2012 2 commits
  20. 01 Nov, 2012 1 commit
  21. 02 Jun, 2011 2 commits
  22. 23 May, 2011 1 commit