]> Git Repo - linux.git/log
linux.git
7 years agoMerge branch 'pci/resource' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:25 +0000 (12:11 -0600)]
Merge branch 'pci/resource' into next

* pci/resource:
  PCI: Fail pci_map_rom() if the option ROM is invalid
  PCI: Move pci_map_rom() error path
  x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)
  PCI: Add pci_resize_resource() for resizing BARs
  PCI: Add resizable BAR infrastructure
  PCI: Add PCI resource type mask #define

7 years agoMerge branch 'pci/portdrv' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:24 +0000 (12:11 -0600)]
Merge branch 'pci/portdrv' into next

* pci/portdrv:
  PCI/portdrv: Turn off PCIe services during shutdown

7 years agoMerge branch 'pci/msi' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:23 +0000 (12:11 -0600)]
Merge branch 'pci/msi' into next

* pci/msi:
  PCI/portdrv: Compute MSI/MSI-X IRQ vectors after final allocation
  PCI/portdrv: Factor out Interrupt Message Number lookup
  PCI/portdrv: Consolidate comments
  PCI/portdrv: Add #defines for AER and DPC Interrupt Message Number masks

7 years agoMerge branch 'pci/misc' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:22 +0000 (12:11 -0600)]
Merge branch 'pci/misc' into next

* pci/misc:
  PCI: Fix kernel-doc build warning
  PCI: Move PCI_QUIRKS to the PCI bus menu
  alpha/PCI: Make pdev_save_srm_config() static
  PCI: Remove unused declarations
  PCI: Remove redundant pci_dev, pci_bus, resource declarations
  PCI: Remove redundant pcibios_set_master() declarations
  PCI/PME: Handle invalid data when reading Root Status
  x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst
  PCI: Constify pci_dev_type structure

7 years agoMerge branch 'pci/hotplug' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:22 +0000 (12:11 -0600)]
Merge branch 'pci/hotplug' into next

* pci/hotplug:
  PCI: pciehp: Do not clear Presence Detect Changed during initialization
  PCI: pciehp: Fix race condition handling surprise link down
  PCI: Distribute available resources to hotplug-capable bridges
  PCI: Distribute available buses to hotplug-capable bridges
  PCI: Do not allocate more buses than available in parent
  PCI: Open-code the two pass loop when scanning bridges
  PCI: Move pci_hp_add_bridge() to drivers/pci/probe.c
  PCI: Add for_each_pci_bridge() helper
  PCI: shpchp: Convert timers to use timer_setup()
  PCI: cpqphp: Convert timers to use timer_setup()
  PCI: pciehp: Convert timers to use timer_setup()
  PCI: ibmphp: Use common error handling code in unconfigure_boot_device()

7 years agoMerge branch 'pci/endpoint' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:21 +0000 (12:11 -0600)]
Merge branch 'pci/endpoint' into next

* pci/endpoint:
  misc: pci_endpoint_test: Fix BUG_ON error during pci_disable_msi()
  misc: pci_endpoint_test: Fix pci_endpoint_test not releasing resources on remove
  misc: pci_endpoint_test: Fix failure path return values in probe
  misc: pci_endpoint_test: Avoid triggering a BUG()
  misc: pci_endpoint_test: Prevent some integer overflows

7 years agoMerge branch 'pci/aspm' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:20 +0000 (12:11 -0600)]
Merge branch 'pci/aspm' into next

* pci/aspm:
  PCI/ASPM: Add L1 Substates definitions
  PCI/ASPM: Reformat ASPM register definitions
  PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD
  PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time
  PCI/ASPM: Deal with missing root ports in link state handling

7 years agoMerge branch 'pci/aer' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:20 +0000 (12:11 -0600)]
Merge branch 'pci/aer' into next

* pci/aer:
  PCI/AER: Report non-fatal errors only to the affected endpoint

7 years agoMerge branch 'pci/acpi' into next
Bjorn Helgaas [Tue, 14 Nov 2017 18:11:19 +0000 (12:11 -0600)]
Merge branch 'pci/acpi' into next

* pci/acpi:
  ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle

7 years agomailbox/omap: unregister mbox class
Arvind Yadav [Sat, 11 Nov 2017 18:09:18 +0000 (23:39 +0530)]
mailbox/omap: unregister mbox class

platform_driver_register() can fail here and we must unregister mbox
class.

Signed-off-by: Arvind Yadav <[email protected]>
Acked-by: Suman Anna <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
7 years agomailbox: mailbox-test: don't rely on rx_buffer content to signal data ready
Sudeep Holla [Thu, 28 Sep 2017 10:18:53 +0000 (11:18 +0100)]
mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready

Currently we rely on the first byte of the Rx buffer to check if there's
any data available to be read. If the first byte of the received buffer
is zero (i.e. null character), then we fail to signal that data is
available even when it's available.

Instead introduce a boolean variable to track the data availability and
update it in the channel receive callback as ready and clear it when the
data is read.

Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
7 years agomailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone
Sudeep Holla [Thu, 28 Sep 2017 10:18:52 +0000 (11:18 +0100)]
mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone

Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if
the controller sets txdone_by_poll. However some clients can have a
mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone.
However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that
case. In such scenario, we may end up with below warnings as the tx
ticker is run both by mailbox framework and the client.

WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 #242
Hardware name: ARM LTD ARM Juno Development Platform
task: ffff8009768ca700 task.stack: ffff8009768f8000
PC is at hrtimer_forward+0x88/0xd8
LR is at txdone_hrtimer+0xd4/0xf8
Call trace:
 hrtimer_forward+0x88/0xd8
 __hrtimer_run_queues+0xe4/0x158
 hrtimer_interrupt+0xa4/0x220
 arch_timer_handler_phys+0x30/0x40
 handle_percpu_devid_irq+0x78/0x130
 generic_handle_irq+0x24/0x38
 __handle_domain_irq+0x5c/0xb8
 gic_handle_irq+0x54/0xa8

This patch fixes the issue by resetting TXDONE_BY_POLL if client has set
knows_txdone.

Cc: Alexey Klimov <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
7 years agoPCI/ASPM: Add L1 Substates definitions
Bjorn Helgaas [Mon, 13 Nov 2017 14:36:40 +0000 (08:36 -0600)]
PCI/ASPM: Add L1 Substates definitions

Add and use #defines for L1 Substate register fields instead of hard-coding
the masks.  Also update comments to use names from the spec.  No functional
change intended.

Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Vidya Sagar <[email protected]>
7 years agoPCI/ASPM: Reformat ASPM register definitions
Bjorn Helgaas [Fri, 10 Nov 2017 21:13:10 +0000 (15:13 -0600)]
PCI/ASPM: Reformat ASPM register definitions

Reformat register field definitions in the style used elsewhere and align
comments with names used in the spec.  No functional change intended.

Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Vidya Sagar <[email protected]>
7 years agoPCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD
Bjorn Helgaas [Mon, 13 Nov 2017 21:05:50 +0000 (15:05 -0600)]
PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD

Previously we programmed the LTR_L1.2_THRESHOLD in the parent (upstream)
device using the capability pointer of the *child* (downstream) device,
which corrupted some random word of the parent's config space.

Use the parent's L1 SS capability pointer to program its
LTR_L1.2_THRESHOLD.

Fixes: aeda9adebab8 ("PCI/ASPM: Configure L1 substate settings")
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Vidya Sagar <[email protected]>
CC: [email protected] # v4.11+
CC: Rajat Jain <[email protected]>
7 years agonet: stmmac: fix LPI transitioning for dwmac4
Niklas Cassel [Tue, 14 Nov 2017 10:15:54 +0000 (11:15 +0100)]
net: stmmac: fix LPI transitioning for dwmac4

The LPI transitioning logic in stmmac_main uses
priv->tx_path_in_lpi_mode to enter/exit LPI.

However, priv->tx_path_in_lpi_mode is assigned
using the return value from host_irq_status().

So for dwmac4, priv->tx_path_in_lpi_mode was always false,
so stmmac_tx_clean() would always try to put us in eee mode,
and stmmac_xmit() would never take us out of eee mode.

To fix this, make host_irq_status() read and return the LPI
irq status also for dwmac4.

This also increments the existing LPI counters, so that
ethtool --statistics shows LPI transitions also for dwmac4.

For dwmac1000, irqs are enabled/disabled using the register
named "Interrupt Mask Register", and thus setting a bit disables
that specific irq.

For dwmac4 the matching register is named "MAC_Interrupt_Enable",
and thus setting a bit enables that specific irq.

Looking at dwmac1000_core.c, the irqs that are always enabled are:
LPI and PMT.

Looking at dwmac4_core.c, the irqs that are always enabled are:
PMT.

To be able to read the LPI irq status, we need to enable the LPI
irq also for dwmac4.

Signed-off-by: Niklas Cassel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoatm: horizon: Fix irq release error
Arvind Yadav [Tue, 14 Nov 2017 08:12:38 +0000 (13:42 +0530)]
atm: horizon: Fix irq release error

atm_dev_register() can fail here and passed parameters to free irq
which is not initialised. Initialization of 'dev->irq' happened after
the 'goto out_free_irq'. So using 'irq' insted of 'dev->irq' in
free_irq().

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet-sysfs: trigger netlink notification on ifalias change via sysfs
Roopa Prabhu [Tue, 14 Nov 2017 07:21:36 +0000 (23:21 -0800)]
net-sysfs: trigger netlink notification on ifalias change via sysfs

This patch adds netlink notifications on iflias changes via sysfs.
makes it consistent with the netlink path which also calls
netdev_state_change. Also makes it consistent with other sysfs
netdev_store operations.

Signed-off-by: Roopa Prabhu <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoopenvswitch: Using kfree_rcu() to simplify the code
Wei Yongjun [Tue, 14 Nov 2017 06:27:12 +0000 (06:27 +0000)]
openvswitch: Using kfree_rcu() to simplify the code

The callback function of call_rcu() just calls a kfree(), so we
can use kfree_rcu() instead of call_rcu() + callback function.

Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoopenvswitch: Make local function ovs_nsh_key_attr_size() static
Wei Yongjun [Tue, 14 Nov 2017 06:27:03 +0000 (06:27 +0000)]
openvswitch: Make local function ovs_nsh_key_attr_size() static

Fixes the following sparse warnings:

net/openvswitch/flow_netlink.c:340:8: warning:
 symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoopenvswitch: Fix return value check in ovs_meter_cmd_features()
Wei Yongjun [Tue, 14 Nov 2017 06:20:16 +0000 (06:20 +0000)]
openvswitch: Fix return value check in ovs_meter_cmd_features()

In case of error, the function ovs_meter_cmd_reply_start() returns
ERR_PTR() not NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoliquidio: Missing error code in liquidio_init_nic_module()
Dan Carpenter [Tue, 14 Nov 2017 06:14:17 +0000 (09:14 +0300)]
liquidio: Missing error code in liquidio_init_nic_module()

We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.

Fixes: e20f469660ad ("liquidio: synchronize VF representor names with NIC firmware")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoxdp: sample: Missing curly braces in read_route()
Dan Carpenter [Tue, 14 Nov 2017 06:12:03 +0000 (09:12 +0300)]
xdp: sample: Missing curly braces in read_route()

The assert statement is supposed to be part of the else branch but the
curly braces were accidentally left off.

Fixes: 3e29cd0e6563 ("xdp: Sample xdp program implementing ip forward")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver
Desnes Augusto Nunes do Rosario [Mon, 13 Nov 2017 17:59:19 +0000 (15:59 -0200)]
ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

This patch implements and enables VDP support for the ibmvnic driver.
Moreover, it includes the implementation of suitable structs, signal
 transmission/handling and functions which allows the retrival of firmware
 information from the ibmvnic card through the ethtool command.

Signed-off-by: Desnes A. Nunes do Rosario <[email protected]>
Signed-off-by: Thomas Falcon <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: bridge: add vlan_tunnel to bridge port policies
Nikolay Aleksandrov [Mon, 13 Nov 2017 16:30:55 +0000 (18:30 +0200)]
net: bridge: add vlan_tunnel to bridge port policies

Found another missing port flag policy entry for IFLA_BRPORT_VLAN_TUNNEL
so add it now.

CC: Roopa Prabhu <[email protected]>
Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support")
Signed-off-by: Nikolay Aleksandrov <[email protected]>
Acked-by: Roopa Prabhu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: mvneta: fix handling of the Tx descriptor counter
Simon Guinot [Mon, 13 Nov 2017 15:27:02 +0000 (16:27 +0100)]
net: mvneta: fix handling of the Tx descriptor counter

The mvneta controller provides a 8-bit register to update the pending
Tx descriptor counter. Then, a maximum of 255 Tx descriptors can be
added at once. In the current code the mvneta_txq_pend_desc_add function
assumes the caller takes care of this limit. But it is not the case. In
some situations (xmit_more flag), more than 255 descriptors are added.
When this happens, the Tx descriptor counter register is updated with a
wrong value, which breaks the whole Tx queue management.

This patch fixes the issue by allowing the mvneta_txq_pend_desc_add
function to process more than 255 Tx descriptors.

Fixes: 2a90f7e1d5d0 ("net: mvneta: add xmit_more support")
Cc: [email protected] # 4.11+
Signed-off-by: Simon Guinot <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonetlink: remove unused NETLINK SKB flags
Johannes Berg [Mon, 13 Nov 2017 15:19:46 +0000 (16:19 +0100)]
netlink: remove unused NETLINK SKB flags

These flags are unused, remove them to be less confusing.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonetlink: remove unnecessary forward declaration
Johannes Berg [Mon, 13 Nov 2017 14:57:30 +0000 (15:57 +0100)]
netlink: remove unnecessary forward declaration

netlink_skb_destructor() is actually defined before the first usage
in the file, so remove the unnecessary forward declaration.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: dsa: lan9303: calculate offload_fwd_mark from tag
Egil Hjelmeland [Mon, 13 Nov 2017 13:25:25 +0000 (14:25 +0100)]
net: dsa: lan9303: calculate offload_fwd_mark from tag

