[PATCH v3 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-09-10 Thread Boqun Feng
This patchset add the necessary changes to support guests whose page size is larger than 4K. And the main architecture which we develop this for is ARM64 (also it's the architecture that I use to test this feature). Now as the patchset has been deeply reviewed, I change it from "RFC" to "PATCH",

[PATCH v3 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-10 Thread Boqun Feng
This patch introduces two types of GPADL: HV_GPADL_{BUFFER, RING}. The types of GPADL are purely the concept in the guest, IOW the hypervisor treat them as the same. The reason of introducing the types for GPADL is to support guests whose page size is not 4k (the page size of Hyper-V hypervisor).

[PATCH v3 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-09-10 Thread Boqun Feng
Both the base_*_gpa should use the guest page number in Hyper-V page, so use HV_HYP_PAGE instead of PAGE. Signed-off-by: Boqun Feng --- drivers/hv/hv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 7499079f4077..8ac8bbf5b5aa

[PATCH v3 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-09-10 Thread Boqun Feng
Since the hypervisor always uses 4K as its page size, the size of PFNs used for gpadl should be HV_HYP_PAGE_SIZE rather than PAGE_SIZE, so adjust this accordingly as the preparation for supporting 16K/64K page size guests. No functional changes on x86, since PAGE_SIZE is always 4k (equals to

[PATCH v3 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-09-10 Thread Boqun Feng
Pure function movement, no functional changes. The move is made, because in a later change, __vmbus_open() will rely on some static functions afterwards, so we separate the move and the modification of __vmbus_open() in two patches to make it easy to review. Signed-off-by: Boqun Feng

[PATCH v3 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-09-10 Thread Boqun Feng
There will be more places other than vmbus where we need to calculate the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to hyperv generic header. Signed-off-by: Boqun Feng --- drivers/hv/channel.c | 13 - include/linux/hyperv.h | 15 +++ 2 files

[PATCH v3 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-10 Thread Boqun Feng
When communicating with Hyper-V, HV_HYP_PAGE_SIZE should be used since that's the page size used by Hyper-V and Hyper-V expects all page-related data using the unit of HY_HYP_PAGE_SIZE, for example, the "pfn" in hv_page_buffer is actually the HV_HYP_PAGE (i.e. the Hyper-V page) number. In order

[PATCH v3 08/11] Input: hyperv-keyboard: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at least 2 * PAGE_SIZE: one page for the header and at least one page of the data part (because of the alignment requirement for double mapping). So make sure the ringbuffer sizes to be at least 2 * PAGE_SIZE when using

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Florian Fainelli
On 9/10/2020 1:32 PM, Oded Gabbay wrote: On Thu, Sep 10, 2020 at 11:28 PM Jakub Kicinski wrote: On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: create mode 100644

[PATCH v3 09/11] HID: hyperv: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at least 2 * PAGE_SIZE: one page for the header and at least one page of the data part (because of the alignment requirement for double mapping). So make sure the ringbuffer sizes to be at least 2 * PAGE_SIZE when using

[PATCH v3 10/11] Driver: hv: util: Make ringbuffer at least take two pages

2020-09-10 Thread Boqun Feng
When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at least 2 * PAGE_SIZE: one page for the header and at least one page of the data part (because of the alignment requirement for double mapping). So make sure the ringbuffer sizes to be at least 2 * PAGE_SIZE when using

[PATCH v3 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-10 Thread Boqun Feng
Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE as the unit for page related data. For storvsc, the data is vmbus_packet_mpb_array. And since in scsi_cmnd, sglist of pages (in unit of PAGE_SIZE) is used, we need

Re: [PATCH v18 00/32] per memcg lru_lock: reviews

2020-09-10 Thread Alexander Duyck
On Wed, Sep 9, 2020 at 5:32 PM Hugh Dickins wrote: > > On Wed, 9 Sep 2020, Alexander Duyck wrote: > > On Tue, Sep 8, 2020 at 4:41 PM Hugh Dickins wrote: > > > [PATCH v18 28/32] mm/compaction: Drop locked from > > > isolate_migratepages_block > > > Most of this consists of replacing "locked" by

[PATCH] checkpatch: accept longer commit description lines

2020-09-10 Thread Tetsuo Handa
Given that commit bdc48fa11e46f867 ("checkpatch/coding-style: deprecate 80-column warning") was introduced because nowadays most of us are using screens that can print more than 100 columns, most of us will be also using mail clients that can print more than 100 columns. Since 75 chars limit for

Re: kcompactd hotplug fail

2020-09-10 Thread peterz
On Thu, Sep 10, 2020 at 04:10:06PM +0200, pet...@infradead.org wrote: > Hi, > > While playing with hotplug, I ran into the below: Ah, it could be I wrecked my kernel bad... :-( I'll let you know if I can reproduce this on a pristine kernel.

Re: [PATCH v3 2/2] venus: firmware: Set virtual address ranges

2020-09-10 Thread Bjorn Andersson
On Thu 10 Sep 02:52 CDT 2020, Stanimir Varbanov wrote: > In order to boot some of the new Venus firmware versions TZ call to set > virtual address ranges is needed. Add virtual address ranges for CP and > CP_NONPIX in resource structure and use them when loading and booting > the firmware on

Re: [PATCH] scsi: clear UAC before sending SG_IO

2020-09-10 Thread kernel test robot
Hi Randall, Thank you for the patch! Yet something to improve: [auto build test ERROR on mkp-scsi/for-next] [also build test ERROR on scsi/for-next v5.9-rc4 next-20200910] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base

Re: [PATCH v8 1/5] PCI: Conditionally initialize host bridge native_* members

2020-09-10 Thread Kuppuswamy, Sathyanarayanan
On 9/10/20 12:49 PM, Bjorn Helgaas wrote: On Fri, Jul 24, 2020 at 08:58:52PM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: From: Kuppuswamy Sathyanarayanan If CONFIG_PCIEPORTBUS is not enabled in kernel then initialing struct pci_host_bridge PCIe specific native_* members to

Re: [PATCH V5 1/4] arm64: dts: qcom: sc7180: Improve the pin config settings for CTS and TX

2020-09-10 Thread Doug Anderson
Hi, On Thu, Sep 10, 2020 at 5:55 AM satya priya wrote: > > Remove output-high from CTS and TX as this is not really required. During > bringup to fix transfer failures this was added to match with console uart > settings. Probably some boot loader config was missing then. As it is > working fine

bdi cleanups v4

2020-09-10 Thread Christoph Hellwig
Hi Jens, this series contains a bunch of different BDI cleanups. The biggest item is to isolate block drivers from the BDI in preparation of changing the lifetime of the block device BDI in a follow up series. Changes since v3: - rebased on the lasted block tree, which has some of the prep

[PATCH 01/12] fs: remove the unused SB_I_MULTIROOT flag

2020-09-10 Thread Christoph Hellwig
The last user of SB_I_MULTIROOT is disappeared with commit f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- fs/namei.c | 4 ++-- include/linux/fs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [RFC PATCH 6/6] security/fbfam: Mitigate a fork brute force attack

2020-09-10 Thread Jann Horn
On Thu, Sep 10, 2020 at 10:22 PM Kees Cook wrote: > In order to mitigate a fork brute force attack it is necessary to kill > all the offending tasks. This tasks are all the ones that share the > statistical data with the current task (the task that has crashed). > > Since the attack detection is

[PATCH 02/12] drbd: remove dead code in device_to_statistics

2020-09-10 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not used for VM writeback will not be marked congested, so the check will never trigger. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_nl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c

Re: [PATCHv2 3/4] Input: rotary-encoder - Use dev_err_probe

2020-09-10 Thread Sebastian Reichel
Hi Rob, On Wed, Sep 09, 2020 at 01:48:49PM -0600, Rob Herring wrote: > On Mon, Sep 7, 2020 at 2:40 PM Sebastian Reichel > wrote: > > > > Simplify driver a bit by making use of dev_err_probe. > > > > Signed-off-by: Sebastian Reichel > > --- > > drivers/input/misc/rotary_encoder.c | 8 ++-- >

Re: Ways to deprecate /sys/devices/system/memory/memoryX/phys_device ?

2020-09-10 Thread Dave Hansen
On 9/10/20 3:20 AM, David Hildenbrand wrote: > While I'd love to rip it out completely, I think it would break old > lsmem/chmem completely - and I assume that's not acceptable. I was > wondering what would be considered safe to do now/in the future: > > 1. Make it always return 0 (just as if

[PATCH 06/12] block: lift setting the readahead size into the block layer

2020-09-10 Thread Christoph Hellwig
Drivers shouldn't really mess with the readahead size, as that is a VM concept. Instead set it based on the optimal I/O size by lifting the algorithm from the md driver when registering the disk. Also set bdi->io_pages there as well by applying the same scheme based on max_sectors.

[PATCH 04/12] bdi: initialize ->ra_pages and ->io_pages in bdi_init

2020-09-10 Thread Christoph Hellwig
Set up a readahead size by default, as very few users have a good reason to change it. Signed-off-by: Christoph Hellwig Acked-by: David Sterba [btrfs] Acked-by: Richard Weinberger [ubifs, mtd] --- block/blk-core.c | 2 -- drivers/mtd/mtdcore.c | 2 ++ fs/9p/vfs_super.c | 6 --

[PATCH 05/12] md: update the optimal I/O size on reshape

2020-09-10 Thread Christoph Hellwig
The raid5 and raid10 drivers currently update the read-ahead size, but not the optimal I/O size on reshape. To prepare for deriving the read-ahead size from the optimal I/O size make sure it is updated as well. Signed-off-by: Christoph Hellwig --- drivers/md/raid10.c | 22

[PATCH 07/12] bdi: remove BDI_CAP_CGROUP_WRITEBACK

2020-09-10 Thread Christoph Hellwig
Just checking SB_I_CGROUPWB for cgroup writeback support is enough. Either the file system allocates its own bdi (e.g. btrfs), in which case it is known to support cgroup writeback, or the bdi comes from the block layer, which always supports cgroup writeback. Signed-off-by: Christoph Hellwig

[PATCH 09/12] mm: use SWP_SYNCHRONOUS_IO more intelligently

2020-09-10 Thread Christoph Hellwig
There is no point in trying to call bdev_read_page if SWP_SYNCHRONOUS_IO is not set, as the device won't support it. Signed-off-by: Christoph Hellwig --- mm/page_io.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index

[PATCH 08/12] bdi: remove BDI_CAP_SYNCHRONOUS_IO

2020-09-10 Thread Christoph Hellwig
BDI_CAP_SYNCHRONOUS_IO is only checked in the swap code, and used to decided if ->rw_page can be used on a block device. Just check up for the method instead. The only complication is that zram needs a second set of block_device_operations as it can switch between modes that actually support

[PATCH 10/12] bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag

2020-09-10 Thread Christoph Hellwig
The BDI_CAP_STABLE_WRITES is one of the few bits of information in the backing_dev_info shared between the block drivers and the writeback code. To help untangling the dependency replace it with a queue flag and a superblock flag derived from it. This also helps with the case of e.g. a file

Re: [PATCH] perf: Fix race in perf_mmap_close function

2020-09-10 Thread Jiri Olsa
On Thu, Sep 10, 2020 at 10:48:02PM +0900, Namhyung Kim wrote: SNIP > > _do_fork+0x83/0x3a0 > > __do_sys_wait4+0x83/0x90 > > __do_sys_clone+0x85/0xa0 > > do_syscall_64+0x5b/0x1e0 > > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > > > Using atomic decrease and check instead of separated

drivers/net/wireless/ath/ath11k/ahb.c:919:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void

2020-09-10 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7fe10096c1508c7f033d34d0741809f8eecc1ed4 commit: d5c65159f2895379e11ca13f62feabe93278985d ath11k: driver for Qualcomm IEEE 802.11ax devices date: 10 months ago config: x86_64-randconfig-a015-20200910

Re: [PATCH -next] PCI: dwc: unexport dw_pcie_link_set_max_speed

2020-09-10 Thread Rob Herring
On Wed, Sep 9, 2020 at 7:42 AM YueHaibing wrote: > > This function has been made static, which causes warning: > > WARNING: modpost: "dw_pcie_link_set_max_speed" [vmlinux] is a static > EXPORT_SYMBOL_GPL > > Fixes: 3af45d34d30c ("PCI: dwc: Centralize link gen setting") > Signed-off-by:

[PATCH] net: ethernet: ti: cpsw_new: fix suspend/resume

2020-09-10 Thread Grygorii Strashko
Add missed suspend/resume callbacks to properly restore networking after suspend/resume cycle. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_new.c | 53

[PATCH 12/12] bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag

2020-09-10 Thread Christoph Hellwig
Replace the two negative flags that are always used together with a single positive flag that indicates the writeback capability instead of two related non-capabilities. Also remove the pointless wrappers to just check the flag. Signed-off-by: Christoph Hellwig --- fs/9p/vfs_file.c

Re: kcompactd hotplug fail

2020-09-10 Thread peterz
On Thu, Sep 10, 2020 at 04:37:45PM +0200, pet...@infradead.org wrote: > On Thu, Sep 10, 2020 at 04:10:06PM +0200, pet...@infradead.org wrote: > > Hi, > > > > While playing with hotplug, I ran into the below: > > Ah, it could be I wrecked my kernel bad... :-( > > I'll let you know if I can

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:38 PM Andrew Lunn wrote: > > On Thu, Sep 10, 2020 at 11:30:33PM +0300, Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > > > > > Can you please elaborate on how to do this with a single driver that > > > > is already in misc ? > > > > As

Re: [PATCH RFC 01/10] mm: add Kernel Electric-Fence infrastructure

2020-09-10 Thread Dmitry Vyukov
On Mon, Sep 7, 2020 at 3:41 PM Marco Elver wrote: > +config KFENCE_NUM_OBJECTS > + int "Number of guarded objects available" > + default 255 > + range 1 65535 > + help > + The number of guarded objects available. For each KFENCE object, 2 > + pages are

INFO: rcu detected stall in exit_group

2020-09-10 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:34d4ddd3 Merge tag 'linux-kselftest-5.9-rc5' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=134173a590 kernel config: https://syzkaller.appspot.com/x/.config?x=a9075b36a6ae26c9

[PATCH RFC tip/core/rcu 3/4] rcu-tasks: Selectively enable more RCU Tasks Trace IPIs

2020-09-10 Thread paulmck
From: "Paul E. McKenney" Many workloads are quite sensitive to IPIs, and such workloads should build kernels with CONFIG_TASKS_TRACE_RCU_READ_MB=y to prevent RCU Tasks Trace from using them under normal conditions. However, other workloads are quite happy to permit more IPIs if doing so makes

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-10 Thread Anmol Karn
On Thu, Sep 10, 2020 at 01:49:18PM +0300, Dan Carpenter wrote: > On Thu, Sep 10, 2020 at 10:04:24AM +0530, Anmol Karn wrote: > > Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' > > as NULL. Fix it by adding pointer check for it. > > > > Reported-and-tested-by: > >

[PATCH RFC tip/core/rcu 2/4] rcu-tasks: Use more aggressive polling for RCU Tasks Trace

2020-09-10 Thread paulmck
From: "Paul E. McKenney" The RCU Tasks Trace grace periods are too slow, as in 40x slower than those of RCU Tasks. This is due to my having assumed a one-second grace period was OK, and thus not having optimized any further. This commit provides the first step in this optimization process,

Re: [RFC PATCH] PCI/portdrv: No need to call pci_disable_device() during shutdown

2020-09-10 Thread Bjorn Helgaas
[+cc Huacai] On Thu, Sep 10, 2020 at 02:41:39PM -0500, Bjorn Helgaas wrote: > On Sat, Sep 05, 2020 at 04:33:26PM +0800, Tiezhu Yang wrote: > > After commit 745be2e700cd ("PCIe: portdrv: call pci_disable_device > > during remove") and commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe > > services

[PATCH RFC tip/core/rcu 1/4] rcu-tasks: Mark variables static

2020-09-10 Thread paulmck
From: "Paul E. McKenney" The n_heavy_reader_attempts, n_heavy_reader_updates, and n_heavy_reader_ofl_updates variables are not used outside of their translation unit, so this commit marks them static. Signed-off-by: Paul E. McKenney --- kernel/rcu/tasks.h | 6 +++--- 1 file changed, 3

[PATCH RFC tip/core/rcu 4/4] rcu-tasks: Shorten per-grace-period sleep for RCU Tasks Trace

2020-09-10 Thread paulmck
From: "Paul E. McKenney" The various RCU tasks flavors currently wait 100 milliseconds between each grace period in order to prevent CPU-bound loops and to favor efficiency over latency. However, RCU Tasks Trace needs to have a grace-period latency of roughly 25 milliseconds, which is

[RFC PATCH 1/6] security/fbfam: Add a Kconfig to enable the fbfam feature

2020-09-10 Thread Kees Cook
From: John Wood Add a menu entry under "Security options" to enable the "Fork brute force attack mitigation" feature. Signed-off-by: John Wood --- security/Kconfig | 1 + security/fbfam/Kconfig | 10 ++ 2 files changed, 11 insertions(+) create mode 100644

Re: [PATCH] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-09-10 Thread sudaraja
On 2020-09-10 03:50, Anshuman Khandual wrote: On 09/10/2020 01:57 PM, Steven Price wrote: On 10/09/2020 07:05, Sudarshan Rajagopalan wrote: When section mappings are enabled, we allocate vmemmap pages from physically continuous memory of size PMD_SZIE using vmemmap_alloc_block_buf(). Section

Re: [f2fs-dev] [GIT PULL] small bug fixes for 5.9

2020-09-10 Thread pr-tracker-bot
The pull request you sent on Thu, 10 Sep 2020 07:02:41 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git > tags/f2fs-for-5.9-rc5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/581cb3a26baf846ee9636214afaa5333919875b1 Thank you! --

[[PATCH]] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged

2020-09-10 Thread Vijay Balakrishna
When memory is hotplug added or removed the min_free_kbytes must be recalculated based on what is expected by khugepaged. Currently after hotplug, min_free_kbytes will be set to a lower default and higher default set when THP enabled is lost. This leaves the system with small min_free_kbytes

[PATCH rfc 2/5] mm: memcontrol: use helpers to access page's memcg data

2020-09-10 Thread Roman Gushchin
Currently there are many open-coded reads and writes of the page->mem_cgroup pointer, as well as a couple of read helpers, which are barely used. It creates an obstacle on a way to reuse some bits of the pointer for storing additional bits of information. In fact, we already do this for slab

[PATCH rfc 5/5] mm: convert page kmemcg type to a page memcg flag

2020-09-10 Thread Roman Gushchin
PageKmemcg flag is currently defined as a page type (like buddy, offline, table and guard). Semantically it means that the page was accounted as a kernel memory by the page allocator and has to be uncharged on the release. As a side effect of defining the flag as a page type, the accounted page

[PATCH rfc 4/5] mm: introduce page memcg flags

2020-09-10 Thread Roman Gushchin
The lowest bit in page->memcg_data is used to distinguish between struct memory_cgroup pointer and a pointer to a objcgs array. All checks and modifications of this bit are open-coded. Let's formalize it using page memcg flags, defined in page_memcg_flags enum and replace all open-coded accesses

[PATCH net-next v3 0/9] net: ethernet: ti: ale: add static configuration

2020-09-10 Thread Grygorii Strashko
Hi All, As existing, as newly introduced CPSW ALE versions have differences in supported features and ALE table formats. Especially it's actual for the recent AM65x/J721E/J7200 and future AM64x SoCs, which supports more features like: auto-aging, classifiers, Link aggregation, additional HW

Re: [RFC PATCH 3/6] security/fbfam: Use the api to manage statistics

2020-09-10 Thread Jann Horn
On Thu, Sep 10, 2020 at 10:21 PM Kees Cook wrote: > Use the previous defined api to manage statistics calling it accordingly > when a task forks, calls execve or exits. You defined functions that return error codes in the previous patch, but here you ignore the return values. That's a bad idea.

[PATCH net-next v3 2/9] net: ethernet: ti: ale: add static configuration

2020-09-10 Thread Grygorii Strashko
As existing, as newly introduced CPSW ALE versions have differences in supported features and ALE table formats. Especially it's actual for the recent AM65x/J721E/J7200 SoC and feature AM64x, which supports features like: auto-aging, classifiers, Link aggregation, additional hw filtering, etc.

[PATCH net-next v3 6/9] net: ethernet: ti: ale: make usage of ale dev_id mandatory

2020-09-10 Thread Grygorii Strashko
Hence all existing driver updated to use ALE dev_id the usage of ale dev_id can be made mandatory and cpsw_ale_create() can be updated to use "features" property from ALE static configuration. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 30

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Jakub Kicinski
On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: > On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c > > > create mode 100644

[PATCH net-next v3 5/9] net: ethernet: ti: am65-cpsw: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI TI AM65x/J721E CPSW NUSS driver to use dev_id. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH net-next v3 7/9] net: ethernet: ti: am65-cpsw: enable hw auto ageing

2020-09-10 Thread Grygorii Strashko
The AM65x ALE supports HW auto-ageing which can be enabled by programming ageing interval in ALE_AGING_TIMER register. For this CPSW fck_clk frequency has to be know by ALE. This patch extends cpsw_ale_params with bus_freq field and enables ALE HW auto ageing for AM65x CPSW2G ALE version.

Re: [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()

2020-09-10 Thread Stephen Boyd
Quoting Jing Xiangfeng (2020-08-27 07:16:29) > lpass_core_sc7180_probe() misses to call pm_clk_destroy() and > pm_runtime_disable() in error paths. Correct goto target to fix it. > This issue is found by code inspection. > > Signed-off-by: Jing Xiangfeng > --- Applied to clk-fixes

Re: [PATCH v2] net: Correct the comment of dst_dev_put()

2020-09-10 Thread David Miller
From: Miaohe Lin Date: Thu, 10 Sep 2020 04:41:53 -0400 > Since commit 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to > invalidate dst entries"), we use blackhole_netdev to invalidate dst entries > instead of loopback device anymore. > > Signed-off-by: Miaohe Lin Applied, thanks.

Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-10 Thread Marek Behun
On Thu, 10 Sep 2020 22:23:45 +0200 Pavel Machek wrote: > Hi! > > > Okay, so the netdev trigger offers modes `link`, `rx`, `tx`. > > You can enable/disable either of these (via separate sysfs files). `rx` > > and `tx` blink the LED, `link` turns the LED on if the interface is > > linked. > >

[PATCH net-next v3 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions

2020-09-10 Thread Grygorii Strashko
The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko ---

[PATCH net-next v3 8/9] net: ethernet: ti: ale: switch to use tables for vlan entry description

2020-09-10 Thread Grygorii Strashko
The ALE VLAN entries are too much differ between different TI CPSW ALE versions. So, handling them using flags, defines and get/set functions became over-complicated. This patch introduces tables to describe the ALE VLAN entries fields, which are different between TI CPSW ALE versions, and new

Re: [RESEND][RFC PATCH 0/6] Fork brute force attack mitigation (fbfam)

2020-09-10 Thread Jann Horn
On Thu, Sep 10, 2020 at 10:21 PM Kees Cook wrote: > [kees: re-sending this series on behalf of John Wood > also visible at https://github.com/johwood/linux fbfam] [...] > The goal of this patch serie is to detect and mitigate a fork brute force > attack. > > Attacks with the purpose to break

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Andrew Lunn
On Thu, Sep 10, 2020 at 11:30:33PM +0300, Oded Gabbay wrote: > On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > > > Can you please elaborate on how to do this with a single driver that > > > is already in misc ? > > > As I mentioned in the cover letter, we are not developing a > > >

Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-10 Thread Marek Behun
On Thu, 10 Sep 2020 19:34:35 +0100 Russell King - ARM Linux admin wrote: > On Thu, Sep 10, 2020 at 08:31:54PM +0200, Andrew Lunn wrote: > > Generally the driver will default to the hardware reset blink > > pattern. There are a few PHY drivers which change this at probe, but > > not many. The

Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-10 Thread Pavel Machek
Hi! > > We already have different support for blinking in LED subsystem. Lets use > > that. > > You are assuming we have full software control of the LED, we can turn > it on and off. That is not always the case. But there is sometimes a > mode which the hardware blinks the LED. Please see

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > Can you please elaborate on how to do this with a single driver that > > is already in misc ? > > As I mentioned in the cover letter, we are not developing a > > stand-alone NIC. We have a deep-learning accelerator with a NIC > >

Re: Ways to deprecate /sys/devices/system/memory/memoryX/phys_device ?

2020-09-10 Thread David Hildenbrand
> Am 10.09.2020 um 22:01 schrieb Dave Hansen : > > On 9/10/20 3:20 AM, David Hildenbrand wrote: >> I was just exploring how /sys/devices/system/memory/memoryX/phys_device >> is/was used. It's one of these interfaces that most probably never >> should have been added but now we are stuck with

[PATCH rfc 1/5] mm: memcg/slab: fix racy access to page->mem_cgroup in mem_cgroup_from_obj()

2020-09-10 Thread Roman Gushchin
mem_cgroup_from_obj() checks the lowest bit of the page->mem_cgroup pointer to determine if the page has an attached obj_cgroup vector instead of a regular memcg pointer. If it's not set, it simple returns the page->mem_cgroup value as a struct mem_cgroup pointer. The commit 10befea91b61 ("mm:

Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-10 Thread Andrew Lunn
> We already have different support for blinking in LED subsystem. Lets use > that. You are assuming we have full software control of the LED, we can turn it on and off. That is not always the case. But there is sometimes a mode which the hardware blinks the LED. Being able to blink the LED is

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:28 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > > > create mode 100644

Re: [PATCH v3 1/2] leds: mt6360: Add LED driver for MT6360

2020-09-10 Thread Jacek Anaszewski
On 9/10/20 10:25 PM, Pavel Machek wrote: Hi! 1. set FLED1 brightness # echo 1 > /sys/class/leds/white:flash1/flash_brightness 2. enable FLED1 strobe # echo 1 > /sys/class/leds/white:flash1/flash_strobe 3 . turn off FLED1 strobe (just used to gaurantee the strobe mode flash leds must be turned

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > > Doesn't seem like this one shows any more information than can be > > > queried with ethtool, right? > > correct, it just displays it in a format that is much more readable > >

Re: [PATCH] net: Fix broken NETIF_F_CSUM_MASK spell in netdev_features.h

2020-09-10 Thread David Miller
From: Miaohe Lin Date: Thu, 10 Sep 2020 04:46:40 -0400 > Remove the weird space inside the NETIF_F_CSUM_MASK. > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Jakub Kicinski
On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > Doesn't seem like this one shows any more information than can be > > queried with ethtool, right? > correct, it just displays it in a format that is much more readable You can cat /sys/class/net/$ifc/carrier if you want 0/1. > > >

[PATCH net-next v3 4/9] net: netcp: ethss: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI Keystone 2 NETCP driver to use dev_id and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/netcp_ethss.c | 18

[PATCH net-next v3 1/9] net: ethernet: ti: ale: add cpsw_ale_get_num_entries api

2020-09-10 Thread Grygorii Strashko
Add cpsw_ale_get_num_entries() API to return number of ALE table entries and update existing drivers to use it. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 10 ++ drivers/net/ethernet/ti/cpsw_ale.c | 5 +

[PATCH net-next v3 3/9] net: ethernet: ti: cpsw: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI cpsw driver to use dev_id="cpsw" and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 6 --

[PATCH rfc 0/5] mm: allow mapping accounted kernel pages to userspace

2020-09-10 Thread Roman Gushchin
Currently a non-slab kernel page which has been charged to a memory cgroup can't be mapped to userspace. The underlying reason is simple: PageKmemcg flag is defined as a page type (like buddy, offline, etc), so it takes a bit from a page->mapped counter. Pages with a type set can't be mapped to

[RFC PATCH 4/6] security/fbfam: Add a new sysctl to control the crashing rate threshold

2020-09-10 Thread Kees Cook
From: John Wood This is a previous step to add the detection feature. A fork brute force attack will be detected when an application crashes quickly. Since, a rate can be defined as a time per fault, add a new sysctl to control the crashing rate threshold. This way, each system can tune the

[PATCH rfc 3/5] mm: memcontrol/slab: use helpers to access slab page's memcg_data

2020-09-10 Thread Roman Gushchin
To gather all direct accesses to struct page's memcg_data field in one place, let's introduce 4 new helper functions to use in the slab accounting code: struct obj_cgroup **page_obj_cgroups(struct page *page); struct obj_cgroup **page_obj_cgroups_check(struct page *page); bool

Re: [PATCH v3 1/2] leds: mt6360: Add LED driver for MT6360

2020-09-10 Thread Pavel Machek
Hi! > > > 1. set FLED1 brightness > > > # echo 1 > /sys/class/leds/white:flash1/flash_brightness > > > 2. enable FLED1 strobe > > > # echo 1 > /sys/class/leds/white:flash1/flash_strobe > > > 3 . turn off FLED1 strobe (just used to gaurantee the strobe mode > > > flash leds must be turned off) > >

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Andrew Lunn
> Can you please elaborate on how to do this with a single driver that > is already in misc ? > As I mentioned in the cover letter, we are not developing a > stand-alone NIC. We have a deep-learning accelerator with a NIC > interface. This sounds like an MFD. Andrew

Re: [PATCH RFC 01/10] mm: add Kernel Electric-Fence infrastructure

2020-09-10 Thread Paul E. McKenney
On Thu, Sep 10, 2020 at 07:11:41PM +0200, Dmitry Vyukov wrote: > On Thu, Sep 10, 2020 at 6:19 PM Alexander Potapenko wrote: > > > > On Thu, Sep 10, 2020 at 5:43 PM Dmitry Vyukov wrote: > > > > > > > > + /* Calculate address for this allocation. */ > > > > + if (right) > > > > +

[RFC PATCH 2/6] security/fbfam: Add the api to manage statistics

2020-09-10 Thread Kees Cook
From: John Wood Create a statistical data structure to hold all the necessary information involve in a fork brute force attack. This info is a timestamp for the first fork or execve and the number of crashes since then. Moreover, due to this statitistical data will be shared between different

[RFC PATCH 6/6] security/fbfam: Mitigate a fork brute force attack

2020-09-10 Thread Kees Cook
From: John Wood In order to mitigate a fork brute force attack it is necessary to kill all the offending tasks. This tasks are all the ones that share the statistical data with the current task (the task that has crashed). Since the attack detection is done in the function fbfam_handle_attack()

Re: [PATCH v3 1/2] leds: mt6360: Add LED driver for MT6360

2020-09-10 Thread Jacek Anaszewski
On 9/10/20 2:29 PM, Pavel Machek wrote: Hi! +{ + struct mt6360_led *led = container_of(lcdev, struct mt6360_led, flash.led_cdev); + struct mt6360_priv *priv = led->priv; + u32 enable_mask = MT6360_TORCHEN_MASK | MT6360_FLCSEN_MASK(led->led_no); + u32 val = (level) ?

Re: [PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:19 PM Andrew Lunn wrote: > > > +static int gaudi_nic_get_link_ksettings(struct net_device *netdev, > > + struct ethtool_link_ksettings *cmd) > > +{ > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > + struct

Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

2020-09-10 Thread Pavel Machek
Hi! > Okay, so the netdev trigger offers modes `link`, `rx`, `tx`. > You can enable/disable either of these (via separate sysfs files). `rx` > and `tx` blink the LED, `link` turns the LED on if the interface is > linked. I wonder if people really need separate rx and tx, but... this sounds

[RFC PATCH 5/6] security/fbfam: Detect a fork brute force attack

2020-09-10 Thread Kees Cook
From: John Wood To detect a fork brute force attack it is necessary to compute the crashing rate of the application. This calculation is performed in each fatal fail of a task, or in other words, when a core dump is triggered. If this rate shows that the application is crashing quickly, there is

[RESEND][RFC PATCH 0/6] Fork brute force attack mitigation (fbfam)

2020-09-10 Thread Kees Cook
[kees: re-sending this series on behalf of John Wood also visible at https://github.com/johwood/linux fbfam] From: John Wood The goal of this patch serie is to detect and mitigate a fork brute force attack. Attacks with the purpose to break ASLR or bypass canaries traditionaly use some level

[RFC PATCH 3/6] security/fbfam: Use the api to manage statistics

2020-09-10 Thread Kees Cook
From: John Wood Use the previous defined api to manage statistics calling it accordingly when a task forks, calls execve or exits. Signed-off-by: John Wood --- fs/exec.c | 2 ++ kernel/exit.c | 2 ++ kernel/fork.c | 4 3 files changed, 8 insertions(+) diff --git a/fs/exec.c

Re: [PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Andrew Lunn
> +static int gaudi_nic_get_link_ksettings(struct net_device *netdev, > + struct ethtool_link_ksettings *cmd) > +{ > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > + struct gaudi_nic_device *gaudi_nic = *ptr; > + struct hl_device *hdev =

[PATCH RFC tip/core/rcu 0/4] Accelerate RCU Tasks Trace updates

2020-09-10 Thread Paul E. McKenney
Hello! This series accelerates RCU Tasks Trace updates, reducing the average grace-period latencies from about a second to about 20 milliseconds on my x86 laptop. These are benchmark numbers, based on a previously posted patch to rcuscale.c [1] running on my x86 laptop. The patches in this

Re: [PATCH v8 2/5] ACPI/PCI: Ignore _OSC negotiation result if pcie_ports_native is set.

2020-09-10 Thread Bjorn Helgaas
On Fri, Jul 24, 2020 at 08:58:53PM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > pcie_ports_native is set only if user requests native handling > of PCIe capabilities via pcie_port_setup command line option. > User input takes precedence over

[PATCH net-next 0/6] Fix some kernel-doc warnings for hns

2020-09-10 Thread Wang Hai
Fix some kernel-doc warnings for hns. Wang Hai (6): hinic: Fix some kernel-doc warnings in hinic_hw_io.c net: hns: fix 'cdev' kernel-doc warning in hnae_ae_unregister() net: hns: Fix some kernel-doc warnings in hns_dsaf_xgmac.c net: hns: Fix some kernel-doc warnings in hns_enet.c net:

<    1   2   3   4   5   6   7   8   9   10   >