Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
bb57768
mt76: add missing lock configuring coverage class
LorenzoBianconi Jun 2, 2020
d941f47
mt76: mt7615: fix lmac queue debugsfs entry
LorenzoBianconi May 30, 2020
a07292e
mt76: mt7615: fix hw queue mapping
LorenzoBianconi May 30, 2020
7f88314
mt76: overwrite qid for non-bufferable mgmt frames
LorenzoBianconi Jun 1, 2020
fbb1461
iwlwifi: mvm: don't call iwl_mvm_free_inactive_queue() under RCU
jmberg-intel Apr 3, 2020
ea0cca6
iwlwifi: fix crash in iwl_dbg_tlv_alloc_trigger
Jun 12, 2020
6247c3b
Merge tag 'mt76-for-kvalo-2020-06-07' of https://github.com/nbd168/wi…
Jun 23, 2020
4ac668a
mt76: mt76x02: do not access uninitialized NAPI structs
nbd168 Jun 15, 2020
b1e79d1
mt76: mt7663u: fix memory leaks in mt7663u_probe
LorenzoBianconi Jun 21, 2020
dc7bd30
mt76: mt7615: fix EEPROM buffer size
nbd168 Jun 22, 2020
0bda49f
efi/x86: Remove unused variables
nivedita76 Jun 18, 2020
59476f8
efi/x86: Only copy upto the end of setup_header
nivedita76 Jun 18, 2020
c1aac64
efi/libstub/arm64: link stub lib.a conditionally
masahir0y Jun 4, 2020
950accb
efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds
atishp04 Jun 25, 2020
3230d95
efi/libstub: Move the function prototypes to header file
atishp04 Jul 6, 2020
f88814c
efi/efivars: Expose RT service availability via efivars abstraction
ardbiesheuvel Jul 8, 2020
769e0fe
efi: Revert "efi/x86: Fix build with gcc 4"
ardbiesheuvel Jul 9, 2020
163e9ef
bnxt_en: Fix race when modifying pause settings.
Jul 12, 2020
ca0c753
bnxt_en: Init ethtool link settings after reading updated PHY configu…
Jul 12, 2020
27640ce
bnxt_en: Fix completion ring sizing with TPA enabled.
Jul 12, 2020
d99c6fa
Merge branch 'bnxt_en-fixes'
davem330 Jul 12, 2020
e048401
usb: hso: Fix debug compile warning on sparc32
geertu Jul 13, 2020
46ef5b8
ip6_gre: fix null-ptr-deref in ip6gre_init_net()
Jul 13, 2020
d113c0f
Merge tag 'wireless-drivers-2020-07-13' of git://git.kernel.org/pub/s…
davem330 Jul 14, 2020
3195c47
hippi: Fix a size used in a 'pci_free_consistent()' in an error handl…
tititiou36 Jul 14, 2020
ff021f2
gianfar: Use random MAC address when none is given
fidomax Jul 14, 2020
651149f
selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion
piso77 Jul 14, 2020
1d61e21
qed: Disable "MFW indication via attention" SPAM every 5 minutes
loberman Jul 14, 2020
1e9451c
netfilter: nf_tables: fix nat hook table deletion
Jul 14, 2020
841eb40
dpaa2-eth: check fsl_mc_get_endpoint for IS_ERR_OR_NULL()
IoanaCiornei Jul 14, 2020
f961134
vsock/virtio: annotate 'the_virtio_vsock' RCU pointer
stefano-garzarella Jul 10, 2020
c28d9a2
ax88172a: fix ax88172a_unbind() failures
gkennedy12 Jul 15, 2020
3407463
net: fec: fix hardware time stamping by external devices
sorganov Jul 14, 2020
473309f
net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual conf…
sorganov Jul 15, 2020
66673f9
ieee802154: fix one possible memleak in adf7242_probe
liujian56 Jul 17, 2020
56a1c77
docs: ptp.rst: add support for Renesas (IDT) ClockMatrix
Jul 14, 2020
cebb697
rtnetlink: Fix memory(net_device) leak when ->newlink fails
Jul 15, 2020
bca9749
net: smc91x: Fix possible memory leak in smc_drv_probe()
Jul 16, 2020
aba69d4
selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support
piso77 Jul 16, 2020
2f11f0d
net: bcmgenet: test MPD_EN when resuming
Jul 16, 2020
3d653ad
net: bcmgenet: test RBUF_ACPI_EN when resuming
Jul 16, 2020
a8c6454
net: bcmgenet: restore HFB filters on resume
Jul 16, 2020
1291517
Merge branch 'bcmgenet-WAKE_FILTER'
davem330 Jul 17, 2020
0b4a66a
nfc: nci: add missed destroy_workqueue in nci_register_device
Jul 17, 2020
23e500e
net: atlantic: disable PTP on AQC111, AQC112
Jul 17, 2020
2ccb016
net: macb: use phy_interface_mode_is_rgmii everywhere
alexandrebelloni Jul 17, 2020
7f5f814
rhashtable: drop duplicated word in <linux/rhashtable.h>
rddunlap Jul 17, 2020
6d6148b
net: hsr: fix incorrect lsdu size in the tag of HSR frames for small …
Jul 17, 2020
eea9f73
net: hsr: validate address B before copying to skb
Jul 17, 2020
9b87377
mlxsw: core: Fix wrong SFP EEPROM reading for upper pages 1-3
mellanoxbmc Jul 17, 2020
a35fffb
net/smc: handle unexpected response types for confirm link
karstengr Jul 18, 2020
68fd894
net/smc: clear link during SMC client link down processing
karstengr Jul 18, 2020
7df8bcb
net/smc: fix link lookup for new rdma connections
karstengr Jul 18, 2020
6367359
net/smc: protect smc ib device initialization
karstengr Jul 18, 2020
2ff0867
net/smc: drop out-of-flow llc response messages
karstengr Jul 18, 2020
c48254f
net/smc: move add link processing for new device into llc layer
karstengr Jul 18, 2020
b9979c2
net/smc: fix handling of delete link requests
karstengr Jul 18, 2020
741a49a
net/smc: do not call dma sync for unmapped memory
karstengr Jul 18, 2020
fd7f3a7
net/smc: remove freed buffer from list
karstengr Jul 18, 2020
1ad2405
net/smc: fix restoring of fallback changes
karstengr Jul 18, 2020
a463fa2
Merge branch 'net-smc-fixes'
davem330 Jul 19, 2020
fad5819
net: dsa: mv88e6xxx: fix in-band AN link establishment
Jul 19, 2020
7c6719a
arm64: dts: clearfog-gt-8k: fix switch link configuration
Jul 19, 2020
544f287
bonding: check error value of register_netdevice() immediately
TaeheeYoo Jul 19, 2020
19dc365
net: ieee802154: adf7242: Replace HTTP links with HTTPS ones
Al2Klimov Jul 19, 2020
92f53e2
ath9k: Fix regression with Atheros 9271
shiftee Jul 11, 2020
b5ba46b
iwlwifi: Make some Killer Wireless-AC 1550 cards work again
alessiobonfiglio Jul 14, 2020
1cfd342
ath10k: Fix NULL pointer dereference in AHB device probe
hauke Jul 14, 2020
24a63fe
net: bcmgenet: fix error returns in bcmgenet_probe()
Jul 20, 2020
53a9288
net: bcmgenet: add missed clk_disable_unprepare in bcmgenet_probe
Jul 20, 2020
7d85396
Merge tag 'ieee802154-for-davem-2020-07-20' of git://git.kernel.org/p…
davem330 Jul 21, 2020
639f181
rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA
dhowells Jul 20, 2020
2bced6a
net/smc: put slot when connection is killed
karstengr Jul 20, 2020
a9e4450
net/smc: fix dmb buffer shortage
karstengr Jul 20, 2020
d49e2c9
Merge branch 'smc-fixes'
davem330 Jul 21, 2020
6790711
dpaa_eth: Fix one possible memleak in dpaa_eth_probe
liujian56 Jul 20, 2020
5dbaeb8
mlxsw: destroy workqueue when trap_register in mlxsw_emad_init
liujian56 Jul 20, 2020
34b85ad
Documentation: bareudp: update iproute2 sample commands
Jul 20, 2020
5d93518
net: hsr: check for return value of skb_put_padto()
Jul 20, 2020
f85ae16
ionic: use offset for ethtool regs data
emusln Jul 20, 2020
cbec215
ionic: fix up filter locks and debug msgs
emusln Jul 20, 2020
cc4428c
ionic: update filter id after replay
emusln Jul 20, 2020
bdff466
ionic: keep rss hash after fw update
emusln Jul 20, 2020
0925e9d
ionic: use mutex to protect queue operations
emusln Jul 20, 2020
4932893
Merge branch 'ionic-locking-and-filter-fixes'
davem330 Jul 21, 2020
c271042
crypto/chtls: fix tls alert messages corrupted by tls data
vinaychelsio Jul 17, 2020
30d9e50
crypto/chtls: correct net_device reference count
vinaychelsio Jul 17, 2020
1e8fd3a
nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
Navidem Jul 18, 2020
ae372cb
net/sched: act_ct: fix restore the qdisc_skb_cb after defrag
Jul 19, 2020
befc113
net: ag71xx: add missed clk_disable_unprepare in error path of probe
Jul 20, 2020
db44c60
net: neterion: vxge: reduce stack usage in VXGE_COMPLETE_VPATH_TX
Jul 20, 2020
6ef9dcb
tipc: allow to build NACK message in link timeout function
Jul 21, 2020
4cb699d
riscv: kasan: use local_tlb_flush_all() to avoid uninitialized __sbi_…
VincentZWC Jul 10, 2020
6cfcd55
clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4
tmlind Jul 13, 2020
b4a25fb
Merge tag 'timers-v5.8-rc7' of https://git.linaro.org/people/daniel.l…
KAGA-KOKO Jul 21, 2020
f2b2c55
udp: Copy has_conns in reuseport_grow().
q2ven Jul 21, 2020
efc6b6f
udp: Improve load balancing for SO_REUSEPORT.
q2ven Jul 21, 2020
ca67323
Merge branch 'udp-Fix-reuseport-selection-with-connected-sockets'
davem330 Jul 21, 2020
015c5d5
net: ethernet: ravb: exit if re-initialization fails in tx timeout
shimoday Jul 21, 2020
9bb5fbe
net-sysfs: add a newline when printing 'tx_timeout' by sysfs
fenghusthu Jul 21, 2020
b0a4227
net: udp: Fix wrong clean up for IS_UDPLITE macro
MiaoheLin Jul 21, 2020
0ec3b6a
net: hns3: fix for not unmapping TX buffer correctly
Jul 21, 2020
48ae74c
net: hns3: fix for not calculating TX BD send size correctly
Jul 21, 2020
8ceca59
net: hns3: fix error handling for desc filling
Jul 21, 2020
fac24df
net: hns3: fix return value error when query MAC link status fail
IronShen Jul 21, 2020
2dc3bd7
Merge branch 'hns3-fixes'
davem330 Jul 21, 2020
3506b2f
net: dsa: microchip: call phy_remove_link_mode during probe
Jul 21, 2020
2c9d8e0
netdevsim: fix unbalaced locking in nsim_create()
TaeheeYoo Jul 21, 2020
1ea9990
qed: suppress "don't support RoCE & iWARP" flooding on HW init
solbjorn Jul 21, 2020
eb61c2d
qed: suppress false-positives interrupt error messages on HW init
solbjorn Jul 21, 2020
785ed9c
Merge branch 'qed-suppress-irrelevant-error-messages-on-HW-init'
davem330 Jul 21, 2020
b346c0c
selftest: txtimestamp: fix net ns entry logic
piso77 Jul 21, 2020
8210e34
ipvs: fix the connection sync failed in some cases
guodeqing-hw Jul 16, 2020
8fdcabe
drivers/net/wan/x25_asy: Fix to make it work
Jul 16, 2020
1264d7f
net: ethernet: ave: Fix error returns in ave_init
Jul 17, 2020
2c4dc31
net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
Jul 17, 2020
de2b41b
x86, vmlinux.lds: Page-align end of ..page_aligned sections
joergroedel Jul 21, 2020
d136122
sched: Fix race against ptrace_freeze_trace()
Jul 20, 2020
372a8ea
x86/unwind/orc: Fix ORC for newly forked tasks
jpoimboe Jul 17, 2020
039a7a3
x86/stacktrace: Fix reliable check for empty user task stacks
jpoimboe Jul 17, 2020
d181d2d
x86/dumpstack: Dump user space code correctly again
KAGA-KOKO Jul 22, 2020
74f8555
Merge tag 'efi-urgent-for-v5.8-rc4' of git://git.kernel.org/pub/scm/l…
KAGA-KOKO Jul 22, 2020
26cb708
enetc: Remove the mdio bus on PF probe bailout
claudiu-m Jul 22, 2020
2f2a7ff
AX.25: Fix out-of-bounds read in ax25_connect()
peilin-ye Jul 22, 2020
8f13399
sctp: shrink stream outq only when new outcnt < old outcnt
lxin Jul 22, 2020
3ecdda3
sctp: shrink stream outq when fails to do addstream reconf
lxin Jul 22, 2020
f659173
Merge branch 'sctp-shrink-stream-outq-in-the-right-place'
davem330 Jul 23, 2020
8885bb0
AX.25: Prevent out-of-bounds read in ax25_sendmsg()
peilin-ye Jul 22, 2020
901f3cc
net: atlantic: fix PTP on AQC10X
Jul 22, 2020
e6827d1
cxgb4: add missing release on skb in uld_send()
Navidem Jul 23, 2020
17ad73e
AX.25: Prevent integer overflows in connect and sendmsg
Jul 23, 2020
76be93f
tcp: allow at most one TLP probe per flight
yuchungcheng Jul 23, 2020
0e67051
Revert "cifs: Fix the target file was deleted when rename failed."
smfrench Jul 23, 2020
c75d1d5
bonding: check return value of register_netdevice() in bond_newlink()
congwang Jul 22, 2020
32818c0
geneve: fix an uninitialized value in geneve_changelink()
congwang Jul 23, 2020
8e81358
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
davem330 Jul 24, 2020
062d3f9
sched: Warn if garbage is passed to default_wake_function()
ickle Jul 23, 2020
fe5ed7a
uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL,…
oleg-nesterov Jul 23, 2020
c2b69f2
flow_offload: Move rhashtable inclusion to the source file
herbertx Jul 24, 2020
c2c6331
xen-netfront: fix potential deadlock in xennet_remove()
Jul 24, 2020
657237f
Merge tag 'wireless-drivers-2020-07-24' of git://git.kernel.org/pub/s…
davem330 Jul 25, 2020
af9f691
qrtr: orphan socket in qrtr_release()
congwang Jul 24, 2020
d0d8aae
RISC-V: Set maximum number of mapped pages correctly
atishp04 Jul 15, 2020
7df5cb7
dev: Defer free of skbs in flush_backlog
Jul 23, 2020
8754e13
drivers/net/wan: lapb: Corrected the usage of skb_cow
Jul 24, 2020
4400231
RISC-V: Do not rely on initrd_start/end computed during early dt parsing
atishp04 Jul 15, 2020
fa5a198
riscv: Parse all memory blocks to remove unusable memory
atishp04 Jul 15, 2020
1b64b2e
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net into m…
torvalds Jul 25, 2020
7cb3a5c
Merge tag '5.8-rc6-cifs-fix' of git://git.samba.org/sfrench/cifs-2.6 …
torvalds Jul 25, 2020
17baa44
Merge tag 'efi-urgent-2020-07-25' of git://git.kernel.org/pub/scm/lin…
torvalds Jul 25, 2020
3077805
Merge tag 'sched-urgent-2020-07-25' of git://git.kernel.org/pub/scm/l…
torvalds Jul 25, 2020
a7b36c2
Merge tag 'timers-urgent-2020-07-25' of git://git.kernel.org/pub/scm/…
torvalds Jul 25, 2020
78b1afe
Merge tag 'perf-urgent-2020-07-25' of git://git.kernel.org/pub/scm/li…
torvalds Jul 25, 2020
fbe0d45
Merge tag 'x86-urgent-2020-07-25' of git://git.kernel.org/pub/scm/lin…
torvalds Jul 25, 2020
04300d6
Merge tag 'riscv-for-linus-5.8-rc7' of git://git.kernel.org/pub/scm/l…
torvalds Jul 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Documentation/driver-api/ptp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PTP hardware clock infrastructure for Linux
+ Ancillary clock features
- Time stamp external events
- Period output signals configurable from user space
- Low Pass Filter (LPF) access from user space
- Synchronization of the Linux system time via the PPS subsystem

PTP hardware clock kernel API
Expand Down Expand Up @@ -94,3 +95,14 @@ Supported hardware

- Auxiliary Slave/Master Mode Snapshot (optional interrupt)
- Target Time (optional interrupt)

* Renesas (IDT) ClockMatrix™

- Up to 4 independent PHC channels
- Integrated low pass filter (LPF), access via .adjPhase (compliant to ITU-T G.8273.2)
- Programmable output periodic signals
- Programmable inputs can time stamp external triggers
- Driver and/or hardware configuration through firmware (idtcm.bin)
- LPF settings (bandwidth, phase limiting, automatic holdover, physical layer assist (per ITU-T G.8273.2))
- Programmable output PTP clocks, any frequency up to 1GHz (to other PHY/MAC time stampers, refclk to ASSPs/SoCs/FPGAs)
- Lock to GNSS input, automatic switching between GNSS and user-space PHC control (optional)
19 changes: 13 additions & 6 deletions Documentation/networking/bareudp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,29 @@ Usage

1) Device creation & deletion

a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847.
a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc

This creates a bareudp tunnel device which tunnels L3 traffic with ethertype
0x8847 (MPLS traffic). The destination port of the UDP header will be set to
6635.The device will listen on UDP port 6635 to receive traffic.

b) ip link delete bareudp0

2) Device creation with multiple proto mode enabled
2) Device creation with multiproto mode enabled

There are two ways to create a bareudp device for MPLS & IP with multiproto mode
enabled.
The multiproto mode allows bareudp tunnels to handle several protocols of the
same family. It is currently only available for IP and MPLS. This mode has to
be enabled explicitly with the "multiproto" flag.

a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847 multiproto
a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype ipv4 multiproto

b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls
For an IPv4 tunnel the multiproto mode allows the tunnel to also handle
IPv6.

b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc multiproto

For MPLS, the multiproto mode allows the tunnel to handle both unicast
and multicast MPLS packets.

3) Device Usage

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export TEXT_OFFSET

core-y += arch/arm64/
libs-y := arch/arm64/lib/ $(libs-y)
core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a

# Default target when executing plain make
boot := arch/arm64/boot
Expand Down
5 changes: 1 addition & 4 deletions arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,7 @@
status = "okay";
phy-mode = "2500base-x";
phys = <&cp1_comphy5 2>;
fixed-link {
speed = <2500>;
full-duplex;
};
managed = "in-band-status";
};

&cp1_spi1 {
Expand Down
66 changes: 45 additions & 21 deletions arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,40 @@ void __init mem_init(void)
#ifdef CONFIG_BLK_DEV_INITRD
static void __init setup_initrd(void)
{
phys_addr_t start;
unsigned long size;

if (initrd_start >= initrd_end) {
pr_info("initrd not found or empty");
/* Ignore the virtul address computed during device tree parsing */
initrd_start = initrd_end = 0;

if (!phys_initrd_size)
return;
/*
* Round the memory region to page boundaries as per free_initrd_mem()
* This allows us to detect whether the pages overlapping the initrd
* are in use, but more importantly, reserves the entire set of pages
* as we don't want these pages allocated for other purposes.
*/
start = round_down(phys_initrd_start, PAGE_SIZE);
size = phys_initrd_size + (phys_initrd_start - start);
size = round_up(size, PAGE_SIZE);

if (!memblock_is_region_memory(start, size)) {
pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region",
(u64)start, size);
goto disable;
}
if (__pa_symbol(initrd_end) > PFN_PHYS(max_low_pfn)) {
pr_err("initrd extends beyond end of memory");

if (memblock_is_region_reserved(start, size)) {
pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region\n",
(u64)start, size);
goto disable;
}

size = initrd_end - initrd_start;
memblock_reserve(__pa_symbol(initrd_start), size);
memblock_reserve(start, size);
/* Now convert initrd to virtual addresses */
initrd_start = (unsigned long)__va(phys_initrd_start);
initrd_end = initrd_start + phys_initrd_size;
initrd_below_start_ok = 1;

pr_info("Initial ramdisk at: 0x%p (%lu bytes)\n",
Expand All @@ -126,33 +147,36 @@ void __init setup_bootmem(void)
{
struct memblock_region *reg;
phys_addr_t mem_size = 0;
phys_addr_t total_mem = 0;
phys_addr_t mem_start, end = 0;
phys_addr_t vmlinux_end = __pa_symbol(&_end);
phys_addr_t vmlinux_start = __pa_symbol(&_start);

/* Find the memory region containing the kernel */
for_each_memblock(memory, reg) {
phys_addr_t end = reg->base + reg->size;

if (reg->base <= vmlinux_start && vmlinux_end <= end) {
mem_size = min(reg->size, (phys_addr_t)-PAGE_OFFSET);

/*
* Remove memblock from the end of usable area to the
* end of region
*/
if (reg->base + mem_size < end)
memblock_remove(reg->base + mem_size,
end - reg->base - mem_size);
}
end = reg->base + reg->size;
if (!total_mem)
mem_start = reg->base;
if (reg->base <= vmlinux_start && vmlinux_end <= end)
BUG_ON(reg->size == 0);
total_mem = total_mem + reg->size;
}
BUG_ON(mem_size == 0);

/*
* Remove memblock from the end of usable area to the
* end of region
*/
mem_size = min(total_mem, (phys_addr_t)-PAGE_OFFSET);
if (mem_start + mem_size < end)
memblock_remove(mem_start + mem_size,
end - mem_start - mem_size);

/* Reserve from the start of the kernel to the end of the kernel */
memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);

set_max_mapnr(PFN_DOWN(mem_size));
max_pfn = PFN_DOWN(memblock_end_of_DRAM());
max_low_pfn = max_pfn;
set_max_mapnr(max_low_pfn);

#ifdef CONFIG_BLK_DEV_INITRD
setup_initrd();
Expand Down
4 changes: 2 additions & 2 deletions arch/riscv/mm/kasan_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ asmlinkage void __init kasan_early_init(void)
(__pa(((uintptr_t) kasan_early_shadow_pmd))),
__pgprot(_PAGE_TABLE)));

flush_tlb_all();
local_flush_tlb_all();
}

static void __init populate(void *start, void *end)
Expand Down Expand Up @@ -79,7 +79,7 @@ static void __init populate(void *start, void *end)
pfn_pgd(PFN_DOWN(__pa(&pmd[offset])),
__pgprot(_PAGE_TABLE)));

flush_tlb_all();
local_flush_tlb_all();
memset(start, 0, end - start);
}

Expand Down
27 changes: 17 additions & 10 deletions arch/x86/kernel/dumpstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ static void printk_stack_address(unsigned long address, int reliable,
printk("%s %s%pB\n", log_lvl, reliable ? "" : "? ", (void *)address);
}

static int copy_code(struct pt_regs *regs, u8 *buf, unsigned long src,
unsigned int nbytes)
{
if (!user_mode(regs))
return copy_from_kernel_nofault(buf, (u8 *)src, nbytes);

/*
* Make sure userspace isn't trying to trick us into dumping kernel
* memory by pointing the userspace instruction pointer at it.
*/
if (__chk_range_not_ok(src, nbytes, TASK_SIZE_MAX))
return -EINVAL;

return copy_from_user_nmi(buf, (void __user *)src, nbytes);
}

/*
* There are a couple of reasons for the 2/3rd prologue, courtesy of Linus:
*
Expand All @@ -97,17 +113,8 @@ void show_opcodes(struct pt_regs *regs, const char *loglvl)
#define OPCODE_BUFSIZE (PROLOGUE_SIZE + 1 + EPILOGUE_SIZE)
u8 opcodes[OPCODE_BUFSIZE];
unsigned long prologue = regs->ip - PROLOGUE_SIZE;
bool bad_ip;

/*
* Make sure userspace isn't trying to trick us into dumping kernel
* memory by pointing the userspace instruction pointer at it.
*/
bad_ip = user_mode(regs) &&
__chk_range_not_ok(prologue, OPCODE_BUFSIZE, TASK_SIZE_MAX);

if (bad_ip || copy_from_kernel_nofault(opcodes, (u8 *)prologue,
OPCODE_BUFSIZE)) {
if (copy_code(regs, opcodes, prologue, sizeof(opcodes))) {
printk("%sCode: Bad RIP value.\n", loglvl);
} else {
printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %"
Expand Down
5 changes: 0 additions & 5 deletions arch/x86/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry,
* or a page fault), which can make frame pointers
* unreliable.
*/

if (IS_ENABLED(CONFIG_FRAME_POINTER))
return -EINVAL;
}
Expand All @@ -81,10 +80,6 @@ int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry,
if (unwind_error(&state))
return -EINVAL;

/* Success path for non-user tasks, i.e. kthreads and idle tasks */
if (!(task->flags & (PF_KTHREAD | PF_IDLE)))
return -EINVAL;

return 0;
}

Expand Down
8 changes: 6 additions & 2 deletions arch/x86/kernel/unwind_orc.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,11 @@ bool unwind_next_frame(struct unwind_state *state)
/*
* Find the orc_entry associated with the text address.
*
* Decrement call return addresses by one so they work for sibling
* calls and calls to noreturn functions.
* For a call frame (as opposed to a signal frame), state->ip points to
* the instruction after the call. That instruction's stack layout
* could be different from the call instruction's layout, for example
* if the call was to a noreturn function. So get the ORC data for the
* call instruction itself.
*/
orc = orc_find(state->signal ? state->ip : state->ip - 1);
if (!orc) {
Expand Down Expand Up @@ -662,6 +665,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
state->sp = task->thread.sp;
state->bp = READ_ONCE_NOCHECK(frame->bp);
state->ip = READ_ONCE_NOCHECK(frame->ret_addr);
state->signal = (void *)state->ip == ret_from_fork;
}

