I'm announcing the release of the 4.9.244 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 8
Makefile | 2
arch/x86/events/intel/pt.c | 4
arch/x86/kernel/cpu/bugs.c | 52 +-
drivers/block/xen-blkback/blkback.c | 22 -
drivers/block/xen-blkback/xenbus.c | 5
drivers/char/random.c | 1
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 27 -
drivers/gpu/drm/gma500/psb_irq.c | 34 -
drivers/iommu/amd_iommu_types.h | 6
drivers/misc/mei/client.h | 4
drivers/net/can/dev.c | 14
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 51 ++
drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 48 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 32 +
drivers/net/geneve.c | 36 +
drivers/net/wan/cosa.c | 1
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 2
drivers/net/xen-netback/common.h | 15
drivers/net/xen-netback/interface.c | 61 ++
drivers/net/xen-netback/netback.c | 11
drivers/net/xen-netback/rx.c | 13
drivers/of/address.c | 4
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 7
drivers/pinctrl/devicetree.c | 26 -
drivers/pinctrl/pinctrl-amd.c | 6
drivers/regulator/core.c | 2
drivers/scsi/device_handler/scsi_dh_alua.c | 9
drivers/scsi/hpsa.c | 4
drivers/usb/class/cdc-acm.c | 9
drivers/usb/gadget/udc/goku_udc.c | 2
drivers/xen/events/events_2l.c | 9
drivers/xen/events/events_base.c | 422 +++++++++++++++++--
drivers/xen/events/events_fifo.c | 82 +--
drivers/xen/events/events_internal.h | 20
drivers/xen/evtchn.c | 7
drivers/xen/xen-pciback/pci_stub.c | 14
drivers/xen/xen-pciback/pciback.h | 12
drivers/xen/xen-pciback/pciback_ops.c | 48 +-
drivers/xen/xen-pciback/xenbus.c | 2
drivers/xen/xen-scsiback.c | 23 -
fs/btrfs/extent_io.c | 4
fs/btrfs/ioctl.c | 2
fs/cifs/cifs_unicode.c | 8
fs/ext4/inline.c | 1
fs/ext4/super.c | 5
fs/gfs2/glock.c | 3
fs/gfs2/rgrp.c | 5
fs/ocfs2/super.c | 1
fs/xfs/libxfs/xfs_rmap.c | 2
fs/xfs/libxfs/xfs_rmap_btree.c | 16
fs/xfs/xfs_iops.c | 10
fs/xfs/xfs_pnfs.c | 2
include/linux/can/skb.h | 20
include/linux/perf_event.h | 2
include/linux/prandom.h | 36 +
include/linux/time64.h | 4
include/xen/events.h | 29 +
kernel/events/core.c | 42 -
kernel/events/internal.h | 2
kernel/exit.c | 5
kernel/irq/Kconfig | 1
kernel/reboot.c | 28 -
kernel/time/timer.c | 7
kernel/trace/ring_buffer.c | 54 ++
lib/random32.c | 462 ++++++++++++---------
lib/swiotlb.c | 6
mm/mempolicy.c | 6
net/ipv4/syncookies.c | 9
net/ipv6/sit.c | 2
net/ipv6/syncookies.c | 10
net/iucv/af_iucv.c | 3
net/mac80211/tx.c | 35 +
net/wireless/reg.c | 2
net/x25/af_x25.c | 2
net/xfrm/xfrm_state.c | 8
sound/hda/ext/hdac_ext_controller.c | 2
tools/perf/util/session.c | 1
78 files changed, 1446 insertions(+), 548 deletions(-)
Al Viro (1):
don't dump the threads that had been already exiting when zapped.
Alexander Aring (1):
gfs2: Wake up when sd_glock_disposal becomes zero
Alexander Usyskin (1):
mei: protect mei_cl_mtu from null dereference
Anand K Mistry (1):
x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
Billy Tsai (1):
pinctrl: aspeed: Fix GPI only function problem.
Bob Peterson (2):
gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free
gfs2: check for live vs. read-only file system in gfs2_fitrim
Boris Protopopov (1):
Convert trailing spaces and periods in path components
Brian Foster (1):
xfs: flush new eof page on truncate to avoid post-eof corruption
Chris Brandt (1):
usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
Christoph Hellwig (1):
xfs: fix a missing unlock on error in xfs_fs_map_blocks
Christophe JAILLET (1):
i40e: Fix a potential NULL pointer dereference
Coiby Xu (2):
pinctrl: amd: use higher precision for 512 RtcClk
pinctrl: amd: fix incorrect way to disable debounce filter
Dan Carpenter (2):
ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
can: peak_usb: add range checking in decode operations
Darrick J. Wong (2):
xfs: fix flags argument to rmap lookup when converting shared file rmaps
xfs: fix rmap key and record comparison functions
Eric Biggers (1):
ext4: fix leaking sysfs kobject after failed mount
Evan Nimmo (1):
of/address: Fix of_node memory leak in of_dma_is_coherent
Evan Quan (1):
drm/amdgpu: perform srbm soft reset always on SDMA resume
Evgeny Novikov (1):
usb: gadget: goku_udc: fix potential crashes in probe
Filipe Manana (1):
Btrfs: fix missing error return if writeback for extent buffer never started
George Spelvin (1):
random32: make prandom_u32() output unpredictable
Greg Kroah-Hartman (1):
Linux 4.9.244
Grzegorz Siwik (1):
i40e: Wrong truncation from u16 to u8
Hannes Reinecke (1):
scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
Jiri Olsa (2):
perf tools: Add missing swap for ino_generation
perf/core: Fix race in the perf_mmap_close() function
Johannes Berg (1):
mac80211: fix use of skb payload instead of header
Johannes Thumshirn (1):
btrfs: reschedule when cloning lots of extents
Joseph Qi (1):
ext4: unlock xattr_sem properly in ext4_inline_data_truncate()
Juergen Gross (12):
xen/events: avoid removing an event channel while handling it
xen/events: add a proper barrier to 2-level uevent unmasking
xen/events: fix race in evtchn_fifo_unmask()
xen/events: add a new "late EOI" evtchn framework
xen/blkback: use lateeoi irq binding
xen/netback: use lateeoi irq binding
xen/scsiback: use lateeoi irq binding
xen/pciback: use lateeoi irq binding
xen/events: switch user event channels to lateeoi model
xen/events: use a common cpu hotplug hook for event channels
xen/events: defer eoi in case of excessive number of events
xen/events: block rogue events for some time
Kaixu Xia (1):
ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
Keita Suzuki (1):
scsi: hpsa: Fix memory leak in hpsa_init_one()
Mao Wenan (1):
net: Update window_clamp if SOCK_RCVBUF is set
Marc Zyngier (1):
genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY
Mark Gray (1):
geneve: add transport ports in route lookup for geneve
Martin Schiller (1):
net/x25: Fix null-ptr-deref in x25_connect
Martyna Szapar (2):
i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c
i40e: Memory leak in i40e_config_iwarp_qvlist
Masashi Honma (1):
ath9k_htc: Use appropriate rs_datalen type
Mathieu Poirier (1):
perf/core: Fix crash when using HW tracing kernel filters
Matteo Croce (2):
Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
reboot: fix overflow parsing reboot cpu number
Michał Mirosław (1):
regulator: defer probe when trying to get voltage from unresolved supply
Oleksij Rempel (1):
can: can_create_echo_skb(): fix echo skb generation: always use skb_clone()
Oliver Hartkopp (1):
can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames
Oliver Herms (1):
IPv6: Set SIT tunnel hard_header_len to zero
Peter Zijlstra (1):
perf: Fix get_recursion_context()
Sergey Nemov (1):
i40e: add num_vectors checker in iwarp handler
Shijie Luo (1):
mm: mempolicy: fix potential pte_unmap_unlock pte error
Song Liu (1):
perf/core: Fix bad use of igrab()
Stefano Stabellini (1):
swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb"
Stephane Grosjean (1):
can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
Steven Rostedt (VMware) (1):
ring-buffer: Fix recursion protection transitions between interrupt context
Suravee Suthikulpanit (1):
iommu/amd: Increase interrupt remapping table limit to 512 entries
Thomas Zimmermann (1):
drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]
Ursula Braun (1):
net/af_iucv: fix null pointer dereference on shutdown
Vincent Mailhol (1):
can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
Wang Hai (1):
cosa: Add missing kfree in error path of cosa_write
Wengang Wang (1):
ocfs2: initialize ip_next_orphan
Will Deacon (1):
pinctrl: devicetree: Avoid taking direct reference to device name string
Ye Bin (1):
cfg80211: regulatory: Fix inconsistent format argument
Zeng Tao (1):
time: Prevent undefined behaviour in timespec64_to_ns()
kiyin(尹亮) (1):
perf/core: Fix a memory leak in perf_event_parse_addr_filter()
zhuoliang zhang (1):
net: xfrm: fix a race condition during allocing spi
I'm announcing the release of the 4.4.244 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 8
Makefile | 2
arch/x86/kernel/cpu/bugs.c | 52 +-
drivers/block/xen-blkback/blkback.c | 22
drivers/block/xen-blkback/xenbus.c | 5
drivers/char/random.c | 2
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 27 -
drivers/gpu/drm/gma500/psb_irq.c | 34 -
drivers/iommu/amd_iommu_types.h | 6
drivers/misc/mei/client.h | 4
drivers/net/can/dev.c | 14
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 51 ++
drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 48 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4
drivers/net/geneve.c | 36 +
drivers/net/wan/cosa.c | 1
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 2
drivers/net/xen-netback/common.h | 39 +
drivers/net/xen-netback/interface.c | 59 ++
drivers/net/xen-netback/netback.c | 17
drivers/of/address.c | 4
drivers/pinctrl/devicetree.c | 26 -
drivers/pinctrl/pinctrl-amd.c | 6
drivers/usb/class/cdc-acm.c | 9
drivers/usb/gadget/udc/goku_udc.c | 2
drivers/xen/events/events_2l.c | 9
drivers/xen/events/events_base.c | 444 ++++++++++++++++++--
drivers/xen/events/events_fifo.c | 102 +---
drivers/xen/events/events_internal.h | 20
drivers/xen/evtchn.c | 7
drivers/xen/xen-pciback/pci_stub.c | 14
drivers/xen/xen-pciback/pciback.h | 12
drivers/xen/xen-pciback/pciback_ops.c | 48 +-
drivers/xen/xen-pciback/xenbus.c | 2
drivers/xen/xen-scsiback.c | 23 -
fs/btrfs/extent_io.c | 4
fs/btrfs/ioctl.c | 2
fs/cifs/cifs_unicode.c | 8
fs/ext4/inline.c | 1
fs/ext4/super.c | 5
fs/gfs2/glock.c | 3
fs/gfs2/rgrp.c | 5
fs/ocfs2/super.c | 1
fs/xfs/xfs_pnfs.c | 2
include/linux/can/skb.h | 20
include/linux/prandom.h | 36 +
include/linux/time64.h | 4
include/xen/events.h | 29 +
kernel/events/core.c | 7
kernel/events/internal.h | 2
kernel/exit.c | 5
kernel/reboot.c | 28 -
kernel/time/timer.c | 7
kernel/trace/ring_buffer.c | 54 +-
lib/random32.c | 463 ++++++++++++---------
lib/swiotlb.c | 6
mm/mempolicy.c | 6
net/ipv4/syncookies.c | 9
net/ipv6/sit.c | 2
net/ipv6/syncookies.c | 10
net/iucv/af_iucv.c | 3
net/mac80211/tx.c | 35 +
net/wireless/reg.c | 2
net/x25/af_x25.c | 2
net/xfrm/xfrm_state.c | 8
sound/hda/ext/hdac_ext_controller.c | 2
tools/perf/util/session.c | 1
67 files changed, 1412 insertions(+), 521 deletions(-)
Al Viro (1):
don't dump the threads that had been already exiting when zapped.
Alexander Aring (1):
gfs2: Wake up when sd_glock_disposal becomes zero
Alexander Usyskin (1):
mei: protect mei_cl_mtu from null dereference
Anand K Mistry (1):
x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
Bob Peterson (2):
gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free
gfs2: check for live vs. read-only file system in gfs2_fitrim
Boris Protopopov (1):
Convert trailing spaces and periods in path components
Chris Brandt (1):
usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
Christoph Hellwig (1):
xfs: fix a missing unlock on error in xfs_fs_map_blocks
Coiby Xu (2):
pinctrl: amd: use higher precision for 512 RtcClk
pinctrl: amd: fix incorrect way to disable debounce filter
Dan Carpenter (2):
ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
can: peak_usb: add range checking in decode operations
Eric Biggers (1):
ext4: fix leaking sysfs kobject after failed mount
Evan Nimmo (1):
of/address: Fix of_node memory leak in of_dma_is_coherent
Evan Quan (1):
drm/amdgpu: perform srbm soft reset always on SDMA resume
Evgeny Novikov (1):
usb: gadget: goku_udc: fix potential crashes in probe
Filipe Manana (1):
Btrfs: fix missing error return if writeback for extent buffer never started
George Spelvin (1):
random32: make prandom_u32() output unpredictable
Greg Kroah-Hartman (1):
Linux 4.4.244
Grzegorz Siwik (1):
i40e: Wrong truncation from u16 to u8
Jiri Olsa (2):
perf tools: Add missing swap for ino_generation
perf/core: Fix race in the perf_mmap_close() function
Johannes Berg (1):
mac80211: fix use of skb payload instead of header
Johannes Thumshirn (1):
btrfs: reschedule when cloning lots of extents
Joseph Qi (1):
ext4: unlock xattr_sem properly in ext4_inline_data_truncate()
Juergen Gross (12):
xen/events: avoid removing an event channel while handling it
xen/events: add a proper barrier to 2-level uevent unmasking
xen/events: fix race in evtchn_fifo_unmask()
xen/events: add a new "late EOI" evtchn framework
xen/blkback: use lateeoi irq binding
xen/netback: use lateeoi irq binding
xen/scsiback: use lateeoi irq binding
xen/pciback: use lateeoi irq binding
xen/events: switch user event channels to lateeoi model
xen/events: use a common cpu hotplug hook for event channels
xen/events: defer eoi in case of excessive number of events
xen/events: block rogue events for some time
Kaixu Xia (1):
ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
Mao Wenan (1):
net: Update window_clamp if SOCK_RCVBUF is set
Mark Gray (1):
geneve: add transport ports in route lookup for geneve
Martin Schiller (1):
net/x25: Fix null-ptr-deref in x25_connect
Martyna Szapar (1):
i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c
Masashi Honma (1):
ath9k_htc: Use appropriate rs_datalen type
Matteo Croce (2):
Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
reboot: fix overflow parsing reboot cpu number
Oleksij Rempel (1):
can: can_create_echo_skb(): fix echo skb generation: always use skb_clone()
Oliver Hartkopp (1):
can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames
Oliver Herms (1):
IPv6: Set SIT tunnel hard_header_len to zero
Peter Zijlstra (1):
perf: Fix get_recursion_context()
Shijie Luo (1):
mm: mempolicy: fix potential pte_unmap_unlock pte error
Stefano Stabellini (1):
swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb"
Stephane Grosjean (1):
can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
Steven Rostedt (VMware) (1):
ring-buffer: Fix recursion protection transitions between interrupt context
Suravee Suthikulpanit (1):
iommu/amd: Increase interrupt remapping table limit to 512 entries
Thomas Zimmermann (1):
drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]
Ursula Braun (1):
net/af_iucv: fix null pointer dereference on shutdown
Vincent Mailhol (1):
can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
Wang Hai (1):
cosa: Add missing kfree in error path of cosa_write
Wengang Wang (1):
ocfs2: initialize ip_next_orphan
Will Deacon (1):
pinctrl: devicetree: Avoid taking direct reference to device name string
Ye Bin (1):
cfg80211: regulatory: Fix inconsistent format argument
Zeng Tao (1):
time: Prevent undefined behaviour in timespec64_to_ns()
zhuoliang zhang (1):
net: xfrm: fix a race condition during allocing spi
Reshape request should be blocked with ongoing resync job. In cluster
env, a node can start resync job even if the resync cmd isn't executed
on it, e.g., user executes "mdadm --grow" on node A, sometimes node B
will start resync job. However, current update_raid_disks() only check
local recovery status, which is incomplete. As a result, we see user will
execute "mdadm --grow" successfully on local, while the remote node deny
to do reshape job when it doing resync job. The inconsistent handling
cause array enter unexpected status. If user doesn't observe this issue
and continue executing mdadm cmd, the array doesn't work at last.
Fix this issue by blocking reshape request. When node executes "--grow"
and detects ongoing resync, it should stop and report error to user.
The following script reproduces the issue with ~100% probability.
(two nodes share 3 iSCSI luns: sdg/sdh/sdi. Each lun size is 1GB)
```
# on node1, node2 is the remote node.
ssh root@node2 "mdadm -S --scan"
mdadm -S --scan
for i in {g,h,i};do dd if=/dev/zero of=/dev/sd$i oflag=direct bs=1M \
count=20; done
mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sdg /dev/sdh
ssh root@node2 "mdadm -A /dev/md0 /dev/sdg /dev/sdh"
sleep 5
mdadm --manage --add /dev/md0 /dev/sdi
mdadm --wait /dev/md0
mdadm --grow --raid-devices=3 /dev/md0
mdadm /dev/md0 --fail /dev/sdg
mdadm /dev/md0 --remove /dev/sdg
mdadm --grow --raid-devices=2 /dev/md0
```
Cc: stable(a)vger.kernel.org
Signed-off-by: Zhao Heming <heming.zhao(a)suse.com>
---
drivers/md/md.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 98bac4f304ae..74280e353b8f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7278,6 +7278,7 @@ static int update_raid_disks(struct mddev *mddev, int raid_disks)
return -EINVAL;
if (mddev->sync_thread ||
test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
+ test_bit(MD_RESYNCING_REMOTE, &mddev->recovery) ||
mddev->reshape_position != MaxSector)
return -EBUSY;
@@ -9662,8 +9663,11 @@ static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev)
}
}
- if (mddev->raid_disks != le32_to_cpu(sb->raid_disks))
- update_raid_disks(mddev, le32_to_cpu(sb->raid_disks));
+ if (mddev->raid_disks != le32_to_cpu(sb->raid_disks)) {
+ ret = update_raid_disks(mddev, le32_to_cpu(sb->raid_disks));
+ if (ret)
+ pr_warn("md: updating array disks failed. %d\n", ret);
+ }
/*
* Since mddev->delta_disks has already updated in update_raid_disks,
--
2.27.0
[This is backport for 4.9 of 29daf869cbab69088fe1755d9dd224e99ba78b56]
The kernel expects pte_young() to work regardless of CONFIG_SWAP.
Make sure a minor fault is taken to set _PAGE_ACCESSED when it
is not already set, regardless of the selection of CONFIG_SWAP.
This adds at least 3 instructions to the TLB miss exception
handlers fast path. Following patch will reduce this overhead.
Also update the rotation instruction to the correct number of bits
to reflect all changes done to _PAGE_ACCESSED over time.
Fixes: d069cb4373fe ("powerpc/8xx: Don't touch ACCESSED when no SWAP.")
Fixes: 5f356497c384 ("powerpc/8xx: remove unused _PAGE_WRITETHRU")
Fixes: e0a8e0d90a9f ("powerpc/8xx: Handle PAGE_USER via APG bits")
Fixes: 5b2753fc3e8a ("powerpc/8xx: Implementation of PAGE_EXEC")
Fixes: a891c43b97d3 ("powerpc/8xx: Prepare handlers for _PAGE_HUGE for 512k pages.")
Cc: stable(a)vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy(a)csgroup.eu>
Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au>
Link: https://lore.kernel.org/r/af834e8a0f1fa97bfae65664950f0984a70c4750.16024928…
---
arch/powerpc/kernel/head_8xx.S | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 2274be535dda..3801b32b1642 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -359,11 +359,9 @@ InstructionTLBMiss:
/* Load the MI_TWC with the attributes for this "segment." */
MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */
-#ifdef CONFIG_SWAP
- rlwinm r11, r10, 32-5, _PAGE_PRESENT
+ rlwinm r11, r10, 32-11, _PAGE_PRESENT
and r11, r11, r10
rlwimi r10, r11, 0, _PAGE_PRESENT
-#endif
li r11, RPN_PATTERN
/* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 20-23 and 28 must be clear.
@@ -443,11 +441,9 @@ _ENTRY(DTLBMiss_jmp)
* r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5));
* r10 = (r10 & ~PRESENT) | r11;
*/
-#ifdef CONFIG_SWAP
- rlwinm r11, r10, 32-5, _PAGE_PRESENT
+ rlwinm r11, r10, 32-11, _PAGE_PRESENT
and r11, r11, r10
rlwimi r10, r11, 0, _PAGE_PRESENT
-#endif
/* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 22 and 28 must be clear.
* Software indicator bits 24, 25, 26, and 27 must be
--
2.25.0
[This is backport for 4.4 of 29daf869cbab69088fe1755d9dd224e99ba78b56]
The kernel expects pte_young() to work regardless of CONFIG_SWAP.
Make sure a minor fault is taken to set _PAGE_ACCESSED when it
is not already set, regardless of the selection of CONFIG_SWAP.
This adds at least 3 instructions to the TLB miss exception
handlers fast path. Following patch will reduce this overhead.
Also update the rotation instruction to the correct number of bits
to reflect all changes done to _PAGE_ACCESSED over time.
Fixes: d069cb4373fe ("powerpc/8xx: Don't touch ACCESSED when no SWAP.")
Fixes: 5f356497c384 ("powerpc/8xx: remove unused _PAGE_WRITETHRU")
Fixes: e0a8e0d90a9f ("powerpc/8xx: Handle PAGE_USER via APG bits")
Fixes: 5b2753fc3e8a ("powerpc/8xx: Implementation of PAGE_EXEC")
Fixes: a891c43b97d3 ("powerpc/8xx: Prepare handlers for _PAGE_HUGE for 512k pages.")
Cc: stable(a)vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy(a)csgroup.eu>
Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au>
Link: https://lore.kernel.org/r/af834e8a0f1fa97bfae65664950f0984a70c4750.16024928…
---
arch/powerpc/kernel/head_8xx.S | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 01e274e6907b..3d7512e72900 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -361,11 +361,9 @@ InstructionTLBMiss:
/* Load the MI_TWC with the attributes for this "segment." */
MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */
-#ifdef CONFIG_SWAP
- rlwinm r11, r10, 32-5, _PAGE_PRESENT
+ rlwinm r11, r10, 32-11, _PAGE_PRESENT
and r11, r11, r10
rlwimi r10, r11, 0, _PAGE_PRESENT
-#endif
li r11, RPN_PATTERN
/* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 20-23 and 28 must be clear.
@@ -436,11 +434,9 @@ DataStoreTLBMiss:
* r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5));
* r10 = (r10 & ~PRESENT) | r11;
*/
-#ifdef CONFIG_SWAP
- rlwinm r11, r10, 32-5, _PAGE_PRESENT
+ rlwinm r11, r10, 32-11, _PAGE_PRESENT
and r11, r11, r10
rlwimi r10, r11, 0, _PAGE_PRESENT
-#endif
/* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 22 and 28 must be clear.
* Software indicator bits 24, 25, 26, and 27 must be
--
2.25.0