[PATCH] regulator: qcom_spmi: Improve readability for setting up enable/mode pin control

2020-07-31 Thread Axel Lin
By checking data->pin_ctrl_enable / data->pin_ctrl_hpm flags first, then use switch-case to improve readability. Signed-off-by: Axel Lin --- drivers/regulator/qcom_spmi-regulator.c | 70 - 1 file changed, 34 insertions(+), 36 deletions(-) diff --git

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread Leon Romanovsky
On Fri, Jul 31, 2020 at 07:19:24PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 31, 2020 at 11:36:04AM -0300, Jason Gunthorpe wrote: > > On Fri, Jul 31, 2020 at 04:21:48PM +0200, Greg Kroah-Hartman wrote: > > > > > > The spec was updated in C11 to require zero'ing padding when doing > > > >

Re: [PATCH v5 32/36] x86/boot/compressed: Reorganize zero-size section asserts

2020-07-31 Thread Kees Cook
On Fri, Jul 31, 2020 at 10:53:25PM -0400, Arvind Sankar wrote: > On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote: > > On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote: > > > For readability, move the zero-sized sections to the end after DISCARDS > > > and mark them NOLOAD

Re: [PATCH v5 32/36] x86/boot/compressed: Reorganize zero-size section asserts

2020-07-31 Thread Kees Cook
On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote: > On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote: > > For readability, move the zero-sized sections to the end after DISCARDS > > and mark them NOLOAD for good measure. > > > > Signed-off-by: Kees Cook > > --- > >

drivers/net/bareudp.c:274:45: warning: Clarify calculation precedence for '&' and

2020-07-31 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7dc6fd0f3b8404542718039f5de19fe56e474578 commit: 571912c69f0ed731bd1e071ade9dc7ca4aa52065 net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc. date: 5 months ago

Re: [PATCH v5 29/36] x86/build: Enforce an empty .got.plt section

2020-07-31 Thread Kees Cook
On Fri, Jul 31, 2020 at 10:12:48PM -0400, Arvind Sankar wrote: > On Fri, Jul 31, 2020 at 04:08:13PM -0700, Kees Cook wrote: > > The .got.plt section should always be zero (or filled only with the > > linker-generated lazy dispatch entry). Enforce this with an assert and > > mark the section as

Re: [PATCH] lib: Convert test_uuid.c to KUnit

2020-07-31 Thread Arpitha Raghunandan
On 30/07/20 5:46 pm, Arpitha Raghunandan wrote: > Converts test lib/test_uuid.c to KUnit > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > --- > lib/Kconfig.debug | 7 +-- > lib/Makefile | 2 +- > lib/{test_uuid.c => uuid_kunit.c} | 84

Re: [PATCH v2 0/3]

2020-07-31 Thread Florian Fainelli
On 7/31/2020 10:10 PM, Rakesh Pillai wrote: > > >> -Original Message- >> From: Florian Fainelli >> Sent: Saturday, August 1, 2020 12:17 AM >> To: Rakesh Pillai ; ath...@lists.infradead.org >> Cc: linux-wirel...@vger.kernel.org; linux-kernel@vger.kernel.org; >> kv...@codeaurora.org;

RE: [PATCH v2 1/3] ath10k: Add history for tracking certain events

2020-07-31 Thread Rakesh Pillai
> -Original Message- > From: Ben Greear > Sent: Saturday, August 1, 2020 12:08 AM > To: Rakesh Pillai ; ath...@lists.infradead.org > Cc: linux-wirel...@vger.kernel.org; linux-kernel@vger.kernel.org; > kv...@codeaurora.org; da...@davemloft.net; k...@kernel.org; > net...@vger.kernel.org

Re: [PATCH] platform/x86:dell-laptop:Add battery charging thresholds and charging mode switch.

2020-07-31 Thread kernel test robot
Hi Perry, Thank you for the patch! Yet something to improve: [auto build test ERROR on power-supply/for-next] [also build test ERROR on linux/master linus/master v5.8-rc7 next-20200731] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest

RE: [PATCH v2 0/3]

2020-07-31 Thread Rakesh Pillai
> -Original Message- > From: Florian Fainelli > Sent: Saturday, August 1, 2020 12:17 AM > To: Rakesh Pillai ; ath...@lists.infradead.org > Cc: linux-wirel...@vger.kernel.org; linux-kernel@vger.kernel.org; > kv...@codeaurora.org; da...@davemloft.net; k...@kernel.org; >

Re: [PATCH] checkpatch: skip macros when finding missing switch/case break

2020-07-31 Thread Cambda Zhu
I agree with you. Actually there are some false warnings not mentioned in my patch, such as: case xxx: { if () { return; } else { if () { return; } else { return; } } } case xxx: ... Since compiler can do this

[PATCH bpf-next] bpf: make __htab_lookup_and_delete_batch faster when map is almost empty

2020-07-31 Thread Brian Vazquez
While running some experiments it was observed that map_lookup_batch was much slower than get_next_key + lookup when the syscall overhead is minimal. This was because the map_lookup_batch implementation was more expensive traversing empty buckets, this can be really costly when the pre-allocated

Re: High load from process irq/65-i2c-INT3 - kernel module tps6598x

2020-07-31 Thread Jürgen Stauber
Hi Heikki, unfortunately I didn’t find any UCMCx option within the UEFI bios. kr, Jürgen > On 28.07.2020, at 14:32, Heikki Krogerus > wrote: > > Hi Jürgen, > > I'm sorry about the late reply (vacation). > >> On Mon, Jul 20, 2020 at 06:31:04PM +0200, Jürgen Stauber wrote: >> Hi all, >>

Re: [PATCH v2 1/3] lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert()

2020-07-31 Thread Sergey Senozhatsky
On (20/07/31 21:08), Andy Shevchenko wrote: > First of all, there is no compile time check for the SMALL > to be ' ' (0x20, i.e. space). Second, for ZEROPAD the check > is hidden in the code. > > For better maintenance replace BUILD_BUG_ON() with static_assert() > for ZEROPAD and move it closer

Re: [PATCH 2/2] remoteproc: imx_rproc: add elf memory hooks

2020-07-31 Thread Oleksij Rempel
Hi, please fix errors reported by test robot. On Tue, Jul 28, 2020 at 05:31:13PM +0800, peng@nxp.com wrote: > From: Peng Fan > > Please not apply 2/2 for now, this 2/2 has not gone through > test on all i.MX8 platforms. > > Signed-off-by: Peng Fan > --- > drivers/remoteproc/imx_rproc.c

[PATCH v2 0/3] Mediatek pinctrl patch on mt8192

2020-07-31 Thread Zhiyong Tao
This series includes 3 patches: 1.add pinctrl file on mt8192. 2.add pinctrl binding document on mt8192. 3.add pinctrl driver on MT8192. Changes in patch v2: 1)change maintainers name in pinctrl-mt8192.yaml. 2)remove unused description for "reg-names". 3)change 'subnode format:' which is not a

[PATCH v2 2/3] dt-bindings: pinctrl: mt8192: add binding document

2020-07-31 Thread Zhiyong Tao
The commit adds mt8192 compatible node in binding document. Signed-off-by: Zhiyong Tao --- .../bindings/pinctrl/pinctrl-mt8192.yaml | 175 ++ 1 file changed, 175 insertions(+) create mode 100755 Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml diff --git

[PATCH v2 1/3] dt-bindings: pinctrl: mt8192: add pinctrl file

2020-07-31 Thread Zhiyong Tao
This patch adds pinctrl file for mt8192. Signed-off-by: Zhiyong Tao --- include/dt-bindings/pinctrl/mt8192-pinfunc.h | 1344 ++ 1 file changed, 1344 insertions(+) create mode 100644 include/dt-bindings/pinctrl/mt8192-pinfunc.h diff --git

Re: [PATCH 1/4] mm/thp: move lru_add_page_tail func to huge_memory.c

2020-07-31 Thread Alex Shi
Hi Andrew, This patchset is just cleanup and get reviewed by Kirill, is it cath up 5.9? Thanks Alex 在 2020/8/1 下午12:09, Alex Shi 写道: > The func is only used in huge_memory.c, defining it in other file with a > CONFIG_TRANSPARENT_HUGEPAGE macro restrict just looks weird. > > Let's move it THP.

[PATCH 4/4] mm/thp: narrow lru locking

2020-07-31 Thread Alex Shi
lru_lock and page cache xa_lock have no reason with current sequence, put them together isn't necessary. let's narrow the lru locking, but left the local_irq_disable to block interrupt re-entry and statistic update. Hugh Dickins point: split_huge_page_to_list() was already silly,to be using the

[PATCH 1/4] mm/thp: move lru_add_page_tail func to huge_memory.c

2020-07-31 Thread Alex Shi
The func is only used in huge_memory.c, defining it in other file with a CONFIG_TRANSPARENT_HUGEPAGE macro restrict just looks weird. Let's move it THP. And make it static as Hugh Dickin suggested. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Johannes Weiner

[PATCH 3/4] mm/thp: remove code path which never got into

2020-07-31 Thread Alex Shi
split_huge_page() will never call on a page which isn't on lru list, so this code never got a chance to run, and should not be run, to add tail pages on a lru list which head page isn't there. Although the bug was never triggered, it'better be removed for code correctness. BTW, it looks better

[PATCH 2/4] mm/thp: clean up lru_add_page_tail

2020-07-31 Thread Alex Shi
Since the first parameter is only used by head page, it's better to make it explicit. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Hugh Dickins Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org ---

Re: [PATCH] mm/memcg: remove useless check on page->mem_cgroup

2020-07-31 Thread Alex Shi
在 2020/7/31 下午11:16, Johannes Weiner 写道: >> if (!entry.val) { >> memcg_memory_event(memcg, MEMCG_SWAP_FAIL); > Uncharged readahead pages are gone, but I'm not 100% sure uncharged > pages in general are gone. ISTR that the !page->mem_cgroup check in > mem_cgroup_uncharge()

Re: [PATCH net-next] fib: fix another fib_rules_ops indirect call wrapper problem

2020-07-31 Thread Randy Dunlap
On 7/31/20 8:01 PM, Brian Vazquez wrote: > It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops > indirect calls wrappers") I forgot to include the case when > CONFIG_IP_MULTIPLE_TABLES is not set. > > Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers") >

Re: [PATCH v5 13/36] vmlinux.lds.h: add PGO and AutoFDO input sections

2020-07-31 Thread Arvind Sankar
On Fri, Jul 31, 2020 at 04:07:57PM -0700, Kees Cook wrote: > From: Nick Desaulniers > > Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too. > > When compiling with profiling information (collected via PGO > instrumentations or AutoFDO sampling), Clang will separate code into

