Push to branch refs/heads/master: cf8db2b9de798ecea00147567c171d0f06455bec --> 25e7033cb3dd129050fda4503bb2129799592096
.../devicetree/bindings/clock/imx31-clock.txt | 2 +- Documentation/filesystems/00-INDEX | 2 + Documentation/filesystems/wrapfs.txt | 172 ++++++ MAINTAINERS | 9 + Makefile | 2 +- arch/arm/boot/dts/da850-evm.dts | 1 + arch/arm/boot/dts/imx31.dtsi | 18 +- arch/arm/include/asm/cputype.h | 3 + arch/arm/kernel/hw_breakpoint.c | 16 + arch/arm/mach-davinci/da850.c | 12 +- arch/arm/mach-ux500/pm.c | 4 +- arch/arm/xen/enlighten.c | 3 +- arch/arm64/include/uapi/asm/ptrace.h | 1 + arch/arm64/kernel/entry.S | 2 +- arch/arm64/kernel/ptrace.c | 11 +- arch/arm64/kernel/traps.c | 25 +- arch/cris/boot/rescue/Makefile | 8 + arch/m68k/include/asm/delay.h | 2 +- arch/powerpc/boot/ps3-head.S | 5 - arch/powerpc/boot/ps3.c | 8 +- arch/powerpc/kernel/ibmebus.c | 16 +- arch/powerpc/kernel/idle_power7.S | 2 +- arch/powerpc/kernel/misc_32.S | 2 +- arch/x86/include/asm/apic.h | 3 +- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/cpu/perf_event.c | 2 +- arch/x86/kernel/cpu/perf_event_intel.c | 2 +- arch/x86/kernel/entry_32.S | 4 +- arch/x86/kernel/entry_64.S | 3 +- arch/x86/kernel/smp.c | 2 +- arch/x86/kvm/emulate.c | 66 ++- arch/x86/kvm/lapic.c | 6 + arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/vmx.c | 11 +- arch/x86/kvm/x86.c | 1 + arch/x86/pci/acpi.c | 10 + block/bsg.c | 3 + drivers/base/core.c | 42 +- drivers/clk/clk-wm831x.c | 2 +- drivers/clocksource/exynos_mct.c | 17 +- drivers/crypto/caam/caamalg.c | 4 +- drivers/gpu/drm/ast/ast_main.c | 7 +- drivers/gpu/drm/gma500/psb_drv.c | 3 + drivers/gpu/drm/radeon/si_dpm.c | 14 +- drivers/hid/hid-cypress.c | 3 + drivers/hwmon/ds620.c | 2 +- drivers/hwmon/g762.c | 11 +- drivers/i2c/i2c-dev.c | 2 +- drivers/infiniband/core/mad.c | 2 +- drivers/infiniband/core/multicast.c | 7 +- drivers/infiniband/hw/mlx4/ah.c | 6 +- drivers/infiniband/hw/mlx4/main.c | 8 +- drivers/input/joystick/xpad.c | 6 + drivers/input/serio/i8042-x86ia64io.h | 6 + drivers/iommu/amd_iommu.c | 2 +- drivers/isdn/gigaset/ser-gigaset.c | 4 +- drivers/md/dm-crypt.c | 7 +- drivers/md/md.c | 2 +- drivers/md/persistent-data/dm-space-map-metadata.c | 10 +- drivers/md/raid5.c | 9 + drivers/media/rc/ite-cir.c | 2 + drivers/media/tuners/tuner-xc2028.c | 34 +- drivers/mmc/card/mmc_test.c | 2 +- drivers/mmc/host/mxs-mmc.c | 6 +- drivers/mtd/nand/Kconfig | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 +- .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 + drivers/net/ethernet/brocade/bna/bnad.c | 4 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 20 +- drivers/net/ethernet/ti/cpmac.c | 5 +- drivers/net/hyperv/netvsc_drv.c | 4 + drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- drivers/pci/hotplug/rpadlpar_core.c | 10 +- drivers/pci/pci.c | 4 + drivers/pinctrl/sh-pfc/pinctrl.c | 3 +- drivers/s390/char/vmlogrdr.c | 2 +- drivers/s390/scsi/zfcp_dbf.c | 17 +- drivers/s390/scsi/zfcp_dbf.h | 41 +- drivers/s390/scsi/zfcp_erp.c | 61 ++- drivers/s390/scsi/zfcp_ext.h | 4 +- drivers/s390/scsi/zfcp_fsf.h | 3 +- drivers/s390/scsi/zfcp_reqlist.h | 30 +- drivers/s390/scsi/zfcp_scsi.c | 61 ++- drivers/scsi/mvsas/mv_94xx.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 16 +- drivers/scsi/scsi_sysfs.c | 4 - drivers/scsi/sg.c | 11 +- drivers/ssb/pci.c | 1 + drivers/staging/iio/adc/ad7606_core.c | 2 +- drivers/target/iscsi/iscsi_target_tpg.c | 1 - drivers/thermal/thermal_hwmon.c | 2 +- drivers/tty/serial/8250/8250_pci.c | 23 +- drivers/tty/sysrq.c | 4 +- drivers/usb/class/cdc-acm.c | 1 + drivers/usb/core/config.c | 10 + drivers/usb/core/hub.c | 136 ++--- drivers/usb/dwc3/dwc3-pci.c | 16 + drivers/usb/dwc3/gadget.c | 8 +- drivers/usb/gadget/composite.c | 23 +- drivers/usb/gadget/dummy_hcd.c | 6 +- drivers/usb/gadget/inode.c | 17 +- drivers/usb/gadget/uvc_video.c | 2 +- drivers/usb/host/uhci-pci.c | 4 + drivers/usb/host/xhci-hub.c | 37 ++ drivers/usb/host/xhci-mem.c | 42 +- drivers/usb/host/xhci-pci.c | 13 +- drivers/usb/host/xhci-ring.c | 7 - drivers/usb/host/xhci.c | 13 - drivers/usb/host/xhci.h | 3 + drivers/usb/musb/musbhsdma.h | 2 +- drivers/usb/phy/phy-am335x-control.c | 2 + drivers/usb/serial/ch341.c | 90 ++-- drivers/usb/serial/cyberjack.c | 10 + drivers/usb/serial/garmin_gps.c | 1 + drivers/usb/serial/io_edgeport.c | 5 + drivers/usb/serial/io_ti.c | 17 +- drivers/usb/serial/iuu_phoenix.c | 11 + drivers/usb/serial/keyspan_pda.c | 14 + drivers/usb/serial/kl5kusb105.c | 44 +- drivers/usb/serial/kobil_sct.c | 12 + drivers/usb/serial/mos7720.c | 51 +- drivers/usb/serial/mos7840.c | 12 + drivers/usb/serial/omninet.c | 13 + drivers/usb/serial/option.c | 7 + drivers/usb/serial/oti6858.c | 16 + drivers/usb/serial/pl2303.c | 8 + drivers/usb/serial/quatech2.c | 4 - drivers/usb/serial/spcp8x5.c | 14 + drivers/usb/serial/ti_usb_3410_5052.c | 7 + drivers/vfio/pci/vfio_pci.c | 33 +- drivers/vfio/pci/vfio_pci_intrs.c | 2 +- drivers/vme/bridges/vme_ca91cx42.c | 2 +- drivers/xen/gntdev.c | 2 +- fs/9p/acl.c | 40 +- fs/Kconfig | 1 + fs/Makefile | 1 + fs/block_dev.c | 9 +- fs/btrfs/acl.c | 6 +- fs/btrfs/delayed-inode.c | 8 - fs/btrfs/extent_io.c | 9 + fs/btrfs/tree-log.c | 3 +- fs/cifs/cifs_fs_sb.h | 4 + fs/cifs/cifsfs.c | 17 +- fs/cifs/cifsglob.h | 3 + fs/cifs/cifsproto.h | 5 +- fs/cifs/connect.c | 116 +++- fs/cifs/dir.c | 20 +- fs/cifs/inode.c | 22 +- fs/cifs/smb2file.c | 2 +- fs/cifs/smb2pdu.c | 77 ++- fs/cifs/smb2proto.h | 1 + fs/dcache.c | 7 +- fs/exec.c | 10 +- fs/ext2/acl.c | 12 +- fs/ext3/acl.c | 10 +- fs/ext4/acl.c | 12 +- fs/ext4/inline.c | 4 +- fs/ext4/inode.c | 29 +- fs/ext4/mballoc.c | 4 +- fs/ext4/super.c | 64 ++- fs/f2fs/acl.c | 6 +- fs/f2fs/debug.c | 1 + fs/fuse/file.c | 5 +- fs/generic_acl.c | 12 +- fs/gfs2/acl.c | 14 +- fs/hfsplus/posix_acl.c | 4 +- fs/hfsplus/xattr.c | 5 +- fs/ioprio.c | 2 + fs/jffs2/acl.c | 9 +- fs/jfs/xattr.c | 5 +- fs/nfs/dir.c | 1 + fs/nfs/file.c | 2 +- fs/nfs/nfs4filelayoutdev.c | 3 +- fs/ocfs2/acl.c | 20 +- fs/ocfs2/dlmglue.c | 10 + fs/ocfs2/file.c | 9 +- fs/ocfs2/stackglue.c | 6 + fs/ocfs2/stackglue.h | 3 + fs/posix_acl.c | 31 ++ fs/proc/proc_sysctl.c | 3 +- fs/reiserfs/xattr_acl.c | 8 +- fs/ubifs/tnc.c | 25 +- fs/wrapfs/Kconfig | 8 + fs/wrapfs/Makefile | 7 + fs/wrapfs/dentry.c | 49 ++ fs/wrapfs/file.c | 378 +++++++++++++ fs/wrapfs/inode.c | 591 +++++++++++++++++++++ fs/wrapfs/lookup.c | 351 ++++++++++++ fs/wrapfs/main.c | 176 ++++++ fs/wrapfs/mmap.c | 94 ++++ fs/wrapfs/super.c | 208 ++++++++ fs/wrapfs/wrapfs.h | 209 ++++++++ fs/xfs/xfs_acl.c | 15 +- fs/xfs/xfs_log_recover.c | 1 + include/linux/capability.h | 2 - include/linux/cpu.h | 12 +- include/linux/cred.h | 5 +- include/linux/jump_label_ratelimit.h | 4 + include/linux/namei.h | 2 + include/linux/netdevice.h | 9 +- include/linux/posix_acl.h | 1 + include/uapi/linux/can.h | 1 + include/uapi/linux/magic.h | 2 + kernel/cpu.c | 3 +- kernel/jump_label.c | 6 + kernel/rtmutex.c | 68 ++- kernel/rtmutex_common.h | 5 +- kernel/time/tick-broadcast.c | 3 + mm/hugetlb.c | 37 +- mm/page_alloc.c | 17 +- mm/vmscan.c | 14 +- net/can/raw.c | 3 + net/ceph/messenger.c | 13 + net/core/dev.c | 4 +- net/core/drop_monitor.c | 39 +- net/ipv4/igmp.c | 7 +- net/ipv6/ip6_offload.c | 1 + net/ipv6/raw.c | 7 +- net/sched/cls_api.c | 4 +- net/sunrpc/auth_gss/svcauth_gss.c | 2 +- scripts/kconfig/nconf.gui.c | 15 +- security/apparmor/apparmorfs.c | 2 + security/apparmor/audit.c | 3 +- security/apparmor/domain.c | 22 +- security/apparmor/file.c | 3 +- security/apparmor/include/match.h | 1 + security/apparmor/include/policy.h | 2 + security/apparmor/lsm.c | 22 +- security/apparmor/match.c | 16 +- security/apparmor/path.c | 61 ++- security/apparmor/policy.c | 61 ++- security/apparmor/policy_unpack.c | 5 +- sound/pci/hda/patch_conexant.c | 17 + sound/pci/hda/patch_realtek.c | 2 + sound/usb/card.c | 1 - sound/usb/hiface/pcm.c | 2 + sound/usb/mixer.c | 3 +- tools/perf/util/trace-event-scripting.c | 6 +- tools/testing/selftests/net/run_netsocktests | 2 +- 239 files changed, 4233 insertions(+), 783 deletions(-) commit 25e7033cb3dd129050fda4503bb2129799592096 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Feb 18 19:11:22 2017 -0500 Wrapfs: ->iget fixes Change where we igrab/iput to ensure we always hold a valid lower_inode. Return ENOMEM (not EACCES) if iget5_locked returns NULL. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 6edff6d8d2e101b0e328d99a87953c9dbb8be69f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Feb 18 15:26:11 2017 -0500 Wrapfs: update copyrights for 2017 Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ba97804d904818fb9a1be6c7e04655b6ed46027a Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun May 22 00:44:14 2016 -0400 Wrapfs: support NFS exports Based on patch from Sandeep Joshi <sanjos...@gmail.com>. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ad9357d586c0dc58cef52ff9d3e64fbe7b3c0f9b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun May 22 00:44:14 2016 -0400 Wrapfs: use d_splice_alias Refactor interpose code to allow lookup to use d_splice_alias. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 6da59afd22eb8fed7293707cf241ef2be8276ecb Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 3 23:53:56 2015 -0500 Wrapfs: update copyright year to 2015 commit 47f161f04049a3f0b724785acb3dbd01309c147c Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 3 23:53:56 2015 -0500 Wrapfs: use vfs xattr helpers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a9e64b3c297dd06d22cb04cdc1f2c9f281618d91 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Aug 15 23:00:54 2014 -0400 Wrapfs: properly copy meta-data after AIO operations from lower inode Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 3ee8dd2503a0d31ba113533af9321c7c85185b3e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Aug 11 18:34:18 2014 -0400 Wrapfs: leave placeholders for updating upper inode after AIO Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 48fc1b5ce56b4e7a419150aaabc4a0dff2131fc8 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Aug 10 01:25:04 2014 -0400 Wrapfs: protect lower_file by ref-count during aio operation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit be3ee91c089949738fd9c585304b75dac0a5d90f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 25 22:51:34 2014 -0400 Wrapfs: fix ->llseek to update upper and lower offsets Fixes bug: xfstests generic/257. f_pos consistently is required by and only by dir_ops->wrapfs_readdir, main_ops is not affected. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit 1044f4db4a415b4075fed00873b628116bb6e82e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 25 22:50:34 2014 -0400 Wrapfs: support extended attributes (xattr) operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit cd0acc90bb2eec57428c0ddecf2682ea9f84fcff Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Jun 20 20:08:50 2014 -0400 Wrapfs: support asynchronous-IO (AIO) operations Signed-off-by: Li Mengyang <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 575247524310a77c955dabb71af61cd5a34e84c7 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Jun 20 20:08:50 2014 -0400 Wrapfs: support direct-IO (DIO) operations Signed-off-by: Li Mengyang <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit c5f7f36ec607acd1a618070f2a858dea7bb8d605 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu May 15 00:16:01 2014 -0400 Wrapfs: implement vm_ops->page_mkwrite Some file systems (e.g., ext4) require it. Reported by Ted Ts'o. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f116f875bd96ec5831e2f69e0324117e17b16d2c Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Apr 3 14:19:17 2014 -0400 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 19815ebff3f1f3e12bf225fddf0e1c1bd80820e7 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Apr 3 14:19:14 2014 -0400 Wrapfs: update maintainers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f5db9feb3f65b1b6a4477bccf5a7afccf41c7c3c Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 21 03:33:20 2014 -0500 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 10ab5c4e4210e7c63f186116f842edbf15746c2f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 21 01:24:13 2014 -0500 Wrapfs: 2014 Copyright update Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 110ba09f3038cc83f3ac26bab2f4a444d5a3e604 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 19:16:01 2013 -0500 patch wrapfs-copyright-update.patch commit 4a1aea8a4b7fb7f04bbf9e7cc3bc704f306eefdb Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Nov 18 23:25:14 2013 -0500 Wrapfs: implement ->getattr Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 6ae44afd90524a3c4b041a841fb6e9bdb411a983 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Nov 18 20:34:00 2013 -0500 Wrapfs: use file_inode helper Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 708ab55f848aa920c98ff2417db1b547c8657e30 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Nov 18 20:34:00 2013 -0500 Wrapfs: call filemap_write_and_wait in ->flush Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit e34da8ddf467d229ee4c5b683639073f100823df Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Nov 17 22:14:19 2013 -0500 VFS: export vfs_path_lookup In 3.12, this useful function was unexported: wrapfs needs a way to lookup relative to a struct path and use a proper vfsmount, unlike lookup_one_len. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 78ff1e3a97a6a8b44309d0eb6b0406884ddeae1e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Nov 17 19:36:14 2013 -0500 Wrapfs: ->readdir op now ->iterate Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f177b852b614bddd53944001e82cac0b16ee4a73 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 5 01:36:58 2013 -0400 Wrapfs: copy lower inode attributes in ->ioctl Some ioctls (e.g., EXT2_IOC_SETFLAGS) can change inode attributes, so copy them from lower inode. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 5878a1566e60172bca0d5808a48294d84013c91c Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 5 01:36:58 2013 -0400 Wrapfs: remove unnecessary call to vm_unmap in ->mmap Code is unnecessary and causes deadlocks in newer kernels. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d1c65efa78d24c621128a31b579018e0cfc48cf8 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:32 2013 -0400 Wrapfs: declare MODULE_ALIAS_FS Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit e1074dcd8a69415980b29831a4d05bae25303ab0 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:32 2013 -0400 Wrapfs: don't use FS_REVAL_DOT in fs_flags Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 7d83aa10b48f638e44545fd1668d9ca085bcb2ff Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:31 2013 -0400 Wrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 56501400a40ae020ea0eb65f439ea9c3119593a4 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:31 2013 -0400 Wrapfs: dentry_open() no longer does mntput/dput We need to grab a reference on the path before dentry_open, and drop it after. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1f9e05bf59a8c48eb25794a12675f74e7aeb60de Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:30 2013 -0400 Wrapfs: no need to call mnt_want_write any longer Apparently this is now being done by the VFS. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 00270322a23e782f9ff5ee56a86b763ef2b5975f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:30 2013 -0400 Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ecce2c9b0aa539b491161a3de45523a7eeaee40e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->lookup takes flags not a nameidata Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d004a0de8b2c057b9421eaa75679cf2d50671fb6 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->create no longer takes a nameidata, only a flag Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit b87c169e5c07ee9890cbdf730a21d6d872c722c9 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->d_revalidate now takes namei flags, not nameidata Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit dcec44396133ce38114f3fabc4fd9e953e931526 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:28 2013 -0400 Wrapfs: struct nameidata no longer has an open-intent data Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit e14d82e19e936806dc60a5bcedb11ec776f99781 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:28 2013 -0400 Wrapfs: dentry_open now takes a struct path Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 5c9c40e7235f90927f85ca7c3709ae2d6cbe8c69 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:27 2013 -0400 Wrapfs: use vm_munmap in ->mmap Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 58cf14c2b5f07ad3f9ed9c12409998e79fbfe900 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:27 2013 -0400 Wrapfs: use clear_inode in evict_inode Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit cf1b481fd0157f8e1fb9ef3add492158920c029d Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:26 2013 -0400 Wrapfs: use d_make_root Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 6d85bf33038ce7b27513b772991fe08e5f18c3cd Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 31 04:40:19 2012 -0500 Wrapfs: use mode_t Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 79b0664ff271de4a58256248014288498bcab1de Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Jan 29 20:34:27 2012 -0500 Wrapfs: use set_nlink() Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d510c908e79717af04bd05d354eb022f106b2609 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Sep 9 00:47:49 2011 -0400 Wrapfs: drop our dentry in ->rmdir Also clear nlinks on our inode. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 2ba6641d7f587888f398092d17e8ba5a5b6b78c3 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:32 2011 -0400 Wrapfs: use d_alloc_root Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 8f43468a443beae7fc1f7267317ed4404e9c85cc Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:31 2011 -0400 Wrapfs: use d_set_d_op Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a926c932f5030ad0421fb310e191ba9dfab67a35 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:30 2011 -0400 Wrapfs: use updated vfs_path_lookup prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 23b035dee76194e41994d9d16f2a41adb1242e2b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:30 2011 -0400 Wrapfs: ->fsync updates for new prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f70459c6213cd30003ac8cabe0eb9098798d9a31 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:29 2011 -0400 Wrapfs: support LOOKUP_RCU in ->d_revalidate Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit fcc0d60cf0d9e6f1546a146999f8a67f3487c2cd Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:28 2011 -0400 Wrapfs: new ->permission prototype and fixes. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit b1350d3e8cea6ac3f029bdce41a2e81ca5d11951 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon May 2 02:00:02 2011 -0400 Wrapfs: lookup fixes Don't use lookup_one_len any longer (doesn't work for NFS). Initialize lower wrapfs_dentry_info so lower_path is NULL. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 4d14cdc3eacffe023c9c69bb0621de0c351e614e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Mar 18 13:14:28 2011 -0400 Wrapfs: remove extra debug in rmdir Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9debe8d362f9f26022148691f0a629fb071000d1 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Mar 18 12:38:01 2011 -0400 Wrapfs: checkpatch fixes Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a35c73510c7d13a71a364eed2b1ec5cc297740a5 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Mar 18 00:45:17 2011 -0400 Wrapfs: port to 2.6.39 Remove lock/unlock_kernel in ->fasync. Convert from ->get_sb to ->mount op. Remove include to smp_lock.h, added sched.h. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 5d2138ac0d7cb2ad7169a9bd0cd10bc619b5a6bd Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Mar 17 23:21:55 2011 -0400 Wrapfs: copyright update for 2011 Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 7e247996bc8e3fda49c5397e172a1e56ced8a955 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Mar 17 23:21:55 2011 -0400 Wrapfs: better handling of NFS silly-renamed files In ->unlink, if we try to unlink an NFS silly-renamed file, NFS returns -EBUSY. We have to treat it as a success and return 0 to the VFS. NFS will remove silly-deleted files later on anyway. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 03dc32d10d5a2ac0f307e77da4d0cf71ccecbb33 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Mar 17 23:21:55 2011 -0400 Wrapfs: update parent directory inode size in inode ops After ->unlink, ->rmdir, and ->rename, we need to copy the (possibly changed) inode size of the parent directory(ies) where the operation took place. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 190c449e1572f36be16559c894019d7499482dc2 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Mar 17 23:21:55 2011 -0400 Wrapfs: remove unnecessary calls to copy lower inode->n_links Removed from ->create, ->symlink, and ->mknod. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f701c28809d3c83d4a69bb34c2b971fa77c728a7 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Mar 7 23:20:33 2011 -0500 Wrapfs: ->setattr fixes Call inode_change_ok on our inode, not lower. Don't copy inode sizes (VFS does it). Pass lower file in struct iattr passed to notify_change on lower inode. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9e56b24029db6a06039294d6d682d8079edee0ba Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Mar 6 16:23:16 2011 -0500 Wrapfs: update ->permission prototye and code for new iperm flag Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 10b03bb5fdf50ae85d74165272af2ff609da44cb Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Nov 12 18:15:05 2010 -0500 Wrapfs: handle maxbytes properly Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 36ea1e2d1018acc811d9163b111310f2ac6cca80 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Sep 11 15:49:33 2010 -0400 Wrapfs: support ->unlocked_ioctl and ->compat_ioctl Old ->ioctl was split into ->unlocked_ioctl and ->compat_ioctl. Compat version doesn't need to lock_kernel any longer. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 057ef34c7b6d3ac5ac80bf275af553050557da1a Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Aug 10 23:50:14 2010 -0400 Wrapfs: new vfs_statfs and ->evict_inode prototypes Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1e744d61b3ac07bf94d19c26a3c90e8859631a0f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Aug 6 23:37:29 2010 -0400 Wrapfs: update ->fsync prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9c6bb3e5b2219f330c34139df328c527c83e0774 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Apr 20 21:22:02 2010 -0400 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 29e405a124029273124b6a0efbcf09f67e6092d6 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Apr 20 15:32:09 2010 -0400 Wrapfs: include slab.h Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f284eec488463fd1a6c8242bbe6004a8242fdeb6 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Apr 20 15:26:02 2010 -0400 Wrapfs: avoid an extra path_get/put pair in wrapfs_open Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 78f580763793ff62d2870ecff493c07208eec859 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Feb 26 03:18:04 2010 -0500 Wrapfs: decrement nd_path on follow_link error Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 81a20cc17b6e57396749c7502c33b43951591b67 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 5 04:27:00 2010 -0500 Wrapfs: don't mention kernel version in modload message Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ed5456d6a976252a7c6f70942151756c3722d2fb Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Kconfig: hook to configure Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 87b1867e77a5a959f89b017332166125218c9b97 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Makefile: hook to compile Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 28257a979cb394afcf0f07f4a6c33b7da79878c1 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: file system magic number Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9b4841864f567951481f847cc4d588d6f5dedf6b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: Kconfig options Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a07599f47b3d8a97310679c3eea6ac7d95447945 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: main Makefile Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 42cd78b2255ef483f0985753a220a28cd7d89986 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: vm_ops operations Includes necessary address_space workaround ops. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 29334bcea271a3c12357562b9227905b88a09393 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: mount-time and module-linkage functions Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 254b6db1c0ef64c1f4aeefe98de9d8782f116e3d Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: lookup-related functions Main lookup function, nameidata helpers, and stacking-interposition functions. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit bb440e10d624455ae19529f2f96670fdbc8b5fc4 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: file operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ccc2bc4c64fa8dde09f7167fe806785bf06efa04 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: dentry operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit dfee6b1dff8f3a564891815c958750ae57f34071 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: inode operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 5d662b059bed7041dae2db86dae1c284fa236934 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: superblock operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 56bba33e8bccf585df9ebb6c13eb627a523cc328 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: main header file Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 80dd1e1018effeff69e74e03b8f49747c02ae070 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: Maintainers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 4993e994455f5d00a1063ae63a92c4223d6b364a Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Documentation: index entry for Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f2d6eba8f04783cc9f1d0e1b65e54a068a55d035 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: introduction and usage documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d7f41d3b297086cd8a263eb3c8b5dd97b7e70a32 Author: Jiri Slaby <jsl...@suse.cz> Date: Fri Jan 27 11:52:30 2017 +0100 Linux 3.12.70 commit b0369e53c851f8cd87afd059d360a4f646840c8c Author: Gu Zheng <guzhe...@huawei.com> Date: Mon Jan 9 09:34:48 2017 +0800 tmpfs: clear S_ISGID when setting posix ACLs commit 497de07d89c1410d76a15bec2bb41f24a2a89f31 upstream. This change was missed the tmpfs modification in In CVE-2016-7097 commit 073931017b49 ("posix_acl: Clear SGID bit when setting file permissions") It can test by xfstest generic/375, which failed to clear setgid bit in the following test case on tmpfs: touch $testfile chown 100:100 $testfile chmod 2755 $testfile _runas -u 100 -g 101 -- setfacl -m u::rwx,g::rwx,o::rwx $testfile Signed-off-by: Gu Zheng <guzhe...@huawei.com> Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> Signed-off-by: Jan Kara <j...@suse.cz> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit ded56d6d88168cb8cb46a50456929fb5f8aae600 Author: Tariq Saeed <tariq.x.sa...@oracle.com> Date: Fri Sep 4 15:44:31 2015 -0700 ocfs2: fix BUG_ON() in ocfs2_ci_checkpointed() commit 3d46a44a0c01b15d385ccaae24b56f619613c256 upstream. PID: 614 TASK: ffff882a739da580 CPU: 3 COMMAND: "ocfs2dc" #0 [ffff882ecc3759b0] machine_kexec at ffffffff8103b35d #1 [ffff882ecc375a20] crash_kexec at ffffffff810b95b5 #2 [ffff882ecc375af0] oops_end at ffffffff815091d8 #3 [ffff882ecc375b20] die at ffffffff8101868b #4 [ffff882ecc375b50] do_trap at ffffffff81508bb0 #5 [ffff882ecc375ba0] do_invalid_op at ffffffff810165e5 #6 [ffff882ecc375c40] invalid_op at ffffffff815116fb [exception RIP: ocfs2_ci_checkpointed+208] RIP: ffffffffa0a7e940 RSP: ffff882ecc375cf0 RFLAGS: 00010002 RAX: 0000000000000001 RBX: 000000000000654b RCX: ffff8812dc83f1f8 RDX: 00000000000017d9 RSI: ffff8812dc83f1f8 RDI: ffffffffa0b2c318 RBP: ffff882ecc375d20 R8: ffff882ef6ecfa60 R9: ffff88301f272200 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffffffffff R13: ffff8812dc83f4f0 R14: 0000000000000000 R15: ffff8812dc83f1f8 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #7 [ffff882ecc375d28] ocfs2_check_meta_downconvert at ffffffffa0a7edbd [ocfs2] #8 [ffff882ecc375d38] ocfs2_unblock_lock at ffffffffa0a84af8 [ocfs2] #9 [ffff882ecc375dc8] ocfs2_process_blocked_lock at ffffffffa0a85285 [ocfs2] assert is tripped because the tran is not checkpointed and the lock level is PR. Some time ago, chmod command had been executed. As result, the following call chain left the inode cluster lock in PR state, latter on causing the assert. system_call_fastpath -> my_chmod -> sys_chmod -> sys_fchmodat -> notify_change -> ocfs2_setattr -> posix_acl_chmod -> ocfs2_iop_set_acl -> ocfs2_set_acl -> ocfs2_acl_set_mode Here is how. 1119 int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) 1120 { 1247 ocfs2_inode_unlock(inode, 1); <<< WRONG thing to do. .. 1258 if (!status && attr->ia_valid & ATTR_MODE) { 1259 status = posix_acl_chmod(inode, inode->i_mode); 519 posix_acl_chmod(struct inode *inode, umode_t mode) 520 { .. 539 ret = inode->i_op->set_acl(inode, acl, ACL_TYPE_ACCESS); 287 int ocfs2_iop_set_acl(struct inode *inode, struct posix_acl *acl, ... 288 { 289 return ocfs2_set_acl(NULL, inode, NULL, type, acl, NULL, NULL); 224 int ocfs2_set_acl(handle_t *handle, 225 struct inode *inode, ... 231 { .. 252 ret = ocfs2_acl_set_mode(inode, di_bh, 253 handle, mode); 168 static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head ... 170 { 183 if (handle == NULL) { >>> BUG: inode lock not held in ex at this point <<< 184 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), 185 OCFS2_INODE_UPDATE_CREDITS); ocfs2_setattr.#1247 we unlock and at #1259 call posix_acl_chmod. When we reach ocfs2_acl_set_mode.#181 and do trans, the inode cluster lock is not held in EX mode (it should be). How this could have happended? We are the lock master, were holding lock EX and have released it in ocfs2_setattr.#1247. Note that there are no holders of this lock at this point. Another node needs the lock in PR, and we downconvert from EX to PR. So the inode lock is PR when do the trans in ocfs2_acl_set_mode.#184. The trans stays in core (not flushed to disc). Now another node want the lock in EX, downconvert thread gets kicked (the one that tripped assert abovt), finds an unflushed trans but the lock is not EX (it is PR). If the lock was at EX, it would have flushed the trans ocfs2_ci_checkpointed -> ocfs2_start_checkpoint before downconverting (to NULL) for the request. ocfs2_setattr must not drop inode lock ex in this code path. If it does, takes it again before the trans, say in ocfs2_set_acl, another cluster node can get in between, execute another setattr, overwriting the one in progress on this node, resulting in a mode acl size combo that is a mix of the two. Orabug: 20189959 Signed-off-by: Tariq Saeed <tariq.x.sa...@oracle.com> Reviewed-by: Mark Fasheh <mfas...@suse.de> Cc: Joel Becker <jl...@evilplan.org> Cc: Joseph Qi <joseph...@huawei.com> Signed-off-by: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...@linux-foundation.org> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit 05dc5c8fcbd236d4100777fe8534b290c87d644b Author: Mintz, Yuval <yuval.mi...@cavium.com> Date: Sun Dec 4 15:30:17 2016 +0200 bnx2x: Correct ringparam estimate when DOWN commit 65870fa77fd7f83d7be4ed924d47ed9e3831f434 upstream. Until interface is up [and assuming ringparams weren't explicitly configured] when queried for the size of its rings bnx2x would claim they're the maximal size by default. That is incorrect as by default the maximal number of buffers would be equally divided between the various rx rings. This prevents the user from actually setting the number of elements on each rx ring to be of maximal size prior to transitioning the interface into up state. To fix this, make a rough estimation about the number of buffers. It wouldn't always be accurate, but it would be much better than current estimation and would allow users to increase number of buffers during early initialization of the interface. Reported-by: Seymour, Shane <shane.seym...@hpe.com> Signed-off-by: Yuval Mintz <yuval.mi...@cavium.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit b6580bd986df184845960c3abe490ed378ee1216 Author: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> Date: Mon Nov 28 19:34:42 2016 -0200 serial: 8250_pci: Detach low-level driver during PCI error recovery commit f209fa03fc9d131b3108c2e4936181eabab87416 upstream. During a PCI error recovery, like the ones provoked by EEH in the ppc64 platform, all IO to the device must be blocked while the recovery is completed. Current 8250_pci implementation only suspends the port instead of detaching it, which doesn't prevent incoming accesses like TIOCMGET and TIOCMSET calls from reaching the device. Those end up racing with the EEH recovery, crashing it. Similar races were also observed when opening the device and when shutting it down during recovery. This patch implements a more robust IO blockage for the 8250_pci recovery by unregistering the port at the beginning of the procedure and re-adding it afterwards. Since the port is detached from the uart layer, we can be sure that no request will make through to the device during recovery. This is similar to the solution used by the JSM serial driver. I thank Peter Hurley <pe...@hurleysoftware.com> for valuable input on this one over one year ago. Signed-off-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit a2b17a74c58b0a6ac4c7bd1c1c64f00eaadadfce Author: Wanpeng Li <wanpeng...@hotmail.com> Date: Sun Sep 18 19:34:51 2016 +0800 x86/apic: Order irq_enter/exit() calls correctly vs. ack_APIC_irq() commit b0f48706a176b71a6e54f399d7404bbeeaa7cfab upstream. =============================== [ INFO: suspicious RCU usage. ] 4.8.0-rc6+ #5 Not tainted ------------------------------- ./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 0 RCU used illegally from extended quiescent state! no locks held by swapper/2/0. stack backtrace: CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.8.0-rc6+ #5 Hardware name: Dell Inc. OptiPlex 7020/0F5C5X, BIOS A03 01/08/2015 0000000000000000 ffff8d1bd6003f10 ffffffff94446949 ffff8d1bd4a68000 0000000000000001 ffff8d1bd6003f40 ffffffff940e9247 ffff8d1bbdfcf3d0 000000000000080b 0000000000000000 0000000000000000 ffff8d1bd6003f70 Call Trace: <IRQ> [<ffffffff94446949>] dump_stack+0x99/0xd0 [<ffffffff940e9247>] lockdep_rcu_suspicious+0xe7/0x120 [<ffffffff9448e0d5>] do_trace_write_msr+0x135/0x140 [<ffffffff9406e750>] native_write_msr+0x20/0x30 [<ffffffff9406503d>] native_apic_msr_eoi_write+0x1d/0x30 [<ffffffff9405b17e>] smp_trace_call_function_interrupt+0x1e/0x270 [<ffffffff948cb1d6>] trace_call_function_interrupt+0x96/0xa0 <EOI> [<ffffffff947200f4>] ? cpuidle_enter_state+0xe4/0x360 [<ffffffff947200df>] ? cpuidle_enter_state+0xcf/0x360 [<ffffffff947203a7>] cpuidle_enter+0x17/0x20 [<ffffffff940df008>] cpu_startup_entry+0x338/0x4d0 [<ffffffff9405bfc4>] start_secondary+0x154/0x180 This can be reproduced readily by running ftrace test case of kselftest. Move the irq_enter() call before ack_APIC_irq(), because irq_enter() tells the RCU susbstems to end the extended quiescent state, so that the following trace call in ack_APIC_irq() works correctly. The same applies to exiting_ack_irq() which calls ack_APIC_irq() after irq_exit(). [ tglx: Massaged changelog ] Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Wanpeng Li <wanpeng...@hotmail.com> Link: http://lkml.kernel.org/r/1474198491-3738-1-git-send-email-wanpeng...@hotmail.com Signed-off-by: Thomas Gleixner <t...@linutronix.de> Acked-by: Joerg Roedel <jroe...@suse.de> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit 75e8aab4ba77c566a538bd85b0324ae71cc5a5ed Author: Al Viro <v...@zeniv.linux.org.uk> Date: Thu Sep 11 18:55:50 2014 -0400 move the call of __d_drop(anon) into __d_materialise_unique(dentry, anon) commit 6f18493e541c690169c3b1479d47d95f624161cf upstream. and lock the right list there Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> Acked-by: NeilBrown <ne...@suse.com> Signed-off-by: Jiri Slaby <jsl...@suse.cz> commit 77eed17655f6176a74b70005a337127838057235 Author: Robert Doebbelin <rob...@quobyte.com> Date: Mon Mar 7 09:50:56 2016 +0100 fuse: do not use iocb after it may have been freed commit 7cabc61e01a0a8b663bd2b4c982aa53048218734 upstream. diff --git a/Documentation/devicetree/bindings/clock/imx31-clock.txt b/Documentation/devicetree/bindings/clock/imx31-clock.txt index 19df842..8163d56 100644 --- a/Documentation/devicetree/bindings/clock/imx31-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx31-clock.txt @@ -77,7 +77,7 @@ Examples: clks: ccm@53f80000{ compatible = "fsl,imx31-ccm"; reg = <0x53f80000 0x4000>; - interrupts = <0 31 0x04 0 53 0x04>; + interrupts = <31>, <53>; #clock-cells = <1>; }; diff --git a/Makefile b/Makefile index f355c0e..d0e6e38 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 12 -SUBLEVEL = 69 +SUBLEVEL = 70 EXTRAVERSION = NAME = One Giant Leap for Frogkind diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 588ce58..bd81f1d 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -59,6 +59,7 @@ #size-cells = <1>; compatible = "m25p64"; spi-max-frequency = <30000000>; + m25p,fast-read; reg = <0>; partition@0 { label = "U-Boot-SPL"; diff --git a/arch/arm/boot/dts/imx31.dtsi b/arch/arm/boot/dts/imx31.dtsi index c34f825..626e5e3 100644 --- a/arch/arm/boot/dts/imx31.dtsi +++ b/arch/arm/boot/dts/imx31.dtsi @@ -30,11 +30,11 @@ }; }; - avic: avic-interrupt-controller@60000000 { + avic: interrupt-controller@68000000 { compatible = "fsl,imx31-avic", "fsl,avic"; interrupt-controller; #interrupt-cells = <1>; - reg = <0x60000000 0x100000>; + reg = <0x68000000 0x100000>; }; soc { @@ -110,13 +110,6 @@ interrupts = <19>; clocks = <&clks 25>; }; - - clks: ccm@53f80000{ - compatible = "fsl,imx31-ccm"; - reg = <0x53f80000 0x4000>; - interrupts = <0 31 0x04 0 53 0x04>; - #clock-cells = <1>; - }; }; aips@53f00000 { /* AIPS2 */ @@ -126,6 +119,13 @@ reg = <0x53f00000 0x100000>; ranges; + clks: ccm@53f80000{ + compatible = "fsl,imx31-ccm"; + reg = <0x53f80000 0x4000>; + interrupts = <31>, <53>; + #clock-cells = <1>; + }; + gpt: timer@53f90000 { compatible = "fsl,imx31-gpt"; reg = <0x53f90000 0x4000>; diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 9672e97..5695490 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h @@ -76,6 +76,9 @@ #define ARM_CPU_XSCALE_ARCH_V2 0x4000 #define ARM_CPU_XSCALE_ARCH_V3 0x6000 +/* Qualcomm implemented cores */ +#define ARM_CPU_PART_SCORPION 0x510002d0 + extern unsigned int processor_id; #ifdef CONFIG_CPU_CP15 diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 7b95de6..b3ebae3 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -1066,6 +1066,22 @@ static int __init arch_hw_breakpoint_init(void) return 0; } + /* + * Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD + * whenever a WFI is issued, even if the core is not powered down, in + * violation of the architecture. When DBGPRSR.SPD is set, accesses to + * breakpoint and watchpoint registers are treated as undefined, so + * this results in boot time and runtime failures when these are + * accessed and we unexpectedly take a trap. + * + * It's not clear if/how this can be worked around, so we blacklist + * Scorpion CPUs to avoid these issues. + */ + if ((read_cpuid_id() & 0xff00fff0) == ARM_CPU_PART_SCORPION) { + pr_info("Scorpion CPU detected. Hardware breakpoints and watchpoints disabled\n"); + return 0; + } + has_ossr = core_has_os_save_restore(); /* Determine how many BRPs/WRPs are available. */ diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index f56e5fb..25f1149 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -297,6 +297,16 @@ static struct clk emac_clk = { .gpsc = 1, }; +/* + * In order to avoid adding the emac_clk to the clock lookup table twice (and + * screwing up the linked list in the process) create a separate clock for + * mdio inheriting the rate from emac_clk. + */ +static struct clk mdio_clk = { + .name = "mdio", + .parent = &emac_clk, +}; + static struct clk mcasp_clk = { .name = "mcasp", .parent = &pll0_sysclk2, @@ -461,7 +471,7 @@ static struct clk_lookup da850_clks[] = { CLK(NULL, "arm", &arm_clk), CLK(NULL, "rmii", &rmii_clk), CLK("davinci_emac.1", NULL, &emac_clk), - CLK("davinci_mdio.0", "fck", &emac_clk), + CLK("davinci_mdio.0", "fck", &mdio_clk), CLK("davinci-mcasp.0", NULL, &mcasp_clk), CLK("da8xx_lcdc.0", "fck", &lcdc_clk), CLK("da830-mmc.0", NULL, &mmcsd0_clk), diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c index 1a468f0..9d53256 100644 --- a/arch/arm/mach-ux500/pm.c +++ b/arch/arm/mach-ux500/pm.c @@ -128,8 +128,8 @@ bool prcmu_pending_irq(void) */ bool prcmu_is_cpu_in_wfi(int cpu) { - return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : - PRCM_ARM_WFI_STANDBY_WFI0; + return readl(PRCM_ARM_WFI_STANDBY) & + (cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : PRCM_ARM_WFI_STANDBY_WFI0); } /* diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 83e4f95..0cad698 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -260,8 +260,7 @@ static int __init xen_guest_init(void) * for secondary CPUs as they are brought up. * For uniformity we use VCPUOP_register_vcpu_info even on cpu0. */ - xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info), - sizeof(struct vcpu_info)); + xen_vcpu_info = alloc_percpu(struct vcpu_info); if (xen_vcpu_info == NULL) return -ENOMEM; diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 6913643..c136fd5 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -75,6 +75,7 @@ struct user_fpsimd_state { __uint128_t vregs[32]; __u32 fpsr; __u32 fpcr; + __u32 __reserved[2]; }; struct user_hwdebug_state { diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 028a1b9..c405e24 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -493,7 +493,7 @@ el0_inv: mov x0, sp mov x1, #BAD_SYNC mrs x2, esr_el1 - b bad_mode + b bad_el0_sync ENDPROC(el0_sync) .align 6 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 9b9d651..cdf1ec1 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -442,6 +442,8 @@ static int hw_break_set(struct task_struct *target, /* (address, ctrl) registers */ limit = regset->n * regset->size; while (count && offset < limit) { + if (count < PTRACE_HBP_ADDR_SZ) + return -EINVAL; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &addr, offset, offset + PTRACE_HBP_ADDR_SZ); if (ret) @@ -451,6 +453,8 @@ static int hw_break_set(struct task_struct *target, return ret; offset += PTRACE_HBP_ADDR_SZ; + if (!count) + break; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &ctrl, offset, offset + PTRACE_HBP_CTRL_SZ); if (ret) @@ -487,7 +491,7 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; - struct user_pt_regs newregs; + struct user_pt_regs newregs = task_pt_regs(target)->user_regs; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newregs, 0, -1); if (ret) @@ -517,7 +521,8 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; - struct user_fpsimd_state newstate; + struct user_fpsimd_state newstate = + target->thread.fpsimd_state.user_fpsimd; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newstate, 0, -1); if (ret) @@ -540,7 +545,7 @@ static int tls_set(struct task_struct *target, const struct user_regset *regset, const void *kbuf, const void __user *ubuf) { int ret; - unsigned long tls; + unsigned long tls = target->thread.tp_value; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1); if (ret) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 7ffaddd..7d1f6c5 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -306,16 +306,33 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs) } /* - * bad_mode handles the impossible case in the exception vector. + * bad_mode handles the impossible case in the exception vector. This is always + * fatal. */ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) { - siginfo_t info; - void __user *pc = (void __user *)instruction_pointer(regs); console_verbose(); pr_crit("Bad mode in %s handler detected, code 0x%08x\n", handler[reason], esr); + + die("Oops - bad mode", regs, 0); + local_irq_disable(); + panic("bad mode"); +} + +/* + * bad_el0_sync handles unexpected, but potentially recoverable synchronous + * exceptions taken from EL0. Unlike bad_mode, this returns. + */ +asmlinkage void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr) +{ + siginfo_t info; + void __user *pc = (void __user *)instruction_pointer(regs); + console_verbose(); + + pr_crit("Bad EL0 synchronous exception detected on CPU%d, code 0x%08x\n", + smp_processor_id(), esr); __show_regs(regs); info.si_signo = SIGILL; @@ -323,7 +340,7 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) info.si_code = ILL_ILLOPC; info.si_addr = pc; - arm64_notify_die("Oops - bad mode", regs, &info, 0); + force_sig_info(info.si_signo, &info, current); } void __pte_error(const char *file, int line, unsigned long val) diff --git a/arch/cris/boot/rescue/Makefile b/arch/cris/boot/rescue/Makefile index 52bd0bd..d98edbb 100644 --- a/arch/cris/boot/rescue/Makefile +++ b/arch/cris/boot/rescue/Makefile @@ -10,6 +10,9 @@ asflags-y += $(LINUXINCLUDE) ccflags-y += -O2 $(LINUXINCLUDE) + +ifdef CONFIG_ETRAX_AXISFLASHMAP + arch-$(CONFIG_ETRAX_ARCH_V10) = v10 arch-$(CONFIG_ETRAX_ARCH_V32) = v32 @@ -28,6 +31,11 @@ $(obj)/rescue.bin: $(obj)/rescue.o FORCE $(call if_changed,objcopy) cp -p $(obj)/rescue.bin $(objtree) +else +$(obj)/rescue.bin: + +endif + $(obj)/testrescue.bin: $(obj)/testrescue.o $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin # Pad it to 784 bytes diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h index d28fa8f..c598d84 100644 --- a/arch/m68k/include/asm/delay.h +++ b/arch/m68k/include/asm/delay.h @@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs) */ #define HZSCALE (268435456 / (1000000 / HZ)) -#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)); +#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)) #endif /* defined(_M68K_DELAY_H) */ diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S index b6fcbaf..3dc44b0 100644 --- a/arch/powerpc/boot/ps3-head.S +++ b/arch/powerpc/boot/ps3-head.S @@ -57,11 +57,6 @@ __system_reset_overlay: bctr 1: - /* Save the value at addr zero for a null pointer write check later. */ - - li r4, 0 - lwz r3, 0(r4) - /* Primary delays then goes to _zimage_start in wrapper. */ or 31, 31, 31 /* db16cyc */ diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index 9954d98..029ea3c 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c @@ -119,13 +119,12 @@ void ps3_copy_vectors(void) flush_cache((void *)0x100, 512); } -void platform_init(unsigned long null_check) +void platform_init(void) { const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ void *chosen; unsigned long ft_addr; u64 rm_size; - unsigned long val; console_ops.write = ps3_console_write; platform_ops.exit = ps3_exit; @@ -153,11 +152,6 @@ void platform_init(unsigned long null_check) printf(" flat tree at 0x%lx\n\r", ft_addr); - val = *(unsigned long *)0; - - if (val != null_check) - printf("null check failed: %lx != %lx\n\r", val, null_check); - ((kernel_entry_t)0)(ft_addr, 0, NULL); ps3_exit(); diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 16a7c23..bc47b79 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c @@ -180,6 +180,7 @@ static int ibmebus_create_device(struct device_node *dn) static int ibmebus_create_devices(const struct of_device_id *matches) { struct device_node *root, *child; + struct device *dev; int ret = 0; root = of_find_node_by_path("/"); @@ -188,9 +189,12 @@ static int ibmebus_create_devices(const struct of_device_id *matches) if (!of_match_node(matches, child)) continue; - if (bus_find_device(&ibmebus_bus_type, NULL, child, - ibmebus_match_node)) + dev = bus_find_device(&ibmebus_bus_type, NULL, child, + ibmebus_match_node); + if (dev) { + put_device(dev); continue; + } ret = ibmebus_create_device(child); if (ret) { @@ -262,6 +266,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, const char *buf, size_t count) { struct device_node *dn = NULL; + struct device *dev; char *path; ssize_t rc = 0; @@ -269,8 +274,10 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, if (!path) return -ENOMEM; - if (bus_find_device(&ibmebus_bus_type, NULL, path, - ibmebus_match_path)) { + dev = bus_find_device(&ibmebus_bus_type, NULL, path, + ibmebus_match_path); + if (dev) { + put_device(dev); printk(KERN_WARNING "%s: %s has already been probed\n", __func__, path); rc = -EEXIST; @@ -306,6 +313,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus, if ((dev = bus_find_device(&ibmebus_bus_type, NULL, path, ibmebus_match_path))) { of_device_unregister(to_platform_device(dev)); + put_device(dev); kfree(path); return count; diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index df93072..6ff0f4e 100644 --- a/arch/powerpc/kernel/idle_power7.S +++ b/arch/powerpc/kernel/idle_power7.S @@ -110,7 +110,7 @@ power7_enter_nap_mode: std r0,0(r1) ptesync ld r0,0(r1) -1: cmp cr0,r0,r0 +1: cmpd cr0,r0,r0 bne 1b PPC_NAP b . diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index ace3413..e23298f 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -313,7 +313,7 @@ _GLOBAL(flush_instruction_cache) lis r3, KERNELBASE@h iccci 0,r3 #endif -#elif CONFIG_FSL_BOOKE +#elif defined(CONFIG_FSL_BOOKE) BEGIN_FTR_SECTION mfspr r3,SPRN_L1CSR0 ori r3,r3,L1CSR0_CFI|L1CSR0_CLFC diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 2955983..43849c3 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -710,9 +710,8 @@ static inline void exiting_irq(void) static inline void exiting_ack_irq(void) { - irq_exit(); - /* Ack only at the end to avoid potential reentry */ ack_APIC_irq(); + irq_exit(); } extern void ioapic_zap_locks(void); diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 9364936..f415fd8 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1067,7 +1067,7 @@ static __init int setup_disablecpuid(char *arg) { int bit; - if (get_option(&arg, &bit) && bit < NCAPINTS*32) + if (get_option(&arg, &bit) && bit >= 0 && bit < NCAPINTS * 32) setup_clear_cpu_cap(bit); else return 0; diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 0271272..050784b 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -64,7 +64,7 @@ u64 x86_perf_event_update(struct perf_event *event) int shift = 64 - x86_pmu.cntval_bits; u64 prev_raw_count, new_raw_count; int idx = hwc->idx; - s64 delta; + u64 delta; if (idx == INTEL_PMC_IDX_FIXED_BTS) return 0; diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 04e7df0..0c6527a 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c @@ -2578,7 +2578,7 @@ __init int intel_pmu_init(void) /* Support full width counters using alternative MSR range */ if (x86_pmu.intel_cap.full_width_write) { - x86_pmu.max_period = x86_pmu.cntval_mask; + x86_pmu.max_period = x86_pmu.cntval_mask >> 1; x86_pmu.perfctr = MSR_IA32_PMC0; pr_cont("full-width counters, "); } diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 1f1c33d..a78db5e 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -1113,8 +1113,8 @@ ftrace_graph_call: jmp ftrace_stub #endif -.globl ftrace_stub -ftrace_stub: +/* This is weak to keep gas from relaxing the jumps */ +WEAK(ftrace_stub) ret END(ftrace_caller) diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index ead3e7c..ceb8d11 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -122,7 +122,8 @@ GLOBAL(ftrace_graph_call) jmp ftrace_stub #endif -GLOBAL(ftrace_stub) +/* This is weak to keep gas from relaxing the jumps */ +WEAK(ftrace_stub) retq END(ftrace_caller) diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 7c3a5a6..e5d895f 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -267,8 +267,8 @@ __visible void smp_reschedule_interrupt(struct pt_regs *regs) static inline void smp_entering_irq(void) { - ack_APIC_irq(); irq_enter(); + ack_APIC_irq(); } __visible void smp_trace_reschedule_interrupt(struct pt_regs *regs) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 77d3732..0b45efc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -744,6 +744,20 @@ static int segmented_read_std(struct x86_emulate_ctxt *ctxt, return ctxt->ops->read_std(ctxt, linear, data, size, &ctxt->exception); } +static int segmented_write_std(struct x86_emulate_ctxt *ctxt, + struct segmented_address addr, + void *data, + unsigned int size) +{ + int rc; + ulong linear; + + rc = linearize(ctxt, addr, size, true, &linear); + if (rc != X86EMUL_CONTINUE) + return rc; + return ctxt->ops->write_std(ctxt, linear, data, size, &ctxt->exception); +} + /* * Fetch the next byte of the instruction being emulated which is pointed to * by ctxt->_eip, then increment ctxt->_eip. @@ -1444,7 +1458,6 @@ static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt, &ctxt->exception); } -/* Does not support long mode */ static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, u16 selector, int seg, struct desc_struct *desc) @@ -1458,6 +1471,21 @@ static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, int ret; u16 dummy; + + /* + * None of MOV, POP and LSS can load a NULL selector in CPL=3, but + * they can load it at CPL<3 (Intel's manual says only LSS can, + * but it's wrong). + * + * However, the Intel manual says that putting IST=1/DPL=3 in + * an interrupt gate will result in SS=3 (the AMD manual instead + * says it doesn't), so allow SS=3 in __load_segment_descriptor + * and only forbid it here. + */ + if (seg == VCPU_SREG_SS && selector == 3 && + ctxt->mode == X86EMUL_MODE_PROT64) + return emulate_exception(ctxt, GP_VECTOR, 0, true); + memset(&seg_desc, 0, sizeof seg_desc); if (ctxt->mode == X86EMUL_MODE_REAL) { @@ -1480,20 +1508,34 @@ static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, rpl = selector & 3; cpl = ctxt->ops->cpl(ctxt); - /* NULL selector is not valid for TR, CS and SS (except for long mode) */ - if ((seg == VCPU_SREG_CS - || (seg == VCPU_SREG_SS - && (ctxt->mode != X86EMUL_MODE_PROT64 || rpl != cpl)) - || seg == VCPU_SREG_TR) - && null_selector) - goto exception; - /* TR should be in GDT only */ if (seg == VCPU_SREG_TR && (selector & (1 << 2))) goto exception; - if (null_selector) /* for NULL selector skip all following checks */ + /* NULL selector is not valid for TR, CS and (except for long mode) SS */ + if (null_selector) { + if (seg == VCPU_SREG_CS || seg == VCPU_SREG_TR) + goto exception; + + if (seg == VCPU_SREG_SS) { + if (ctxt->mode != X86EMUL_MODE_PROT64 || rpl != cpl) + goto exception; + + /* + * ctxt->ops->set_segment expects the CPL to be in + * SS.DPL, so fake an expand-up 32-bit data segment. + */ + seg_desc.type = 3; + seg_desc.p = 1; + seg_desc.s = 1; + seg_desc.dpl = cpl; + seg_desc.d = 1; + seg_desc.g = 1; + } + + /* Skip all following checks */ goto load; + } ret = read_segment_descriptor(ctxt, selector, &seg_desc, &desc_addr); if (ret != X86EMUL_CONTINUE) @@ -3179,8 +3221,8 @@ static int emulate_store_desc_ptr(struct x86_emulate_ctxt *ctxt, } /* Disable writeback. */ ctxt->dst.type = OP_NONE; - return segmented_write(ctxt, ctxt->dst.addr.mem, - &desc_ptr, 2 + ctxt->op_bytes); + return segmented_write_std(ctxt, ctxt->dst.addr.mem, + &desc_ptr, 2 + ctxt->op_bytes); } static int em_sgdt(struct x86_emulate_ctxt *ctxt) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index a4ce2b2..33d4795 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1908,3 +1908,9 @@ void kvm_lapic_init(void) jump_label_rate_limit(&apic_hw_disabled, HZ); jump_label_rate_limit(&apic_sw_disabled, HZ); } + +void kvm_lapic_exit(void) +{ + static_key_deferred_flush(&apic_hw_disabled); + static_key_deferred_flush(&apic_sw_disabled); +} diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index fc87568..f1fd075 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -93,6 +93,7 @@ static inline bool kvm_hv_vapic_assist_page_enabled(struct kvm_vcpu *vcpu) int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data); void kvm_lapic_init(void); +void kvm_lapic_exit(void); static inline u32 kvm_apic_get_reg(struct kvm_lapic *apic, int reg_off) { diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index b81c81b..c7f2b3c 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1052,10 +1052,10 @@ static inline int nested_cpu_has_ept(struct vmcs12 *vmcs12) return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_EPT); } -static inline bool is_exception(u32 intr_info) +static inline bool is_nmi(u32 intr_info) { return (intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VALID_MASK)) - == (INTR_TYPE_HARD_EXCEPTION | INTR_INFO_VALID_MASK); + == (INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK); } static void nested_vmx_vmexit(struct kvm_vcpu *vcpu); @@ -4769,7 +4769,7 @@ static int handle_exception(struct kvm_vcpu *vcpu) if (is_machine_check(intr_info)) return handle_machine_check(vcpu); - if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR) + if (is_nmi(intr_info)) return 1; /* already handled by vmx_vcpu_run() */ if (is_no_device(intr_info)) { @@ -6653,7 +6653,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) switch (exit_reason) { case EXIT_REASON_EXCEPTION_NMI: - if (!is_exception(intr_info)) + if (is_nmi(intr_info)) return 0; else if (is_page_fault(intr_info)) return enable_ept; @@ -6962,8 +6962,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx) kvm_machine_check(); /* We need to handle NMIs before interrupts are enabled */ - if ((exit_intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR && - (exit_intr_info & INTR_INFO_VALID_MASK)) { + if (is_nmi(exit_intr_info)) { kvm_before_handle_nmi(&vmx->vcpu); asm("int $2"); kvm_after_handle_nmi(&vmx->vcpu); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8562aff..69e7b0b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5573,6 +5573,7 @@ out: void kvm_arch_exit(void) { + kvm_lapic_exit(); perf_unregister_guest_info_callbacks(&kvm_guest_cbs); if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index a24e9c2..a33c61c 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -118,6 +118,16 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = { DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), }, }, + /* https://bugzilla.kernel.org/show_bug.cgi?id=42606 */ + { + .callback = set_nouse_crs, + .ident = "Supermicro X8DTH", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), + DMI_MATCH(DMI_PRODUCT_NAME, "X8DTH-i/6/iF/6F"), + DMI_MATCH(DMI_BIOS_VERSION, "2.0a"), + }, + }, /* https://bugzilla.kernel.org/show_bug.cgi?id=15362 */ { diff --git a/block/bsg.c b/block/bsg.c index 420a5a9..76801e5 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -675,6 +675,9 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) dprintk("%s: write %Zd bytes\n", bd->name, count); + if (unlikely(segment_eq(get_fs(), KERNEL_DS))) + return -EINVAL; + bsg_set_block(bd, file); bytes_written = 0; diff --git a/drivers/base/core.c b/drivers/base/core.c index 944fecd..449f709 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -874,11 +874,29 @@ static struct kobject *get_device_parent(struct device *dev, return NULL; } +static inline bool live_in_glue_dir(struct kobject *kobj, + struct device *dev) +{ + if (!kobj || !dev->class || + kobj->kset != &dev->class->p->glue_dirs) + return false; + return true; +} + +static inline struct kobject *get_glue_dir(struct device *dev) +{ + return dev->kobj.parent; +} + +/* + * make sure cleaning up dir as the last step, we need to make + * sure .release handler of kobject is run with holding the + * global lock + */ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir) { /* see if we live in a "glue" directory */ - if (!glue_dir || !dev->class || - glue_dir->kset != &dev->class->p->glue_dirs) + if (!live_in_glue_dir(glue_dir, dev)) return; mutex_lock(&gdp_mutex); @@ -886,11 +904,6 @@ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir) mutex_unlock(&gdp_mutex); } -static void cleanup_device_parent(struct device *dev) -{ - cleanup_glue_dir(dev, dev->kobj.parent); -} - static int device_add_class_symlinks(struct device *dev) { int error; @@ -1054,6 +1067,7 @@ int device_add(struct device *dev) struct kobject *kobj; struct class_interface *class_intf; int error = -EINVAL; + struct kobject *glue_dir = NULL; dev = get_device(dev); if (!dev) @@ -1098,8 +1112,10 @@ int device_add(struct device *dev) /* first, register with generic layer. */ /* we require the name to be set before, and pass NULL */ error = kobject_add(&dev->kobj, dev->kobj.parent, NULL); - if (error) + if (error) { + glue_dir = get_glue_dir(dev); goto Error; + } /* notify platform of device entry */ if (platform_notify) @@ -1182,11 +1198,11 @@ done: device_remove_file(dev, &dev_attr_uevent); attrError: kobject_uevent(&dev->kobj, KOBJ_REMOVE); + glue_dir = get_glue_dir(dev); kobject_del(&dev->kobj); Error: - cleanup_device_parent(dev); - if (parent) - put_device(parent); + cleanup_glue_dir(dev, glue_dir); + put_device(parent); name_error: kfree(dev->p); dev->p = NULL; @@ -1261,6 +1277,7 @@ EXPORT_SYMBOL_GPL(put_device); void device_del(struct device *dev) { struct device *parent = dev->parent; + struct kobject *glue_dir = NULL; struct class_interface *class_intf; /* Notify clients of device removal. This call must come @@ -1302,8 +1319,9 @@ void device_del(struct device *dev) if (platform_notify_remove) platform_notify_remove(dev); kobject_uevent(&dev->kobj, KOBJ_REMOVE); - cleanup_device_parent(dev); + glue_dir = get_glue_dir(dev); kobject_del(&dev->kobj); + cleanup_glue_dir(dev, glue_dir); put_device(parent); } EXPORT_SYMBOL_GPL(device_del); diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index 805b4c3..ee5f2c9 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c @@ -248,7 +248,7 @@ static int wm831x_clkout_is_prepared(struct clk_hw *hw) if (ret < 0) { dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_1: %d\n", ret); - return true; + return false; } return (ret & WM831X_CLKOUT_ENA) != 0; diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index fc0e502..26bfe09 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -398,13 +398,11 @@ static irqreturn_t exynos4_mct_tick_isr(int irq, void *dev_id) return IRQ_HANDLED; } -static int exynos4_local_timer_setup(struct clock_event_device *evt) +static int exynos4_local_timer_setup(struct mct_clock_event_device *mevt) { - struct mct_clock_event_device *mevt; + struct clock_event_device *evt = &mevt->evt; unsigned int cpu = smp_processor_id(); - mevt = container_of(evt, struct mct_clock_event_device, evt); - mevt->base = EXYNOS4_MCT_L_BASE(cpu); sprintf(mevt->name, "mct_tick%d", cpu); @@ -433,12 +431,15 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) return 0; } -static void exynos4_local_timer_stop(struct clock_event_device *evt) +static void exynos4_local_timer_stop(struct mct_clock_event_device *mevt) { + struct clock_event_device *evt = &mevt->evt; + evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); if (mct_int_type == MCT_INT_SPI) { if (evt->irq != -1) disable_irq_nosync(evt->irq); + exynos4_mct_write(0x1, mevt->base + MCT_L_INT_CSTAT_OFFSET); } else { disable_percpu_irq(mct_irqs[MCT_L0_IRQ]); } @@ -456,11 +457,11 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self, switch (action & ~CPU_TASKS_FROZEN) { case CPU_STARTING: mevt = this_cpu_ptr(&percpu_mct_tick); - exynos4_local_timer_setup(&mevt->evt); + exynos4_local_timer_setup(mevt); break; case CPU_DYING: mevt = this_cpu_ptr(&percpu_mct_tick); - exynos4_local_timer_stop(&mevt->evt); + exynos4_local_timer_stop(mevt); break; } @@ -526,7 +527,7 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem goto out_irq; /* Immediately configure the timer on the boot CPU */ - exynos4_local_timer_setup(&mevt->evt); + exynos4_local_timer_setup(mevt); return; out_irq: diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 7c63b72..66f5493 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -418,7 +418,9 @@ static int aead_set_sh_desc(struct crypto_aead *aead) /* Will read cryptlen */ append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); - aead_append_src_dst(desc, FIFOLD_TYPE_MSG1OUT2); + append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | KEY_VLF | + FIFOLD_TYPE_MSG1OUT2 | FIFOLD_TYPE_LASTBOTH); + append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); /* Write ICV */ append_seq_store(desc, ctx->authsize, LDST_CLASS_2_CCB | diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 88fc3a5..32be5cb 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -120,7 +120,8 @@ static int ast_get_dram_info(struct drm_device *dev) ast_write32(ast, 0x10000, 0xfc600309); do { - ; + if (pci_channel_offline(dev->pdev)) _______________________________________________ unionfs-cvs mailing list: http://unionfs.filesystems.org/ unionfs-cvs@fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs