Commit f2b62eb2 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

Import Debian changes 4.14.7-1parrot7

linux (4.14.7-1parrot7) testing; urgency=medium

  * Import new Debian release.
  * Re-include parrot patches.

linux (4.14.7-1) unstable; urgency=medium

  * New upstream stable update:
    https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.3
    - [s390x] fix transactional execution control register handling
    - [s390x] noexec: execute kexec datamover without DAT
    - [s390x] runtime instrumention: fix possible memory corruption
    - [s390x] guarded storage: fix possible memory corruption
    - [s390x] disassembler: add missing end marker for e7 table
    - [s390x] disassembler: increase show_code buffer size
    - ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock
    - ACPI / EC: Fix regression related to triggering source of EC event
      handling
    - cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq
    - serdev: fix registration of second slave
    - sched: Make resched_cpu() unconditional
    - lib/mpi: call cond_resched() from mpi_powm() loop
    - [x86] boot: Fix boot failure when SMP MP-table is based at 0
    - [x86] decoder: Add new TEST instruction pattern
    - [amd64] entry: Fix entry_SYSCALL_64_after_hwframe() IRQ tracing
    - [x86] perf: intel: Hide TSX events when RTM is not supported
    - [arm64] Implement arch-specific pte_access_permitted()
    - [armhf/armmp-lpae] 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE
    - [armhf/armmp-lpae] 8721/1: mm: dump: check hardware RO bit for LPAE
    - uapi: fix linux/tls.h userspace compilation error
    - uapi: fix linux/rxrpc.h userspace compilation errors
    - [mips*/4kc-malta] cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN don't work
      for 32-bit SMP
    - [armhf,arm64] net: mvneta: fix handling of the Tx descriptor counter
    - nbd: wait uninterruptible for the dead timeout
    - nbd: don't start req until after the dead connection logic
    - PM / OPP: Add missing of_node_put(np)
    - PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time
    - PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD
    - [x86] PCI: hv: Use effective affinity mask
    - [arm64] PCI: Set Cavium ACS capability quirk flags to assert RR/CR/SV/UF
    - [arm64] PCI: Apply Cavium ThunderX ACS quirk to more Root Ports
    - dm integrity: allow unaligned bv_offset
    - dm cache: fix race condition in the writeback mode overwrite_bio
      optimisation
    - dm crypt: allow unaligned bv_offset
    - dm zoned: ignore last smaller runt zone
    - dm mpath: remove annoying message of 'blk_get_request() returned -11'
    - dm bufio: fix integer overflow when limiting maximum cache size
    - ovl: Put upperdentry if ovl_check_origin() fails
    - dm: allocate struct mapped_device with kvzalloc
    - sched/rt: Simplify the IPI based RT balancing logic
    - dm: fix race between dm_get_from_kobject() and __dm_destroy()
    - dm: discard support requires all targets in a table support discards
    - [mips*] Fix odd fp register warnings with MIPS64r2
    - [mips*/4kc-malta] Fix MIPS64 FP save/restore on 32-bit kernels
    - [mips*] dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry
    - [mips*] Fix an n32 core file generation regset support regression
    - [mips*] math-emu: Fix final emulation phase for certain instructions
    - rt2x00usb: mark device removed when get ENOENT usb error
    - mm/z3fold.c: use kref to prevent page free/compact race
    - autofs: don't fail mount for transient error
    - nilfs2: fix race condition that causes file system corruption
    - fscrypt: lock mutex before checking for bounce page pool
    - eCryptfs: use after free in ecryptfs_release_messaging()
    - libceph: don't WARN() if user tries to add invalid key
    - bcache: check ca->alloc_thread initialized before wake up it
    - fs: guard_bio_eod() needs to consider partitions
    - fanotify: fix fsnotify_prepare_user_wait() failure
    - isofs: fix timestamps beyond 2027
    - btrfs: change how we decide to commit transactions during flushing
    - f2fs: expose some sectors to user in inline data or dentry case
    - NFS: Fix typo in nomigration mount option
    - NFS: Revert "NFS: Move the flock open mode check into nfs_flock()"
    - nfs: Fix ugly referral attributes
    - NFS: Avoid RCU usage in tracepoints
    - NFS: revalidate "." etc correctly on "open".
    - nfsd: deal with revoked delegations appropriately
    - rtlwifi: rtl8192ee: Fix memory leak when loading firmware
    - rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
    - iwlwifi: fix firmware names for 9000 and A000 series hw
    - md: fix deadlock error in recent patch.
    - md: don't check MD_SB_CHANGE_CLEAN in md_allow_write
    - Bluetooth: btqcomsmd: Add support for BD address setup
    - md/bitmap: revert a patch
    - fsnotify: clean up fsnotify_prepare/finish_user_wait()
    - fsnotify: pin both inode and vfsmount mark
    - fsnotify: fix pinning group in fsnotify_prepare_user_wait()
    - ata: fixes kernel crash while tracing ata_eh_link_autopsy event
    - ext4: fix interaction between i_size, fallocate, and delalloc after a
      crash
    - ext4: prevent data corruption with inline data + DAX
    - ext4: prevent data corruption with journaling + DAX
    - ALSA: pcm: update tstamp only if audio_tstamp changed
    - ALSA: usb-audio: Add sanity checks to FE parser
    - ALSA: usb-audio: Fix potential out-of-bound access at parsing SU
    - ALSA: usb-audio: Add sanity checks in v2 clock parsers
    - ALSA: timer: Remove kernel warning at compat ioctl error paths
    - ALSA: hda/realtek - Fix ALC275 no sound issue
    - ALSA: hda: Fix too short HDMI/DP chmap reporting
    - ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization
    - ALSA: hda/realtek - Fix ALC700 family no sound issue
    - [x86] mfd: lpc_ich: Avoton/Rangeley uses SPI_BYT method
    - fix a page leak in vhost_scsi_iov_to_sgl() error recovery
    - 9p: Fix missing commas in mount options
    - fs/9p: Compare qid.path in v9fs_test_inode
    - net/9p: Switch to wait_event_killable()
    - scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()
    - scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()
    - scsi: lpfc: fix pci hot plug crash in timer management routines
    - scsi: lpfc: fix pci hot plug crash in list_add call
    - scsi: lpfc: Fix crash receiving ELS while detaching driver
    - scsi: lpfc: Fix FCP hba_wqidx assignment
    - scsi: lpfc: Fix oops if nvmet_fc_register_targetport fails
    - iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
    - iscsi-target: Fix non-immediate TMR reference leak
    - target: fix null pointer regression in core_tmr_drain_tmr_list
    - target: fix buffer offset in core_scsi3_pri_read_full_status
    - target: Fix QUEUE_FULL + SCSI task attribute handling
    - target: Fix caw_sem leak in transport_generic_request_failure
    - target: Fix quiese during transport_write_pending_qf endless loop
    - target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
    - mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid
    - mtd: nand: atmel: Actually use the PM ops
    - mtd: nand: omap2: Fix subpage write
    - mtd: nand: Fix writing mtdoops to nand flash.
    - mtd: nand: mtk: fix infinite ECC decode IRQ issue
    - p54: don't unregister leds when they are not initialized
    - block: Fix a race between blk_cleanup_queue() and timeout handling
    - raid1: prevent freeze_array/wait_all_barriers deadlock
    - genirq: Track whether the trigger type has been set
    - [armhf,arm64] irqchip/gic-v3: Fix ppi-partitions lookup
    - lockd: double unregister of inetaddr notifiers
    - [powerpc*] KVM: Book3S HV: Don't call real-mode XICS hypercall handlers
      if not enabled
    - [x86] KVM: nVMX: set IDTR and GDTR limits when loading L1 host state
    - [x86] KVM: SVM: obey guest PAT
    - [x86] kvm: vmx: Reinstate support for CPUs without virtual NMI
      (Closes: #884482)
    - dax: fix PMD faults on zero-length files
    - dax: fix general protection fault in dax_alloc_inode
    - SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status
    - [armhf] clk: ti: dra7-atl-clock: fix child-node lookups
    - libnvdimm, dimm: clear 'locked' status on successful DIMM enable
    - libnvdimm, pfn: make 'resource' attribute only readable by root
    - libnvdimm, namespace: fix label initialization to use valid seq numbers
    - libnvdimm, region : make 'resource' attribute only readable by root
    - libnvdimm, namespace: make 'resource' attribute only readable by root
    - svcrdma: Preserve CB send buffer across retransmits
    - IB/srpt: Do not accept invalid initiator port names
    - IB/cm: Fix memory corruption in handling CM request
    - IB/hfi1: Fix incorrect available receive user context count
    - IB/srp: Avoid that a cable pull can trigger a kernel crash
    - IB/core: Avoid crash on pkey enforcement failed in received MADs
    - IB/core: Only maintain real QPs in the security lists
    - NFC: fix device-allocation error return
    - spi-nor: intel-spi: Fix broken software sequencing codes
    - fm10k,i40e,i40evf,igb,igbvf,ixgbe,ixgbevf: Use smp_rmb rather than
      read_barrier_depends
    - [hppa] Fix validity check of pointer size argument in new CAS
      implementation
    - [powerpc*] Fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX
    - [powerpc*] mm/radix: Fix crashes on Power9 DD1 with radix MMU and
      STRICT_RWX
    - [powerpc*] perf/imc: Use cpu_to_node() not topology_physical_package_id()
    - [powerpc*] signal: Properly handle return value from uprobe_deny_signal()
    - [powerpc*] 64s: Fix masking of SRR1 bits on instruction fault
    - [powerpc*] 64s/radix: Fix 128TB-512TB virtual address boundary case
      allocation
    - [powerpc*] 64s/hash: Fix 512T hint detection to use >= 128T
    - [powerpc*] 64s/hash: Fix 128TB-512TB virtual address boundary case
      allocation
    - [powerpc*] 64s/hash: Fix fork() with 512TB process address space
    - [powerpc*] 64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary
    - media: Don't do DMA on stack for firmware upload in the AS102 driver
    - media: rc: check for integer overflow
    - media: rc: nec decoder should not send both repeat and keycode
    - media: v4l2-ctrl: Fix flags field on Control events
    - [arm64] media: venus: fix wrong size on dma_free
    - [arm64] media: venus: venc: fix bytesused v4l2_plane field
    - [arm64] media: venus: reimplement decoder stop command
    - [arm64] dts: meson-gxl: Add alternate ARM Trusted Firmware reserved
      memory zone
    - iwlwifi: fix wrong struct for a000 device
    - iwlwifi: fix PCI IDs and configuration mapping for 9000 series
    - iwlwifi: mvm: support version 7 of the SCAN_REQ_UMAC FW command
    - e1000e: Fix error path in link detection
    - e1000e: Fix return value test
    - e1000e: Separate signaling for link check/link up
    - e1000e: Avoid receiver overrun interrupt bursts
    - e1000e: fix buffer overrun while the I219 is processing DMA transactions
    https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.4
    - [x86]: platform: hp-wmi: Fix tablet mode detection for convertibles
    - mm, memory_hotplug: do not back off draining pcp free pages from kworker
      context
    - mm, oom_reaper: gather each vma to prevent leaking TLB entry
    - [armhf,arm64] mm/cma: fix alloc_contig_range ret code/potential leak
    - mm: fix device-dax pud write-faults triggered by get_user_pages()
    - mm, hugetlbfs: introduce ->split() to vm_operations_struct
    - device-dax: implement ->split() to catch invalid munmap attempts
    - mm: introduce get_user_pages_longterm
    - mm: fail get_vaddr_frames() for filesystem-dax mappings
    - v4l2: disable filesystem-dax mapping support
    - IB/core: disable memory registration of filesystem-dax vmas
    - exec: avoid RLIMIT_STACK races with prlimit()
    - mm/madvise.c: fix madvise() infinite loop under special circumstances
    - mm: migrate: fix an incorrect call of prep_transhuge_page()
    - mm, memcg: fix mem_cgroup_swapout() for THPs
    - fs/fat/inode.c: fix sb_rdonly() change
    - autofs: revert "autofs: take more care to not update last_used on path
      walk"
    - autofs: revert "autofs: fix AT_NO_AUTOMOUNT not being honored"
    - mm/hugetlb: fix NULL-pointer dereference on 5-level paging machine
    - btrfs: clear space cache inode generation always
    - nfsd: Fix stateid races between OPEN and CLOSE
    - nfsd: Fix another OPEN stateid race
    - nfsd: fix panic in posix_unblock_lock called from nfs4_laundromat
    - crypto: algif_aead - skip SGL entries with NULL page
    - crypto: af_alg - remove locking in async callback
    - crypto: skcipher - Fix skcipher_walk_aead_common
    - lockd: lost rollback of set_grace_period() in lockd_down_net()
    - [s390x] revert ELF_ET_DYN_BASE base changes
    - [armhf] drm: omapdrm: Fix DPI on platforms using the DSI VDDS
    - [armhf] omapdrm: hdmi4: Correct the SoC revision matching
    - [arm64] module-plts: factor out PLT generation code for ftrace
    - [arm64] ftrace: emit ftrace-mod.o contents through code
    - [powerpc*] powernv: Fix kexec crashes caused by tlbie tracing
    - [powerpc*] kexec: Fix kexec/kdump in P9 guest kernels
    - [x86] KVM: pvclock: Handle first-time write to pvclock-page contains
      random junk
    - [x86] KVM: Exit to user-mode on #UD intercept when emulator requires
    - [x86] KVM: inject exceptions produced by x86_decode_insn
    - [x86] KVM: lapic: Split out x2apic ldr calculation
    - [x86] KVM: lapic: Fixup LDR on load in x2apic
    - mmc: sdhci: Avoid swiotlb buffer being full
    - mmc: block: Fix missing blk_put_request()
    - mmc: block: Check return value of blk_get_request()
    - mmc: core: Do not leave the block driver in a suspended state
    - mmc: block: Ensure that debugfs files are removed
    - mmc: core: prepend 0x to pre_eol_info entry in sysfs
    - mmc: core: prepend 0x to OCR entry in sysfs
    - ACPI / EC: Fix regression related to PM ops support in ECDT device
    - eeprom: at24: fix reading from 24MAC402/24MAC602
    - eeprom: at24: correctly set the size for at24mac402
    - eeprom: at24: check at24_read/write arguments
    - [alpha,x86] i2c: i801: Fix Failed to allocate irq -2147483648 error
    - bcache: Fix building error on MIPS
    - bcache: only permit to recovery read error when cache device is clean
    - bcache: recover data from backing when data is clean
    - hwmon: (jc42) optionally try to disable the SMBUS timeout
    - nvme-pci: add quirk for delay before CHK RDY for WDC SN200
    - Revert "drm/radeon: dont switch vt on suspend"
    - drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
    - drm/amdgpu: Potential uninitialized variable in
      amdgpu_vm_update_directories()
    - drm/amdgpu: correct reference clock value on vega10
    - drm/amdgpu: fix error handling in amdgpu_bo_do_create
    - drm/amdgpu: Properly allocate VM invalidate eng v2
    - drm/amdgpu: Remove check which is not valid for certain VBIOS
    - drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more
    - dma-buf: make reservation_object_copy_fences rcu save
    - drm/amdgpu: reserve root PD while releasing it
    - drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list
    - drm/vblank: Fix flip event vblank count
    - drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug
    - drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode()
    - drm/radeon: fix atombios on big endian
    - drm/panel: simple: Add missing panel_simple_unprepare() calls
    - [arm64] drm/hisilicon: Ensure LDI regs are properly configured.
    - drm/ttm: once more fix ttm_buffer_object_transfer
    - drm/amd/pp: fix typecast error in powerplay.
    - drm/fb_helper: Disable all crtc's when initial setup fails.
    - drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks
    - drm/amdgpu: move UVD/VCE and VCN structure out from union
    - drm/amdgpu: Set adev->vcn.irq.num_types for VCN
    - IB/core: Do not warn on lid conversions for OPA
    - IB/hfi1: Do not warn on lid conversions for OPA
    - e1000e: fix the use of magic numbers for buffer overrun issue
    - md: forbid a RAID5 from having both a bitmap and a journal.
    - [x86] drm/i915: Fix false-positive assert_rpm_wakelock_held in
      i915_pmic_bus_access_notifier v2
    - [x86] drm/i915: Re-register PMIC bus access notifier on runtime resume
    - [x86] drm/i915/fbdev: Serialise early hotplug events with async fbdev
      config
    - [x86] drm/i915/gvt: Correct ADDR_4K/2M/1G_MASK definition
    - [x86] drm/i915: Don't try indexed reads to alternate slave addresses
    - [x86] drm/i915: Prevent zero length "index" write
    https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.5
    - drm/amdgpu: Use unsigned ring indices in amdgpu_queue_mgr_map
    - [s390x] runtime instrumentation: simplify task exit handling
    - usbip: fix usbip attach to find a port that matches the requested speed
    - usbip: Fix USB device hang due to wrong enabling of scatter-gather
    - uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices
    - usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub
    - serial: 8250_early: Only set divisor if valid clk & baud
    - [mips*] Add custom serial.h with BASE_BAUD override for generic kernel
    - ima: fix hash algorithm initialization
    - [s390x] vfio-ccw: Do not attempt to free no-op, test and tic cda.
    - PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare()
    - [s390x] pci: do not require AIS facility
    - serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
    - staging: rtl8188eu: avoid a null dereference on pmlmepriv
    - [arm64] mmc: sdhci-msm: fix issue with power irq
    - hwmon: (pmbus/core) Prevent unintentional setting of page to 0xFF
    - perf/core: Fix __perf_read_group_add() locking
    - [armhf] PCI: dra7xx: Create functional dependency between PCIe and PHY
    - [x86] intel_rdt: Initialize bitmask of shareable resource if CDP enabled
    - [x86] intel_rdt: Fix potential deadlock during resctrl mount
    - serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
    - kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT=y
    - [x86] entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
    - [armhf,arm64] clocksource/drivers/arm_arch_timer: Validate CNTFRQ after
      enabling frame
    - [x86] EDAC, sb_edac: Fix missing break in switch
    - [arm64] cpuidle: Correct driver unregistration if init fails
    - usb: xhci: Return error when host is dead in xhci_disable_slot()
    - [armel,armhf] sysrq : fix Show Regs call trace on ARM
    - [sh4] serial: sh-sci: suppress warning for ports without dma channels
    - [armhf] serial: imx: Update cached mctrl value when changing RTS
    - [x86] kprobes: Disable preemption in ftrace-based jprobes
    - [x86] locking/refcounts, asm: Use unique .text section for refcount
      exceptions
    - [s390x] ptrace: fix guarded storage regset handling
    - perf tools: Fix leaking rec_argv in error cases
    - mm, x86/mm: Fix performance regression in get_user_pages_fast()
    - iio: adc: ti-ads1015: add 10% to conversion wait time
    - iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup()
      return values
    - [x86] locking/refcounts, asm: Enable CONFIG_ARCH_HAS_REFCOUNT
    - [powerpc*] jprobes: Disable preemption when triggered through ftrace
    - [powerpc*] kprobes: Disable preemption before invoking probe handler for
      optprobes
    - usb: hub: Cycle HUB power when initialization fails
    - [armhf,arm64] USB: ulpi: fix bus-node lookup
    - xhci: Don't show incorrect WARN message about events for empty rings
    - usb: xhci: fix panic in xhci_free_virt_devices_depth_first
    - USB: core: Add type-specific length check of BOS descriptors
    - USB: usbfs: Filter flags passed in from user space
    - usb: host: fix incorrect updating of offset
    - locking/refcounts: Do not force refcount_t usage as GPL-only export
    https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.6
    - usb: gadget: core: Fix ->udc_set_speed() speed handling
    - serdev: ttyport: add missing receive_buf sanity checks
    - serdev: ttyport: fix NULL-deref on hangup
    - serdev: ttyport: fix tty locking in close
    - usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT
    - can: peak/pci: fix potential bug when probe() fails
    - can: kvaser_usb: free buf in error paths
    - can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback()
    - can: kvaser_usb: ratelimit errors if incomplete messages are received
    - can: kvaser_usb: cancel urb on -EPIPE and -EPROTO
    - can: ems_usb: cancel urb on -EPIPE and -EPROTO
    - can: esd_usb2: cancel urb on -EPIPE and -EPROTO
    - can: usb_8dev: cancel urb on -EPIPE and -EPROTO
    - can: peak/pcie_fd: fix potential bug in restarting tx queue
    - virtio: release virtio index when fail to device_register
    - [arm64] pinctrl: armada-37xx: Fix direction_output() callback behavior
    - [x86] Drivers: hv: vmbus: Fix a rescind issue
    - [x86] hv: kvp: Avoid reading past allocated blocks from KVP file
    - firmware: vpd: Destroy vpd sections in remove function
    - firmware: vpd: Tie firmware kobject to device lifetime
    - firmware: vpd: Fix platform driver and device registration/unregistration
    - scsi: dma-mapping: always provide dma_get_cache_alignment
    - scsi: use dma_get_cache_alignment() as minimum DMA alignment
    - scsi: libsas: align sata_device's rps_resp on a cacheline
    - efi: Move some sysfs files to be read-only by root
    - efi/esrt: Use memunmap() instead of kfree() to free the remapping
    - ASN.1: fix out-of-bounds read when parsing indefinite length item
    - ASN.1: check for error from ASN1_OP_END__ACT actions
    - KEYS: add missing permission check for request_key() destination
      (CVE-2017-17807)
    - KEYS: reject NULL restriction string when type is specified
    - X.509: reject invalid BIT STRING for subjectPublicKey
    - X.509: fix comparisons of ->pkey_algo
    - [x86] idt: Load idt early in start_secondary
    - [x86] PCI: Make broadcom_postcore_init() check acpi_disabled
    - [x86] KVM: fix APIC page invalidation
    - btrfs: fix missing error return in btrfs_drop_snapshot
    - btrfs: handle errors while updating refcounts in update_ref_for_cow
    - ALSA: pcm: prevent UAF in snd_pcm_info
    - ALSA: seq: Remove spurious WARN_ON() at timer check
    - ALSA: usb-audio: Fix out-of-bound error
    - ALSA: usb-audio: Add check return value for usb_string()
    - [x86] iommu/vt-d: Fix scatterlist offset handling
    - smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place
    - [s390x] always save and restore all registers on context switch
    - [s390x] mm: fix off-by-one bug in 5-level page table handling
    - [s390x] fix compat system call table
    - [s390x] KVM: Fix skey emulation permission check
    - [powerpc*] Revert "powerpc: Do not call ppc_md.panic in fadump panic
      notifier"
    - [powerpc*] 64s: Initialize ISAv3 MMU registers before setting partition
      table
    - iwlwifi: mvm: mark MIC stripped MPDUs
    - iwlwifi: mvm: don't use transmit queue hang detection when it is not
      possible
    - iwlwifi: mvm: flush queue before deleting ROC
    - iwlwifi: mvm: fix packet injection
    - iwlwifi: mvm: enable RX offloading with TKIP and WEP
    - brcmfmac: change driver unbind order of the sdio function devices
    - md/r5cache: move mddev_lock() out of r5c_journal_mode_set()
    - [armhf] drm/bridge: analogix dp: Fix runtime PM state in get_modes()
      callback
    - [armhf] drm/exynos: gem: Drop NONCONTIG flag for buffers allocated
      without IOMMU
    - [x86] drm/i915: Fix vblank timestamp/frame counter jumps on gen2
    - media: dvb: i2c transfers over usb cannot be done from stack
    - media: rc: sir_ir: detect presence of port
    - media: rc: partial revert of "media: rc: per-protocol repeat period"
    - [arm64] KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one
    - [armhf] KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one
    - [x86] KVM: VMX: remove I/O port 0x80 bypass on Intel hosts
      (CVE-2017-1000407)
    - [armhf,arm64] KVM: Fix broken GICH_ELRSR big endian conversion
    - [armhf,arm64] KVM: vgic-irqfd: Fix MSI entry allocation
    - [armhf,arm64] KVM: vgic: Preserve the revious read from the pending table
    - [armhf,arm64] KVM: vgic-its: Check result of allocation before use
    - [arm64] fpsimd: Prevent registers leaking from dead tasks
    - [arm64] SW PAN: Point saved ttbr0 at the zero page when switching to
      init_mm
    - [arm64] SW PAN: Update saved ttbr0 value on enter_lazy_tlb
    - [armhf] Revert "ARM: dts: imx53: add srtc node"
    - [armhf] bus: arm-cci: Fix use of smp_processor_id() in preemptible context
    - IB/core: Only enforce security for InfiniBand
    - [armel,armhf] BUG if jumping to usermode address in kernel mode
    - [armel,armhf] avoid faulting on qemu
    - [arm64] irqchip/qcom: Fix u32 comparison with value less than zero
    - [powerpc*] perf: Fix pmu_count to count only nest imc pmus
    - apparmor: fix leak of null profile name if profile allocation fails
    - mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl()
    - gre6: use log_ecn_error module parameter in ip6_tnl_rcv()
    - route: also update fnhe_genid when updating a route cache
    - route: update fnhe_expires for redirect when the fnhe exists
    - rsi: fix memory leak on buf and usb_reg_buf
    - pipe: match pipe_max_size data type with procfs
    - lib/genalloc.c: make the avail variable an atomic_long_t
    - NFS: Fix a typo in nfs_rename()
    - sunrpc: Fix rpc_task_begin trace point
    - nfp: inherit the max_mtu from the PF netdev
    - nfp: fix flower offload metadata flag usage
    - xfs: fix forgotten rcu read unlock when skipping inode reclaim
    - block: wake up all tasks blocked in get_request()
    - [sparc64] mm: set fields in deferred pages
    - zsmalloc: calling zs_map_object() from irq is a bug
    - slub: fix sysfs duplicate filename creation when slub_debug=O
    - sctp: do not free asoc when it is already dead in sctp_sendmsg
    - sctp: use the right sk after waking up from wait_buf sleep
    - fcntl: don't leak fd reference when fixup_compat_flock fails
    - geneve: fix fill_info when link down
    - bpf: fix lockdep splat
    - [arm64] clk: qcom: common: fix legacy board-clock registration
    - [arm64] clk: hi3660: fix incorrect uart3 clock freqency
    - atm: horizon: Fix irq release error
    - xfrm: Copy policy family in clone_policy
    - f2fs: fix to clear FI_NO_PREALLOC
    - bnxt_re: changing the ip address shouldn't affect new connections
    - IB/mlx4: Increase maximal message size under UD QP
    - IB/mlx5: Assign send CQ and recv CQ of UMR QP
    - afs: Fix total-length calculation for multiple-page send
    - afs: Connect up the CB.ProbeUuid
    https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.7
    - net: realtek: r8169: implement set_link_ksettings()
    - [s390x] qeth: fix early exit from error path
    - tipc: fix memory leak in tipc_accept_from_sock()
    - vhost: fix skb leak in handle_rx()
    - rds: Fix NULL pointer dereference in __rds_rdma_map
    - sit: update frag_off info
    - tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()
    - packet: fix crash in fanout_demux_rollover()
    - net/packet: fix a race in packet_bind() and packet_notifier()
    - tcp: remove buggy call to tcp_v6_restore_cb()
    - usbnet: fix alignment for frames with no ethernet header
    - net: remove hlist_nulls_add_tail_rcu()
    - stmmac: reset last TSO segment size after device open
    - tcp/dccp: block bh before arming time_wait timer
    - [s390x] qeth: build max size GSO skbs on L2 devices
    - [s390x] qeth: fix thinko in IPv4 multicast address tracking
    - [s390x] qeth: fix GSO throughput regression
    - tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match()
    - tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()
    - tcp: use current time in tcp_rcv_space_adjust()
    - net: sched: cbq: create block for q->link.block
    - tap: free skb if flags error
    - tcp: when scheduling TLP, time of RTO should account for current ACK
    - tun: free skb in early errors
    - net: ipv6: Fixup device for anycast routes during copy
    - tun: fix rcu_read_lock imbalance in tun_build_skb
    - net: accept UFO datagrams from tuntap and packet
    - net: openvswitch: datapath: fix data type in queue_gso_packets
    - cls_bpf: don't decrement net's refcount when offload fails
    - sctp: use right member as the param of list_for_each_entry
    - ipmi: Stop timers before cleaning up the module
    - usb: gadget: ffs: Forbid usb_ep_alloc_request from sleeping
    - fcntl: don't cap l_start and l_end values for F_GETLK64 in compat syscall
    - fix kcm_clone()
    - [armhf,arm64] KVM: vgic-its: Preserve the revious read from the pending
      table
    - kbuild: do not call cc-option before KBUILD_CFLAGS initialization
    - [powerpc*] powernv/idle: Round up latency and residency values
    - ipvlan: fix ipv6 outbound device
    - blk-mq: Avoid that request queue removal can trigger list corruption
    - nvmet-rdma: update queue list during ib_device removal
    - audit: Allow auditd to set pid to 0 to end auditing
    - audit: ensure that 'audit=1' actually enables audit for PID 1
    - dm raid: fix panic when attempting to force a raid to sync
    - md: free unused memory after bitmap resize
    - RDMA/cxgb4: Annotate r2 and stag as __be32
    - [x86] intel_rdt: Fix potential deadlock during resctrl unmount

  [ Salvatore Bonaccorso ]
  * Add ABI reference for 4.14.0-1
  * xen/time: do not decrease steal time after live migration on xen
    (Closes: #871608)
  * crypto: salsa20 - fix blkcipher_walk API usage (CVE-2017-17805)
  * crypto: hmac - require that the underlying hash algorithm is unkeyed
    (CVE-2017-17806)

  [ Vagrant Cascadian ]
  * [armhf, arm64] Backport patches from 4.15.x to support dwmac-sun8i.

  [ Ben Hutchings ]
  * [rt] Update to 4.14.6-rt7:
    - hrtimer: account for migrated timers
    - crypto: mcryptd: protect the per-CPU queue with a lock
    - tracing: Update inter-event hist trigger support to v7:
      + Rename virtual "$common_timestamp" field to "common_timestamp"
      + Fix use-after-free in trigger removal
    - mm/slub: close possible memory-leak in kmem_cache_alloc_bulk()
    - crypto: limit more FPU-enabled sections
  * dccp: CVE-2017-8824: use-after-free in DCCP code
  * netfilter: nfnetlink_cthelper: Add missing permission checks
    (CVE-2017-17448)
  * netlink: Add netns check on taps (CVE-2017-17449)
  * netfilter: xt_osf: Add missing permission checks (CVE-2017-17450)
  * USB: core: prevent malicious bNumInterfaces overflow (CVE-2017-17558)
  * net: ipv4: fix for a race condition in raw_sendmsg (CVE-2017-17712)
  * media: dvb-usb-v2: lmedm04: Improve logic checking of warm start
    (CVE-2017-16538)
  * media: dvb-usb-v2: lmedm04: move ts2020 attach to dm04_lme2510_tuner
    (CVE-2017-16538)
  * media: hdpvr: Fix an error handling path in hdpvr_probe() (CVE-2017-16644)
  * [armhf,arm64,x86] KVM: Fix stack-out-of-bounds read in write_mmio
    (CVE-2017-17741)
  * bluetooth: Prevent stack info leak from the EFS element.
    (CVE-2017-1000410)
  * bpf/verifier: Fix multiple security issues (Closes: #883558):
    - encapsulate verifier log state into a structure
    - move global verifier log into verifier environment
    - fix branch pruning logic
    - fix bounds calculation on BPF_RSH
    - fix incorrect sign extension in check_alu_op() (CVE-2017-16995)
    - fix incorrect tracking of register size truncation (CVE-2017-16996)
    - fix 32-bit ALU op verification
    - fix missing error return in check_stack_boundary()
    - force strict alignment checks for stack pointers
    - don't prune branches when a scalar is replaced with a pointer
    - fix integer overflows
  * Bump ABI to 2
parents 6823e253 90e307ca
......@@ -34,6 +34,10 @@ Required properties:
- reg: I2C address
Optional properties:
- smbus-timeout-disable: When set, the smbus timeout function will be disabled.
This is not supported on all chips.
Example:
temp-sensor@1a {
......
......@@ -20,16 +20,16 @@ Required Properties:
(CMT1 on sh73a0 and r8a7740)
This is a fallback for the above renesas,cmt-48-* entries.
- "renesas,cmt0-r8a73a4" for the 32-bit CMT0 device included in r8a73a4.
- "renesas,cmt1-r8a73a4" for the 48-bit CMT1 device included in r8a73a4.
- "renesas,cmt0-r8a7790" for the 32-bit CMT0 device included in r8a7790.
- "renesas,cmt1-r8a7790" for the 48-bit CMT1 device included in r8a7790.
- "renesas,cmt0-r8a7791" for the 32-bit CMT0 device included in r8a7791.
- "renesas,cmt1-r8a7791" for the 48-bit CMT1 device included in r8a7791.
- "renesas,cmt0-r8a7793" for the 32-bit CMT0 device included in r8a7793.
- "renesas,cmt1-r8a7793" for the 48-bit CMT1 device included in r8a7793.
- "renesas,cmt0-r8a7794" for the 32-bit CMT0 device included in r8a7794.
- "renesas,cmt1-r8a7794" for the 48-bit CMT1 device included in r8a7794.
- "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4.
- "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
- "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.
- "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790.
- "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791.
- "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791.
- "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793.
- "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793.
- "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794.
- "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794.
- "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2.
- "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2.
......@@ -46,7 +46,7 @@ Required Properties:
Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
cmt0: timer@ffca0000 {
compatible = "renesas,cmt0-r8a7790", "renesas,rcar-gen2-cmt0";
compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
reg = <0 0xffca0000 0 0x1004>;
interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
<0 142 IRQ_TYPE_LEVEL_HIGH>;
......@@ -55,7 +55,7 @@ Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
};
cmt1: timer@e6130000 {
compatible = "renesas,cmt1-r8a7790", "renesas,rcar-gen2-cmt1";
compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
reg = <0 0xe6130000 0 0x1004>;
interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
<0 121 IRQ_TYPE_LEVEL_HIGH>,
......
......@@ -11,7 +11,7 @@ Required properties:
be used, but a device adhering to this binding may leave out all except
for usbVID,PID.
- reg: the port number which this device is connecting to, the range
is 1-31.
is 1-255.
Example:
......
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 2
SUBLEVEL = 7
EXTRAVERSION =
NAME = Petit Gorille
......@@ -373,9 +373,6 @@ LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
LDFLAGS_vmlinux =
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
......@@ -394,21 +391,19 @@ LINUXINCLUDE := \
-I$(objtree)/include \
$(USERINCLUDE)
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS := -D__ASSEMBLY__
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar \
-Werror-implicit-function-declaration \
-Wno-format-security \
-std=gnu89 $(call cc-option,-fno-PIE)
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE)
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
GCC_PLUGINS_CFLAGS :=
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
......@@ -421,7 +416,7 @@ export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV CFLAGS_KCOV CFLAGS_KASAN CFLAGS_UBSAN
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_KASAN CFLAGS_UBSAN
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
......@@ -622,6 +617,12 @@ endif
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
export CFLAGS_GCOV CFLAGS_KCOV
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
# values of the respective KBUILD_* variables
ARCH_CPPFLAGS :=
......
......@@ -91,7 +91,7 @@ config STATIC_KEYS_SELFTEST
config OPTPROBES
def_bool y
depends on KPROBES && HAVE_OPTPROBES
depends on !PREEMPT
select TASKS_RCU if PREEMPT
config KPROBES_ON_FTRACE
def_bool y
......
......@@ -433,15 +433,6 @@ gpt: timer@53fa0000 {
clock-names = "ipg", "per";
};
srtc: srtc@53fa4000 {
compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
reg = <0x53fa4000 0x4000>;
interrupts = <24>;
interrupt-parent = <&tzic>;
clocks = <&clks IMX5_CLK_SRTC_GATE>;
clock-names = "ipg";
};
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
......
......@@ -518,4 +518,22 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
#endif
.endm
.macro bug, msg, line
#ifdef CONFIG_THUMB2_KERNEL
1: .inst 0xde02
#else
1: .inst 0xe7f001f2
#endif
#ifdef CONFIG_DEBUG_BUGVERBOSE
.pushsection .rodata.str, "aMS", %progbits, 1
2: .asciz "\msg"
.popsection
.pushsection __bug_table, "aw"
.align 2
.word 1b, 2b
.hword \line
.popsection
#endif
.endm
#endif /* __ASM_ASSEMBLER_H__ */
......@@ -161,8 +161,7 @@
#else
#define VTTBR_X (5 - KVM_T0SZ)
#endif
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_X)
#define VTTBR_VMID_SHIFT _AC(48, ULL)
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
......
......@@ -300,6 +300,8 @@
mov r2, sp
ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
ldr lr, [r2, #\offset + S_PC]! @ get pc
tst r1, #PSR_I_BIT | 0x0f
bne 1f
msr spsr_cxsf, r1 @ save in spsr_svc
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
@ We must avoid clrex due to Cortex-A15 erratum #830321
......@@ -314,6 +316,7 @@
@ after ldm {}^
add sp, sp, #\offset + PT_REGS_SIZE
movs pc, lr @ return & move spsr_svc into cpsr
1: bug "Returning to usermode but unexpected PSR bits set?", \@
#elif defined(CONFIG_CPU_V7M)
@ V7M restore.
@ Note that we don't need to do clrex here as clearing the local
......@@ -329,6 +332,8 @@
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
ldr lr, [sp, #\offset + S_PC] @ get pc
add sp, sp, #\offset + S_SP
tst r1, #PSR_I_BIT | 0x0f
bne 1f
msr spsr_cxsf, r1 @ save in spsr_svc
@ We must avoid clrex due to Cortex-A15 erratum #830321
......@@ -341,6 +346,7 @@
.endif
add sp, sp, #PT_REGS_SIZE - S_SP
movs pc, lr @ return & move spsr_svc into cpsr
1: bug "Returning to usermode but unexpected PSR bits set?", \@
#endif /* !CONFIG_THUMB2_KERNEL */
.endm
......
......@@ -129,8 +129,8 @@ static const struct prot_bits section_bits[] = {
.val = PMD_SECT_USER,
.set = "USR",
}, {
.mask = L_PMD_SECT_RDONLY,
.val = L_PMD_SECT_RDONLY,
.mask = L_PMD_SECT_RDONLY | PMD_SECT_AP2,
.val = L_PMD_SECT_RDONLY | PMD_SECT_AP2,
.set = "ro",
.clear = "RW",
#elif __LINUX_ARM_ARCH__ >= 6
......
......@@ -639,8 +639,8 @@ static struct section_perm ro_perms[] = {
.start = (unsigned long)_stext,
.end = (unsigned long)__init_begin,
#ifdef CONFIG_ARM_LPAE
.mask = ~L_PMD_SECT_RDONLY,
.prot = L_PMD_SECT_RDONLY,
.mask = ~(L_PMD_SECT_RDONLY | PMD_SECT_AP2),
.prot = L_PMD_SECT_RDONLY | PMD_SECT_AP2,
#else
.mask = ~(PMD_SECT_APX | PMD_SECT_AP_WRITE),
.prot = PMD_SECT_APX | PMD_SECT_AP_WRITE,
......
......@@ -77,9 +77,6 @@ endif
ifeq ($(CONFIG_ARM64_MODULE_PLTS),y)
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/arm64/kernel/module.lds
ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
KBUILD_LDFLAGS_MODULE += $(objtree)/arch/arm64/kernel/ftrace-mod.o
endif
endif
# Default value
......
......@@ -49,6 +49,14 @@
/ {
compatible = "amlogic,meson-gxl";
reserved-memory {
/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
secmon_reserved_alt: secmon@05000000 {
reg = <0x0 0x05000000 0x0 0x300000>;
no-map;
};
};
};
&ethmac {
......
......@@ -215,7 +215,6 @@ typedef struct compat_siginfo {
} compat_siginfo_t;
#define COMPAT_OFF_T_MAX 0x7fffffff
#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
/*
* A pointer passed in from user mode. This should not
......
......@@ -132,11 +132,9 @@ static inline void efi_set_pgd(struct mm_struct *mm)
* Defer the switch to the current thread's TTBR0_EL1
* until uaccess_enable(). Restore the current
* thread's saved ttbr0 corresponding to its active_mm
* (if different from init_mm).
*/
cpu_set_reserved_ttbr0();
if (current->active_mm != &init_mm)
update_saved_ttbr0(current, current->active_mm);
update_saved_ttbr0(current, current->active_mm);
}
}
}
......
......@@ -170,8 +170,7 @@
#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_X)
#define VTTBR_VMID_SHIFT (UL(48))
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
......
......@@ -156,29 +156,21 @@ void check_and_switch_context(struct mm_struct *mm, unsigned int cpu);
#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
/*
* This is called when "tsk" is about to enter lazy TLB mode.
*
* mm: describes the currently active mm context
* tsk: task which is entering lazy tlb
* cpu: cpu number which is entering lazy tlb
*
* tsk->mm will be NULL
*/
static inline void
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
}
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
static inline void update_saved_ttbr0(struct task_struct *tsk,
struct mm_struct *mm)
{
if (system_uses_ttbr0_pan()) {
BUG_ON(mm->pgd == swapper_pg_dir);
task_thread_info(tsk)->ttbr0 =
virt_to_phys(mm->pgd) | ASID(mm) << 48;
}
u64 ttbr;
if (!system_uses_ttbr0_pan())
return;
if (mm == &init_mm)
ttbr = __pa_symbol(empty_zero_page);
else
ttbr = virt_to_phys(mm->pgd) | ASID(mm) << 48;
task_thread_info(tsk)->ttbr0 = ttbr;
}
#else
static inline void update_saved_ttbr0(struct task_struct *tsk,
......@@ -187,6 +179,16 @@ static inline void update_saved_ttbr0(struct task_struct *tsk,
}
#endif
static inline void
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
/*
* We don't actually care about the ttbr0 mapping, so point it at the
* zero page.
*/
update_saved_ttbr0(tsk, &init_mm);
}
static inline void __switch_mm(struct mm_struct *next)
{
unsigned int cpu = smp_processor_id();
......@@ -214,11 +216,9 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
* Update the saved TTBR0_EL1 of the scheduled-in task as the previous
* value may have not been initialised yet (activate_mm caller) or the
* ASID has changed since the last run (following the context switch
* of another thread of the same process). Avoid setting the reserved
* TTBR0_EL1 to swapper_pg_dir (init_mm; e.g. via idle_task_exit).
* of another thread of the same process).
*/
if (next != &init_mm)
update_saved_ttbr0(tsk, next);
update_saved_ttbr0(tsk, next);
}
#define deactivate_mm(tsk,mm) do { } while (0)
......
......@@ -32,7 +32,7 @@ struct mod_arch_specific {
struct mod_plt_sec init;
/* for CONFIG_DYNAMIC_FTRACE */
void *ftrace_trampoline;
struct plt_entry *ftrace_trampoline;
};
#endif
......@@ -45,4 +45,48 @@ extern u64 module_alloc_base;
#define module_alloc_base ((u64)_etext - MODULES_VSIZE)
#endif
struct plt_entry {
/*
* A program that conforms to the AArch64 Procedure Call Standard
* (AAPCS64) must assume that a veneer that alters IP0 (x16) and/or
* IP1 (x17) may be inserted at any branch instruction that is
* exposed to a relocation that supports long branches. Since that
* is exactly what we are dealing with here, we are free to use x16
* as a scratch register in the PLT veneers.
*/
__le32 mov0; /* movn x16, #0x.... */
__le32 mov1; /* movk x16, #0x...., lsl #16 */
__le32 mov2; /* movk x16, #0x...., lsl #32 */
__le32 br; /* br x16 */
};
static inline struct plt_entry get_plt_entry(u64 val)
{
/*
* MOVK/MOVN/MOVZ opcode:
* +--------+------------+--------+-----------+-------------+---------+
* | sf[31] | opc[30:29] | 100101 | hw[22:21] | imm16[20:5] | Rd[4:0] |
* +--------+------------+--------+-----------+-------------+---------+
*
* Rd := 0x10 (x16)
* hw := 0b00 (no shift), 0b01 (lsl #16), 0b10 (lsl #32)
* opc := 0b11 (MOVK), 0b00 (MOVN), 0b10 (MOVZ)
* sf := 1 (64-bit variant)
*/
return (struct plt_entry){
cpu_to_le32(0x92800010 | (((~val ) & 0xffff)) << 5),
cpu_to_le32(0xf2a00010 | ((( val >> 16) & 0xffff)) << 5),
cpu_to_le32(0xf2c00010 | ((( val >> 32) & 0xffff)) << 5),
cpu_to_le32(0xd61f0200)
};
}
static inline bool plt_entries_equal(const struct plt_entry *a,
const struct plt_entry *b)
{
return a->mov0 == b->mov0 &&
a->mov1 == b->mov1 &&
a->mov2 == b->mov2;
}
#endif /* __ASM_MODULE_H */
......@@ -98,6 +98,8 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == (PTE_VALID | PTE_UXN))
#define pte_valid_young(pte) \
((pte_val(pte) & (PTE_VALID | PTE_AF)) == (PTE_VALID | PTE_AF))
#define pte_valid_user(pte) \
((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER))
/*
* Could the pte be present in the TLB? We must check mm_tlb_flush_pending
......@@ -107,6 +109,18 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
#define pte_accessible(mm, pte) \
(mm_tlb_flush_pending(mm) ? pte_present(pte) : pte_valid_young(pte))
/*
* p??_access_permitted() is true for valid user mappings (subject to the
* write permission check) other than user execute-only which do not have the
* PTE_USER bit set. PROT_NONE mappings do not have the PTE_VALID bit set.
*/
#define pte_access_permitted(pte, write) \
(pte_valid_user(pte) && (!(write) || pte_write(pte)))
#define pmd_access_permitted(pmd, write) \
(pte_access_permitted(pmd_pte(pmd), (write)))
#define pud_access_permitted(pud, write) \
(pte_access_permitted(pud_pte(pud), (write)))
static inline pte_t clear_pte_bit(pte_t pte, pgprot_t prot)
{
pte_val(pte) &= ~pgprot_val(prot);
......
......@@ -63,6 +63,3 @@ extra-y += $(head-y) vmlinux.lds
ifeq ($(CONFIG_DEBUG_EFI),y)
AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
endif
# will be included by each individual module but not by the core kernel itself
extra-$(CONFIG_DYNAMIC_FTRACE) += ftrace-mod.o
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment