1
0
Fork 0
Commit Graph

796629 Commits (86fe57fc47b17b3528fa5497fc57e158d846c4ea)

Author SHA1 Message Date
Aaron Sierra 906e86b22d ntb_netdev: Simplify remove with client device drvdata
Replace the elaborate private structure global linked-list used in
ntb_netdev_probe() and ntb_netdev_remove() by stashing our private
data in the NTB transport client device.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 21:20:05 -04:00
Aaron Sierra fc5d1829f9 NTB: transport: Try harder to alloc an aligned MW buffer
Be a little wasteful if the (likely CMA) message window buffer is not
suitably aligned after our first attempt; allocate a buffer twice as big
as we need and manually align our MW buffer within it.

This was needed on Intel Broadwell DE platforms with intel_iommu=off

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 21:20:05 -04:00
Gustavo A. R. Silva 846429bc99 ntb: ntb_transport: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1373888 ("Missing break in switch")
Addresses-Coverity-ID: 1373889 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 21:20:05 -04:00
Serge Semin 37a3e9693d ntb: idt: Set PCIe bus address to BARLIMITx
IDT NTB driver sets the upper limit of actual translation address
being written to the corresponding memory window setup. It is achieved
by BARLIMITx register initialization. Needless to say, that the register
works within PCIe bus address space.

In general CPU and PCIe address spaces are different. It means,
that addresses used for Memory TLPs routine can be different from
CPU addresses. While in most of cases they are the same, there are
exceptions when the proper mapping must be performed to have the
portable driver code. There used to be a virt_to_bus()/bus_to_virt()
interface for this purpose. But it's deprecated now. It was also a
mistake to use pci_resource_start() since the return address of the
method is at the CPU address space. In order to achieve the desired
purpose we need to use pci_bus_address() helper. This method shall
return a PCIe bus base address of the corresponding BAR resource.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 21:20:05 -04:00
David S. Miller df975da4e5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:

====================
pull-request: bpf 2018-11-01

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) Fix tcp_bpf_recvmsg() to return -EAGAIN instead of 0 in non-blocking
   case when no data is available yet, from John.

2) Fix a compilation error in libbpf_attach_type_by_name() when compiled
   with clang 3.8, from Andrey.

3) Fix a partial copy of map pointer on scalar alu and remove id
   generation for RET_PTR_TO_MAP_VALUE return types, from Daniel.

4) Add unlimited memlock limit for kernel selftest's flow_dissector_load
   program, from Yonghong.

5) Fix ping for some BPF shell based kselftests where distro does not
   ship "ping -6" anymore, from Li.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 17:34:08 -07:00
Alexei Starovoitov dfeb8f4c96 Merge branch 'verifier-fixes'
Daniel Borkmann says:

====================
The series contains two fixes in BPF core and test cases. For details
please see individual patches. Thanks!
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-31 16:53:18 -07:00
Daniel Borkmann 832c6f2c29 bpf: test make sure to run unpriv test cases in test_verifier
Right now unprivileged tests are never executed as a BPF test run,
only loaded. Allow for running them as well so that we can check
the outcome and probe for regressions.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-31 16:53:17 -07:00
Daniel Borkmann 2683f4128c bpf: add various test cases to test_verifier
Add some more map related test cases to test_verifier kselftest
to improve test coverage. Summary: 1012 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-31 16:53:17 -07:00
Daniel Borkmann 4d31f30148 bpf: don't set id on after map lookup with ptr_to_map_val return
In the verifier there is no such semantics where registers with
PTR_TO_MAP_VALUE type have an id assigned to them. This is only
used in PTR_TO_MAP_VALUE_OR_NULL and later on nullified once the
test against NULL has been pattern matched and type transformed
into PTR_TO_MAP_VALUE.

Fixes: 3e6a4b3e02 ("bpf/verifier: introduce BPF_PTR_TO_MAP_VALUE")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Roman Gushchin <guro@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-31 16:53:17 -07:00
Daniel Borkmann 0962590e55 bpf: fix partial copy of map_ptr when dst is scalar
ALU operations on pointers such as scalar_reg += map_value_ptr are
handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr
and range in the register state share a union, so transferring state
through dst_reg->range = ptr_reg->range is just buggy as any new
map_ptr in the dst_reg is then truncated (or null) for subsequent
checks. Fix this by adding a raw member and use it for copying state
over to dst_reg.