if (get_stack_info((unsigned long *)state->sp, state->task,
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ SECTIONS
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__bss_start = .;
*(.bss..page_aligned)
. = ALIGN(PAGE_SIZE);
*(BSS_MAIN)
BSS_DECRYPTED
. = ALIGN(PAGE_SIZE);
Expand Down
22 changes: 22 additions & 0 deletions drivers/bus/ti-sysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,24 @@ static int sysc_check_disabled_devices(struct sysc *ddata)
return error;
}

/*
* Ignore timers tagged with no-reset and no-idle. These are likely in use,
* for example by drivers/clocksource/timer-ti-dm-systimer.c. If more checks
* are needed, we could also look at the timer register configuration.
*/
static int sysc_check_active_timer(struct sysc *ddata)
{
if (ddata->cap->type != TI_SYSC_OMAP2_TIMER &&
ddata->cap->type != TI_SYSC_OMAP4_TIMER)
return 0;

if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
return -EBUSY;

return 0;
}

static const struct of_device_id sysc_match_table[] = {
{ .compatible = "simple-bus", },
{ /* sentinel */ },
Expand Down Expand Up @@ -2921,6 +2939,10 @@ static int sysc_probe(struct platform_device *pdev)
if (error)
return error;

error = sysc_check_active_timer(ddata);
if (error)
return error;

error = sysc_get_clocks(ddata);
if (error)
return error;
Expand Down
Loading