Re: [PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-07-31 Thread Randy Dunlap
On 7/31/20 8:25 PM, Dan Williams wrote: > Disable parsing of the HMAT for debug, to workaround broken platform > instances, or cases where it is otherwise not wanted. > > --- > arch/x86/mm/numa.c |2 ++ > drivers/acpi/numa/hmat.c |8 +++- > include/acpi/acpi_numa.h |8

Re: [RFC PATCH] bpftool btf: Add prefix option to dump C

2020-07-31 Thread Andrii Nakryiko
On Fri, Jul 31, 2020 at 6:47 PM Ian Rogers wrote: > > On Tue, Jul 21, 2020 at 11:58 PM Andrii Nakryiko > wrote: > > > > On Tue, Jul 21, 2020 at 10:44 PM Ian Rogers wrote: > > > > > > When bpftool dumps types and enum members into a header file for > > > inclusion the names match those in the

[PATCH v3 17/23] mm/memremap_pages: Support multiple ranges per invocation

2020-07-31 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc:

[PATCH v3 16/23] mm/memremap_pages: Convert to 'struct range'

2020-07-31 Thread Dan Williams
The 'struct resource' in 'struct dev_pagemap' is only used for holding resource span information. The other fields, 'name', 'flags', 'desc', 'parent', 'sibling', and 'child' are all unused wasted space. This is in preparation for introducing a multi-range extension of devm_memremap_pages(). The

[PATCH v3 22/23] dax/hmem: Introduce dax_hmem.region_idle parameter

2020-07-31 Thread Dan Williams
From: Joao Martins Introduce a new module parameter for dax_hmem which initializes all region devices as free, rather than allocating a pagemap for the region by default. All hmem devices created with dax_hmem.region_idle=1 will have full available size for creating dynamic dax devices.

[PATCH v3 21/23] device-dax: Add an 'align' attribute

2020-07-31 Thread Dan Williams
From: Joao Martins Introduce a device align attribute. While doing so, rename the region align attribute to be more explicitly named as so, but keep it named as @align to retain the API for tools like daxctl. Changes on align may not always be valid, when say certain mappings were created with

[PATCH v3 20/23] device-dax: Make align a per-device property

2020-07-31 Thread Dan Williams
From: Joao Martins Introduce @align to struct dev_dax. When creating a new device, we still initialize to the default dax_region @align. Child devices belonging to a region may wish to keep a different alignment property instead of a global region-defined one. Signed-off-by: Joao Martins

[PATCH v3 23/23] device-dax: Add a range mapping allocation attribute

2020-07-31 Thread Dan Williams
From: Joao Martins Add a sysfs attribute which denotes a range from the dax region to be allocated. It's an write only @mapping sysfs attribute in the format of '-' to allocate a range. @start and @end use hexadecimal values and the @pgoff is implicitly ordered wrt to previous writes to @mapping

[PATCH v3 18/23] device-dax: Add dis-contiguous resource support

2020-07-31 Thread Dan Williams
Break the requirement that device-dax instances are physically contiguous. With this constraint removed it allows fragmented available capacity to be fully allocated. This capability is useful to mitigate the "noisy neighbor" problem with memory-side-cache management for virtual machines, or any

[PATCH v3 19/23] device-dax: Introduce 'mapping' devices

2020-07-31 Thread Dan Williams
In support of interrogating the physical address layout of a device with dis-contiguous ranges, introduce a sysfs directory with 'start', 'end', and 'page_offset' attributes. The alternative is trying to parse /proc/iomem, and that file will not reflect the extent layout until the device is

[PATCH v3 09/23] device-dax: Move instance creation parameters to 'struct dev_dax_data'

2020-07-31 Thread Dan Williams
In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 14 +++--- drivers/dax/bus.h | 16 drivers/dax/hmem/hmem.c |8 +++-

[PATCH v3 10/23] device-dax: Make pgmap optional for instance creation

2020-07-31 Thread Dan Williams
The passed in dev_pagemap is only required in the pmem case as the libnvdimm core may have reserved a vmem_altmap for dev_memremap_pages() to place the memmap in pmem directly. In the hmem case there is no agent reserving an altmap so it can all be handled by a core internal default. Pass the

[PATCH v3 13/23] device-dax: Introduce 'seed' devices

2020-07-31 Thread Dan Williams
Add a seed device concept for dynamic dax regions to be able to split the region amongst multiple sub-instances. The seed device, similar to libnvdimm seed devices, is a device that starts with zero capacity allocated and unbound to a driver. In contrast to libnvdimm seed devices explicit 'create'

[PATCH v3 15/23] device-dax: Add resize support

2020-07-31 Thread Dan Williams
Make the device-dax 'size' attribute writable to allow capacity to be split between multiple instances in a region. The intended consumers of this capability are users that want to split a scarce memory resource between device-dax and System-RAM access, or users that want to have multiple security

[PATCH v3 11/23] device-dax: Kill dax_kmem_res

2020-07-31 Thread Dan Williams
Several related issues around this unneeded attribute: - The dax_kmem_res property allows the kmem driver to stash the adjusted resource range that was used for the hotplug operation, but that can be recalculated from the original base range. - kmem is using an open coded release_resource()

[PATCH v3 14/23] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-31 Thread Dan Williams
Use sysfs_streq() in device_find_child_by_name() to allow it to use a sysfs input string that might contain a trailing newline. The other "device by name" interfaces, {bus,driver,class}_find_device_by_name(), already account for sysfs strings. Cc: "Rafael J. Wysocki" Reviewed-by: Greg

[PATCH v3 04/23] ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device

2020-07-31 Thread Dan Williams
In preparation for exposing "Soft Reserved" memory ranges without an HMAT, move the hmem device registration to its own compilation unit and make the implementation generic. The generic implementation drops usage acpi_map_pxm_to_online_node() that was translating ACPI proximity domain values and

[PATCH v3 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

2020-07-31 Thread Dan Williams
In preparation to set a fallback value for dev_dax->target_node, introduce generic fallback helpers for phys_to_target_node() A generic implementation based on node-data or memblock was proposed, but as noted by Mike: "Here again, I would prefer to add a weak default for

[PATCH v3 12/23] device-dax: Add an allocation interface for device-dax instances

2020-07-31 Thread Dan Williams
In preparation for a facility that enables dax regions to be sub-divided, introduce infrastructure to track and allocate region capacity. The new dax_region/available_size attribute is only enabled for volatile hmem devices, not pmem devices that are defined by nvdimm namespace boundaries. This

[PATCH v3 07/23] ACPI: HMAT: Attach a device for each soft-reserved range

2020-07-31 Thread Dan Williams
The hmem enabling in commit 'cf8741ac57ed ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device")' only registered ranges to the hmem driver for each soft-reservation that also appeared in the HMAT. While this is meant to encourage platform firmware to "do the right thing" and

[PATCH v3 01/23] x86/numa: Cleanup configuration dependent command-line options

2020-07-31 Thread Dan Williams
In preparation for adding a new numa= option clean up the existing ones to avoid ifdefs in numa_setup(), and provide feedback when the option is numa=fake= option is invalid due to kernel config. The same does not need to be done for numa=noacpi, since the capability is already hard disabled at

[PATCH v3 03/23] efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance

2020-07-31 Thread Dan Williams
In preparation for attaching a platform device per iomem resource teach the efi_fake_mem code to create an e820 entry per instance. Similar to E820_TYPE_PRAM, bypass merging resource when the e820 map is sanitized. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin"

[PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-07-31 Thread Dan Williams
Disable parsing of the HMAT for debug, to workaround broken platform instances, or cases where it is otherwise not wanted. Cc: x...@kernel.org Cc: "Rafael J. Wysocki" Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H.

[PATCH v3 08/23] device-dax: Drop the dax_region.pfn_flags attribute

2020-07-31 Thread Dan Williams
All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c |

[PATCH v3 05/23] resource: Report parent to walk_iomem_res_desc() callback

2020-07-31 Thread Dan Williams
In support of detecting whether a resource might have been been claimed, report the parent to the walk_iomem_res_desc() callback. For example, the ACPI HMAT parser publishes "hmem" platform devices per target range. However, if the HMAT is disabled / missing a fallback driver can attach devices to

[PATCH v3 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-07-31 Thread Dan Williams
Changes since v2 [1]: - Rebase on next/master to resolve conflicts with pending mem-hotplug and memremap_pages() changes in -mm - Drop attempt at a generic phys_to_target_node() implementation and just follow the default fallback approach taken with memory_add_physaddr_to_nid() (Mike) -

[PATCH v3 4/6] interconnect: qcom: Only wait for completion in AMC/WAKE by default

2020-07-31 Thread Mike Tipton
Change the default TCS wait behavior to only wait for completion in AMC and WAKE. Waiting isn't necessary in the SLEEP TCS, since votes are only being removed in this case. Resources can be safely disabled asynchronously in parallel with the rest of the power collapse sequence. This reduces the

[PATCH v3 3/6] interconnect: qcom: Support bcm-voter-specific TCS wait behavior

2020-07-31 Thread Mike Tipton
Currently, all bcm-voters set tcs_cmd::wait=true for the last VCD command in each TCS (AMC, WAKE, and SLEEP). However, some bcm-voters don't need the completion and instead need to optimize for latency. For instance, disabling wait-for-completion in the WAKE set can decrease resume latency and

[PATCH v3 5/6] interconnect: qcom: Add support for per-BCM scaling factors

2020-07-31 Thread Mike Tipton
Currently, bcm-voter always assumes requests are made in KBps and that BCM HW always wants them in Bps, so it always scales the requests by 1000. However, certain use cases and BCMs may use different units. Thus, add support for BCM-specific scaling factors. Signed-off-by: Mike Tipton ---

[PATCH v3 6/6] interconnect: qcom: Fix small BW votes being truncated to zero

2020-07-31 Thread Mike Tipton
Small BW votes that translate to less than a single BCM unit are currently truncated to zero. Ensure that non-zero BW requests always result in at least a vote of 1 to BCM. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Mike Tipton ---

[PATCH v3 2/6] dt-bindings: interconnect: Add property to set BCM TCS wait behavior

2020-07-31 Thread Mike Tipton
Add "qcom,tcs-wait" property to set which TCS should wait for completion when triggering. Signed-off-by: Mike Tipton --- .../bindings/interconnect/qcom,bcm-voter.yaml | 20 +++ 1 file changed, 20 insertions(+) diff --git

[PATCH v3 1/6] dt-bindings: interconnect: Add generic qcom bindings

2020-07-31 Thread Mike Tipton
Add generic qcom interconnect bindings that are common across platforms. In particular, these include QCOM_ICC_TAG_* macros that clients can use when calling icc_set_tag(). Signed-off-by: Mike Tipton --- drivers/interconnect/qcom/icc-rpmh.h| 18 ++

[PATCH v3 0/6] interconnect: qcom: Misc bcm-voter changes and fixes

2020-07-31 Thread Mike Tipton
These changes are mostly unrelated, but there are some dependencies between them. v3: - Improve qcom,tcs-wait property description - Stop using #define in property `default` doc v2: - New patch for generic qcom,icc.h bindings - New patch for documenting qcom,tcs-wait property - Update bcm_div()

[f2fs-dev][PATCH] f2fs: update_sit_entry: Make the judgment condition of f2fs_bug_on more intuitive

2020-07-31 Thread Zhihao Cheng
Current judgment condition of f2fs_bug_on in function update_sit_entry(): new_vblocks >> (sizeof(unsigned short) << 3) || new_vblocks > sbi->blocks_per_seg which equivalents to: new_vblocks < 0 || new_vblocks > sbi->blocks_per_seg The latter is more intuitive. Signed-off-by: Zhihao

Re: linux-next: Tree for Jul 31 (net/decnet/ & FIB_RULES)

2020-07-31 Thread Brian Vazquez
Ugh I completely missed CONFIG_IP_MULTIPLE_TABLES too, I sent the new patch. This time I believe I cover all the cases. PTAL. Thanks, Brian On Fri, Jul 31, 2020 at 5:50 PM Randy Dunlap wrote: > > On 7/31/20 5:35 PM, Stephen Rothwell wrote: > > Hi Randy, > > > > On Fri, 31 Jul 2020 08:53:09

[PATCH net-next] fib: fix another fib_rules_ops indirect call wrapper problem

2020-07-31 Thread Brian Vazquez
It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers") I forgot to include the case when CONFIG_IP_MULTIPLE_TABLES is not set. Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers") Reported-by: Randy Dunlap Cc: Stephen Rothwell

Re: [PATCH v5 32/36] x86/boot/compressed: Reorganize zero-size section asserts

2020-07-31 Thread Arvind Sankar
On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote: > On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote: > > For readability, move the zero-sized sections to the end after DISCARDS > > and mark them NOLOAD for good measure. > > > > Signed-off-by: Kees Cook > > --- > >

Re: [PATCH 2/3] dt-bindings: arm: mstar: remove the binding description for mstar,pmsleep

2020-07-31 Thread Daniel Palmer
On Sat, 1 Aug 2020 at 04:22, Arnd Bergmann wrote: > This patch for some reason did not apply, so I ended up removing the > file manually and using your changelog. > > Arnd Thanks Arnd.

[PATCH net-next v3 2/2] hinic: add check for mailbox msg from VF

2020-07-31 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +-

[PATCH net-next v3 0/2] hinic: mailbox channel enhancement

2020-07-31 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF

[PATCH net-next v3 1/2] hinic: add generating mailbox random index support

2020-07-31 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- V2~V3 fix review opinions pointed out by Jakub .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c |

ERROR: "min_low_pfn" undefined!

2020-07-31 Thread kernel test robot
ago config: microblaze-randconfig-r012-20200731 (attached as .config) compiler: microblaze-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git

Re: [PATCH v2 1/2] interconnect: Add sync state support

2020-07-31 Thread Mike Tipton
On 7/30/2020 12:07 PM, Saravana Kannan wrote: On Mon, Jul 27, 2020 at 11:18 PM Mike Tipton wrote: On 7/22/2020 10:07 AM, Saravana Kannan wrote: On Wed, Jul 22, 2020 at 4:01 AM Georgi Djakov wrote: The bootloaders often do some initial configuration of the interconnects in the system and

Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-31 Thread Willem de Bruijn
On Fri, Jul 31, 2020 at 4:41 PM Xie He wrote: > > Thank you for your thorough review comment! > > On Fri, Jul 31, 2020 at 7:13 AM Willem de Bruijn > wrote: > > > > Thanks for fixing a kernel panic. The existing line was added recently > > in commit 9dc829a135fb ("drivers/net/wan/lapbether: Fixed

[PATCH] sched/fair: reduce preemption with IDLE tasks runable

2020-07-31 Thread Jiang Biao
From: Jiang Biao No need to preempt when there are only one runable CFS task with other IDLE tasks on runqueue. The only one CFS task would always be picked in that case. Signed-off-by: Jiang Biao --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next v2 1/2] hinic: add generating mailbox random index support

2020-07-31 Thread luobin (L)
On 2020/8/1 3:52, Jakub Kicinski wrote: > On Fri, 31 Jul 2020 09:56:41 +0800 Luo bin wrote: >> add support to generate mailbox random id of VF to ensure that >> mailbox messages PF received are from the correct VF. >> >> Signed-off-by: Luo bin > >> diff --git

Re: KASAN: use-after-free Read in netdevice_event_work_handler

2020-07-31 Thread Rustam Kovhaev
On Fri, Jul 31, 2020 at 02:11:22PM -0700, Rustam Kovhaev wrote: > On Thu, Jul 09, 2020 at 04:54:19PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:0bddd227 Documentation: update for gcc 4.9 requirement > > git tree: upstream > >

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2020-07-31 Thread Hugh Dickins
On Fri, 31 Jul 2020, Roman Gushchin wrote: > On Thu, Jul 30, 2020 at 09:06:55PM -0700, Hugh Dickins wrote: > > > > Though another alternative did occur to me overnight: we could > > scrap the logged warning, and show "nr_whatever -53" as output > > from /proc/sys/vm/stat_refresh: that too would

Re: [PATCH v5 29/36] x86/build: Enforce an empty .got.plt section

2020-07-31 Thread Arvind Sankar
On Fri, Jul 31, 2020 at 04:08:13PM -0700, Kees Cook wrote: > The .got.plt section should always be zero (or filled only with the > linker-generated lazy dispatch entry). Enforce this with an assert and > mark the section as NOLOAD. This is more sensitive than just blindly > discarding the section.

[Linux-kernel-mentees] [PATCH v2] ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

2020-07-31 Thread Peilin Ye
ptrace_get_syscall_info() is potentially copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole near the beginning of `info`. Fix it by adding a padding field to `struct ptrace_syscall_info`. Cc: sta...@vger.kernel.org Fixes: 201766a20e30 ("ptrace: add

Re: KASAN: use-after-free Read in netdevice_event_work_handler

2020-07-31 Thread Coiby Xu
On Fri, Jul 31, 2020 at 09:11:22PM +, Rustam Kovhaev wrote: On Thu, Jul 09, 2020 at 04:54:19PM -0700, syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:0bddd227 Documentation: update for gcc 4.9 requirement git tree: upstream console output:

[PATCH] ACPI: NFIT: Fix ARS zero-sized allocation

2020-07-31 Thread Dan Williams
Pending commit in -next "devres: handle zero size in devm_kmalloc()" triggers a boot regression due to the ARS implementation expecting NULL from a zero-sized allocation. Avoid the zero-sized allocation by skipping ARS, otherwise crashes with the following signature when de-referencing

Re: [RFC PATCH] bpftool btf: Add prefix option to dump C

2020-07-31 Thread Ian Rogers
On Tue, Jul 21, 2020 at 11:58 PM Andrii Nakryiko wrote: > > On Tue, Jul 21, 2020 at 10:44 PM Ian Rogers wrote: > > > > When bpftool dumps types and enum members into a header file for > > inclusion the names match those in the original source. If the same > > header file needs to be included in

Re: [PATCH v5 32/36] x86/boot/compressed: Reorganize zero-size section asserts

2020-07-31 Thread Arvind Sankar
On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote: > For readability, move the zero-sized sections to the end after DISCARDS > and mark them NOLOAD for good measure. > > Signed-off-by: Kees Cook > --- > arch/x86/boot/compressed/vmlinux.lds.S | 42 +++--- > 1 file

Re: [PATCH v6 09/12] x86/process: Clear PASID state for a newly forked/cloned thread

2020-07-31 Thread Andy Lutomirski
On Mon, Jul 13, 2020 at 4:48 PM Fenghua Yu wrote: > > The PASID state has to be cleared on forks, since the child has a > different address space. The PASID is also cleared for thread clone. While > it would be correct to inherit the PASID in this case, it is unknown > whether the new task will

Re: [PATCH v2 2/3] lib/vsprintf: Replace custom spec to print decimals with generic one

2020-07-31 Thread Sergey Senozhatsky
On (20/07/31 16:48), Steven Rostedt wrote: [..] > > > - static const struct printf_spec num_spec = { > > > - .flags = SMALL, > > > - .field_width = -1, > > > - .precision = -1, > > > - .base = 10, > > > - }; > > > > > > struct printf_spec str_spec = spec; > > >

Re: [PATCH v2 2/3] lib/vsprintf: Replace custom spec to print decimals with generic one

2020-07-31 Thread Sergey Senozhatsky
On (20/07/31 21:08), Andy Shevchenko wrote: > When printing phandle via %pOFp the custom spec is used. First of all, > it has a SMALL flag which makes no sense for decimal numbers. Second, > we have already default spec for decimal numbers. Use the latter in > the %pOFp case as well. > > Cc:

Re: [PATCH v2 1/3] lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert()

2020-07-31 Thread Sergey Senozhatsky
On (20/07/31 21:08), Andy Shevchenko wrote: > First of all, there is no compile time check for the SMALL > to be ' ' (0x20, i.e. space). Second, for ZEROPAD the check > is hidden in the code. > > For better maintenance replace BUILD_BUG_ON() with static_assert() > for ZEROPAD and move it closer

Re: [PATCH v2 3/3] lib/vsprintf: Force type of flags value for gfp_t

2020-07-31 Thread Sergey Senozhatsky
On (20/07/31 16:49), Steven Rostedt wrote: > On Fri, 31 Jul 2020 21:08:24 +0300 > Andy Shevchenko wrote: > > > Sparse is not happy about restricted type being assigned: > > lib/vsprintf.c:1940:23: warning: incorrect type in assignment (different > > base types) > > lib/vsprintf.c:1940:23:

Re: [PATCH v6 12/12] x86/traps: Fix up invalid PASID

2020-07-31 Thread Andy Lutomirski
On Mon, Jul 13, 2020 at 4:48 PM Fenghua Yu wrote: > > A #GP fault is generated when ENQCMD instruction is executed without > a valid PASID value programmed in the current thread's PASID MSR. The > #GP fault handler will initialize the MSR if a PASID has been allocated > for this process. Let's

Re: [Linux-kernel-mentees] [PATCH] ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

2020-07-31 Thread Peilin Ye
On Sat, Aug 01, 2020 at 03:21:42AM +0300, Dmitry V. Levin wrote: > On Mon, Jul 27, 2020 at 05:36:44PM -0400, Peilin Ye wrote: > > ptrace_get_syscall_info() is copying uninitialized stack memory to > > userspace due to the compiler not initializing holes in statically > > allocated structures. Fix

[PATCH] PCI: Don't use Printk in raw_spinlocks

2020-07-31 Thread Xingxing Su
Do not use printk in raw_spinlocks, it will cause BUG: Invalid wait context. The trace reported by lockdep follows. [2.986113] = [2.986115] [ BUG: Invalid wait context ] [2.986116] 5.8.0-rc1+ #11 Not tainted [2.986118] - [

Re: [PATCH mmotm] mm: memcontrol: decouple reference counting from page accounting fix

2020-07-31 Thread Roman Gushchin
On Thu, Jul 30, 2020 at 08:17:50PM -0700, Hugh Dickins wrote: > Moving tasks between mem cgroups with memory.move_charge_at_immigrate 3, > while swapping, crashes soon on mmotm (and so presumably on linux-next): > for example, spinlock found corrupted when lock_page_memcg() is called. > It's as if

Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

2020-07-31 Thread Roman Gushchin
On Thu, Jul 30, 2020 at 09:06:55PM -0700, Hugh Dickins wrote: > On Thu, 30 Jul 2020, Roman Gushchin wrote: > > On Wed, Jul 29, 2020 at 08:45:47PM -0700, Hugh Dickins wrote: > > > > > > But a better idea is perhaps to redefine the behavior of > > > "echo >/proc/sys/vm/stat_refresh". What if > > >

[PATCH 03/13] csky: Add cpu feature register hint for smp

2020-07-31 Thread guoren
From: Guo Ren CPU features registers are setup by customers' bootloader, but Linux must help transfer them from the primary to secondary cores. This patch add hint2 CPU feature register supported. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/kernel/smp.c | 3 +++ 1 file changed, 3

[PATCH 10/13] csky: Fixup warning by EXPORT_SYMBOL(kmap)

2020-07-31 Thread guoren
From: Guo Ren This a wrong code, and no kmap symbol for export. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/mm/highmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/csky/mm/highmem.c b/arch/csky/mm/highmem.c index 89ec32e..89c1080 100644 --- a/arch/csky/mm/highmem.c

[PATCH 07/13] csky: Optimize the trap processing flow

2020-07-31 Thread guoren
From: Guo Ren - Seperate different trap functions - Add trap_no() - Remove panic code print - Redesign die_if_kerenl to die with riscv's - Print exact trap info for app segment fault [ 17.389321] gzip[126]: unhandled signal 11 code 0x3 at 0x0007835a in busybox[8000+d4000] [ 17.393882]

[PATCH 09/13] csky: Set CONFIG_NR_CPU 4 as default

2020-07-31 Thread guoren
From: Guo Ren The C860 processors support 4 cores smp for maximum, so set NR_CPU to 4 as default Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index fd92d73..ad98b93

[PATCH 08/13] csky: Use top-down mmap layout

2020-07-31 Thread guoren
From: Guo Ren Follow riscv mmap layout with commit "riscv: make mmap allocation top-down by default (54c95a11cc1b)". Before: cat /proc/self/maps 8000-000dc000 r-xp fe:00 17 /bin/busybox 000dc000-000dd000 r--p 000d3000 fe:00 17 /bin/busybox 000dd000-000de000 rw-p

[PATCH 11/13] csky: Add irq_work support

2020-07-31 Thread guoren
From: Guo Ren Running work in hardware interrupt context for csky. Implement: - arch_irq_work_raise() - arch_irq_work_has_interrupt() Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/include/asm/irq_work.h | 11 +++ arch/csky/kernel/smp.c | 12 2 files

[PATCH 00/13] Update csky subsystem for linux-5.9-rc1

2020-07-31 Thread guoren
From: Guo Ren Here are the patchess for the next linux version. Add features (seccomp-filter, err-injection, top-down mmap-layout, irq_work, show_ipi, context-tracking), and fixup (kprobe_on_ftrace, ...), Optimize (fault print, ...). I think we'll finish most of features for arch/csky this year

[PATCH 13/13] csky: Add context tracking support

2020-07-31 Thread guoren
From: Guo Ren This patch support context tracking with no hz full. Here is the test result with dynticks-testing (see tick_stop): cat /sys/kernel/debug/tracing/per_cpu/cpu0/trace tracer: nop entries-in-buffer/entries-written: 356/356 #P:1 _-=> irqs-off

[PATCH 01/13] csky: remove unusued thread_saved_pc and *_segments functions/macros

2020-07-31 Thread guoren
From: Tobias Klauser These are used nowhere in the tree (except for some architectures which define them for their own use) and were already removed for other architectures in: commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()") commit c17c02040bf0 ("arch: remove unused

  1   2   3   4   5   6   7   8   9   10   >