Fixes: f1174f77b5 ("bpf/verifier: rework value tracking")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Edward Cree <ecree@solarflare.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-31 16:53:17 -07:00
Linus Torvalds 5b7449810a chrome-platform for v4.20
* Move mfd/cros_ec_lpc* includes to drivers/platform from mfd
 * Adding a new interrupt path for cros_ec_lpc
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlvaNx8ACgkQHwn1ewov
 5li9/g//apJnCEFTCNoxsQlqj15io3Osogpm3uPw85u5OzkSgs9aSTTlzjcf6gYO
 nowl2vn009fI0vPEdOqIj1KOw2F2ATHyRFXl4Ap0HOF8eERGKS46SLSy93cUvdxc
 rAeHY23lJ/3/7nrJTMnIbFxpukNR7RgoXPlGRb3Gj6me879nTNr68YU48lvTJIM1
 dS5m19joL/JnR93iPZwf9PTI6C95eYFgalCMfwBYDAhk4sk7Ovk1LMsoLh9vT1i2
 xBW16AaF0CgEJbiCc57ktbN/Fkt/tdcdiZmn+hvXvRFOOu3HDXvoXOJa/IxBgruk
 mgVzvBordNIiSdPN9T4Cof17NJiU58RtcfFe+GuftUJ8S5NSPQbelch+Pfa+cknn
 zvEwv/0rLWvWmu1cmkHCLq2QdHxaNIiGMuIxIDZfhihGn1kTcD/FTgX5nt3hVYRk
 yVSKe/1ed6yCnYvSQ6x3uprBGpMayJCaSco/lQzWX6Iqe6eEXOYxm43YsQmddPLA
 jnzJlmfuAb6lyvdgD5mrGkV/3/GdYp/t5OUUefTnhPWsfS1l/aaqeDvyVNuqsMGp
 EyeYz+9Nilc17G8iuXw272/YZF6JhL7CO7vjxKqyRIaDUjj2HBzMUZ+NrgPg08AJ
 MHRBltRT/LayKg5e/9tKylF1UhstMli7sldX6qRXL1A8q6vYWC4=
 =cmQo
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform

Pull chrome-platform updates from Benson Leung:

 - Move mfd/cros_ec_lpc* includes to drivers/platform from mfd

 - Adding a new interrupt path for cros_ec_lpc

* tag 'tag-chrome-platform-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
  platform/chrome: chromeos_tbmc - Remove unneeded const
  platform/chrome: Add a new interrupt path for cros_ec_lpc
  mfd: cros_ec: Fix and improve kerneldoc comments.
  platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform.
2018-10-31 16:47:55 -07:00
A.s. Dong 012ebc3b78 MAINTAINERS: add maintainer for IMX LPI2C driver
The LPI2C is used in IMX7ULP/MX8 SoCs.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-10-31 23:37:34 +00:00
A.s. Dong 69819c7fc8 dt-bindings: i2c: i2c-imx-lpi2c: add imx8qxp compatible string
Add imx8qxp compatible string

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-10-31 23:36:43 +00:00
Charles Keepax 6f108dd70d i2c: Clear client->irq in i2c_device_remove
The IRQ will be mapped in i2c_device_probe only if client->irq is zero and
i2c_device_remove does not clear this. When rebinding an I2C device,
whos IRQ provider has also been rebound this means that an IRQ mapping
will never be created, causing the I2C device to fail to acquire its
IRQ. Fix this issue by clearing client->irq in i2c_device_remove,
forcing i2c_device_probe to lookup the mapping again.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-10-31 23:33:34 +00:00
Charles Keepax b9bb3fdf4e i2c: Remove unnecessary call to irq_find_mapping
irq_create_mapping calls irq_find_mapping internally and will use the
found mapping if one exists, so there is no need to manually call this
from i2c_smbus_host_notify_to_irq.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-10-31 23:33:14 +00:00
Linus Torvalds 3dca04d694 RISC-V Patches for the 4.20 Merge Window, Part 2 v2
This tag contains the follow-on patches I'd like to target for the 4.20
 merge window.  I'm being somewhat conservative here, as while there are
 a few patches on the mailing list that were posted early in the merge
 window I'd like to let those bake for another round -- this was a fairly
 big release as far as RISC-V is concerened, and we need to walk before
 we can run.
 
 As far as the patches that made it go:
 
 * A patch to ignore offline CPUs when calculating AT_HWCAP.  This should
   fix GDB on the HiFive unleashed, which has an embedded core for hart
   0 which is exposed to Linux as an offline CPU.
 * A move of EM_RISCV to elf-em.h, which is where it should have been to
   begin with.
 * I've also removed the 64-bit divide routines.  I know I'm not really
   playing by my own rules here because I posted the patches this
   morning, but since they shouldn't be in the kernel I think it's better
   to err on the side of going too fast here.
 
 I don't anticipate any more patch sets for the merge window.
 
 Changes since v1:
 
 * Use a consistent base to merge from so the history isn't a mess.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAlvZ//ITHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQaOqEACpJTs19+1HFQ/YSB4P+drIImDq9XNF
 OFElcqe+R961BnyHJUA4WObl0Bl9bDqciYhelwdeb/0gYaOBG5IsmwAKxN9N2f9d
 m2/3eVUyiwMDKsc8Mrdcu7e3TLvfnhfaSOVe9hDvVcSeZvaC4S+dr+b7gjOZd45o
 52SQqj6TMh20g5h6knaU5wnhHriJH7U4MwiEmwSTZuUkKj8Uoa1HGyzuVqqhi6A2
 3y0m4VmVTwS9dmork2xZdsif+POSxrRxdtMTMWf85FelSO1OdTeMemUx2WnnWlCU
 5VoPF5upXWB6uVtgXAVC8yhjCke5mUIOMcO10UGXdcjS/q9Vfg0yt6LusijTmYec
 UznnpnkPOap3t6tb+dkRanP+BRphB6A9DpXUkiGGo2nwbi48OC+pTYjZMdRUX7r3
 FHq3LknprDfK6+D6goftlXlYSmb8H2rSCubK5dv6Zq9/rkBAkN/ESo9HEXvtPrAh
 oQAU1kmjq1EQg87fpmMvVySLApj+YPCoNMaPn3be03JRup4vaoGo8obmVP7rqgAG
 BIq6gx2BqqWWNvJftFm85AurTC1K3ClLO0mgTD5zhHvaCTHNI0TLlYh58QcKU00j
 c6+u+6tMF00Nvk8n/cbC/hRc2T+oAGb6hr6pFQEhANAkMu9dYpYfOWRbYl7Iiszq
 J3eT+7rxvHXCpg==
 =9Lsg
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux

Pull more RISC-V updates from Palmer Dabbelt:
 "This contains the follow-on patches I'd like to target for the 4.20
  merge window. I'm being somewhat conservative here, as while there are
  a few patches on the mailing list that were posted early in the merge
  window I'd like to let those bake for another round -- this was a
  fairly big release as far as RISC-V is concerened, and we need to walk
  before we can run.

  As far as the patches that made it go:

   - A patch to ignore offline CPUs when calculating AT_HWCAP. This
     should fix GDB on the HiFive unleashed, which has an embedded core
     for hart 0 which is exposed to Linux as an offline CPU.

   - A move of EM_RISCV to elf-em.h, which is where it should have been
     to begin with.

   - I've also removed the 64-bit divide routines. I know I'm not really
     playing by my own rules here because I posted the patches this
     morning, but since they shouldn't be in the kernel I think it's
     better to err on the side of going too fast here.

  I don't anticipate any more patch sets for the merge window"

* tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  Move EM_RISCV into elf-em.h
  RISC-V: properly determine hardware caps
  Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines"
  Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32"
2018-10-31 16:20:28 -07:00
Naveen N. Rao 1936f094e1 selftests/powerpc: Fix compilation issue due to asm label
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
	/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined

With different compiler versions, we may also see:
	/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'

Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.

Fixes: d2bf793237 ("selftests/powerpc: Add test to verify rfi flush across a system call")
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-11-01 10:06:03 +11:00
Linus Torvalds 9bb9d4fdce Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger:

 - removal of old and dead code

 - a bug fix for our tty driver

 - other minor cleanups across the code base

* 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Make line/tty semantics use true write IRQ
  um: trap: fix spelling mistake, EACCESS -> EACCES
  um: Don't hardcode path as it is architecture dependent
  um: NULL check before kfree is not needed
  um: remove unused AIO code
  um: Give start_idle_thread() a return code
  um: Remove update_debugregs()
  um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP
2018-10-31 15:46:16 -07:00
Linus Torvalds adb6b2b2b5 c6x changes for 4.20
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJb2glLAAoJEOiN4VijXeFPjfUQAJcSJ/NeoGGpj9T8/+InkEZ9
 dFkB91lyylooew15b9s7Jvrm1kLDzQ6wZif3BzLuBqE4mkh58MawAuOVCYolzTlN
 dkaA5Jqz/CA0ycvQAnfKQKdzJlBDhRanUg1MmB2O018q4afGJKbMlhRicqKtVdv1
 T5GVzwFLkklaAbmPgWOsTujvyK1aAlXUljwO31oKaFZT5Cjl2eM51NfmMiXzQ63o
 lqutmpMspCd9V+jac0aLlYonjFKVIoMHI687RUReIWlbsIySA2GMG/W7xLmnIxJe
 Ny2labiL/epmBlK3IgM0q/eW7RrZN5gX5o6TVpsVL2PJePEOQkMMVz6MAZAt4u9k
 MVcdeuWCqOawMtoyKLUsC/N5ve/rRMildf/XUOL5uu171IEjp3WWCrHR1n1j5aH4
 ouPiXjedB+k9muzi5lQGNERthvPqTshnPohu5xyZt2FcvcA15gbNBFKbzYTlaMVI
 YJANFfLBVaH2QnY1ZSXgp5k1zzlpueil7WB0sqQlbcr372KPJKyscGjXV+4Qa6iJ
 uUjXY8XTuNHeFC5/RKwY3CFWfbE4ebxtvRaUgniVvxYk/OiTjswRhTletMPXxG8+
 QE4+ZNKC8NQfaaxba3yYTPd5Nk7+1WypZC3lbuJcObBQFrDFWpRF58ZGrB53+ssG
 3mB+TupWvjV2KjasXozC
 =8GvY
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