The lan9303 set bits in the host CPU tag indicating if a ingress frame
is a trapped IGMP or STP frame. Use these bits to calculate
skb->offload_fwd_mark more efficiently.

Signed-off-by: Egil Hjelmeland <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs
Salil Mehta [Mon, 13 Nov 2017 11:39:38 +0000 (11:39 +0000)]
net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

This patch migrates the HNS3 driver code from use of depricated PCI
MSI/MSI-X interrupt vector allocation/free APIs to new common APIs.

Signed-off-by: Salil Mehta <[email protected]>
Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: dsa: lan9303: correctly check return value of devm_gpiod_get_optional
Pan Bian [Sun, 12 Nov 2017 15:38:09 +0000 (23:38 +0800)]
net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its
return value should not be validated by a NULL check. Instead, use IS_ERR.

Signed-off-by: Pan Bian <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: phy: realtek: fix RTL8211F interrupt mode
Heiner Kallweit [Sun, 12 Nov 2017 15:16:04 +0000 (16:16 +0100)]
net: phy: realtek: fix RTL8211F interrupt mode

After commit b94d22d94ad22 "ARM64: dts: meson-gx: add external PHY
interrupt on some platforms" ethernet stopped working on my Odroid-C2
which has a RTL8211F phy.

It turned out that no interrupts were triggered. Further analysis
showed the register INER can't be altered on page 0.
Because register INSR needs to be accessed via page 0xa43 I assumed
that register INER needs to be accessed via some page too.
Some brute force check resulted in page 0xa42 being the right one.

With this patch the phy is working properly in interrupt mode.

Fixes: 3447cf2e9a11 ("net/phy: Add support for Realtek RTL8211F")
Signed-off-by: Heiner Kallweit <[email protected]>
Tested-by: Jerome Brunet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge branch 'mlxsw-Update-firmware-version'
David S. Miller [Tue, 14 Nov 2017 12:17:08 +0000 (21:17 +0900)]
Merge branch 'mlxsw-Update-firmware-version'

Jiri Pirko says:

====================
mlxsw: Update firmware version

Ido says:

This set adjusts the driver to use a new firmware version. The new
version includes various enhancements and fixes detailed in the first
patch.

The second patch enables batch deletion of neighbours on a router
interface (RIF) which was not possible with previous versions.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agomlxsw: spectrum_router: Add batch neighbour deletion
Ido Schimmel [Sun, 12 Nov 2017 08:02:56 +0000 (09:02 +0100)]
mlxsw: spectrum_router: Add batch neighbour deletion

In commit 4a3c67a6e7cd ("mlxsw: spectrum_router: Don't batch neighbour
deletion") I removed the support for batch deletion of neighbours on a
router interface (RIF) since at that time the firmware did not support
it for IPv6 neighbours.

This is now supported by the version enforced by the driver, so there is
no reason to delete neighbours one by one anymore.

Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agomlxsw: spectrum: Update minimum firmware version to 13.1530.152
Shalom Toledo [Sun, 12 Nov 2017 08:01:24 +0000 (09:01 +0100)]
mlxsw: spectrum: Update minimum firmware version to 13.1530.152

This new firmware contains:
 - Support Spectrum A1 revision
 - Batch deletion of IPv6 neighbours
 - Remove incorrect VPD capability

Signed-off-by: Shalom Toledo <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: Mention net-next status web page in netdev-FAQ.txt
Harald Welte [Sun, 12 Nov 2017 22:21:34 +0000 (07:21 +0900)]
net: Mention net-next status web page in netdev-FAQ.txt

According to
  https://www.mail-archive.com/[email protected]/msg177411.html
there is a status page available at
  http://vger.kernel.org/~davem/net-next.html
to obtain the current status of the net-next tree.  Let's add this
information to the netdev FAQ.

Signed-off-by: Harald Welte <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: Extend Kernel GTP-U tunneling documentation
Harald Welte [Sun, 12 Nov 2017 22:18:45 +0000 (07:18 +0900)]
net: Extend Kernel GTP-U tunneling documentation

* clarify specification references for v0/v1
* add section "APN vs. Network device"
* add section "Local GTP-U entity and tunnel identification"

Signed-off-by: Andreas Schultz <[email protected]>
Signed-off-by: Harald Welte <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge udf, isofs, quota, ext2 changes for 4.15-rc1.
Jan Kara [Tue, 14 Nov 2017 10:09:53 +0000 (11:09 +0100)]
Merge udf, isofs, quota, ext2 changes for 4.15-rc1.

7 years agoMerge branch 'net-devname_alloc_cleanups'
David S. Miller [Tue, 14 Nov 2017 07:38:46 +0000 (16:38 +0900)]
Merge branch 'net-devname_alloc_cleanups'

Rasmus Villemoes says:

====================
net: core: devname allocation cleanups

It's somewhat confusing to have both dev_alloc_name and
dev_get_valid_name. I can't see why the former is less strict than the
latter, so make them (or rather dev_alloc_name_ns and
dev_get_valid_name) equivalent, hardening dev_alloc_name() a little.

Obvious follow-up patches would be to only export one function, and
make dev_alloc_name a static inline wrapper for that (whichever name
is chosen for the exported interface). But maybe there is a good
reason the two exported interfaces do different checking, so I'll
refrain from including the trivial but tree-wide renaming in this
series.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: dev_get_valid_name is now the same as dev_alloc_name_ns
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:10 +0000 (00:15 +0100)]
net: core: dev_get_valid_name is now the same as dev_alloc_name_ns

If name contains a %, it's easy to see that this patch doesn't change
anything (other than eliminate the duplicate dev_valid_name
call). Otherwise, we'll now just spend a little time in snprintf()
copying name to the stack buffer allocated in dev_alloc_name_ns, and do
the __dev_get_by_name using that buffer rather than name.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: maybe return -EEXIST in __dev_alloc_name
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:09 +0000 (00:15 +0100)]
net: core: maybe return -EEXIST in __dev_alloc_name

If we're given format string with no %d, -EEXIST is a saner error code.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: check dev_valid_name in __dev_alloc_name
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:08 +0000 (00:15 +0100)]
net: core: check dev_valid_name in __dev_alloc_name

We currently only exclude non-sysfs-friendly names via
dev_get_valid_name; there doesn't seem to be a reason to allow such
names when we're called via dev_alloc_name.

This does duplicate the dev_valid_name check in the dev_get_valid_name()
case; we'll fix that shortly.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: drop pointless check in __dev_alloc_name
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:07 +0000 (00:15 +0100)]
net: core: drop pointless check in __dev_alloc_name

The only caller passes a stack buffer as buf, so it won't equal the
passed-in name. Moreover, we're already using buf as a scratch buffer
inside the if (p) {} block, so if buf and name were the same, that
snprintf() call would be overwriting its own format string.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: eliminate dev_alloc_name{,_ns} code duplication
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:06 +0000 (00:15 +0100)]
net: core: eliminate dev_alloc_name{,_ns} code duplication

dev_alloc_name contained a BUG_ON(), which I moved to dev_alloc_name_ns;
the only other caller of that already has the same BUG_ON.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: move dev_alloc_name_ns a little higher
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:05 +0000 (00:15 +0100)]
net: core: move dev_alloc_name_ns a little higher

No functional change.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonet: core: improve sanity checking in __dev_alloc_name
Rasmus Villemoes [Sun, 12 Nov 2017 23:15:04 +0000 (00:15 +0100)]
net: core: improve sanity checking in __dev_alloc_name

__dev_alloc_name is called from the public (and exported)
dev_alloc_name(), so we don't have a guarantee that strlen(name) is at
most IFNAMSIZ. If somebody manages to get __dev_alloc_name called with a
% char beyond the 31st character, we'd be making a snprintf() call that
will very easily crash the kernel (using an appropriate %p extension,
we'll likely dereference some completely bogus pointer).

In the normal case where strlen() is sane, we don't even save anything
by limiting to IFNAMSIZ, so just use strchr().

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge branch 'tls-misc-fixes'
David S. Miller [Tue, 14 Nov 2017 07:26:35 +0000 (16:26 +0900)]
Merge branch 'tls-misc-fixes'

Ilya Lesokhin says:

====================
tls: Miscellaneous fixes

Here's a set of miscellaneous fix patches.

Patch 1 makes sure aead_request is initailized properly.
Patches 2-3 Fix a memory leak we've encountered.
patch 4 moves tls_make_aad to allow sharing it in the future.
Patch 5 fixes a TOCTOU issue reported here:
https://www.spinics.net/lists/kernel/msg2608603.html
Patch 6 Avoids callback overriding when tls_set_sw_offload fails.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agotls: don't override sk_write_space if tls_set_sw_offload fails.
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:49 +0000 (10:22 +0200)]
tls: don't override sk_write_space if tls_set_sw_offload fails.

If we fail to enable tls in the kernel we shouldn't override
the sk_write_space callback

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotls: Avoid copying crypto_info again after cipher_type check.
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:48 +0000 (10:22 +0200)]
tls: Avoid copying crypto_info again after cipher_type check.

Avoid copying crypto_info again after cipher_type check
to avoid a TOCTOU exploits.
The temporary array on the stack is removed as we don't really need it

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotls: Move tls_make_aad to header to allow sharing
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:47 +0000 (10:22 +0200)]
tls: Move tls_make_aad to header to allow sharing

move tls_make_aad as it is going to be reused
by the device offload code and rx path.
Remove unused recv parameter.

Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotls: Fix TLS ulp context leak, when TLS_TX setsockopt is not used.
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:46 +0000 (10:22 +0200)]
tls: Fix TLS ulp context leak, when TLS_TX setsockopt is not used.

Previously the TLS ulp context would leak if we attached a TLS ulp
to a socket but did not use the TLS_TX setsockopt,
or did use it but it failed.
This patch solves the issue by overriding prot[TLS_BASE_TX].close
and fixing tls_sk_proto_close to work properly
when its called with ctx->tx_conf == TLS_BASE_TX.
This patch also removes ctx->free_resources as we can use ctx->tx_conf
to obtain the relevant information.

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotls: Add function to update the TLS socket configuration
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:45 +0000 (10:22 +0200)]
tls: Add function to update the TLS socket configuration

The tx configuration is now stored in ctx->tx_conf.
And sk->sk_prot is updated trough a function
This will simplify things when we add rx
and support for different possible
tx and rx cross configurations.

Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotls: Use kzalloc for aead_request allocation
Ilya Lesokhin [Mon, 13 Nov 2017 08:22:44 +0000 (10:22 +0200)]
tls: Use kzalloc for aead_request allocation

Use kzalloc for aead_request allocation as
we don't set all the bits in the request.

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge branch 'bpf-improve-verifier-ARG_CONST_SIZE_OR_ZERO-semantics'
David S. Miller [Tue, 14 Nov 2017 07:20:04 +0000 (16:20 +0900)]
Merge branch 'bpf-improve-verifier-ARG_CONST_SIZE_OR_ZERO-semantics'

Yonghong Song says:

====================
bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics

This patch set intends to change verifier ARG_CONST_SIZE_OR_ZERO
semantics so that simpler bpf programs can be written with verifier
acceptance. Patch #1 comment provided the detailed examples and
the patch itself implements the new semantics. Patch #2
changes bpf_probe_read helper arg2 type from
ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO. Patch #3 fixed a few
test cases and added some for better coverage.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agobpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change
Yonghong Song [Sun, 12 Nov 2017 22:49:11 +0000 (14:49 -0800)]
bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change

Fix a few test cases to allow non-NULL map/packet/stack pointer
with size = 0. Change a few tests using bpf_probe_read to use
bpf_probe_write_user so ARG_CONST_SIZE arg can still be properly
tested. One existing test case already covers size = 0 with non-NULL
packet pointer, so add additional tests so all cases of
size = 0 and 0 <= size <= legal_upper_bound with non-NULL
map/packet/stack pointer are covered.

Signed-off-by: Yonghong Song <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agobpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO
Yonghong Song [Sun, 12 Nov 2017 22:49:10 +0000 (14:49 -0800)]
bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO

The helper bpf_probe_read arg2 type is changed
from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO to permit
size-0 buffer. Together with newer ARG_CONST_SIZE_OR_ZERO
semantics which allows non-NULL buffer with size 0,
this allows simpler bpf programs with verifier acceptance.
The previous commit which changes ARG_CONST_SIZE_OR_ZERO semantics
has details on examples.

Signed-off-by: Yonghong Song <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agobpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics
Yonghong Song [Sun, 12 Nov 2017 22:49:09 +0000 (14:49 -0800)]
bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics

For helpers, the argument type ARG_CONST_SIZE_OR_ZERO permits the
access size to be 0 when accessing the previous argument (arg).
Right now, it requires the arg needs to be NULL when size passed
is 0 or could be 0. It also requires a non-NULL arg when the size
is proved to be non-0.

This patch changes verifier ARG_CONST_SIZE_OR_ZERO behavior
such that for size-0 or possible size-0, it is not required
the arg equal to NULL.

There are a couple of reasons for this semantics change, and
all of them intends to simplify user bpf programs which
may improve user experience and/or increase chances of
verifier acceptance. Together with the next patch which
changes bpf_probe_read arg2 type from ARG_CONST_SIZE to
ARG_CONST_SIZE_OR_ZERO, the following two examples, which
fail the verifier currently, are able to get verifier acceptance.

Example 1:
   unsigned long len = pend - pstart;
   len = len > MAX_PAYLOAD_LEN ? MAX_PAYLOAD_LEN : len;
   len &= MAX_PAYLOAD_LEN;
   bpf_probe_read(data->payload, len, pstart);

It does not have test for "len > 0" and it failed the verifier.
Users may not be aware that they have to add this test.
Converting the bpf_probe_read helper to have
ARG_CONST_SIZE_OR_ZERO helps the above code get
verifier acceptance.

Example 2:
  Here is one example where llvm "messed up" the code and
  the verifier fails.

......
   unsigned long len = pend - pstart;
   if (len > 0 && len <= MAX_PAYLOAD_LEN)
     bpf_probe_read(data->payload, len, pstart);
......

The compiler generates the following code and verifier fails:
......
39: (79) r2 = *(u64 *)(r10 -16)
40: (1f) r2 -= r8
41: (bf) r1 = r2
42: (07) r1 += -1
43: (25) if r1 > 0xffe goto pc+3
  R0=inv(id=0) R1=inv(id=0,umax_value=4094,var_off=(0x0; 0xfff))
  R2=inv(id=0) R6=map_value(id=0,off=0,ks=4,vs=4095,imm=0) R7=inv(id=0)
  R8=inv(id=0) R9=inv0 R10=fp0
44: (bf) r1 = r6
45: (bf) r3 = r8
46: (85) call bpf_probe_read#45
R2 min value is negative, either use unsigned or 'var &= const'
......

The compiler optimization is correct. If r1 = 0,
r1 - 1 = 0xffffffffffffffff > 0xffe.  If r1 != 0, r1 - 1 will not wrap.
r1 > 0xffe at insn #43 can actually capture
both "r1 > 0" and "len <= MAX_PAYLOAD_LEN".
This however causes an issue in verifier as the value range of arg2
"r2" does not properly get refined and lead to verification failure.

Relaxing bpf_prog_read arg2 from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO
allows the following simplied code:
   unsigned long len = pend - pstart;
   if (len <= MAX_PAYLOAD_LEN)
     bpf_probe_read(data->payload, len, pstart);

The llvm compiler will generate less complex code and the
verifier is able to verify that the program is okay.

Signed-off-by: Yonghong Song <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agotcp: allow drivers to tweak TSQ logic
Eric Dumazet [Sat, 11 Nov 2017 23:54:12 +0000 (15:54 -0800)]
tcp: allow drivers to tweak TSQ logic

I had many reports that TSQ logic breaks wifi aggregation.

Current logic is to allow up to 1 ms of bytes to be queued into qdisc
and drivers queues.

But Wifi aggregation needs a bigger budget to allow bigger rates to
be discovered by various TCP Congestion Controls algorithms.

This patch adds an extra socket field, allowing wifi drivers to select
another log scale to derive TCP Small Queue credit from current pacing
rate.

Initial value is 10, meaning that this patch does not change current
behavior.

We expect wifi drivers to set this field to smaller values (tests have
been done with values from 6 to 9)

They would have to use following template :

if (skb->sk && skb->sk->sk_pacing_shift != MY_PACING_SHIFT)
     skb->sk->sk_pacing_shift = MY_PACING_SHIFT;

Ref: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670041
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Toke Høiland-Jørgensen <[email protected]>
Cc: Kir Kolyshkin <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge tag 'rxrpc-next-20171111' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Tue, 14 Nov 2017 07:17:38 +0000 (16:17 +0900)]
Merge tag 'rxrpc-next-20171111' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

David Howells says:

====================
rxrpc: Fixes

Here are some patches that fix some things in AF_RXRPC:

 (1) Prevent notifications from being passed to a kernel service for a call
     that it has ended.

 (2) Fix a null pointer deference that occurs under some circumstances when an
     ACK is generated.

 (3) Fix a number of things to do with call expiration.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agobnx2x: fix slowpath null crash
Zhu Yanjun [Sat, 11 Nov 2017 15:42:03 +0000 (10:42 -0500)]
bnx2x: fix slowpath null crash

When "NETDEV WATCHDOG: em4 (bnx2x): transmit queue 2 timed out" occurs,
BNX2X_SP_RTNL_TX_TIMEOUT is set. In the function bnx2x_sp_rtnl_task,
bnx2x_nic_unload and bnx2x_nic_load are executed to shutdown and open
NIC. In the function bnx2x_nic_load, bnx2x_alloc_mem allocates dma
failure. The message "bnx2x: [bnx2x_alloc_mem:8399(em4)]Can't
allocate memory" pops out. The variable slowpath is set to NULL.
When shutdown the NIC, the function bnx2x_nic_unload is called. In
the function bnx2x_nic_unload, the following functions are executed.
bnx2x_chip_cleanup
    bnx2x_set_storm_rx_mode
        bnx2x_set_q_rx_mode
            bnx2x_set_q_rx_mode
                bnx2x_config_rx_mode
                    bnx2x_set_rx_mode_e2
In the function bnx2x_set_rx_mode_e2, the variable slowpath is operated.
Then the crash occurs.
To fix this crash, the variable slowpath is checked. And in the function
bnx2x_sp_rtnl_task, after dma memory allocation fails, another shutdown
and open NIC is executed.

CC: Joe Jin <[email protected]>
CC: Junxiao Bi <[email protected]>
Signed-off-by: Zhu Yanjun <[email protected]>
Acked-by: Ariel Elior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge branch 'cxgb4-collect-LE-TCAM-and-SGE-queue-contexts'
David S. Miller [Tue, 14 Nov 2017 07:14:07 +0000 (16:14 +0900)]
Merge branch 'cxgb4-collect-LE-TCAM-and-SGE-queue-contexts'

Rahul Lakkireddy says:

====================
cxgb4: collect LE-TCAM and SGE queue contexts

Collect hardware dumps via ethtool --get-dump facility.

Patch 1 collects LE-TCAM dump.

Patch 2 collects SGE queue context dumps.
====================

Signed-off-by: David S. Miller <[email protected]>
7 years agocxgb4: collect SGE queue context dump
Rahul Lakkireddy [Sat, 11 Nov 2017 14:18:16 +0000 (19:48 +0530)]
cxgb4: collect SGE queue context dump

Collect SGE freelist queue and congestion manager contexts.

Signed-off-by: Rahul Lakkireddy <[email protected]>
Signed-off-by: Ganesh Goudar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agocxgb4: collect LE-TCAM dump
Rahul Lakkireddy [Sat, 11 Nov 2017 14:18:15 +0000 (19:48 +0530)]
cxgb4: collect LE-TCAM dump

Signed-off-by: Rahul Lakkireddy <[email protected]>
Signed-off-by: Ganesh Goudar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agovxlan: fix the issue that neigh proxy blocks all icmpv6 packets
Xin Long [Sat, 11 Nov 2017 11:58:50 +0000 (19:58 +0800)]
vxlan: fix the issue that neigh proxy blocks all icmpv6 packets

Commit f1fb08f6337c ("vxlan: fix ND proxy when skb doesn't have transport
header offset") removed icmp6_code and icmp6_type check before calling
neigh_reduce when doing neigh proxy.

It means all icmpv6 packets would be blocked by this, not only ns packet.
In Jianlin's env, even ping6 couldn't work through it.

This patch is to bring the icmp6_code and icmp6_type check back and also
removed the same check from neigh_reduce().

Fixes: f1fb08f6337c ("vxlan: fix ND proxy when skb doesn't have transport header offset")
Reported-by: Jianlin Shi <[email protected]>
Signed-off-by: Xin Long <[email protected]>
Reviewed-by: Vincent Bernat <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoxfrm6_tunnel: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:34:03 +0000 (22:34 +0300)]
xfrm6_tunnel: exit_net cleanup check added

Be sure that spi_byaddr and spi_byspi arrays initialized in net_init hook
were return to initial state

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoppp: exit_net cleanup checks added
Vasily Averin [Sun, 12 Nov 2017 19:33:22 +0000 (22:33 +0300)]
ppp: exit_net cleanup checks added

Be sure that lists initialized in net_init hook were return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agophonet: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:32:47 +0000 (22:32 +0300)]
phonet: exit_net cleanup check added

Be sure that pndevs.list initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agol2tp: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:30:31 +0000 (22:30 +0300)]
l2tp: exit_net cleanup check added

Be sure that l2tp_session_hlist array initialized in net_init hook
was return to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agofib_rules: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:30:01 +0000 (22:30 +0300)]
fib_rules: exit_net cleanup check added

Be sure that rules_ops list initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agofib_notifier: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:29:33 +0000 (22:29 +0300)]
fib_notifier: exit_net cleanup check added

Be sure that fib_notifier_ops list initilized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agonetdev: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:28:46 +0000 (22:28 +0300)]
netdev: exit_net cleanup check added

Be sure that dev_base_head list initialized in net_init hook was return
to initial state

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agovxlan: exit_net cleanup checks added
Vasily Averin [Sun, 12 Nov 2017 19:28:10 +0000 (22:28 +0300)]
vxlan: exit_net cleanup checks added

Be sure that sock_list array initialized in net_init hook was return
to initial state

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agopacket: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:27:49 +0000 (22:27 +0300)]
packet: exit_net cleanup check added

Be sure that packet.sklist initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agogeneve: exit_net cleanup check added
Vasily Averin [Sun, 12 Nov 2017 19:27:19 +0000 (22:27 +0300)]
geneve: exit_net cleanup check added

Be sure that sock_list initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoaf_key: replace BUG_ON on WARN_ON in net_exit hook
Vasily Averin [Sun, 12 Nov 2017 19:26:53 +0000 (22:26 +0300)]
af_key: replace BUG_ON on WARN_ON in net_exit hook

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
7 years agoMerge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Tue, 14 Nov 2017 05:14:07 +0000 (21:14 -0800)]
Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB/PHY updates from Greg KH:
 "Here is the big set of USB and PHY driver updates for 4.15-rc1.

  There is the usual amount of gadget and xhci driver updates, along
  with phy and chipidea enhancements. There's also a lot of SPDX tags
  and license boilerplate cleanups as well, which provide some churn in
  the diffstat.

  Other major thing is the typec code that moved out of staging and into
  the "real" part of the drivers/usb/ tree, which was nice to see
  happen.

  All of these have been in linux-next with no reported issues for a
  while"

* tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits)
  usb: gadget: f_fs: Fix use-after-free in ffs_free_inst
  USB: usbfs: compute urb->actual_length for isochronous
  usb: core: message: remember to reset 'ret' to 0 when necessary
  USB: typec: Remove remaining redundant license text
  USB: typec: add SPDX identifiers to some files
  USB: renesas_usbhs: rcar?.h: add SPDX tags
  USB: chipidea: ci_hdrc_tegra.c: add SPDX line
  USB: host: xhci-debugfs: add SPDX lines
  USB: add SPDX identifiers to all remaining Makefiles
  usb: host: isp1362-hcd: remove a couple of redundant assignments
  USB: adutux: remove redundant variable minor
  usb: core: add a new usb_get_ptm_status() helper
  usb: core: add a 'type' parameter to usb_get_status()
  usb: core: introduce a new usb_get_std_status() helper
  usb: core: rename usb_get_status() 'type' argument to 'recip'
  usb: core: add Status Type definitions
  USB: gadget: Remove redundant license text
  USB: gadget: function: Remove redundant license text
  USB: gadget: udc: Remove redundant license text
  USB: gadget: legacy: Remove redundant license text
  ...

7 years agoMerge branch 'topic/xilinx' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:07:28 +0000 (10:37 +0530)]
Merge branch 'topic/xilinx' into for-linus

7 years agoMerge branch 'topic/timer_api' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:07:18 +0000 (10:37 +0530)]
Merge branch 'topic/timer_api' into for-linus

7 years agoMerge branch 'topic/ti' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:07:13 +0000 (10:37 +0530)]
Merge branch 'topic/ti' into for-linus

7 years agoMerge branch 'topic/sun' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:07:07 +0000 (10:37 +0530)]
Merge branch 'topic/sun' into for-linus

7 years agoMerge branch 'topic/sprd' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:06:09 +0000 (10:36 +0530)]
Merge branch 'topic/sprd' into for-linus

Kconfig and Makefile conflicts so put them in right order (sprd ones after
stm ones)

Signed-off-by: Vinod Koul <[email protected]>
7 years agoMerge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Tue, 14 Nov 2017 05:05:31 +0000 (21:05 -0800)]
Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial updates from Greg KH:
 "Here is the big tty/serial driver pull request for 4.15-rc1.

  Lots of serial driver updates in here, some small vt cleanups, and a
  raft of SPDX and license boilerplate cleanups, messing up the diffstat
  a bit.

  Nothing major, with no realy functional changes except better hardware
  support for some platforms.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
  tty: ehv_bytechan: fix spelling mistake
  tty: serial: meson: allow baud-rates lower than 9600
  serial: 8250_fintek: Fix crash with baud rate B0
  serial: 8250_fintek: Disable delays for ports != 0
  serial: 8250_fintek: Return -EINVAL on invalid configuration
  tty: Remove redundant license text
  tty: serdev: Remove redundant license text
  tty: hvc: Remove redundant license text
  tty: serial: Remove redundant license text
  tty: add SPDX identifiers to all remaining files in drivers/tty/
  tty: serial: jsm: remove redundant pointer ts
  tty: serial: jsm: add space before the open parenthesis '('
  tty: serial: jsm: fix coding style
  tty: serial: jsm: delete space between function name and '('
  tty: serial: jsm: add blank line after declarations
  tty: serial: jsm: change the type of local variable
  tty: serial: imx: remove dead code imx_dma_rxint
  tty: serial: imx: disable ageing timer interrupt if dma in use
  serial: 8250: fix potential deadlock in rs485-mode
  serial: m32r_sio: Drop redundant .data assignment
  ...

7 years agoMerge branch 'topic/stm' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:04:56 +0000 (10:34 +0530)]
Merge branch 'topic/stm' into for-linus

7 years agoMerge branch 'topic/sa11x0' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:03:33 +0000 (10:33 +0530)]
Merge branch 'topic/sa11x0' into for-linus

7 years agoMerge branch 'topic/renasas' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:03:24 +0000 (10:33 +0530)]
Merge branch 'topic/renasas' into for-linus

7 years agoMerge branch 'topic/qcom' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:03:16 +0000 (10:33 +0530)]
Merge branch 'topic/qcom' into for-linus

7 years agoMerge branch 'topic/pl330' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:03:04 +0000 (10:33 +0530)]
Merge branch 'topic/pl330' into for-linus

7 years agoMerge branch 'topic/imx' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:52 +0000 (10:32 +0530)]
Merge branch 'topic/imx' into for-linus

7 years agoMerge branch 'topic/img' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:49 +0000 (10:32 +0530)]
Merge branch 'topic/img' into for-linus

7 years agoMerge branch 'topic/doc' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:44 +0000 (10:32 +0530)]
Merge branch 'topic/doc' into for-linus

7 years agoMerge branch 'topic/dmatest' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:36 +0000 (10:32 +0530)]
Merge branch 'topic/dmatest' into for-linus

7 years agoMerge branch 'topic/bcom' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:28 +0000 (10:32 +0530)]
Merge branch 'topic/bcom' into for-linus

7 years agoMerge branch 'topic/axi' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:02:20 +0000 (10:32 +0530)]
Merge branch 'topic/axi' into for-linus

7 years agoMerge branch 'topic/print_fixes' into for-linus
Vinod Koul [Tue, 14 Nov 2017 05:01:59 +0000 (10:31 +0530)]
Merge branch 'topic/print_fixes' into for-linus

7 years agoMerge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Tue, 14 Nov 2017 04:53:28 +0000 (20:53 -0800)]
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO updates from Greg KH:
 "Here is the "big" staging and IIO driver update for 4.15-rc1.

  Lots and lots of little changes, almost all minor code cleanups as the
  Outreachy application process happened during this development cycle.
  Also happened was a lot of IIO driver activity, and the typec USB code
  moving out of staging to drivers/usb (same commits are in the USB tree
  on a persistent branch to not cause merge issues.)

  Overall, it's a wash, I think we added a few hundred more lines than
  removed, but really only a few thousand were modified at all.

  All of these have been in linux-next for a while. There might be a
  merge issue with Al's vfs tree in the pi433 driver (take his changes,
  they are always better), and the media tree with some of the odd
  atomisp cleanups (take the media tree's version)"

* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
  staging: lustre: add SPDX identifiers to all lustre files
  staging: greybus: Remove redundant license text
  staging: greybus: add SPDX identifiers to all greybus driver files
  staging: ccree: simplify ioread/iowrite
  staging: ccree: simplify registers access
  staging: ccree: simplify error handling logic
  staging: ccree: remove dead code
  staging: ccree: handle limiting of DMA masks
  staging: ccree: copy IV to DMAable memory
  staging: fbtft: remove redundant initialization of buf
  staging: sm750fb: Fix parameter mistake in poke32
  staging: wilc1000: Fix bssid buffer offset in Txq
  staging: fbtft: fb_ssd1331: fix mirrored display
  staging: android: Fix checkpatch.pl error
  staging: greybus: loopback: convert loopback to use generic async operations
  staging: greybus: operation: add private data with get/set accessors
  staging: greybus: loopback: Fix iteration count on async path
  staging: greybus: loopback: Hold per-connection mutex across operations
  staging: greybus/loopback: use ktime_get() for time intervals
  staging: fsl-dpaa2/eth: Extra headroom in RX buffers
  ...

7 years agoMerge tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Tue, 14 Nov 2017 04:36:37 +0000 (20:36 -0800)]
Merge tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull device properties framework updates from Rafael Wysocki:
 "These make the fwnode_handle_get() function return a pointer to the
  target fwnode object, which reflects the of_node_get() behavior, and
  add a macro for iterating over graph endpoints (Sakari Ailus)"

* tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  device property: Add a macro for interating over graph endpoints
  device property: Make fwnode_handle_get() return the fwnode

7 years agoMerge tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Tue, 14 Nov 2017 04:08:22 +0000 (20:08 -0800)]
Merge tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These update ACPICA to upstream revision 20170831, fix APEI to use the
  fixmap instead of ioremap_page_range(), add an operation region driver
  for TI PMIC TPS68470, add support for PCC subspace IDs to the ACPI
  CPPC driver, fix a few assorted issues and clean up some code.

  Specifics:

   - Update the ACPICA code to upstream revision 20170831 including
      * PDTT table header support (Bob Moore).
      * Cleanup and extension of internal string-to-integer conversion
        functions (Bob Moore).
      * Support for 64-bit hardware accesses (Lv Zheng).
      * ACPI PM Timer code adjustment to deal with 64-bit return values
        of acpi_hw_read() (Bob Moore).
      * Support for deferred table verification in acpiexec (Lv Zheng).

   - Fix APEI to use the fixmap instead of ioremap_page_range() which
     cannot work correctly the way the code in there attempted to use it
     and drop some code that's not necessary any more after that change
     (James Morse).

   - Clean up the APEI support code and make it use 64-bit timestamps
     (Arnd Bergmann, Dongjiu Geng, Jan Beulich).

   - Add operation region driver for TI PMIC TPS68470 (Rajmohan Mani).

   - Add support for PCC subspace IDs to the ACPI CPPC driver (George
     Cherian).

   - Fix an ACPI EC driver regression related to the handling of EC
     events during the "noirq" phases of system suspend/resume (Lv
     Zheng).

   - Delay the initialization of the lid state in the ACPI button driver
     to fix issues appearing on some systems (Hans de Goede).

   - Extend the KIOX000A "device always present" quirk to cover all
     affected BIOS versions (Hans de Goede).

   - Clean up some code in the ACPI core and drivers (Colin Ian King,
     Gustavo Silva)"

* tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
  ACPI: Mark expected switch fall-throughs
  ACPI / LPSS: Remove redundant initialization of clk
  ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs
  mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file
  ACPI / sysfs: Make function param_set_trace_method_name() static
  ACPI / button: Delay acpi_lid_initialize_state() until first user space open
  ACPI / EC: Fix regression related to triggering source of EC event handling
  APEI / ERST: use 64-bit timestamps
  ACPI / APEI: Remove arch_apei_flush_tlb_one()
  arm64: mm: Remove arch_apei_flush_tlb_one()
  ACPI / APEI: Remove ghes_ioremap_area
  ACPI / APEI: Replace ioremap_page_range() with fixmap
  ACPI / APEI: remove the unused dead-code for SEA/NMI notification type
  ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions
  ACPI / APEI: adjust a local variable type in ghes_ioremap_pfn_irq()
  ACPICA: Update version to 20170831
  ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read
  ACPICA: String conversions: Update to add new behaviors
  ACPICA: String conversions: Cleanup/format comments. No functional changes
  ACPICA: Restructure/cleanup all string-to-integer conversion functions
  ...

