Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400259

Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access
Date 2016-05-12 19:40 +0200
Message-ID <ry2KC-20V-9@gated-at.bofh.it> (permalink)
References <ry2rf-1NT-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 12, 2016 at 10:18:27AM -0700, Dennis Dalessandro wrote:

> There is also a driver software version being exported via a sysfs
> file. This is needed so that user space applications (psm) can
> determine if it needs to do ioctl() or write().

Why? Don't do this, just call ioctl() and if it fails then use write().

> This does not add anything for compat_ioctl() as it is my understanding that
> 32 bit applications that attempt to call the ioctl() will just fail. Which is
> the intended behavior.

qib works fine with a 64 bit kernel and 32 bit user space, don't
break it.

> There is also a question of if we need to set kobj.parent [1], I'm

It is needed, you need to audit this stuff, there might be more wrong
than that.

> not sure this is the case since the cdev in question lives
> in /dev, not /dev/infiniband.

Irrelevant. kobj.parent is needed because the cdev is embedded within
another reference counted structure. You need to consider how all this
works when the driver is removed while the cdev is still open (or
driver remove is racing with the cdev release).

Jason

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user  access Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
  [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
    Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 19:50 +0200
      RE: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands "Hefty, Sean" <sean.hefty@intel.com> - 2016-05-12 20:20 +0200
      Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 21:30 +0200
        Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 21:50 +0200
          Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Doug Ledford <dledford@redhat.com> - 2016-05-12 21:50 +0200
            Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 23:30 +0200
              Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-13 16:40 +0200
          Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands "ira.weiny" <ira.weiny@intel.com> - 2016-05-13 23:00 +0200
  [PATCH v2 1/5] IB/hfi1: Export drivers user sw version via sysfs Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
  [PATCH v2 2/5] IB/hfi1: Remove unused user command Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
  [PATCH v2 4/5] IB/hfi1: Remove write(), use ioctl() for user cmds Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
  [PATCH v2 5/5] IB/hfi1: Add trace message in user IOCTL handling Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 19:20 +0200
  Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user  access Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 19:40 +0200
    Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 21:10 +0200
      Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user  access Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 21:30 +0200
        Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access Dennis Dalessandro <dennis.dalessandro@intel.com> - 2016-05-12 22:00 +0200
          Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user  access Doug Ledford <dledford@redhat.com> - 2016-05-12 22:40 +0200
          Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user  access Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-05-12 23:30 +0200

csiph-web