Pull c6x update from Mark Salter.

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  c6x: switch to NO_BOOTMEM
2018-10-31 15:39:25 -07:00
Andrey Ignatov 3615353218 libbpf: Fix compile error in libbpf_attach_type_by_name
Arnaldo Carvalho de Melo reported build error in libbpf when clang
version 3.8.1-24 (tags/RELEASE_381/final) is used:

libbpf.c:2201:36: error: comparison of constant -22 with expression of
type 'const enum bpf_attach_type' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
                if (section_names[i].attach_type == -EINVAL)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~
1 error generated.

Fix the error by keeping "is_attachable" property of a program in a
separate struct field instead of trying to use attach_type itself.

Fixes: 956b620fcf ("libbpf: Introduce libbpf_attach_type_by_name")
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-10-31 23:06:17 +01:00
Li Zhijian deee2cae27 kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists
ping binary on some distros doesn't support "ping -6" anymore.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-10-31 23:05:30 +01:00
Ingo Molnar 29995d296e perf/urgent improvements and fixes:
- Fixes dealing with the removal of the fallback to looking up samples
   marked as userspace in the kernel maps, done recently:
 
   - For intel-pt, that was setting the synthesized header misc field
     as PERF_RECORD_MISC_USER, depending thus on the fallback to take
     place, now it sets as USER or KERNEL according to x86 specific
     knowledge. Also now it inserts the PERF_CONTEXT_{USER,KERNEL} into
     the PERF_SAMPLE_CALLCHAINs it synthesizes from hw traces (Adrian Hunter)
 
   - Similar fixes for the cs-etm ARM HW trace code, that used the Intel PT
     model as a starting point (Leo Yan)
 
   - For the "caller" callchain order, where the callchain returned by the
     kernel was simply reversed without taking into account the
     PERF_CONTEXT_{USER,KERNEL,etc} markers from where to define if an entry
     was for kernel or userspace, working just because the map lookup fallback
     was in place (David S. Miller)
 
 - Allow for selecting if 'overwrite' mode should be used in 'perf top' and
   make the default for it not to be used. This is due to problems with the
   current implementation where the pausing used ends up making 'perf top'
   miss PERF_RECORD_{MMAP,FORK,EXEC,etc} events, which with short lifetime
   threads workloads leads quickly to many "unknown" maps (and thus symbols)
   to appear in the UI. Workloads with long thread lifetimes and with few
   metadata events can still use --overwrite to take advantage of the
   overwrite mode (Arnaldo Carvalho de Melo)
 
 - Start 'perf top''s display thread earlier, so that the screen doesn't
   remain blank for too long at tool start (David S. Miller)
 
 - Don't clone maps from parent when synthesizing forks, to avoid the inevitable
   flurry of overlapping maps as we process the synthesized MMAP2 events that get
   delivered shortly thereafter. (David S. Miller)
 
 - Take pgoff into account when reporting elf to libdwfl, now the unwinding
   results are the same with elfutils's libdwfl and libunwind (Milian Wolff)
 
 - Update lotsa kernel ABI headers (Arnaldo Carvalho de Melo)
 
 - 'perf trace' syscall arg beautification improvements to allow for
   handling args such as mount's 'flags', where maks have to be ignored
   before considering what is left, that, if only zeroes, is suppressed
   like other args without such masks (Arnaldo Carvalho de Melo)
 
 - Beautify mount's 'source' and 'flags' args (Arnaldo Carvalho de Melo)
 
 - Generate mmap's flags bit constants from linux/mman.h and all the
   arch specific mman.h files, so that no changes in the main 'perf trace'
   source files is required when new flags get added (Arnaldo Carvalho de Melo)
 
 - Consider syscall aliases, so that 'perf trace -e umount' works and we don't
   have to use 'umount2' (that works as well, just not required) (Arnaldo Carvalho de Melo)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCW9nYxQAKCRCyPKLppCJ+
 J+L1AQCYddnP+10DKmX1AANnFZrnhwpNuXSXmsa1Ar1npLdDLQD9H/v8EOdqQ4f8
 ckoYhlgw7+R/QANS5C4J2aalCbvQ2Qc=
 =uYi2
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo-4.20-20181031' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent improvements and fixes from Arnaldo Carvalho de Melo:

- Fixes dealing with the removal of the fallback to looking up samples
  marked as userspace in the kernel maps, done recently:

  - For intel-pt, that was setting the synthesized header misc field
    as PERF_RECORD_MISC_USER, depending thus on the fallback to take
    place, now it sets as USER or KERNEL according to x86 specific
    knowledge. Also now it inserts the PERF_CONTEXT_{USER,KERNEL} into
    the PERF_SAMPLE_CALLCHAINs it synthesizes from hw traces (Adrian Hunter)

  - Similar fixes for the cs-etm ARM HW trace code, that used the Intel PT
    model as a starting point (Leo Yan)

  - For the "caller" callchain order, where the callchain returned by the
    kernel was simply reversed without taking into account the
    PERF_CONTEXT_{USER,KERNEL,etc} markers from where to define if an entry
    was for kernel or userspace, working just because the map lookup fallback
    was in place (David S. Miller)

- Allow for selecting if 'overwrite' mode should be used in 'perf top' and
  make the default for it not to be used. This is due to problems with the
  current implementation where the pausing used ends up making 'perf top'
  miss PERF_RECORD_{MMAP,FORK,EXEC,etc} events, which with short lifetime
  threads workloads leads quickly to many "unknown" maps (and thus symbols)
  to appear in the UI. Workloads with long thread lifetimes and with few
  metadata events can still use --overwrite to take advantage of the
  overwrite mode (Arnaldo Carvalho de Melo)

- Start 'perf top''s display thread earlier, so that the screen doesn't
  remain blank for too long at tool start (David S. Miller)

- Don't clone maps from parent when synthesizing forks, to avoid the inevitable
  flurry of overlapping maps as we process the synthesized MMAP2 events that get
  delivered shortly thereafter. (David S. Miller)

- Take pgoff into account when reporting elf to libdwfl, now the unwinding
  results are the same with elfutils's libdwfl and libunwind (Milian Wolff)

- Update lotsa kernel ABI headers (Arnaldo Carvalho de Melo)

- 'perf trace' syscall arg beautification improvements to allow for
  handling args such as mount's 'flags', where maks have to be ignored
  before considering what is left, that, if only zeroes, is suppressed
  like other args without such masks (Arnaldo Carvalho de Melo)

- Beautify mount's 'source' and 'flags' args (Arnaldo Carvalho de Melo)

- Generate mmap's flags bit constants from linux/mman.h and all the
  arch specific mman.h files, so that no changes in the main 'perf trace'
  source files is required when new flags get added (Arnaldo Carvalho de Melo)