7 years agoMerge tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Tue, 14 Nov 2017 03:43:50 +0000 (19:43 -0800)]
Merge tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:
 "There are no real big ticket items here this time.

  The most noticeable change is probably the relocation of the OPP
  (Operating Performance Points) framework to its own directory under
  drivers/ as it has grown big enough for that. Also Viresh is now going
  to maintain it and send pull requests for it to me, so you will see
  this change in the git history going forward (but still not right
  now).

  Another noticeable set of changes is the modifications of the PM core,
  the PCI subsystem and the ACPI PM domain to allow of more integration
  between system-wide suspend/resume and runtime PM. For now it's just a
  way to avoid resuming devices from runtime suspend unnecessarily
  during system suspend (if the driver sets a flag to indicate its
  readiness for that) and in the works is an analogous mechanism to
  allow devices to stay suspended after system resume.

  In addition to that, we have some changes related to supporting
  frequency-invariant CPU utilization metrics in the scheduler and in
  the schedutil cpufreq governor on ARM and changes to add support for
  device performance states to the generic power domains (genpd)
  framework.

  The rest is mostly fixes and cleanups of various sorts.

  Specifics:

   - Relocate the OPP (Operating Performance Points) framework to its
     own directory under drivers/ and add support for power domain
     performance states to it (Viresh Kumar).

   - Modify the PM core, the PCI bus type and the ACPI PM domain to
     support power management driver flags allowing device drivers to
     specify their capabilities and preferences regarding the handling
     of devices with enabled runtime PM during system suspend/resume and
     clean up that code somewhat (Rafael Wysocki, Ulf Hansson).

   - Add frequency-invariant accounting support to the task scheduler on
     ARM and ARM64 (Dietmar Eggemann).

   - Fix PM QoS device resume latency framework to prevent "no
     restriction" requests from overriding requests with specific
     requirements and drop the confusing PM_QOS_FLAG_REMOTE_WAKEUP
     device PM QoS flag (Rafael Wysocki).

   - Drop legacy class suspend/resume operations from the PM core and
     drop legacy bus type suspend and resume callbacks from ARM/locomo
     (Rafael Wysocki).

   - Add min/max frequency support to devfreq and clean it up somewhat
     (Chanwoo Choi).

   - Rework wakeup support in the generic power domains (genpd)
     framework and update some of its users accordingly (Geert
     Uytterhoeven).

   - Convert timers in the PM core to use timer_setup() (Kees Cook).

   - Add support for exposing the SLP_S0 (Low Power S0 Idle) residency
     counter based on the LPIT ACPI table on Intel platforms (Srinivas
     Pandruvada).

   - Add per-CPU PM QoS resume latency support to the ladder cpuidle
     governor (Ramesh Thomas).

   - Fix a deadlock between the wakeup notify handler and the notifier
     removal in the ACPI core (Ville Syrjälä).

   - Fix a cpufreq schedutil governor issue causing it to use stale
     cached frequency values sometimes (Viresh Kumar).

   - Fix an issue in the system suspend core support code causing wakeup
     events detection to fail in some cases (Rajat Jain).

   - Fix the generic power domains (genpd) framework to prevent the PM
     core from using the direct-complete optimization with it as that is
     guaranteed to fail (Ulf Hansson).

   - Fix a minor issue in the cpuidle core and clean it up a bit (Gaurav
     Jindal, Nicholas Piggin).

   - Fix and clean up the intel_idle and ARM cpuidle drivers (Jason
     Baron, Len Brown, Leo Yan).

   - Fix a couple of minor issues in the OPP framework and clean it up
     (Arvind Yadav, Fabio Estevam, Sudeep Holla, Tobias Jordan).

   - Fix and clean up some cpufreq drivers and fix a minor issue in the
     cpufreq statistics code (Arvind Yadav, Bhumika Goyal, Fabio
     Estevam, Gautham Shenoy, Gustavo Silva, Marek Szyprowski, Masahiro
     Yamada, Robert Jarzmik, Zumeng Chen).

   - Fix minor issues in the system suspend and hibernation core, in
     power management documentation and in the AVS (Adaptive Voltage
     Scaling) framework (Helge Deller, Himanshu Jha, Joe Perches, Rafael
     Wysocki).

   - Fix some issues in the cpupower utility and document that Shuah
     Khan is going to maintain it going forward (Prarit Bhargava, Shuah
     Khan)"

* tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (88 commits)
  tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore
  tools/power/cpupower: Add 64 bit library detection
  intel_idle: Graceful probe failure when MWAIT is disabled
  cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq
  freezer: Fix typo in freezable_schedule_timeout() comment
  PM / s2idle: Clear the events_check_enabled flag
  cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE
  cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const
  cpufreq: arm_big_little: make function arguments and structure pointer const
  cpuidle: Avoid assignment in if () argument
  cpuidle: Clean up cpuidle_enable_device() error handling a bit
  ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock
  PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare()
  cpuidle: ladder: Add per CPU PM QoS resume latency support
  PM / QoS: Fix device resume latency framework
  PM / domains: Rework governor code to be more consistent
  PM / Domains: Remove gpd_dev_ops.active_wakeup() callback
  soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP
  soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP
  ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP
  ...

7 years agox86 / CPU: Avoid unnecessary IPIs in arch_freq_get_on_cpu()
Rafael J. Wysocki [Mon, 13 Nov 2017 01:15:39 +0000 (02:15 +0100)]
x86 / CPU: Avoid unnecessary IPIs in arch_freq_get_on_cpu()

Even though aperfmperf_snapshot_khz() caches the samples.khz value to
return if called again in a sufficiently short time, its caller,
arch_freq_get_on_cpu(), still uses smp_call_function_single() to run it
which may allow user space to trigger an IPI storm by reading from the
scaling_cur_freq cpufreq sysfs file in a tight loop.

To avoid that, move the decision on whether or not to return the cached
samples.khz value to arch_freq_get_on_cpu().

This change was part of commit 941f5f0f6ef5 ("x86: CPU: Fix up "cpu MHz"
in /proc/cpuinfo"), but it was not the reason for the revert and it
remains applicable.

Fixes: 4815d3c56d1e (cpufreq: x86: Make scaling_cur_freq behave more as expected)
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: WANG Chao <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
7 years agoMerge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 14 Nov 2017 03:07:38 +0000 (19:07 -0800)]
Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 timer updates from Thomas Gleixner:
 "These updates are related to TSC handling:

   - Support platforms which have synchronized TSCs but the boot CPU has
     a non zero TSC_ADJUST value, which is considered a firmware bug on
     normal systems.

     This applies to HPE/SGI UV platforms where the platform firmware
     uses TSC_ADJUST to ensure TSC synchronization across a huge number
     of sockets, but due to power on timings the boot CPU cannot be
     guaranteed to have a zero TSC_ADJUST register value.

   - Fix the ordering of udelay calibration and kvmclock_init()

   - Cleanup the udelay and calibration code"

* 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsc: Mark cyc2ns_init() and detect_art() __init
  x86/platform/UV: Mark tsc_check_sync as an init function
  x86/tsc: Make CONFIG_X86_TSC=n build work again
  x86/platform/UV: Add check of TSC state set by UV BIOS
  x86/tsc: Provide a means to disable TSC ART
  x86/tsc: Drastically reduce the number of firmware bug warnings
  x86/tsc: Skip TSC test and error messages if already unstable
  x86/tsc: Add option that TSC on Socket 0 being non-zero is valid
  x86/timers: Move simple_udelay_calibration() past kvmclock_init()
  x86/timers: Make recalibrate_cpu_khz() void
  x86/timers: Move the simple udelay calibration to tsc.h

This page took 0.11707 seconds and 4 git commands to generate.