udc
25 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1e3f758e0c |
Merge android-4.14 (4.14.149) into android-msm-floral-4.14-lts
Merge 4.14.149 into android-4.14
Linux 4.14.149
ASoC: sgtl5000: Improve VAG power and mute control
* nl80211: validate beacon head
net/wireless/nl80211.c
* cfg80211: Use const more consistently in for_each_element macros
include/linux/ieee80211.h
* cfg80211: add and use strongly typed element iteration macros
include/linux/ieee80211.h
net/wireless/scan.c
coresight: etm4x: Use explicit barriers on enable/disable
* vfs: Fix EOVERFLOW testing in put_compat_statfs64
fs/statfs.c
perf stat: Reset previous counts on repeat with interval
perf stat: Fix a segmentation fault when using repeat forever
perf tools: Fix segfault in cpu_cache_level__read()
* tick: broadcast-hrtimer: Fix a race in bc_set_next
kernel/time/tick-broadcast-hrtimer.c
tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure
powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()
nbd: fix max number of supported devs
block/ndb: add WQ_UNBOUND to the knbd-recv workqueue
nbd: fix crash when the blksize is zero
KVM: PPC: Book3S HV: XIVE: Free escalation interrupts before disabling the VP
perf unwind: Fix libunwind build failure on i386 systems
* kernel/elfcore.c: include proper prototypes
kernel/elfcore.c
perf build: Add detection of java-11-openjdk-devel package
* sched/core: Fix migration to invalid CPU in __set_cpus_allowed_ptr()
kernel/sched/core.c
fuse: fix memleak in cuse_channel_open
* thermal: Fix use-after-free when unregistering thermal zone device
drivers/thermal/thermal_core.c
pwm: stm32-lp: Add check in case requested period cannot be achieved
pNFS: Ensure we do clear the return-on-close layout stateid on fatal errors
drm/amdgpu: Check for valid number of registers to read
netfilter: nf_tables: allow lookups in dynamic sets
watchdog: aspeed: Add support for AST2600
ceph: reconnect connection if session hang in opening state
ceph: fix directories inode i_blkbits initialization
xen/pci: reserve MCFG areas earlier
9p: avoid attaching writeback_fid on mmap with type PRIVATE
fs: nfs: Fix possible null-pointer dereferences in encode_attrs()
ima: always return negative code for error
* cfg80211: initialize on-stack chandefs
net/wireless/nl80211.c
net/wireless/reg.c
ieee802154: atusb: fix use-after-free at disconnect
xen/xenbus: fix self-deadlock after killing user process
Revert "locking/pvqspinlock: Don't wait if vCPU is preempted"
mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence
mmc: sdhci: improve ADMA error reporting
drm/omap: fix max fclk divider for omap36xx
watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout
* timer: Read jiffies once when forwarding base clk
kernel/time/timer.c
* usercopy: Avoid HIGHMEM pfn warning
mm/usercopy.c
crypto: caam - fix concurrency issue in givencrypt descriptor
crypto: cavium/zip - Add missing single_release()
* crypto: skcipher - Unmap pages after an external error
crypto/skcipher.c
crypto: qat - Silence smp_processor_id() warning
tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file
can: mcp251x: mcp251x_hw_reset(): allow more time after a reset
powerpc/powernv: Restrict OPAL symbol map to only be readable by root
* ASoC: Define a set of DAPM pre/post-up events
include/sound/soc-dapm.h
PM / devfreq: tegra: Fix kHz to Hz conversion
KVM: nVMX: handle page fault in vmread fix
KVM: PPC: Book3S HV: Don't lose pending doorbell request on migration on P9
s390/cio: exclude subchannels with no parent from pseudo check
s390/cio: avoid calling strlen on null pointer
s390/topology: avoid firing events before kobjs are created
KVM: s390: Test for bad access register and size at the start of S390_MEM_OP
s390/process: avoid potential reading of freed stack
cuttlefish-4.14: Enable CONFIG_DM_SNAPSHOT
ANDROID: cuttlefish_defconfig: Enable BPF_JIT and BPF_JIT_ALWAYS_ON
* UPSTREAM: netfilter: xt_IDLETIMER: fix sysfs callback function type
net/netfilter/xt_IDLETIMER.c
Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* UPSTREAM: mm: untag user pointers in mmap/munmap/mremap/brk
mm/mmap.c
mm/mremap.c
UPSTREAM: vfio/type1: untag user pointers in vaddr_get_pfn
UPSTREAM: media/v4l2-core: untag user pointers in videobuf_dma_contig_user_get
UPSTREAM: drm/radeon: untag user pointers in radeon_gem_userptr_ioctl
BACKPORT: drm/amdgpu: untag user pointers
UPSTREAM: userfaultfd: untag user pointers
* UPSTREAM: fs/namespace: untag user pointers in copy_mount_options
fs/namespace.c
* UPSTREAM: mm: untag user pointers in get_vaddr_frames
mm/frame_vector.c
* UPSTREAM: mm: untag user pointers in mm/gup.c
mm/gup.c
* BACKPORT: mm: untag user pointers passed to memory syscalls
mm/madvise.c
mm/migrate.c
mm/mincore.c
mm/mlock.c
mm/mprotect.c
mm/mremap.c
mm/msync.c
* BACKPORT: lib: untag user pointers in strn*_user
lib/strncpy_from_user.c
lib/strnlen_user.c
* UPSTREAM: arm64: Fix reference to docs for ARM64_TAGGED_ADDR_ABI
arch/arm64/Kconfig
UPSTREAM: selftests, arm64: add kernel headers path for tags_test
BACKPORT: arm64: Relax Documentation/arm64/tagged-pointers.rst
UPSTREAM: arm64: Define Documentation/arm64/tagged-address-abi.rst
* UPSTREAM: arm64: Change the tagged_addr sysctl control semantics to only prevent the opt-in
arch/arm64/kernel/process.c
* UPSTREAM: arm64: Tighten the PR_{SET, GET}_TAGGED_ADDR_CTRL prctl() unused arguments
kernel/sys.c
UPSTREAM: selftests, arm64: fix uninitialized symbol in tags_test.c
* UPSTREAM: arm64: mm: Really fix sparse warning in untagged_addr()
arch/arm64/include/asm/memory.h
UPSTREAM: selftests, arm64: add a selftest for passing tagged pointers to kernel
* BACKPORT: arm64: Introduce prctl() options to control the tagged user addresses ABI
arch/arm64/Kconfig
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/thread_info.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/process.c
include/uapi/linux/prctl.h
kernel/sys.c
* UPSTREAM: thread_info: Add update_thread_flag() helpers
include/linux/sched.h
include/linux/thread_info.h
* UPSTREAM: arm64: untag user pointers in access_ok and __uaccess_mask_ptr
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/uaccess.h
* UPSTREAM: uaccess: add noop untagged_addr definition
include/linux/mm.h
Merge 4.14.148 into android-4.14
Linux 4.14.148
kexec: bail out upon SIGKILL when allocating memory.
NFC: fix attrs checks in netlink interface
* smack: use GFP_NOFS while holding inode_smack::smk_lock
security/smack/smack_access.c
security/smack/smack_lsm.c
* Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
security/smack/smack_lsm.c
* ipv6: Handle missing host route in __ipv6_ifa_notify
net/ipv6/addrconf.c
sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
tipc: fix unlimited bundling of small messages
xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
net/rds: Fix error handling in rds_ib_add_one()
vsock: Fix a lockdep warning in __vsock_release()
sch_dsmark: fix potential NULL deref in dsmark_init()
qmi_wwan: add support for Cinterion CLS8 devices
nfc: fix memory leak in llcp_sock_bind()
* net: Unpublish sk from sk_reuseport_cb before call_rcu
net/core/sock.c
net: qlogic: Fix memory leak in ql_alloc_large_buffers
* net: ipv4: avoid mixed n_redirects and rate_tokens usage
net/ipv4/route.c
* ipv6: drop incoming packets having a v4mapped source address
net/ipv6/ip6_input.c
hso: fix NULL-deref on tty open
erspan: remove the incorrect mtu limit for erspan
cxgb4:Fix out-of-bounds MSI-X info array access
* bpf: fix use after free in prog symbol exposure
kernel/bpf/syscall.c
* kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
lib/Kconfig.debug
ocfs2: wait for recovering done after direct unlock request
* kbuild: clean compressed initramfs image
usr/Makefile
hypfs: Fix error number left in struct pointer member
pktcdvd: remove warning on attempting to register non-passthrough dev
* fat: work around race with userspace's read via blockdev while mounting
fs/fat/dir.c
fs/fat/fatent.c
ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
* security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
security/smack/smack_lsm.c
PCI: exynos: Propagate errors for optional PHYs
PCI: imx6: Propagate errors for optional regulators
PCI: rockchip: Propagate errors for optional regulators
* HID: apple: Fix stuck function keys when using FN
drivers/hid/hid-apple.c
rtc: snvs: fix possible race condition
ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
livepatch: Nullify obj->mod in klp_module_coming()'s error path
PCI: tegra: Fix OF node reference leak
mfd: intel-lpss: Remove D3cold delay
i2c-cht-wc: Fix lockdep warning
MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
dma-buf/sw_sync: Synchronize signal vs syncpt free
* scsi: core: Reduce memory required for SCSI logging
drivers/scsi/scsi_logging.c
include/scsi/scsi_dbg.h
clk: at91: select parent if main oscillator or bypass is enabled
* arm64: fix unreachable code issue with cmpxchg
arch/arm64/include/asm/cmpxchg.h
powerpc/pseries: correctly track irq state in default idle
powerpc/64s/exception: machine check use correct cfar for late handler
drm/amdgpu/si: fix ASIC tests
drm/nouveau/volt: Fix for some cards having 0 maximum voltage
vfio_pci: Restore original state on release
pinctrl: tegra: Fix write barrier placement in pmx_writel
powerpc/pseries/mobility: use cond_resched when updating device tree
powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
powerpc/rtas: use device model APIs and serialization during LPM
powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL
clk: zx296718: Don't reference clk_init_data after registration
clk: sirf: Don't reference clk_init_data after registration
clk: sunxi-ng: v3s: add missing clock slices for MMC2 module clocks
clk: qoriq: Fix -Wunused-const-variable
ipmi_si: Only schedule continuously in the thread in maintenance mode
gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
drm/radeon: Fix EEH during kexec
drm/stm: attach gem fence to atomic state
video: ssd1307fb: Start page range at page_offset
drm/panel: simple: fix AUO g185han01 horizontal blanking
drm/bridge: tc358767: Increase AUX transfer length limit
tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations
tpm: use tpm_try_get_ops() in tpm-sysfs.c.
tpm: migrate pubek_show to struct tpm_buf
Merge 4.14.147 into android-4.14
Linux 4.14.147
Btrfs: fix race setting up and completing qgroup rescan workers
btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item
* mm/compaction.c: clear total_{migrate,free}_scanned before scanning a new zone
mm/compaction.c
md/raid0: avoid RAID0 data corruption due to layout confusion.
CIFS: Fix oplock handling for SMB 2.1+ protocols
CIFS: fix max ea value size
i2c: riic: Clear NACK in tend isr
* hwrng: core - don't wait on add_early_randomness()
drivers/char/hw_random/core.c
* quota: fix wrong condition in is_quota_modification()
include/linux/quotaops.h
* ext4: fix punch hole for inline_data file systems
fs/ext4/inode.c
* ext4: fix warning inside ext4_convert_unwritten_extents_endio
fs/ext4/extents.c
* /dev/mem: Bail out upon SIGKILL.
drivers/char/mem.c
* cfg80211: Purge frame registrations on iftype change
net/wireless/util.c
md: only call set_in_sync() when it is expected to succeed.
md: don't report active array_state until after revalidate_disk() completes.
md/raid6: Set R5_ReadError when there is read failure on parity disk
btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
btrfs: Relinquish CPUs in btrfs_compare_trees
Btrfs: fix use-after-free when using the tree modification log
* ovl: filter of trusted xattr results in audit
fs/overlayfs/inode.c
* memcg, kmem: do not fail __GFP_NOFAIL charges
mm/memcontrol.c
* memcg, oom: don't require __GFP_FS when invoking memcg OOM killer
mm/oom_kill.c
gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps
* regulator: Defer init completion for a while after late_initcall
drivers/regulator/core.c
* alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
kernel/time/alarmtimer.c
arm64: dts: rockchip: limit clock rate of MMC controllers for RK3328
ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
ARM: samsung: Fix system restart on S3C6410
ASoC: Intel: Fix use of potentially uninitialized variable
ASoC: Intel: Skylake: Use correct function to access iomem space
ASoC: Intel: NHLT: Fix debug print format
* binfmt_elf: Do not move brk for INTERP-less ET_EXEC
fs/binfmt_elf.c
media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table
KVM: x86: Manually calculate reserved bits when loading PDPTRS
KVM: x86: set ctxt->have_exception in x86_decode_insn()
KVM: x86: always stop emulation on page fault
x86/retpolines: Fix up backport of a9d57ef15cbe
parisc: Disable HP HSC-PCI Cards to prevent kernel crash
* fuse: fix missing unlock_page in fuse_writepage()
fs/fuse/file.c
ALSA: hda/realtek - Fixup mute led on HP Spectre x360
randstruct: Check member structs in is_pure_ops_struct()
IB/hfi1: Define variables as unsigned long to fix KASAN warning
* printk: Do not lose last line in kmsg buffer dump
kernel/printk/printk.c
scsi: scsi_dh_rdac: zero cdb in send_mode_select()
ALSA: firewire-tascam: check intermediate state of clock status and retry
ALSA: firewire-tascam: handle error code when getting current source of clock
* PM / devfreq: passive: fix compiler warning
drivers/devfreq/governor_passive.c
media: omap3isp: Set device on omap3isp subdevs
btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
ALSA: hda - Drop unsol event handler for Intel HDMI codecs
e1000e: add workaround for possible stalled packet
libertas: Add missing sentinel at end of if_usb.c fw_table
raid5: don't increment read_errors on EILSEQ return
mmc: sdhci: Fix incorrect switch to HS mode
mmc: core: Clarify sdio_irq_pending flag for MMC_CAP2_SDIO_IRQ_NOTHREAD
raid5: don't set STRIPE_HANDLE to stripe which is in batch list
ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
* kprobes: Prohibit probing on BUG() and WARN() address
include/linux/bug.h
dmaengine: ti: edma: Do not reset reserved paRAM slots
md/raid1: fail run raid1 array when active disk less than one
hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap'
ACPI / PCI: fix acpi_pci_irq_enable() memory leak
ACPI: custom_method: fix memory leaks
ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks
libtraceevent: Change users plugin directory
* iommu/iova: Avoid false sharing on fq_timer_on
drivers/iommu/iova.c
iommu/amd: Silence warnings under memory pressure
nvmet: fix data units read and written counters in SMART log
* arm64: kpti: ensure patched kernel text is fetched from PoU
arch/arm64/mm/proc.S
ACPI / CPPC: do not require the _PSD method
ASoC: es8316: fix headphone mixer volume table
media: ov9650: add a sanity check
perf trace beauty ioctl: Fix off-by-one error in cmd->string table
media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate()
media: cpia2_usb: fix memory leaks
media: saa7146: add cleanup in hexium_attach()
media: cec-notifier: clear cec_adap in cec_notifier_unregister
PM / devfreq: exynos-bus: Correct clock enable sequence
* PM / devfreq: passive: Use non-devm notifiers
drivers/devfreq/governor_passive.c
EDAC/amd64: Decode syndrome before translating address
EDAC/amd64: Recognize DRAM device type ECC capability
libperf: Fix alignment trap with xyarray contents in 'perf stat'
media: dvb-core: fix a memory leak bug
nbd: add missing config put
media: hdpvr: add terminating 0 at end of string
media: radio/si470x: kill urb on error
ARM: dts: imx7d: cl-som-imx7: make ethernet work again
net: lpc-enet: fix printk format strings
media: imx: mipi csi-2: Don't fail if initial state times-out
media: omap3isp: Don't set streaming state on random subdevs
media: i2c: ov5645: Fix power sequence
perf record: Support aarch64 random socket_id assignment
dmaengine: iop-adma: use correct printk format strings
media: rc: imon: Allow iMON RC protocol for ffdc 7e device
media: fdp1: Reduce FCP not found message level to debug
media: mtk-mdp: fix reference count on old device tree
perf test vfs_getname: Disable ~/.perfconfig to get default output
media: gspca: zero usb_buf on error
* sched/fair: Use rq_lock/unlock in online_fair_sched_group
kernel/sched/fair.c
efi: cper: print AER info of PCIe fatal error
EDAC, pnd2: Fix ioremap() size in dnv_rd_reg()
ACPI / processor: don't print errors for processorIDs == 0xff
md: don't set In_sync if array is frozen
md: don't call spare_active in md_reap_sync_thread if all member devices can't work
md/raid1: end bio when the device faulty
ASoC: rsnd: don't call clk_get_rate() under atomic context
EDAC/altera: Use the proper type for the IRQ status bits
ia64:unwind: fix double free for mod->arch.init_unw_table
* ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
sound/usb/pcm.c
* base: soc: Export soc_device_register/unregister APIs
drivers/base/soc.c
media: iguanair: add sanity checks
* EDAC/mc: Fix grain_bits calculation
drivers/edac/edac_mc.c
ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls()
ALSA: hda - Show the fatal CORB/RIRB error more clearly
x86/apic: Soft disable APIC before initializing it
x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails
* sched/core: Fix CPU controller for !RT_GROUP_SCHED
kernel/sched/core.c
* sched/fair: Fix imbalance due to CPU affinity
kernel/sched/fair.c
media: i2c: ov5640: Check for devm_gpiod_get_optional() error
media: hdpvr: Add device num check and handling
media: exynos4-is: fix leaked of_node references
media: mtk-cir: lower de-glitch counter for rc-mm protocol
media: dib0700: fix link error for dibx000_i2c_set_speed
leds: leds-lp5562 allow firmware files up to the maximum length
dmaengine: bcm2835: Print error in case setting DMA mask fails
ASoC: sgtl5000: Fix charge pump source assignment
regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
ALSA: hda: Flush interrupts on disabling
nfc: enforce CAP_NET_RAW for raw sockets
ieee802154: enforce CAP_NET_RAW for raw sockets
ax25: enforce CAP_NET_RAW for raw sockets
appletalk: enforce CAP_NET_RAW for raw sockets
mISDN: enforce CAP_NET_RAW for raw sockets
net/mlx5: Add device ID of upcoming BlueField-2
* usbnet: sanity checking of packet sizes and device mtu
drivers/net/usb/usbnet.c
* usbnet: ignore endpoints with invalid wMaxPacketSize
drivers/net/usb/usbnet.c
skge: fix checksum byte order
* sch_netem: fix a divide by zero in tabledist()
net/sched/sch_netem.c
* ppp: Fix memory leak in ppp_write
drivers/net/ppp/ppp_generic.c
openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
* net_sched: add max len check for TCA_KIND
net/sched/sch_api.c
net/sched: act_sample: don't push mac header on ip6gre ingress
* net: qrtr: Stop rx_worker before freeing node
net/qrtr/qrtr.c
net/phy: fix DP83865 10 Mbps HDX loopback disable function
macsec: drop skb sk before calling gro_cells_receive
* cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
drivers/net/usb/cdc_ncm.c
arcnet: provide a buffer big enough to actually receive packets
* f2fs: use generic EFSBADCRC/EFSCORRUPTED
fs/f2fs/checkpoint.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/node.c
fs/f2fs/recovery.c
fs/f2fs/segment.c
fs/f2fs/segment.h
fs/f2fs/super.c
Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
xfs: don't crash on null attr fork xfs_bmapi_read
ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
net: don't warn in inet diag when IPV6 is disabled
* drm: Flush output polling on shutdown
drivers/gpu/drm/drm_probe_helper.c
* f2fs: fix to do sanity check on segment bitmap of LFS curseg
fs/f2fs/segment.c
dm zoned: fix invalid memory access
* Revert "f2fs: avoid out-of-range memory access"
fs/f2fs/segment.c
* blk-mq: move cancel of requeue_work to the front of blk_exit_queue
block/blk-mq.c
block/blk-sysfs.c
PCI: hv: Avoid use of hv_pci_dev->pci_slot after freeing it
* f2fs: check all the data segments against all node ones
fs/f2fs/super.c
* irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
drivers/irqchip/irq-gic-v3-its.c
locking/lockdep: Add debug_locks check in __lock_downgrade()
* power: supply: sysfs: ratelimit property read error message
drivers/power/supply/power_supply_sysfs.c
pinctrl: sprd: Use define directive for sprd_pinconf_params values
objtool: Clobber user CFLAGS variable
ALSA: hda - Apply AMD controller workaround for Raven platform
ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
* arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field
arch/arm64/kernel/cpufeature.c
ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()
media: tvp5150: fix switch exit in set control handler
iwlwifi: mvm: send BCAST management frames to the right station
crypto: talitos - fix missing break in switch statement
mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
HID: hidraw: Fix invalid read in hidraw_ioctl
HID: logitech: Fix general protection fault caused by Logitech driver
* HID: sony: Fix memory corruption issue on cleanup.
drivers/hid/hid-sony.c
HID: prodikeys: Fix general protection fault during probe
* IB/core: Add an unbound WQ type to the new CQ API
include/rdma/ib_verbs.h
* objtool: Query pkg-config for libelf location
Makefile
powerpc/xive: Fix bogus error code returned by OPAL
* Revert "Bluetooth: validate BLE connection interval updates"
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
* BACKPORT: block: annotate refault stalls from IO submission
block/bio.c
block/blk-core.c
include/linux/blk_types.h
* ext4: add verity flag check for dax
fs/ext4/inode.c
* ANDROID: usb: gadget: Fix dependency for f_accessory
drivers/usb/gadget/Kconfig
* ANDROID: sched: fair: balance for single core cluster
kernel/sched/fair.c
UPSTREAM: mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y
* f2fs: add a condition to detect overflow in f2fs_ioc_gc_range()
fs/f2fs/file.c
* f2fs: fix to add missing F2FS_IO_ALIGNED() condition
fs/f2fs/data.c
fs/f2fs/segment.c
* f2fs: fix to fallback to buffered IO in IO aligned mode
fs/f2fs/f2fs.h
* f2fs: fix to handle error path correctly in f2fs_map_blocks
fs/f2fs/data.c
* f2fs: fix extent corrupotion during directIO in LFS mode
fs/f2fs/data.c
* f2fs: check all the data segments against all node ones
fs/f2fs/super.c
* f2fs: Add a small clarification to CONFIG_FS_F2FS_FS_SECURITY
fs/f2fs/Kconfig
* f2fs: fix inode rwsem regression
fs/f2fs/file.c
* f2fs: fix to avoid accessing uninitialized field of inode page in is_alive()
fs/f2fs/dir.c
fs/f2fs/inline.c
* f2fs: avoid infinite GC loop due to stale atomic files
fs/f2fs/file.c
fs/f2fs/segment.c
* f2fs: Fix indefinite loop in f2fs_gc()
fs/f2fs/gc.c
* f2fs: convert inline_data in prior to i_size_write
fs/f2fs/file.c
* f2fs: fix error path of f2fs_convert_inline_page()
fs/f2fs/inline.c
f2fs: add missing documents of reserve_root/resuid/resgid
* f2fs: fix flushing node pages when checkpoint is disabled
fs/f2fs/node.c
* f2fs: enhance f2fs_is_checkpoint_ready()'s readability
fs/f2fs/data.c
fs/f2fs/file.c
fs/f2fs/inode.c
fs/f2fs/namei.c
fs/f2fs/segment.c
fs/f2fs/segment.h
fs/f2fs/xattr.c
* f2fs: clean up __bio_alloc()'s parameter
fs/f2fs/data.c
* f2fs: fix wrong error injection path in inc_valid_block_count()
fs/f2fs/f2fs.h
* f2fs: fix to writeout dirty inode during node flush
fs/f2fs/node.c
* f2fs: optimize case-insensitive lookups
fs/f2fs/dir.c
fs/f2fs/f2fs.h
* f2fs: introduce f2fs_match_name() for cleanup
fs/f2fs/dir.c
* f2fs: Fix indefinite loop in f2fs_gc()
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/segment.h
* f2fs: allocate memory in batch in build_sit_info()
fs/f2fs/segment.c
fs/f2fs/segment.h
* f2fs: fix to avoid data corruption by forbidding SSR overwrite
fs/f2fs/segment.c
* f2fs: Fix build error while CONFIG_NLS=m
fs/f2fs/Kconfig
* Revert "f2fs: avoid out-of-range memory access"
fs/f2fs/segment.c
* f2fs: cleanup the code in build_sit_entries.
fs/f2fs/segment.c
* f2fs: fix wrong available node count calculation
fs/f2fs/node.c
fs/f2fs/super.c
* f2fs: remove duplicate code in f2fs_file_write_iter
fs/f2fs/file.c
* f2fs: fix to migrate blocks correctly during defragment
fs/f2fs/file.c
* f2fs: use wrapped f2fs_cp_error()
fs/f2fs/inode.c
* f2fs: fix to use more generic EOPNOTSUPP
fs/f2fs/file.c
* f2fs: use wrapped IS_SWAPFILE()
fs/f2fs/f2fs.h
* f2fs: Support case-insensitive file name lookups
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/hash.c
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/namei.c
fs/f2fs/super.c
* f2fs: include charset encoding information in the superblock
fs/f2fs/f2fs.h
fs/f2fs/super.c
fs/f2fs/sysfs.c
include/linux/f2fs_fs.h
* fs: Reserve flag for casefolding
include/uapi/linux/fs.h
* f2fs: fix to avoid call kvfree under spinlock
fs/f2fs/f2fs.h
* fs: f2fs: Remove unnecessary checks of SM_I(sbi) in update_general_status()
fs/f2fs/debug.c
* f2fs: disallow direct IO in atomic write
fs/f2fs/file.c
* f2fs: fix to handle quota_{on,off} correctly
fs/f2fs/super.c
* f2fs: fix to detect cp error in f2fs_setxattr()
fs/f2fs/xattr.c
* f2fs: fix to spread f2fs_is_checkpoint_ready()
fs/f2fs/file.c
fs/f2fs/namei.c
fs/f2fs/xattr.c
* f2fs: support fiemap() for directory inode
fs/f2fs/data.c
fs/f2fs/inline.c
fs/f2fs/namei.c
* f2fs: fix to avoid discard command leak
fs/f2fs/segment.c
* f2fs: fix to avoid tagging SBI_QUOTA_NEED_REPAIR incorrectly
fs/f2fs/inode.c
* f2fs: fix to drop meta/node pages during umount
fs/f2fs/super.c
* f2fs: disallow switching io_bits option during remount
fs/f2fs/super.c
* f2fs: fix panic of IO alignment feature
fs/f2fs/data.c
fs/f2fs/super.c
include/linux/f2fs_fs.h
* f2fs: introduce {page,io}_is_mergeable() for readability
fs/f2fs/data.c
* f2fs: fix livelock in swapfile writes
fs/f2fs/data.c
* f2fs: add fs-verity support
fs/f2fs/Makefile
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/inode.c
fs/f2fs/super.c
fs/f2fs/sysfs.c
fs/f2fs/xattr.h
ext4: update on-disk format documentation for fs-verity
* ext4: add fs-verity read support
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/readpage.c
fs/ext4/super.c
* ext4: add basic fs-verity support
fs/ext4/Makefile
fs/ext4/ext4.h
fs/ext4/file.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/super.c
fs/ext4/sysfs.c
* fs-verity: support builtin file signatures
fs/verity/Kconfig
* fs-verity: add SHA-512 support
include/uapi/linux/fsverity.h
* fs-verity: implement FS_IOC_MEASURE_VERITY ioctl
include/linux/fsverity.h
* fs-verity: implement FS_IOC_ENABLE_VERITY ioctl
include/linux/fsverity.h
* fs-verity: add data verification hooks for ->readpages()
include/linux/fsverity.h
* fs-verity: add the hook for file ->setattr()
include/linux/fsverity.h
* fs-verity: add the hook for file ->open()
include/linux/fsverity.h
* fs-verity: add inode and superblock fields
include/linux/fs.h
* fs-verity: add Kconfig and the helper functions for hashing
fs/Kconfig
fs/Makefile
fs/verity/Kconfig
* fs: uapi: define verity bit for FS_IOC_GETFLAGS
include/uapi/linux/fs.h
* fs-verity: add UAPI header
include/uapi/linux/fsverity.h
fs-verity: add MAINTAINERS file entry
fs-verity: add a documentation file
* ext4: fix kernel oops caused by spurious casefold flag
fs/ext4/dir.c
fs/ext4/hash.c
fs/ext4/inode.c
fs/ext4/namei.c
* ext4: fix coverity warning on error path of filename setup
fs/ext4/namei.c
* ext4: optimize case-insensitive lookups
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/namei.c
include/linux/unicode.h
* ext4: fix dcache lookup of !casefolded directories
fs/ext4/dir.c
unicode: update to Unicode 12.1.0 final
unicode: add missing check for an error return from utf8lookup()
* ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present
fs/ext4/sysfs.c
* unicode: refactor the rule for regenerating utf8data.h
scripts/Makefile
* ext4: Support case-insensitive file name lookups
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/hash.c
fs/ext4/ialloc.c
fs/ext4/inline.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/namei.c
fs/ext4/super.c
include/linux/fs.h
* ext4: include charset encoding information in the superblock
fs/ext4/ext4.h
fs/ext4/super.c
unicode: update unicode database unicode version 12.1.0
* unicode: introduce test module for normalized utf8 implementation
fs/unicode/Kconfig
* unicode: implement higher level API for string handling
include/linux/unicode.h
unicode: reduce the size of utf8data[]
unicode: introduce code for UTF-8 normalization
* unicode: introduce UTF-8 character database
fs/Kconfig
fs/Makefile
fs/unicode/Kconfig
scripts/Makefile
* ext4 crypto: fix to check feature status before get policy
fs/ext4/ioctl.c
fscrypt: document the new ioctls and policy version
ubifs: wire up new fscrypt ioctls
* f2fs: wire up new fscrypt ioctls
fs/f2fs/file.c
fs/f2fs/super.c
* ext4: wire up new fscrypt ioctls
fs/ext4/ioctl.c
fs/ext4/super.c
* fscrypt: require that key be added when setting a v2 encryption policy
fs/crypto/fscrypt_private.h
fs/crypto/keyring.c
fs/crypto/policy.c
* fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS ioctl
fs/crypto/keyring.c
include/linux/fscrypt.h
include/uapi/linux/fscrypt.h
* fscrypt: allow unprivileged users to add/remove keys for v2 policies
fs/crypto/fscrypt_private.h
fs/crypto/keyring.c
fs/crypto/keysetup.c
include/uapi/linux/fscrypt.h
* fscrypt: v2 encryption policy support
fs/crypto/crypto.c
fs/crypto/fname.c
fs/crypto/fscrypt_private.h
fs/crypto/keyring.c
fs/crypto/keysetup.c
fs/crypto/keysetup_v1.c
fs/crypto/policy.c
include/linux/fscrypt.h
include/uapi/linux/fscrypt.h
* fscrypt: add an HKDF-SHA512 implementation
fs/crypto/Kconfig
fs/crypto/Makefile
fs/crypto/fscrypt_private.h
fs/crypto/hkdf.c
* fscrypt: add FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctl
fs/crypto/keyring.c
include/linux/fscrypt.h
include/uapi/linux/fscrypt.h
* fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl
fs/crypto/fscrypt_private.h
fs/crypto/keyring.c
fs/crypto/keysetup.c
include/linux/fscrypt.h
include/uapi/linux/fscrypt.h
* fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl
fs/crypto/Makefile
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
fs/crypto/keyring.c
fs/crypto/keysetup.c
fs/super.c
include/linux/fs.h
include/linux/fscrypt.h
include/uapi/linux/fscrypt.h
* fscrypt: rename keyinfo.c to keysetup.c
fs/crypto/Makefile
fs/crypto/fscrypt_private.h
include/linux/fscrypt.h
* fscrypt: move v1 policy key setup to keysetup_v1.c
fs/crypto/Makefile
fs/crypto/fscrypt_private.h
fs/crypto/keysetup_v1.c
* fscrypt: refactor key setup code in preparation for v2 policies
fs/crypto/fscrypt_private.h
* fscrypt: rename fscrypt_master_key to fscrypt_direct_key
fs/crypto/fscrypt_private.h
* fscrypt: add ->ci_inode to fscrypt_info
fs/crypto/fscrypt_private.h
* fscrypt: use FSCRYPT_* definitions, not FS_*
fs/crypto/crypto.c
fs/crypto/fname.c
fs/crypto/fscrypt_private.h
fs/crypto/policy.c
include/uapi/linux/fscrypt.h
* fscrypt: use FSCRYPT_ prefix for uapi constants
include/uapi/linux/fscrypt.h
* fs, fscrypt: move uapi definitions to new header <linux/fscrypt.h>
include/linux/fscrypt.h
include/uapi/linux/fs.h
include/uapi/linux/fscrypt.h
fscrypt: use ENOPKG when crypto API support missing
fscrypt: improve warnings for missing crypto API support
fscrypt: improve warning messages for unsupported encryption contexts
* fscrypt: make fscrypt_msg() take inode instead of super_block
fs/crypto/crypto.c
fs/crypto/fname.c
fs/crypto/fscrypt_private.h
fs/crypto/hooks.c
* fscrypt: clean up base64 encoding/decoding
fs/crypto/fname.c
* fscrypt: remove loadable module related code
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
Merge 4.14.146 into android-4.14
Linux 4.14.146
media: technisat-usb2: break out of loop at end of buffer
* tcp: Don't dequeue SYN/FIN-segments from write-queue
net/ipv4/tcp.c
* tcp: Reset send_head when removing skb from write-queue
net/ipv4/tcp.c
* binfmt_elf: move brk out of mmap when doing direct loader exec
fs/binfmt_elf.c
floppy: fix usercopy direction
PCI: kirin: Fix section mismatch warning
iommu/amd: Fix race in increase_address_space()
iommu/amd: Flush old domains in kdump kernel
* keys: Fix missing null pointer check in request_key_auth_describe()
security/keys/request_key_auth.c
x86/hyper-v: Fix overflow bug in fill_gva_list()
x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation
dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
dmaengine: ti: dma-crossbar: Fix a memory leak bug
net: seeq: Fix the function used to release some memory in an error handling path
tools/power turbostat: fix buffer overrun
tools/power x86_energy_perf_policy: Fix argument parsing
tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2
amd-xgbe: Fix error path in xgbe_mod_init()
perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
perf/x86/intel: Restrict period on Nehalem
i2c: designware: Synchronize IRQs when unregistering slave client
sky2: Disable MSI on yet another ASUS boards (P6Xxxx)
ARM: 8901/1: add a criteria for pfn_valid of arm
cifs: Use kzfree() to zero out the password
cifs: set domainName when a domain-key is used in multiuser
* kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol
kernel/kallsyms.c
NFSv2: Fix write regression
NFSv2: Fix eof handling
* netfilter: nf_conntrack_ftp: Fix debug output
net/netfilter/nf_conntrack_ftp.c
x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
* r8152: Set memory to all 0xFFs on failed reg reads
drivers/net/usb/r8152.c
batman-adv: Only read OGM2 tvlv_len after buffer len check
ARM: 8874/1: mm: only adjust sections of valid mm structures
qed: Add cleanup in qed_slowpath_start()
* Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105
drivers/atm/Kconfig
NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
NFSv4: Fix return value in nfs_finish_open()
NFSv4: Fix return values for nfs4_file_open()
netfilter: xt_nfacct: Fix alignment mismatch in xt_nfacct_match_info
fpga: altera-ps-spi: Fix getting of optional confd gpio
s390/bpf: use 32-bit index for tail calls
ARM: dts: dra74x: Fix iodelay configuration for mmc3
ARM: OMAP2+: Fix omap4 errata warning on other SoCs
s390/bpf: fix lcgr instruction encoding
ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss
* nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds
net/wireless/nl80211.c
mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
tty/serial: atmel: reschedule TX after RX was started
serial: sprd: correct the wrong sequence of arguments
firmware: google: check if size is valid when decoding VPD data
KVM: coalesced_mmio: add bounds checking
* net_sched: let qdisc_put() accept NULL pointer
net/sched/sch_generic.c
xen-netfront: do not assume sk_buff_head list is empty in error handling
media: tm6000: double free if usb disconnect while streaming
phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current
* USB: usbcore: Fix slab-out-of-bounds bug during device reset
drivers/usb/core/config.c
powerpc/mm/radix: Use the right page size for vmemmap mapping
Input: elan_i2c - remove Lenovo Legion Y7000 PnpID
HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report
ANDROID: arm64: bpf: implement arch_bpf_jit_check_func
* ANDROID: bpf: validate bpf_func when BPF_JIT is enabled with CFI
include/linux/filter.h
kernel/bpf/core.c
net/Kconfig
UPSTREAM: kcm: use BPF_PROG_RUN
* UPSTREAM: psi: get poll_work to run when calling poll syscall next time
kernel/sched/psi.c
* UPSTREAM: sched/psi: Do not require setsched permission from the trigger creator
kernel/sched/psi.c
* UPSTREAM: sched/psi: Reduce psimon FIFO priority
kernel/sched/psi.c
Merge 4.14.145 into android-4.14
Linux 4.14.145
x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
* nvmem: Use the same permissions for eeprom as for nvmem
drivers/nvmem/core.c
platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table
Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
firmware: ti_sci: Always request response from firmware
crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
crypto: talitos - Do not modify req->cryptlen on decryption.
crypto: talitos - fix ECB algs ivsize
crypto: talitos - check data blocksize in ablkcipher.
crypto: talitos - fix CTR alg blocksize
crypto: talitos - check AES key size
* driver core: Fix use-after-free and double free on glue directory
drivers/base/core.c
ubifs: Correctly use tnc_next() in search_dh_cookie()
* PCI: Always allow probing with driver_override
drivers/pci/pci-driver.c
mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
clk: rockchip: Don't yell about bad mmc phases when getting
drm/meson: Add support for XBGR8888 & ABGR8888 formats
powerpc: Add barrier_nospec to raw_copy_in_user()
MIPS: VDSO: Use same -m%-float cflag as the kernel proper
MIPS: VDSO: Prevent use of smp_processor_id()
KVM: nVMX: handle page fault in vmread
KVM: x86: work around leak of uninitialized stack contents
KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
* genirq: Prevent NULL pointer dereference in resend_irqs()
kernel/irq/resend.c
Btrfs: fix assertion failure during fsync and use of stale transaction
* gpio: fix line flag validation in lineevent_create
drivers/gpio/gpiolib.c
* gpio: fix line flag validation in linehandle_create
drivers/gpio/gpiolib.c
gpiolib: acpi: Add gpiolib_acpi_run_edge_events_on_boot option and blacklist
Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
btrfs: correctly validate compression type
btrfs: compression: add helper for type to string conversion
* tun: fix use-after-free when register netdev failed
drivers/net/tun.c
tipc: add NULL pointer check before calling kfree_rcu
* tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
net/ipv4/tcp_input.c
sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
net: phylink: Fix flow control resolution
* net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
net/core/skbuff.c
* net: Fix null de-reference of device refcount
net/core/dev.c
isdn/capi: check message length in capi_write()
* ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
net/ipv6/ping.c
* cdc_ether: fix rndis support for Mediatek based smartphones
drivers/net/usb/cdc_ether.c
* bridge/mdb: remove wrong use of NLM_F_MULTI
net/bridge/br_mdb.c
Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* BACKPORT: arm64: Add support for relocating the kernel with RELR relocations
Makefile
arch/Kconfig
arch/arm64/Kconfig
arch/arm64/kernel/head.S
arch/arm64/kernel/vmlinux.lds.S
init/Kconfig
* ANDROID: Log which device failed to suspend in dpm_suspend_start()
drivers/base/power/main.c
kernel/power/suspend.c
* ANDROID: Revert "ANDROID: sched: Disallow WALT with CFS bandwidth control"
init/Kconfig
* ANDROID: sched: WALT: Add support for CFS_BANDWIDTH
kernel/sched/fair.c
* ANDROID: sched: WALT: Refactor cumulative runnable average fixup
kernel/sched/deadline.c
kernel/sched/fair.c
kernel/sched/rt.c
kernel/sched/sched.h
kernel/sched/stop_task.c
kernel/sched/walt.h
Merge 4.14.144 into android-4.14
Linux 4.14.144
vhost: make sure log_num < in_num
* kernel/module: Fix mem leak in module_add_modinfo_attrs
kernel/module.c
clk: s2mps11: Add used attribute to s2mps11_dt_match
scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
arm64: dts: rockchip: enable usb-host regulators at boot on rk3328-rock64
powerpc/64: mark start_here_multiplatform as __ref
hv_sock: Fix hang when a connection is closed
batman-adv: Only read OGM tvlv_len after buffer len check
batman-adv: fix uninit-value in batadv_netlink_get_ifindex()
vhost/test: fix build for vhost test
PCI: dra7xx: Fix legacy INTD IRQ handling
PCI: designware-ep: Fix find_first_zero_bit() usage
* ip6: fix skb leak in ip6frag_expire_frag_queue()
include/net/ipv6_frag.h
* xfrm: clean up xfrm protocol checks
include/net/xfrm.h
net/key/af_key.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c
powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
drm/vmwgfx: Fix double free in vmw_recv_msg()
* sched/fair: Don't assign runtime for throttled cfs_rq
kernel/sched/fair.c
ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre
ALSA: hda/realtek - Fix overridden device-specific initialization
ALSA: hda - Fix potential endless loop at applying quirks
fscrypt: document testing with xfstests
* fscrypt: remove selection of CONFIG_CRYPTO_SHA256
fs/crypto/Kconfig
* fscrypt: remove unnecessary includes of ratelimit.h
fs/crypto/fname.c
fs/crypto/hooks.c
* fscrypt: don't set policy for a dead directory
fs/crypto/policy.c
* fscrypt: decrypt only the needed blocks in __fscrypt_decrypt_bio()
fs/crypto/bio.c
* fscrypt: support decrypting multiple filesystem blocks per page
fs/crypto/bio.c
fs/crypto/crypto.c
fs/ext4/inode.c
include/linux/fscrypt.h
* fscrypt: introduce fscrypt_decrypt_block_inplace()
fs/crypto/crypto.c
include/linux/fscrypt.h
* fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range()
fs/crypto/bio.c
* fscrypt: support encrypting multiple filesystem blocks per page
fs/crypto/crypto.c
fs/ext4/page-io.c
fs/f2fs/data.c
include/linux/fscrypt.h
* fscrypt: introduce fscrypt_encrypt_block_inplace()
fs/crypto/crypto.c
include/linux/fscrypt.h
* fscrypt: clean up some BUG_ON()s in block encryption/decryption
fs/crypto/crypto.c
* fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block()
fs/crypto/bio.c
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
* fscrypt: remove the "write" part of struct fscrypt_ctx
fs/crypto/bio.c
fs/crypto/crypto.c
include/linux/fscrypt.h
* fscrypt: simplify bounce page handling
fs/crypto/bio.c
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
fs/ext4/page-io.c
fs/f2fs/data.c
include/linux/fscrypt.h
Change-Id: I15fbf188f7373d8ef3c58e06ec09174054909a1d
Signed-off-by: Robin Peng <robinpeng@google.com>
|
||
|
|
05fade62bd |
kprobes: Prohibit probing on BUG() and WARN() address
[ Upstream commit e336b4027775cb458dc713745e526fa1a1996b2a ] Since BUG() and WARN() may use a trap (e.g. UD2 on x86) to get the address where the BUG() has occurred, kprobes can not do single-step out-of-line that instruction. So prohibit probing on such address. Without this fix, if someone put a kprobe on WARN(), the kernel will crash with invalid opcode error instead of outputing warning message, because kernel can not find correct bug address. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: David S . Miller <davem@davemloft.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Naveen N . Rao <naveen.n.rao@linux.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/156750890133.19112.3393666300746167111.stgit@devnote2 Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
|
|
b530a30789 |
kernel/lib: add additional debug capabilities for data corruption
Data corruptions in the kernel often end up in system crashes that are easier to debug closer to the time of detection. Specifically, if we do not panic immediately after lock or list corruptions have been detected, the problem context is lost in the ensuing system mayhem. Add support for BUG_ON immediately after such corruptions are detected. The CONFIG option controls the enabling/disabling of the feature. Change-Id: I9b2eb62da506a13007acff63e85e9515145909ff Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org> Signed-off-by: Patrick Daly <pdaly@codeaurora.org> Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org> |
||
|
|
b24413180f |
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|
|
bc6245e5ef |
bug: split BUILD_BUG stuff out into <linux/build_bug.h>
Including <linux/bug.h> pulls in a lot of bloat from <asm/bug.h> and <asm-generic/bug.h> that is not needed to call the BUILD_BUG() family of macros. Split them out into their own header, <linux/build_bug.h>. Also correct some checkpatch.pl errors for the BUILD_BUG_ON_ZERO() and BUILD_BUG_ON_NULL() macros by adding parentheses around the bitfield widths that begin with a minus sign. Link: http://lkml.kernel.org/r/20170525120316.24473-6-abbotti@mev.co.uk Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
47e81e59d9 |
linux/bug.h: correct "space required before that '-'"
Correct these checkpatch.pl errors:
|ERROR: space required before that '-' (ctx:OxO)
|#37: FILE: include/linux/bug.h:37:
|+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
|ERROR: space required before that '-' (ctx:OxO)
|#38: FILE: include/linux/bug.h:38:
|+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
I decided to wrap the bitfield expressions that begin with minus signs
in parentheses rather than insert spaces before the minus signs.
Link: http://lkml.kernel.org/r/20170525120316.24473-5-abbotti@mev.co.uk
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|
|
8cdd7cca92 |
linux/bug.h: correct "(foo*)" should be "(foo *)"
Correct this checkpatch.pl error: |ERROR: "(foo*)" should be "(foo *)" |#19: FILE: include/linux/bug.h:19: |+#define BUILD_BUG_ON_NULL(e) ((void*)0) Link: http://lkml.kernel.org/r/20170525120316.24473-4-abbotti@mev.co.uk Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Kees Cook <keescook@chromium.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
e9d5a48499 |
linux/bug.h: correct formatting of block comment
Correct these checkpatch.pl warnings: |WARNING: Block comments use * on subsequent lines |#34: FILE: include/linux/bug.h:34: |+/* Force a compilation error if condition is true, but also produce a |+ result (of value 0 and type size_t), so the expression can be used |WARNING: Block comments use a trailing */ on a separate line |#36: FILE: include/linux/bug.h:36: |+ aren't permitted). */ Link: http://lkml.kernel.org/r/20170525120316.24473-3-abbotti@mev.co.uk Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Kees Cook <keescook@chromium.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
19d436268d |
debug: Add _ONCE() logic to report_bug()
Josh suggested moving the _ONCE logic inside the trap handler, using a bit in the bug_entry::flags field, avoiding the need for the extra variable. Sadly this only works for WARN_ON_ONCE(), since the others have printk() statements prior to triggering the trap. Still, this saves a fair amount of text and some data: text data filename 10682460 4530992 defconfig-build/vmlinux.orig 10665111 4530096 defconfig-build/vmlinux.patched Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> |
||
|
|
85caa95b9f |
bug: switch data corruption check to __must_check
The CHECK_DATA_CORRUPTION() macro was designed to have callers do something meaningful/protective on failure. However, using "return false" in the macro too strictly limits the design patterns of callers. Instead, let callers handle the logic test directly, but make sure that the result IS checked by forcing __must_check (which appears to not be able to be used directly on macro expressions). Link: http://lkml.kernel.org/r/20170206204547.GA125312@beast Signed-off-by: Kees Cook <keescook@chromium.org> Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
de54ebbe26 |
bug: Provide toggle for BUG on data corruption
The kernel checks for cases of data structure corruption under some
CONFIGs (e.g. CONFIG_DEBUG_LIST). When corruption is detected, some
systems may want to BUG() immediately instead of letting the system run
with known corruption. Usually these kinds of manipulation primitives can
be used by security flaws to gain arbitrary memory write control. This
provides a new config CONFIG_BUG_ON_DATA_CORRUPTION and a corresponding
macro CHECK_DATA_CORRUPTION for handling these situations. Notably, even
if not BUGing, the kernel should not continue processing the corrupted
structure.
This is inspired by similar hardening by Syed Rameez Mustafa in MSM
kernels, and in PaX and Grsecurity, which is likely in response to earlier
removal of the BUG calls in commit
|
||
|
|
3e9b3112ec |
add basic register-field manipulation macros
Common approach to accessing register fields is to define
structures or sets of macros containing mask and shift pair.
Operations on the register are then performed as follows:
field = (reg >> shift) & mask;
reg &= ~(mask << shift);
reg |= (field & mask) << shift;
Defining shift and mask separately is tedious. Ivo van Doorn
came up with an idea of computing them at compilation time
based on a single shifted mask (later refined by Felix) which
can be used like this:
#define REG_FIELD 0x000ff000
field = FIELD_GET(REG_FIELD, reg);
reg &= ~REG_FIELD;
reg |= FIELD_PREP(REG_FIELD, field);
FIELD_{GET,PREP} macros take care of finding out what the
appropriate shift is based on compilation time ffs operation.
GENMASK can be used to define registers (which is usually
less error-prone and easier to match with datasheets).
This approach is the most convenient I've seen so to limit code
multiplication let's move the macros to a global header file.
Attempts to use static inlines instead of macros failed due
to false positive triggering of BUILD_BUG_ON()s, especially with
GCC < 6.0.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dinan Gunawardena <dinan.gunawardena@netronome.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||
|
|
ff20c2e0ac |
mm: Some arch may want to use HPAGE_PMD related values as variables
With next generation power processor, we are having a new mmu model [1] that require us to maintain a different linux page table format. Inorder to support both current and future ppc64 systems with a single kernel we need to make sure kernel can select between different page table format at runtime. With the new MMU (radix MMU) added, we will have two different pmd hugepage size 16MB for hash model and 2MB for Radix model. Hence make HPAGE_PMD related values as a variable. Actual conversion of HPAGE_PMD to a variable for ppc64 happens in a followup patch. [1] http://ibm.biz/power-isa3 (Needs registration). Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> |
||
|
|
9a8ab1c399 |
bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
Introduce compiletime_assert to compiler.h, which moves the details of how to break a build and emit an error message for a specific compiler to the headers where these details should be. Following in the tradition of the POSIX assert macro, compiletime_assert creates a build-time error when the supplied condition is *false*. Next, we add BUILD_BUG_ON_MSG to bug.h which simply wraps compiletime_assert, inverting the logic, so that it fails when the condition is *true*, consistent with the language "build bug on." This macro allows you to specify the error message you want emitted when the supplied condition is true. Finally, we remove all other code from bug.h that mucks with these details (BUILD_BUG & BUILD_BUG_ON), and have them all call BUILD_BUG_ON_MSG. This not only reduces source code bloat, but also prevents the possibility of code being changed for one macro and not for the other (which was previously the case for BUILD_BUG and BUILD_BUG_ON). Since __compiletime_error_fallback is now only used in compiler.h, I'm considering it a private macro and removing the double negation that's now extraneous. [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: David Rientjes <rientjes@google.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
c361d3e543 |
compiler.h, bug.h: prevent double error messages with BUILD_BUG{,_ON}
Prior to the introduction of __attribute__((error("msg"))) in gcc 4.3,
creating compile-time errors required a little trickery.
BUILD_BUG{,_ON} uses this attribute when available to generate
compile-time errors, but also uses the negative-sized array trick for
older compilers, resulting in two error messages in some cases. The
reason it's "some" cases is that as of gcc 4.4, the negative-sized array
will not create an error in some situations, like inline functions.
This patch replaces the negative-sized array code with the new
__compiletime_error_fallback() macro which expands to the same thing
unless the the error attribute is available, in which case it expands to
do{}while(0), resulting in exactly one compile-time error on all
versions of gcc.
Note that we are not changing the negative-sized array code for the
unoptimized version of BUILD_BUG_ON, since it has the potential to catch
problems that would be disabled in later versions of gcc were
__compiletime_error_fallback used. The reason is that that an
unoptimized build can't always remove calls to an error-attributed
function call (like we are using) that should effectively become dead
code if it were optimized. However, using a negative-sized array with a
similar value will not result in an false-positive (error). The only
caveat being that it will also fail to catch valid conditions, which we
should be expecting in an unoptimized build anyway.
Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Joe Perches <joe@perches.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|
|
a3ccc497cd |
bug.h: make BUILD_BUG_ON generate compile-time error
Negative sized arrays wont create a compile-time error in some cases starting with gcc 4.4 (e.g., inlined functions), but gcc 4.3 introduced the error function attribute that will. This patch modifies BUILD_BUG_ON to behave like BUILD_BUG already does, using the error function attribute so that you don't have to build the entire kernel to discover that you have a problem, and then enjoy trying to track it down from a link-time error. Also, we are only including asm/bug.h and then expecting that linux/compiler.h will eventually be included to define __linktime_error (used in BUILD_BUG_ON). This patch includes it directly for clarity and to avoid the possibility of changes in <arch>/*/include/asm/bug.h being changed or not including linux/compiler.h for some reason. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
1d6a0d19c8 |
bug.h: prevent double evaulation of `condition' in BUILD_BUG_ON
When calling BUILD_BUG_ON in an optimized build using gcc 4.3 and later, the condition will be evaulated twice, possibily with side-effects. This patch eliminates that error. [akpm@linux-foundation.org: tweak code layout] Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: David Rientjes <rientjes@google.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
ca623c914e |
bug.h: fix BUILD_BUG_ON macro in __CHECKER__
When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. However, both BUILD_BUG_ON_NOT_POWER_OF_2 and BUILD_BUG_ON was evaluating to nothing in this case, and we want (0) since this is a function-like macro that will be followed by a semicolon. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
6ae8d04871 |
compiler{,-gcc4}.h, bug.h: Remove duplicate macros
__linktime_error() does the same thing as __compiletime_error() and is only used in bug.h. Since the macro defines a function attribute that will cause a failure at compile-time (not link-time), it makes more sense to keep __compiletime_error(), which is also neatly mated with __compiletime_warning(). Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Andi Kleen <ak@linux.intel.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
c5782e9f5a |
include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID
Commit
|
||
|
|
baf05aa927 |
bug: introduce BUILD_BUG_ON_INVALID() macro
Sometimes we want to check some expressions correctness at compile time. "(void)(e);" or "if (e);" can be dangerous if the expression has side-effects, and gcc sometimes generates a lot of code, even if the expression has no effect. This patch introduces macro BUILD_BUG_ON_INVALID() for such checks, it forces a compilation error if expression is invalid without any extra code. [Cast to "long" required because sizeof does not work for bit-fields.] Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
35edd9103c |
bug: consolidate BUILD_BUG_ON with other bug code
The support for BUILD_BUG in linux/kernel.h predates the
addition of linux/bug.h -- with this chunk off separate,
you can run into situations where a person gets a compile
fail even when they've included linux/bug.h, like this:
CC lib/string.o
lib/string.c: In function 'strlcat':
lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON'
make[2]: *** [lib/string.o] Error 1
$
$ grep linux/bug.h lib/string.c
#include <linux/bug.h>
$
Since the above violates the principle of least surprise, move
the BUG chunks from kernel.h to bug.h so it is all together.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||
|
|
0d9c25dde8 |
headers: move module_bug_finalize()/module_bug_cleanup() definitions into module.h
They're in linux/bug.h at present, which causes include order tangles. In particular, linux/bug.h cannot be used by linux/atomic.h because, according to Nikanth: linux/bug.h pulls in linux/module.h => linux/spinlock.h => asm/spinlock.h (which uses atomic_inc) => asm/atomic.h. bug.h is a pretty low-level thing and module.h is a higher-level thing, IMO. Cc: Nikanth Karthikesan <knikanth@novell.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
608e261968 |
generic bug: use show_regs() instead of dump_stack()
The current generic bug implementation has a call to dump_stack() in case a WARN_ON(whatever) gets hit. Since report_bug(), which calls dump_stack(), gets called from an exception handler we can do better: just pass the pt_regs structure to report_bug() and pass it to show_regs() in case of a warning. This will give more debug informations like register contents, etc... In addition this avoids some pointless lines that dump_stack() emits, since it includes a stack backtrace of the exception handler which is of no interest in case of a warning. E.g. on s390 the following lines are currently always present in a stack backtrace if dump_stack() gets called from report_bug(): [<000000000001517a>] show_trace+0x92/0xe8) [<0000000000015270>] show_stack+0xa0/0xd0 [<00000000000152ce>] dump_stack+0x2e/0x3c [<0000000000195450>] report_bug+0x98/0xf8 [<0000000000016cc8>] illegal_op+0x1fc/0x21c [<00000000000227d6>] sysc_return+0x0/0x10 Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andi Kleen <ak@suse.de> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
7664c5a1da |
[PATCH] Generic BUG implementation
This patch adds common handling for kernel BUGs, for use by architectures as they wish. The code is derived from arch/powerpc. The advantages of having common BUG handling are: - consistent BUG reporting across architectures - shared implementation of out-of-line file/line data - implement CONFIG_DEBUG_BUGVERBOSE consistently This means that in inline impact of BUG is just the illegal instruction itself, which is an improvement for i386 and x86-64. A BUG is represented in the instruction stream as an illegal instruction, which has file/line information associated with it. This extra information is stored in the __bug_table section in the ELF file. When the kernel gets an illegal instruction, it first confirms it might possibly be from a BUG (ie, in kernel mode, the right illegal instruction). It then calls report_bug(). This searches __bug_table for a matching instruction pointer, and if found, prints the corresponding file/line information. If report_bug() determines that it wasn't a BUG which caused the trap, it returns BUG_TRAP_TYPE_NONE. Some architectures (powerpc) implement WARN using the same mechanism; if the illegal instruction was the result of a WARN, then report_bug(Q) returns CONFIG_DEBUG_BUGVERBOSE; otherwise it returns BUG_TRAP_TYPE_BUG. lib/bug.c keeps a list of loaded modules which can be searched for __bug_table entries. The architecture must call module_bug_finalize()/module_bug_cleanup() from its corresponding module_finalize/cleanup functions. Unsetting CONFIG_DEBUG_BUGVERBOSE will reduce the kernel size by some amount. At the very least, filename and line information will not be recorded for each but, but architectures may decide to store no extra information per BUG at all. Unfortunately, gcc doesn't have a general way to mark an asm() as noreturn, so architectures will generally have to include an infinite loop (or similar) in the BUG code, so that gcc knows execution won't continue beyond that point. gcc does have a __builtin_trap() operator which may be useful to achieve the same effect, unfortunately it cannot be used to actually implement the BUG itself, because there's no way to get the instruction's address for use in generating the __bug_table entry. [randy.dunlap@oracle.com: Handle BUG=n, GENERIC_BUG=n to prevent build errors] [bunk@stusta.de: include/linux/bug.h must always #include <linux/module.h] Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Andi Kleen <ak@muc.de> Cc: Hugh Dickens <hugh@veritas.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> |