- Consider syscall aliases, so that 'perf trace -e umount' works and we don't
  have to use 'umount2' (that works as well, just not required) (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-10-31 22:53:40 +01:00
Linus Torvalds 9b5cf826ef fuse update for 4.20
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCW9m8rQAKCRDh3BK/laaZ
 POTeAP9DthScqnVxrRiyvORwffjTLOCijY4yAatgxTU5MO6TQgD/eeO62Exq5Cij
 4uXCSNIzPVPKiimunVKYoDM8KmcNtAQ=
 =z92F
 -----END PGP SIGNATURE-----

Merge tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi:
 "As well as the usual bug fixes, this adds the following new features:

   - cached readdir and readlink

   - max I/O size increased from 128k to 1M

   - improved performance and scalability of request queues

   - copy_file_range support

  The only non-fuse bits are trivial cleanups of macros in
  <linux/bitops.h>"

* tag 'fuse-update-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (31 commits)
  fuse: enable caching of symlinks
  fuse: only invalidate atime in direct read
  fuse: don't need GETATTR after every READ
  fuse: allow fine grained attr cache invaldation
  bitops: protect variables in bit_clear_unless() macro
  bitops: protect variables in set_mask_bits() macro
  fuse: realloc page array
  fuse: add max_pages to init_out
  fuse: allocate page array more efficiently
  fuse: reduce size of struct fuse_inode
  fuse: use iversion for readdir cache verification
  fuse: use mtime for readdir cache verification
  fuse: add readdir cache version
  fuse: allow using readdir cache
  fuse: allow caching readdir
  fuse: extract fuse_emit() helper
  fuse: add FOPEN_CACHE_DIR
  fuse: split out readdir.c
  fuse: Use hash table to link processing request
  fuse: kill req->intr_unique
  ...
2018-10-31 14:50:02 -07:00
Linus Torvalds 31990f0f53 The highlights are:
- a series that fixes some old memory allocation issues in libceph
   (myself).  We no longer allocate memory in places where allocation
   failures cannot be handled and BUG when the allocation fails.
 
 - support for copy_file_range() syscall (Luis Henriques).  If size and
   alignment conditions are met, it leverages RADOS copy-from operation.
   Otherwise, a local copy is performed.
 
 - a patch that reduces memory requirement of ceph_sync_read() from the
   size of the entire read to the size of one object (Zheng Yan).
 
 - fallocate() syscall is now restricted to FALLOC_FL_PUNCH_HOLE (Luis
   Henriques)
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEydHwtzie9C7TfviiSn/eOAIR84sFAlvZ6AcTHGlkcnlvbW92
 QGdtYWlsLmNvbQAKCRBKf944AhHzi8H+B/9V/QB1BX5Q2DvkS3mcLNI2NphrppaD
 VBuviwoIzaBm1paCrx40J/pCtsK1Fybl5dBAh1W0SDxEGR8JUA8GJw+oemtOS6pZ
 DwjOF9S7uhzf5M3nQ9SvAbIudBISMZQRi22Y8fWs3k+yaECIz1J/pe7RiKo/GBAB
 NnlbrZ1AYSB02chchVCSmWTApeIRp9JXnaM9xLMJWGVLL/vONjt3ltJ/w9haGYz8
 FPFLPFeWobWqFElnOUomxU8Cv84DgPtH8si0UAn16jveractpFJWO4X6LDs/ZYDk
 /MccfsB3EK9BCJdLJMoI0/lXxE33z3/MehmJDs9xGSX/N4N7UTF8Ve1b
 =U91e
 -----END PGP SIGNATURE-----

Merge tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client

Pull ceph updates from Ilya Dryomov:
 "The highlights are:

   - a series that fixes some old memory allocation issues in libceph
     (myself). We no longer allocate memory in places where allocation
     failures cannot be handled and BUG when the allocation fails.

   - support for copy_file_range() syscall (Luis Henriques). If size and
     alignment conditions are met, it leverages RADOS copy-from
     operation. Otherwise, a local copy is performed.

   - a patch that reduces memory requirement of ceph_sync_read() from
     the size of the entire read to the size of one object (Zheng Yan).

   - fallocate() syscall is now restricted to FALLOC_FL_PUNCH_HOLE (Luis
     Henriques)"

* tag 'ceph-for-4.20-rc1' of git://github.com/ceph/ceph-client: (25 commits)
  ceph: new mount option to disable usage of copy-from op
  ceph: support copy_file_range file operation
  libceph: support the RADOS copy-from operation
  ceph: add non-blocking parameter to ceph_try_get_caps()
  libceph: check reply num_data_items in setup_request_data()
  libceph: preallocate message data items
  libceph, rbd, ceph: move ceph_osdc_alloc_messages() calls
  libceph: introduce alloc_watch_request()
  libceph: assign cookies in linger_submit()
  libceph: enable fallback to ceph_msg_new() in ceph_msgpool_get()
  ceph: num_ops is off by one in ceph_aio_retry_work()
  libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op()
  ceph: set timeout conditionally in __cap_delay_requeue
  libceph: don't consume a ref on pagelist in ceph_msg_data_add_pagelist()
  libceph: introduce ceph_pagelist_alloc()
  libceph: osd_req_op_cls_init() doesn't need to take opcode
  libceph: bump CEPH_MSG_MAX_DATA_LEN
  ceph: only allow punch hole mode in fallocate
  ceph: refactor ceph_sync_read()
  ceph: check if LOOKUPNAME request was aborted when filling trace
  ...
2018-10-31 14:42:31 -07:00
Gustavo A. R. Silva 1b7619828d NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
Both devm_kcalloc() and devm_kzalloc() return NULL on error. They
never return error pointers.

The use of IS_ERR_OR_NULL is currently applied to the wrong
context.

Fix this by replacing IS_ERR_OR_NULL with regular NULL checks.

Fixes: bf2a952d31 ("NTB: Add IDT 89HPESxNTx PCIe-switches support")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 16:22:44 -04:00
Dave Jiang 7756e2b5d6 ntb: intel: fix return value for ndev_vec_mask()
ndev_vec_mask() should be returning u64 mask value instead of int.
Otherwise the mask value returned can be incorrect for larger
vectors.

Fixes: e26a5843f7 ("NTB: Split ntb_hw_intel and ntb_transport drivers")

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Lucas Van <lucas.van@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-10-31 16:07:26 -04:00
Jon Mason a861594b1b ntb_netdev: fix sleep time mismatch
The tx_time should be in usecs (according to the comment above the
variable), but the setting of the timer during the rearming is done in
msecs.  Change it to match the expected units.

Fixes: e74bfeedad ("NTB: Add flow control to the ntb_netdev")
Suggested-by: Gerd W. Haeussler <gerd.haeussler@cesys-it.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Dave Jiang <dave.jiang@intel.com>
2018-10-31 16:02:39 -04:00
David S. Miller e2acdddde0 Merge branch 'mlxsw-Enable-minimum-shaper-on-MC-TCs'
Ido Schimmel says:

====================
mlxsw: Enable minimum shaper on MC TCs

Petr says:

An MC-aware mode was introduced in commit 7b81953066 ("mlxsw:
spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode,
BUM traffic gets a special treatment by being assigned to a separate set
of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then
configured to strictly prioritize the lower-numbered ones. The intention
is to prevent BUM traffic from flooding the switch and push out all UC
traffic, which would otherwise happen, and instead give UC traffic
precedence.

However strictly prioritizing UC traffic has the effect that UC overload
pushes out all BUM traffic, such as legitimate ARP queries. These
packets are kept in queues for a while, but under sustained UC overload,
their lifetime eventually expires and these packets are dropped. That is
detrimental to network performance as well.

In this patchset, MC TCs (8..15) are configured with minimum shaper of
200Mbps (a minimum permitted value) to allow a trickle of necessary
control traffic to get through.

First in patch #1, the QEEC register is extended with fields necessary
to configure the minimum shaper.

In patch #2, minimum shaper is enabled on TCs 8..15.

In patches #3 and #4, first the MC-awareness test is tweaked to support
the minimum shaper, and then a new test is introduced to test that MC
traffic behaves well under UC overload.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:56:59 -07:00
Petr Machata a5ee171d08 selftests: mlxsw: qos_mc_aware: Add a test for UC awareness
In a previous patch, mlxsw was updated to configure a minimum bandwidth
allowance on MC TCs. Test that this indeed fixes the problem of UC
traffic overload pushing out all MC traffic.

Fixes: b5638d46c9 ("selftests: mlxsw: Add a test for UC behavior under MC flood")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:56:59 -07:00
Petr Machata 8f3f09358c selftests: mlxsw: qos_mc_aware: Tweak for min shaper
Since the minimum shaper is now being enabled for MC TCs, it's
unreasonable to expect no UC traffic loss. Minimal min shaper value is
200Mbps, which is 20% of the 1Gbps that this test configures on egress.
To cover for glitches, tolerate up to 25% UC degradation under MC
overload.

Fixes: b5638d46c9 ("selftests: mlxsw: Add a test for UC behavior under MC flood")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:56:59 -07:00
Petr Machata 0fe6402316 mlxsw: spectrum: Set minimum shaper on MC TCs
An MC-aware mode was introduced in commit 7b81953066 ("mlxsw:
spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode,
BUM traffic gets a special treatment by being assigned to a separate set
of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then
configured to strictly prioritize the lower-numbered ones. The intention
is to prevent BUM traffic from flooding the switch and push out all UC
traffic, which would otherwise happen, and instead give UC traffic
precedence.

However strictly prioritizing UC traffic has the effect that UC overload
pushes out all BUM traffic, such as legitimate ARP queries. These
packets are kept in queues for a while, but under sustained UC overload,
their lifetime eventually expires and these packets are dropped. That is
detrimental to network performance as well.

Therefore configure the MC TCs (8..15) with minimum shaper of 200Mbps (a
minimum permitted value) to allow a trickle of necessary control traffic
to get through.

Fixes: 7b81953066 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:56:58 -07:00
Petr Machata 8b931821aa mlxsw: reg: QEEC: Add minimum shaper fields
Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable
configuration of minimum shaper.

Increase the QEEC length to 0x20 as well: that's the length that the
register has had for a long time now, but with the configurations that
mlxsw typically exercises, the firmware tolerated 0x1C-sized packets.
With mise=true however, FW rejects packets unless they have the full
required length.

Fixes: b9b7cee405 ("mlxsw: reg: Add QoS ETS Element Configuration register")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:56:58 -07:00
David S. Miller c4d63c7147 Merge branch 'hns3-fixes'
Huazhong Tan says:

====================
Bugfix for the HNS3 driver

This patch series include bugfix for the HNS3 ethernet
controller driver.

Change log:
V4->V5:
	Fixes comments from Joe Perches & Sergei Shtylyov
V3->V4:
	Fixes comments from Sergei Shtylyov
V2->V3:
	Fixes comments from Sergei Shtylyov
V1->V2:
	Fixes the compilation break reported by kbuild test robot
	http://patchwork.ozlabs.org/patch/989818/
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:39 -07:00
Huazhong Tan 29118ab962 net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset()
Since hclgevf_reset_wait() is used to wait for the hardware to complete
the reset, it is not necessary to hold the rtnl_lock during
hclgevf_reset_wait(). So this patch releases the lock for the duration
of hclgevf_reset_wait().

Fixes: 6988eb2a9b ("net: hns3: Add support to reset the enet/ring mgmt layer")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan a963052e53 net: hns3: bugfix for rtnl_lock's range in the hclge_reset()
Since hclge_reset_wait() is used to wait for the hardware to complete
the reset, it is not necessary to hold the rtnl_lock during
hclge_reset_wait(). So this patch releases the lock for the duration
of hclge_reset_wait().

Fixes: 6d4fab3953 ("net: hns3: Reset net device with rtnl_lock")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 3c88ed1d79 net: hns3: bugfix for handling mailbox while the command queue reinitialized
In a multi-core machine, the mailbox service and reset service
will be executed at the same time. The reset service will re-initialize
the command queue, before that, the mailbox handler can only get some
invalid messages.

The HCLGE_STATE_CMD_DISABLE flag means that the command queue is not
available and needs to be reinitialized. Therefore, when the mailbox
handler recognizes this flag, it should not process the command.

Fixes: dde1a86e93 ("net: hns3: Add mailbox support to PF driver")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 7fa6be4fd2 net: hns3: fix incorrect return value/type of some functions
There are some functions that, when they fail to send the command,
need to return the corresponding error value to its caller.

Fixes: 46a3df9f97 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Fixes: 681ec3999b ("net: hns3: fix for vlan table lost problem when resetting")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 1c12493809 net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read
When there is a PHY, the driver needs to complete some operations through
MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more
suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from
being sent during the hardware reset.

Fixes: b50ae26c57 ("net: hns3: never send command queue message to IMP when reset)
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 6d71ec6cbf net: hns3: bugfix for is_valid_csq_clean_head()
The HEAD pointer of the hardware command queue maybe equal to the command
queue's next_to_use in the driver, so that does not belong to the invalid
HEAD pointer, since the hardware may not process the command in time,
causing the HEAD pointer to be too late to update. The variables' name
in this function is unreadable, so give them a more readable one.

Fixes: 3ff504908f ("net: hns3: fix a dead loop in hclge_cmd_csq_clean")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 5faaf0752a net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()
It is not necessary to reset the queue in the hns3_uninit_all_ring(),
since the queue is stopped in the down operation, and will be reset
in the up operation. And the judgment of the HCLGE_STATE_RST_HANDLING
flag in the hclge_reset_tqp() is not correct, because we need to reset
tqp during pf reset, otherwise it may cause queue not being reset to
working state problem.

Fixes: 76ad4f0ee7 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan b2f74dbaf1 net: hns3: bugfix for the initialization of command queue's spin lock
The spin lock of the command queue only need to be initialized once
when the driver initializes the command queue. It is not necessary to
initialize the spin lock when resetting. At the same time, the
modification of the queue member should be performed after acquiring
the lock.

Fixes: 3efb960f05 ("net: hns3: Refactor the initialization of command queue")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 0d4411408a net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem
The current driver supports handling two vector0 interrupts, reset and
mailbox. When the hardware reports an interrupt of another type of
interrupt source, if the driver does not process the interrupt, but
enables the interrupt, the hardware will repeatedly report the unknown
interrupt.

Therefore, the driver enables the vector0 interrupt after clearing the
known type of interrupt source. Other conditions are not enabled.

Fixes: cd8c5c269b ("net: hns3: Fix for hclge_reset running repeatly problem")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan 73b907a083 net: hns3: bugfix for buffer not free problem during resetting
When hns3_get_ring_config()/hns3_queue_to_ring()/
hns3_get_vector_ring_chain() failed during resetting, the allocated
memory has not been freed before these three functions return. So
this patch adds error handler in these functions to fix it.

Fixes: 76ad4f0ee7 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Huazhong Tan ece4bf46e9 net: hns3: add error handler for hns3_nic_init_vector_data()
When hns3_nic_init_vector_data() fails to map ring to vector,
it should cancel the netif_napi_add() that has been successfully
done and then exits.

Fixes: 76ad4f0ee7 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:42:38 -07:00
Eric Dumazet d48051c5b8 net/mlx5e: fix csum adjustments caused by RXFCS
As shown by Dmitris, we need to use csum_block_add() instead of csum_add()
when adding the FCS contribution to skb csum.

Before 4.18 (more exactly commit 88078d98d1 "net: pskb_trim_rcsum()
and CHECKSUM_COMPLETE are friends"), the whole skb csum was thrown away,
so RXFCS changes were ignored.

Then before commit d55bef5059 ("net: fix pskb_trim_rcsum_slow() with
odd trim offset") both mlx5 and pskb_trim_rcsum_slow() bugs were canceling
each other.

Now we fixed pskb_trim_rcsum_slow() we need to fix mlx5.

Note that this patch also rewrites mlx5e_get_fcs() to :

- Use skb_header_pointer() instead of reinventing it.
- Use __get_unaligned_cpu32() to avoid possible non aligned accesses
  as Dmitris pointed out.

Fixes: 902a545904 ("net/mlx5e: When RXFCS is set, add FCS data into checksum calculation")
Reported-by: Paweł Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eran Ben Elisha <eranbe@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Cc: Dimitris Michailidis <dmichail@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Paweł Staszewski <pstaszewski@itcare.pl>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Tested-By: Maria Pasechnik <mariap@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:40:52 -07:00
Jason Wang ff002269a4 vhost: Fix Spectre V1 vulnerability
The idx in vhost_vring_ioctl() was controlled by userspace, hence a
potential exploitation of the Spectre variant 1 vulnerability.

Fixing this by sanitizing idx before using it to index d->vqs.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:39:15 -07:00
Bo YU b1c234441e net: drop a space before tabs
Fix a warning from checkpatch.pl:'please no space before tabs'
in include/net/af_unix.h

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:37:12 -07:00
Bo YU c4147beabe net: add an identifier name for 'struct sock *'
Fix a warning from checkpatch:
function definition argument 'struct sock *' should also have an
identifier name in include/net/af_unix.h.

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:37:12 -07:00
Colin Ian King e7611088f0 net: hns3: fix spelling mistake "intrerrupt" -> "interrupt"
Trivial fix to spelling mistake in dev_err message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:33:10 -07:00
Palmer Dabbelt ef70696a63
lib: Remove umoddi3 and udivmoddi4
These were only necessary for an out-of-tree driver that has since been
fixed to use the proper divide routines.  I've simply reverted the pair
of commits we made last week.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-10-31 12:13:54 -07:00