Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Jan 2018 01:58:07 +0000 (17:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Jan 2018 01:58:07 +0000 (17:58 -0800)
commit168fe32a072a4b8dc81a3aebf0e5e588d38e2955
tree297f0f6192256785979f5ebfb92797f81754548d
parent13ddd1667e7f01071cdf120132238ffca004a88e
parentc71d227fc4133f949dae620ed5e3a250b43f2415
Merge branch 'misc.poll' of git://git./linux/kernel/git/viro/vfs

Pull poll annotations from Al Viro:
 "This introduces a __bitwise type for POLL### bitmap, and propagates
  the annotations through the tree. Most of that stuff is as simple as
  'make ->poll() instances return __poll_t and do the same to local
  variables used to hold the future return value'.

  Some of the obvious brainos found in process are fixed (e.g. POLLIN
  misspelled as POLL_IN). At that point the amount of sparse warnings is
  low and most of them are for genuine bugs - e.g. ->poll() instance
  deciding to return -EINVAL instead of a bitmap. I hadn't touched those
  in this series - it's large enough as it is.

  Another problem it has caught was eventpoll() ABI mess; select.c and
  eventpoll.c assumed that corresponding POLL### and EPOLL### were
  equal. That's true for some, but not all of them - EPOLL### are
  arch-independent, but POLL### are not.

  The last commit in this series separates userland POLL### values from
  the (now arch-independent) kernel-side ones, converting between them
  in the few places where they are copied to/from userland. AFAICS, this
  is the least disruptive fix preserving poll(2) ABI and making epoll()
  work on all architectures.

  As it is, it's simply broken on sparc - try to give it EPOLLWRNORM and
  it will trigger only on what would've triggered EPOLLWRBAND on other
  architectures. EPOLLWRBAND and EPOLLRDHUP, OTOH, are never triggered
  at all on sparc. With this patch they should work consistently on all
  architectures"

* 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits)
  make kernel-side POLL... arch-independent
  eventpoll: no need to mask the result of epi_item_poll() again
  eventpoll: constify struct epoll_event pointers
  debugging printk in sg_poll() uses %x to print POLL... bitmap
  annotate poll(2) guts
  9p: untangle ->poll() mess
  ->si_band gets POLL... bitmap stored into a user-visible long field
  ring_buffer_poll_wait() return value used as return value of ->poll()
  the rest of drivers/*: annotate ->poll() instances
  media: annotate ->poll() instances
  fs: annotate ->poll() instances
  ipc, kernel, mm: annotate ->poll() instances
  net: annotate ->poll() instances
  apparmor: annotate ->poll() instances
  tomoyo: annotate ->poll() instances
  sound: annotate ->poll() instances
  acpi: annotate ->poll() instances
  crypto: annotate ->poll() instances
  block: annotate ->poll() instances
  x86: annotate ->poll() instances
  ...
68 files changed:
arch/alpha/include/uapi/asm/Kbuild
arch/ia64/include/uapi/asm/Kbuild
arch/m32r/include/uapi/asm/Kbuild
arch/mn10300/include/uapi/asm/Kbuild
arch/score/include/uapi/asm/Kbuild
arch/x86/include/uapi/asm/Kbuild
block/bsg.c
crypto/af_alg.c
crypto/algif_skcipher.c
drivers/android/binder.c
drivers/gpio/gpiolib.c
drivers/infiniband/hw/hfi1/file_ops.c
drivers/md/md.c
drivers/media/dvb-core/dvb_ca_en50221.c
drivers/media/dvb-core/dvb_frontend.c
drivers/media/platform/sh_veu.c
drivers/media/radio/radio-si476x.c
drivers/media/radio/radio-wl1273.c
drivers/media/v4l2-core/v4l2-mem2mem.c
drivers/media/v4l2-core/videobuf-core.c
drivers/media/v4l2-core/videobuf2-core.c
drivers/media/v4l2-core/videobuf2-v4l2.c
drivers/net/ppp/ppp_generic.c
drivers/net/tap.c
drivers/net/tun.c
drivers/platform/chrome/cros_ec_debugfs.c
drivers/s390/char/monreader.c
drivers/tty/n_tty.c
drivers/usb/core/devio.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/mon/mon_bin.c
drivers/vhost/net.c
drivers/vhost/vhost.c
drivers/xen/pvcalls-front.c
fs/fcntl.c
fs/orangefs/devorangefs-req.c
fs/proc/inode.c
fs/proc_namespace.c
fs/userfaultfd.c
include/crypto/if_alg.h
include/linux/fs.h
include/linux/skbuff.h
include/net/sctp/sctp.h
include/net/sock.h
include/net/tcp.h
ipc/mqueue.c
kernel/events/core.c
kernel/printk/printk.c
kernel/time/posix-clock.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
mm/memcontrol.c
net/9p/trans_fd.c
net/dccp/proto.c
net/ipv4/tcp.c
net/packet/af_packet.c
net/rxrpc/af_rxrpc.c
net/sctp/socket.c
net/socket.c
net/sunrpc/cache.c
net/tipc/socket.c
net/vmw_vsock/af_vsock.c
security/apparmor/apparmorfs.c
sound/core/oss/pcm_oss.c
sound/core/pcm_native.c
sound/core/rawmidi.c
sound/core/seq/seq_clientmgr.c
sound/usb/mixer_quirks.c