[PATCH] add support for battery charging threshold, mute. correctly save ac/dc brightness to hardware registers

2020-08-18 Thread Kenneth Chan
--- drivers/platform/x86/panasonic-laptop.c | 576 +--- 1 file changed, 518 insertions(+), 58 deletions(-) diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 59e38a1d2830..55b6d6527f20 100644 --- a/drivers/platform/x86/panason

Re: [PATCH 2/2] nvme: add emulation for zone-append

2020-08-18 Thread Javier Gonzalez
On 18.08.2020 17:50, Christoph Hellwig wrote: On Tue, Aug 18, 2020 at 11:50:33AM +0200, Javier Gonzalez wrote: I understand that the NVMe process was agitated and that the current ZNS implementation in Linux relies in append support from the device perspective. However, the current TP does allow

Re: remove the last set_fs() in common code, and remove it for x86 and powerpc

2020-08-18 Thread Christoph Hellwig
On Tue, Aug 18, 2020 at 07:46:22PM +0200, Christophe Leroy wrote: > I gave it a go on my powerpc mpc832x. I tested it on top of my newest > series that reworks the 32 bits signal handlers (see > https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=196278) with > the microbenchmark test

Re: [PATCH 2/2] nvme: add emulation for zone-append

2020-08-18 Thread Javier Gonzalez
On 18.08.2020 12:51, Matias Bjørling wrote: On 18/08/2020 11.50, Javier Gonzalez wrote: On 18.08.2020 09:12, Christoph Hellwig wrote: On Tue, Aug 18, 2020 at 10:59:36AM +0530, Kanchan Joshi wrote: If drive does not support zone-append natively, enable emulation using regular write. Make emulat

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-08-18 Thread Theodore Y. Ts'o
On Mon, Aug 03, 2020 at 05:02:11PM -0600, Jens Axboe wrote: > ext4 uses generic_file_read_iter(), which already supports this. > > Cc: Theodore Ts'o > Signed-off-by: Jens Axboe > > --- > > Resending this one, as I've been carrying it privately since May. The > necessary bits are now upstream (

Re: [RFC PATCH V2] iomap: add support to track dirty state of sub pages

2020-08-18 Thread Darrick J. Wong
On Tue, Aug 18, 2020 at 05:50:19PM +0100, Matthew Wilcox wrote: > On Tue, Aug 18, 2020 at 09:12:29AM -0700, Darrick J. Wong wrote: > > On Tue, Aug 18, 2020 at 04:53:05PM +0100, Matthew Wilcox wrote: > > > It would be better to use the same wording as below: > > > > > > > + bitmap_zero(iop->s

Re: [PATCH] sched/fair: provide u64 read for 32-bits arch helper

2020-08-18 Thread Vincent Donnefort
Hi Peter, [...] > > > > > > How about something like: > > > > > > #ifdef CONFIG_64BIT > > > > > > #define DEFINE_U64_U32(name) u64 name > > > #define u64_u32_load(name)name > > > #define u64_u32_store(name, val)name = val > > > > > > #else > > > > > > #define DEFINE_U64_U32(name

Re: [PATCH] ext4: flag as supporting buffered async reads

2020-08-18 Thread Jens Axboe
On 8/18/20 11:11 AM, Theodore Y. Ts'o wrote: > On Mon, Aug 03, 2020 at 05:02:11PM -0600, Jens Axboe wrote: >> ext4 uses generic_file_read_iter(), which already supports this. >> >> Cc: Theodore Ts'o >> Signed-off-by: Jens Axboe >> >> --- >> >> Resending this one, as I've been carrying it privatel

Re: [PATCH v7 1/3] devres: provide devm_krealloc()

2020-08-18 Thread Bartosz Golaszewski
On Tue, Aug 18, 2020 at 7:19 PM Andy Shevchenko wrote: > > On Tue, Aug 18, 2020 at 06:27:12PM +0200, Bartosz Golaszewski wrote: > > On Tue, Aug 18, 2020 at 10:40 AM Andy Shevchenko > > wrote: > > > > > > On Mon, Aug 17, 2020 at 10:02:05PM +0200, Bartosz Golaszewski wrote: > > > > On Mon, Aug 17,

Re: [PATCH] sched/cputime: Mark function as __maybe_unused

2020-08-18 Thread Nick Desaulniers
On Tue, Aug 18, 2020 at 10:04 AM Alex Dewar wrote: > > Depending on config options, account_other_time() may not be called > anywhere. Add __maybe_unused flag to fix clang warning. Just curious, would moving this definition to be within an existing preprocessor guard for a particular config also

Re: [PATCH 2/2] nvme: add emulation for zone-append

2020-08-18 Thread Javier Gonzalez
On 18.08.2020 10:39, Keith Busch wrote: On Tue, Aug 18, 2020 at 07:29:12PM +0200, Javier Gonzalez wrote: On 18.08.2020 09:58, Keith Busch wrote: > On Tue, Aug 18, 2020 at 11:50:33AM +0200, Javier Gonzalez wrote: > > a number of customers are requiring the use of normal writes, which we > > want

Re: Scheduler benchmarks

2020-08-18 Thread peter enderborg
On 8/18/20 7:53 PM, Muni Sekhar wrote: > On Tue, Aug 18, 2020 at 11:06 PM Greg KH wrote: >> On Tue, Aug 18, 2020 at 11:01:35PM +0530, Muni Sekhar wrote: >>> On Tue, Aug 18, 2020 at 10:44 PM Greg KH wrote: On Tue, Aug 18, 2020 at 10:24:13PM +0530, Muni Sekhar wrote: > On Tue, Aug 18, 2020

Re: [PATCH] mballoc: Replace seq_printf with seq_puts

2020-08-18 Thread Theodore Y. Ts'o
On Mon, Aug 10, 2020 at 02:21:58AM +, Xu Wang wrote: > seq_puts is a lot cheaper than seq_printf, so use that to print > literal strings. > > Signed-off-by: Xu Wang Applied, thanks. - Ted

Re: [RFC 2/7] KVM: VMX: Expose IA32_PKRS MSR

2020-08-18 Thread Jim Mattson
On Tue, Aug 18, 2020 at 12:28 AM Chenyi Qiang wrote: > > > > On 8/14/2020 1:31 AM, Jim Mattson wrote: > > On Wed, Aug 12, 2020 at 10:42 PM Chenyi Qiang > > wrote: > >> > >> > >> > >> On 8/13/2020 5:21 AM, Jim Mattson wrote: > >>> On Fri, Aug 7, 2020 at 1:46 AM Chenyi Qiang > >>> wrote: >

Re: remove the last set_fs() in common code, and remove it for x86 and powerpc

2020-08-18 Thread Christophe Leroy
Le 18/08/2020 à 20:05, Christoph Hellwig a écrit : On Tue, Aug 18, 2020 at 07:46:22PM +0200, Christophe Leroy wrote: I gave it a go on my powerpc mpc832x. I tested it on top of my newest series that reworks the 32 bits signal handlers (see https://patchwork.ozlabs.org/project/linuxppc-dev/lis

Re: [PATCH] net/bluetooth/hci_sock.c: add CAP_NET_RAW check.

2020-08-18 Thread Jesse Brandeburg
On Tue, 18 Aug 2020 15:56:48 +0800 Qingyu Li wrote: > When creating a raw PF_BLUETOOTH socket, > CAP_NET_RAW needs to be checked first. > Thanks for the patch! Your subject doesn't need to end in a period. In your commit message, I can guess why you'd want this patch, but your commit message sh

Re: [PATCH] net/bluetooth/bnep/sock.c: add CAP_NET_RAW check.

2020-08-18 Thread Jesse Brandeburg
On Tue, 18 Aug 2020 16:07:03 +0800 Qingyu Li wrote: > When creating a raw PF_BLUETOOTH socket, > CAP_NET_RAW needs to be checked first. > These changes should be part of a series (patch 0,1,2 at least), and all my replies on your other patch apply to this one as well.

Re: [PATCH] net/bluetooth/cmtp/sock.c: add CAP_NET_RAW check.

2020-08-18 Thread Jesse Brandeburg
On Tue, 18 Aug 2020 16:15:55 +0800 Qingyu Li wrote: > When creating a raw PF_BLUETOOTH socket, > CAP_NET_RAW needs to be checked first. Please see my previous replies.

Re: [PATCH] net/bluetooth/hidp/sock.c: add CAP_NET_RAW check.

2020-08-18 Thread Jesse Brandeburg
On Tue, 18 Aug 2020 16:21:03 +0800 Qingyu Li wrote: > When creating a raw PF_BLUETOOTH socket, > CAP_NET_RAW needs to be checked first. > > Signed-off-by: Qingyu Li Please see my replies to your previous patches.

[GIT PULL] SPI fixes for v5.9-rc1

2020-08-18 Thread Mark Brown
The following changes since commit 1d5cd4e7773c834db011f6f0989b1882adbf13c9: Merge series "Some bug fix for lpspi" from Clark Wang : (2020-07-29 14:51:14 +0100) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-fix-v5.9-rc1 fo

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Tue, Aug 18, 2020 at 07:21:14PM +0200, Roger Pau Monné wrote: > > Let me draw the picture from the beginning. > > Thanks, greatly appreciated. > > > EFI memory map contains various memory regions. Some of them are marked > > as not needed after ExitBootServices() call (done in Xen before > > l

Re: [PATCH] qed_main: Remove unnecessary cast in kfree

2020-08-18 Thread Jesse Brandeburg
On Tue, 18 Aug 2020 09:10:56 + Xu Wang wrote: > Remove unnecassary casts in the argument to kfree. > > Signed-off-by: Xu Wang You seem to have several of these patches, they should be sent in a series with the series patch subject (for example): [PATCH net-next 0/n] fix up casts on kfree

[PATCH] arm64: dts: rockchip: Fix power routing to support POE

2020-08-18 Thread Jagan Teki
When POE used, the current power routing is failing to power-up the PMIC regulators which cause Linux boot hangs. This patch is trying to update the power routing in order to support Type C0 and POE powering methods. As per the schematics, sys_12v is a common output power regulator when type c an

[PATCH v2 1/3] mm: remove activate_page() from unuse_pte()

2020-08-18 Thread Yu Zhao
We don't initially add anon pages to active lruvec after commit b518154e59aa ("mm/vmscan: protect the workingset on anonymous LRU"). Remove activate_page() from unuse_pte(), which seems to be missed by the commit. And make the function static while we are at it. Before the commit, we called lru_ca

[PATCH v2 2/3] mm: remove superfluous __ClearPageActive()

2020-08-18 Thread Yu Zhao
To activate a page, mark_page_accessed() always holds a reference on it. It either gets a new reference when adding a page to lru_pvecs.activate_page or reuses an existing one it previously got when it added a page to lru_pvecs.lru_add. So it doesn't call SetPageActive() on a page that doesn't have

[PATCH v2 3/3] mm: remove superfluous __ClearPageWaiters()

2020-08-18 Thread Yu Zhao
Presumably __ClearPageWaiters() was added to follow the previously removed __ClearPageActive() pattern. Only flags that are in PAGE_FLAGS_CHECK_AT_FREE needs to be properly cleared because otherwise we think there may be some kind of leak. PG_waiters is not one of those flags and leaving the clear

[RFC][PATCH 0/9] [v3] Migrate Pages in lieu of discard

2020-08-18 Thread Dave Hansen
OWAIT with explicit __GFP_KSWAPD_RECLAIM and comment why we want that. * Comment on effects of that keep multiple source nodes from sharing target nodes The full series is also available here: https://github.com/hansendc/linux/tree/automigrate-20200818 -- We're starting to see sy

[RFC][PATCH 1/9] mm/numa: node demotion data structure and lookup

2020-08-18 Thread Dave Hansen
From: Dave Hansen Prepare for the kernel to auto-migrate pages to other memory nodes with a user defined node migration table. This allows creating single migration target for each NUMA node to enable the kernel to do NUMA page migrations instead of simply reclaiming colder pages. A node with n

[RFC][PATCH 7/9] mm/vmscan: Consider anonymous pages without swap

2020-08-18 Thread Dave Hansen
From: Keith Busch Age and reclaim anonymous pages if a migration path is available. The node has other recourses for inactive anonymous pages beyond swap, #Signed-off-by: Keith Busch Cc: Keith Busch [vishal: fixup the migration->demotion rename] Signed-off-by: Vishal Verma Signed-off-by: Da

[RFC][PATCH 4/9] mm/migrate: make migrate_pages() return nr_succeeded

2020-08-18 Thread Dave Hansen
From: Yang Shi The migrate_pages() returns the number of pages that were not migrated, or an error code. When returning an error code, there is no way to know how many pages were migrated or not migrated. In the following patch, migrate_pages() is used to demote pages to PMEM node, we need ac

[RFC][PATCH 6/9] mm/vmscan: add page demotion counter

2020-08-18 Thread Dave Hansen
From: Yang Shi Account the number of demoted pages into reclaim_state->nr_demoted. Add pgdemote_kswapd and pgdemote_direct VM counters showed in /proc/vmstat. [ daveh: - __count_vm_events() a bit, and made them look at the THP size directly rather than getting data from migrate_pages(

[RFC][PATCH 5/9] mm/migrate: demote pages during reclaim

2020-08-18 Thread Dave Hansen
From: Dave Hansen This is mostly derived from a patch from Yang Shi: https://lore.kernel.org/linux-mm/1560468577-101178-10-git-send-email-yang@linux.alibaba.com/ Add code to the reclaim path (shrink_page_list()) to "demote" data to another NUMA node instead of discarding the data

[RFC][PATCH 9/9] mm/migrate: new zone_reclaim_mode to enable reclaim migration

2020-08-18 Thread Dave Hansen
From: Dave Hansen Some method is obviously needed to enable reclaim-based migration. Just like traditional autonuma, there will be some workloads that will benefit like workloads with more "static" configurations where hot pages stay hot and cold pages stay cold. If pages come and go from the

[RFC][PATCH 2/9] mm/numa: automatically generate node migration order

2020-08-18 Thread Dave Hansen
From: Dave Hansen When memory fills up on a node, memory contents can be automatically migrated to another node. The biggest problems are knowing when to migrate and to where the migration should be targeted. The most straightforward way to generate the "to where" list would be to follow the

[RFC][PATCH 3/9] mm/migrate: update migration order during on hotplug events

2020-08-18 Thread Dave Hansen
From: Dave Hansen Reclaim-based migration is attempting to optimize data placement in memory based on the system topology. If the system changes, so must the migration ordering. The implementation here is pretty simple and entirely unoptimized. On any memory or CPU hotplug events, assume tha

[RFC][PATCH 8/9] mm/vmscan: never demote for memcg reclaim

2020-08-18 Thread Dave Hansen
From: Dave Hansen Global reclaim aims to reduce the amount of memory used on a given node or set of nodes. Migrating pages to another node serves this purpose. memcg reclaim is different. Its goal is to reduce the total memory consumption of the entire memcg, across all nodes. Migration doe

Re: file metadata via fs API

2020-08-18 Thread Linus Torvalds
On Tue, Aug 18, 2020 at 5:50 AM Miklos Szeredi wrote: > > How do you propose handling variable size attributes, like the list of > fs options? I really REALLY think those things should just be ASCII data. I think marshalling binary data is actively evil and wrong. It's great for well-specified w

[PATCH] net: gianfar: Add of_node_put() before goto statement

2020-08-18 Thread Sumera Priyadarsini
Every iteration of for_each_available_child_of_node() decrements reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential mem

[RESEND PATCH v1 3/4] power: reset: Add support for reboot mode alternate properties

2020-08-18 Thread Elliot Berman
Reboot mode driver does not currently support reboot commands with spaces in them [1]. Add an optional new node "reboot-mode-names" and "reboot-mode-magic" which add an array of strings and u32s, respectively which would permit any string in this framework. Signed-off-by: Elliot Berman --- drive

[RESEND PATCH v1 1/4] dt-bindings: power: reset: Convert reboot-mode to YAML

2020-08-18 Thread Elliot Berman
Convert reboot-mode bindings to YAML. Signed-off-by: Elliot Berman --- .../bindings/power/reset/reboot-mode.txt | 25 .../bindings/power/reset/reboot-mode.yaml | 47 ++ 2 files changed, 47 insertions(+), 25 deletions(-) delete mode 100644 Doc

[RESEND PATCH v1 2/4] dt-bindings: power: reset: Add alternate reboot mode format

2020-08-18 Thread Elliot Berman
Current reboot-mode device tree schema does not support reboot commands with spaces in them [1]. Add an optional new node "reboot-mode-names" and "reboot-mode-magic" which add an array of strings and u32s, respectively which would permit any string in this framework. [1]: https://git.kernel.org/pu

[RESEND PATCH v1 4/4] arm64: dts: qcom: pm8150: Add reboot magic

2020-08-18 Thread Elliot Berman
Add reboot command magic values for pm8150 pon device. Signed-off-by: Elliot Berman --- arch/arm64/boot/dts/qcom/pm8150.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi index 1b64069..afd6231 100644 --- a/a

[RESEND PATCH v1 0/4] Support spaces in reboot mode framework

2020-08-18 Thread Elliot Berman
Resending with updated recepients and cover subject. PM8150 uses reboot-mode framework to set magic values for bootloader to read during next boot. dm-verity wants to use "dm-verity device corrupted" [1] as the restart command, however the reboot-mode framework does not support spaces in the comma

[PATCH v4] tty: serial: earlycon dependency

2020-08-18 Thread Tong Zhang
parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON should automatically select SERIAL_CORE, otherwise will result in symbol not found error during linking if SERIAL_CORE is not configured as builtin Sig

Re: [PATCH 5.4 000/270] 5.4.59-rc1 review

2020-08-18 Thread Guenter Roeck
On Mon, Aug 17, 2020 at 05:13:21PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.4.59 release. > There are 270 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know

Re: [PATCH 4.19 000/168] 4.19.140-rc1 review

2020-08-18 Thread Guenter Roeck
On Mon, Aug 17, 2020 at 05:15:31PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.19.140 release. > There are 168 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me kn

Re: [PATCH 5.7 000/393] 5.7.16-rc1 review

2020-08-18 Thread Guenter Roeck
On Mon, Aug 17, 2020 at 05:10:50PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.7.16 release. > There are 393 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know

Re: [PATCH 5.8 000/464] 5.8.2-rc1 review

2020-08-18 Thread Guenter Roeck
On Mon, Aug 17, 2020 at 05:09:13PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.8.2 release. > There are 464 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know.

Re: [PATCH v6 08/10] net: eth: altera: add support for ptp and timestamping

2020-08-18 Thread Jakub Kicinski
On Tue, 18 Aug 2020 23:46:11 +0800 Ooi, Joyce wrote: > From: Dalon Westergreen > > Add support for the ptp clock used with the tse, and update > the driver to support timestamping when enabled. We also > enable debugfs entries for the ptp clock to allow some user > control and interaction with t

Re: [PATCH v6 09/10] net: eth: altera: add msgdma prefetcher

2020-08-18 Thread Jakub Kicinski
On Tue, 18 Aug 2020 23:46:12 +0800 Ooi, Joyce wrote: > From: Dalon Westergreen > > Add support for the mSGDMA prefetcher. The prefetcher adds support > for a linked list of descriptors in system memory. The prefetcher > feeds these to the mSGDMA dispatcher. This generates warnings on 32bit bui

Re: [PATCH] rcu: shrink each possible cpu krcp

2020-08-18 Thread Joel Fernandes
On Tue, Aug 18, 2020 at 1:18 PM Paul E. McKenney wrote: > > On Mon, Aug 17, 2020 at 06:03:54PM -0400, Joel Fernandes wrote: > > On Fri, Aug 14, 2020 at 2:51 PM Uladzislau Rezki wrote: > > > > > > > From: Zqiang > > > > > > > > Due to cpu hotplug. some cpu may be offline after call "kfree_call_rc

Re: [v3 PATCH] mm/memory.c: skip spurious TLB flush for retried page fault

2020-08-18 Thread Linus Torvalds
On Mon, Aug 17, 2020 at 2:04 PM Yang Shi wrote: > > We could just skip the spurious TLB flush to mitigate the regression. Ok, this patch I will apply. I still hope that arm64 fixes (maybe already fixed) their spurious TLB function, and I think we should rename it to make sure everybody understan

Re: [PATCH 1/2] PCI: rockchip: Work around missing device_type property in DT

2020-08-18 Thread Marc Zyngier
On 2020-08-18 18:48, Saravana Kannan wrote: On Tue, Aug 18, 2020 at 10:34 AM Marc Zyngier wrote: [...] OK. So how about something like this? diff --git a/drivers/of/address.c b/drivers/of/address.c index 590493e04b01..a7a6ee599b14 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c

Re: [PATCH] qed_main: Remove unnecessary cast in kfree

2020-08-18 Thread Joe Perches
On Tue, 2020-08-18 at 11:44 -0700, Jesse Brandeburg wrote: > On Tue, 18 Aug 2020 09:10:56 + > Xu Wang wrote: > > > Remove unnecassary casts in the argument to kfree. > > > > Signed-off-by: Xu Wang > > You seem to have several of these patches, they should be sent in a > series with the ser

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread H. Peter Anvin
On 2020-08-18 10:56, Nick Desaulniers wrote: >> >> The problem here is twofold: >> >> 1. The user would be expected to know what kind of the optimizations the >> compiler can do on what function, which is private knowledge to the >> compiler. >> >> 2. The only way to override -fno-builtin is by a h

Re: [PATCH] dt: bindings: lp55xx: Updte yaml examples with new color ID

2020-08-18 Thread Dan Murphy
Pavel On 8/12/20 2:32 PM, Dan Murphy wrote: Update the binding examples for the color ID to LED_COLOR_ID_RGB Signed-off-by: Dan Murphy --- Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bin

Re: [PATCH 1/2] PCI: rockchip: Work around missing device_type property in DT

2020-08-18 Thread Rob Herring
On Tue, Aug 18, 2020 at 1:03 PM Marc Zyngier wrote: > > On 2020-08-18 18:48, Saravana Kannan wrote: > > On Tue, Aug 18, 2020 at 10:34 AM Marc Zyngier wrote: > > [...] > > >> OK. So how about something like this? > >> > >> diff --git a/drivers/of/address.c b/drivers/of/address.c > >> index 590493e

Re: [RFC PATCH 1/8] memcg: Enable fine-grained control of over memory.high action

2020-08-18 Thread Waiman Long
On 8/17/20 12:56 PM, Chris Down wrote: Shakeel Butt writes: Sometimes, memory reclaim may not be able to recover memory in a rate that can catch up to the physical memory allocation rate especially when rotating disks are used for swapping or writing dirty pages. In this case, the physical memor

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Linus Torvalds
On Tue, Aug 18, 2020 at 12:03 PM H. Peter Anvin wrote: > > I'm not saying "change the semantics", nor am I saying that playing > whack-a-mole *for a limited time* is unreasonable. But I would like to go back > to the compiler authors and get them to implement such a #pragma: "this > freestanding i

Re: [RFC PATCH 1/8] memcg: Enable fine-grained control of over memory.high action

2020-08-18 Thread Waiman Long
On 8/17/20 12:44 PM, Shakeel Butt wrote: On Mon, Aug 17, 2020 at 7:11 AM Waiman Long wrote: Memory controller can be used to control and limit the amount of physical memory used by a task. When a limit is set in "memory.high" in a non-root memory cgroup, the memory controller will try to reclai

Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control

2020-08-18 Thread Waiman Long
On 8/17/20 3:26 PM, Michal Hocko wrote: On Mon 17-08-20 11:55:37, Waiman Long wrote: On 8/17/20 11:26 AM, Michal Hocko wrote: On Mon 17-08-20 10:08:23, Waiman Long wrote: Memory controller can be used to control and limit the amount of physical memory used by a task. When a limit is set in "me

Re: [PATCH 1/4] Makefile: add -fno-builtin-stpcpy

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 03:31:26PM -0700, H. Peter Anvin wrote: > On 2020-08-17 15:02, Nick Desaulniers wrote: > > LLVM implemented a recent "libcall optimization" that lowers calls to > > `sprintf(dest, "%s", str)` where the return value is used to > > `stpcpy(dest, str) - dest`. This generally av

Re: [RFC v7 03/10] mm/damon-test: Add more unit tests for 'init_regions'

2020-08-18 Thread Brendan Higgins
On Tue, Aug 18, 2020 at 12:26 AM SeongJae Park wrote: > > From: SeongJae Park > > This commit adds more test cases for the new feature, 'init_regions'. > > Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins

Re: [PATCH 1/4] Makefile: add -fno-builtin-stpcpy

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 03:02:09PM -0700, Nick Desaulniers wrote: > LLVM implemented a recent "libcall optimization" that lowers calls to > `sprintf(dest, "%s", str)` where the return value is used to > `stpcpy(dest, str) - dest`. This generally avoids the machinery involved > in parsing format str

Re: [PATCH 3/4] x86/boot: use -fno-builtin-bcmp

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 03:02:11PM -0700, Nick Desaulniers wrote: > We're reverting > commit 5f074f3e192f ("lib/string.c: implement a basic bcmp") > in favor of -fno-builtin-bcmp. Remove the additional definition here, > too. > > arch/x86/purgatory/Makefile uses -ffreestanding, so there's no risk

Re: [PATCH 4/4] x86: don't build CONFIG_X86_32 as -ffreestanding

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 03:02:12PM -0700, Nick Desaulniers wrote: > -ffreestanding typically inhibits "libcall optimizations" where calls to > certain library functions can be replaced by the compiler in certain > cases to calls to other library functions that may be more efficient. > This can be p

Re: [PATCH 2/4] Revert "lib/string.c: implement a basic bcmp"

2020-08-18 Thread Kees Cook
On Tue, Aug 18, 2020 at 11:00:01AM -0700, Nick Desaulniers wrote: > On Mon, Aug 17, 2020 at 10:44 PM Nathan Chancellor > wrote: > > > > On Mon, Aug 17, 2020 at 03:02:10PM -0700, Nick Desaulniers wrote: > > > This reverts commit 5f074f3e192f10c9fade898b9b3b8812e3d83342. > > > > > > Use `-fno-builti

[PATCH V3] scripts: coccicheck: Change default value for parallelism

2020-08-18 Thread Sumera Priyadarsini
By default, coccicheck utilizes all available threads to implement parallelisation. However, when all available threads are used, a decrease in performance is noted. The elapsed time is minimum when at most one thread per core is used. For example, on benchmarking the semantic patch kfree.cocci f

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Nick Desaulniers
On Tue, Aug 18, 2020 at 12:19 PM Linus Torvalds wrote: > > On Tue, Aug 18, 2020 at 12:03 PM H. Peter Anvin wrote: > > > > I'm not saying "change the semantics", nor am I saying that playing > > whack-a-mole *for a limited time* is unreasonable. But I would like to go > > back > > to the compiler

[PATCH v6] usb: typec: tcpm: Migrate workqueue to RT priority for processing events

2020-08-18 Thread Badhri Jagan Sridharan
"tReceiverResponse 15 ms Section 6.6.2 The receiver of a Message requiring a response Shall respond within tReceiverResponse in order to ensure that the sender’s SenderResponseTimer does not expire." When the cpu complex is busy running other lower priority work items, TCPM's work queue sometimes

Re: [PATCH 07/11] x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:08AM +0200, Christoph Hellwig wrote: > At least for 64-bit this moves them closer to some of the defines > they are based on, and it prepares for using the TASK_SIZE_MAX > definition from assembly. > > Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook -- Ke

Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control

2020-08-18 Thread Waiman Long
On 8/18/20 5:14 AM, pet...@infradead.org wrote: On Mon, Aug 17, 2020 at 10:08:23AM -0400, Waiman Long wrote: Memory controller can be used to control and limit the amount of physical memory used by a task. When a limit is set in "memory.high" in a v2 non-root memory cgroup, the memory controller

Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control

2020-08-18 Thread Waiman Long
On 8/18/20 5:27 AM, Chris Down wrote: pet...@infradead.org writes: On Mon, Aug 17, 2020 at 10:08:23AM -0400, Waiman Long wrote: Memory controller can be used to control and limit the amount of physical memory used by a task. When a limit is set in "memory.high" in a v2 non-root memory cgroup, t

[PATCH] coresight: etm4x: Handle unreachable sink in perf mode

2020-08-18 Thread Suzuki K Poulose
If the specified/hinted sink is not reachable from a subset of the CPUs, we could end up unable to trace the event on those CPUs. This is the best effort we could do until we support 1:1 configurations. Fail gracefully in such cases avoiding a WARN_ON, which can be easily triggered by the user on c

Re: [PATCH 4/6] iio: dac: ad5686: Constify static struct iio_chan_spec

2020-08-18 Thread Rikard Falkeborn
On Sun, May 31, 2020 at 02:47:15PM +0100, Jonathan Cameron wrote: > On Wed, 27 May 2020 04:50:46 + > "Ardelean, Alexandru" wrote: > > > On Tue, 2020-05-26 at 23:02 +0200, Rikard Falkeborn wrote: > > > [External] > > > > > > These are never modified and can be made const to allow the compiler

Re: [PATCH 06/11] lkdtm: disable set_fs-based tests for !CONFIG_SET_FS

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:07AM +0200, Christoph Hellwig wrote: > Once we can't manipulate the address limit, we also can't test what > happens when the manipulation is abused. > > Signed-off-by: Christoph Hellwig > --- > drivers/misc/lkdtm/bugs.c | 2 ++ > drivers/misc/lkdtm/core.c |

Re: [PATCH] gpio: stp-xway: automatically drive GPHY leds on ar10 and grx390

2020-08-18 Thread Bartosz Golaszewski
On Fri, Aug 14, 2020 at 9:49 PM Aleksander Jan Bajkowski wrote: > > Ar10 (xr300) has 3 and grx390 (xrx330) has 4 built-in GPHY. PHY LEDs are > connected via STP. STP is a peripheral controller used to drive external > shift register cascades. The hardware is able to allow the GPHY to drive > some

Re: [PATCH 01/11] mem: remove duplicate ops for /dev/zero and /dev/null

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:02AM +0200, Christoph Hellwig wrote: > There is no good reason to implement both the traditional ->read and > ->write as well as the iter based ops. So implement just the iter > based ones. > > Suggested-by: Al Viro > Signed-off-by: Christoph Hellwig Reviewed-by:

Re: [PATCH 02/11] fs: don't allow kernel reads and writes without iter ops

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:03AM +0200, Christoph Hellwig wrote: > Don't allow calling ->read or ->write with set_fs as a preparation for > killing off set_fs. All the instances that we use kernel_read/write on > are using the iter ops already. > > If a file has both the regular ->read/->write

Re: [PATCH] rpl_iptunnel: simplify the return expression of rpl_do_srh()

2020-08-18 Thread David Miller
From: Xu Wang Date: Tue, 18 Aug 2020 08:54:54 + > @@ -197,11 +197,7 @@ static int rpl_do_srh(struct sk_buff *skb, const struct > rpl_lwt *rlwt) > > tinfo = rpl_encap_lwtunnel(dst->lwtstate); > > - err = rpl_do_srh_inline(skb, rlwt, tinfo->srh); > - if (err) > -

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Nick Desaulniers
On Tue, Aug 18, 2020 at 12:03 PM H. Peter Anvin wrote: > > I'm not saying "change the semantics", nor am I saying that playing > whack-a-mole *for a limited time* is unreasonable. Ah, ok then. Sorry I mischaracterized your position. > But I would like to go back > to the compiler authors and ge

Re: [PATCH 03/11] fs: don't allow splice read/write without explicit ops

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:04AM +0200, Christoph Hellwig wrote: > default_file_splice_write is the last piece of generic code that uses > set_fs to make the uaccess routines operate on kernel pointers. It > implements a "fallback loop" for splicing from files that do not actually > provide a pr

Re: [PATCH 04/11] uaccess: add infrastructure for kernel builds with set_fs()

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:05AM +0200, Christoph Hellwig wrote: > Add a CONFIG_SET_FS option that is selected by architecturess that > implement set_fs, which is all of them initially. If the option is not > set stubs for routines related to overriding the address space are > provided so that a

Re: [PATCH 05/11] test_bitmap: skip user bitmap tests for !CONFIG_SET_FS

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:06AM +0200, Christoph Hellwig wrote: > We can't run the tests for userspace bitmap parsing if set_fs() doesn't > exist. > > Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 08/11] x86: make TASK_SIZE_MAX usable from assembly code

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:09AM +0200, Christoph Hellwig wrote: > For 64-bit the only hing missing was a strategic _AC, and for 32-bit we typo: thing > need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE > definition to escape the explicit unsigned long cast. This just works > b

Re: [PATCH] net: Avoid strcmp current->comm with warncomm when warned >= 5

2020-08-18 Thread David Miller
From: Miaohe Lin Date: Tue, 18 Aug 2020 07:41:32 -0400 > @@ -417,7 +417,7 @@ static void sock_warn_obsolete_bsdism(const char *name) > { > static int warned; > static char warncomm[TASK_COMM_LEN]; > - if (strcmp(warncomm, current->comm) && warned < 5) { > + if (warned < 5 &&

Re: [PATCH 09/11] x86: remove address space overrides using set_fs()

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:10AM +0200, Christoph Hellwig wrote: > Stop providing the possibility to override the address space using > set_fs() now that there is no need for that any more. To properly > handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on > x86 a new alternative is

Re: [PATCH] net: tipc: Convert to use the preferred fallthrough macro

2020-08-18 Thread David Miller
From: Miaohe Lin Date: Tue, 18 Aug 2020 08:07:13 -0400 > Convert the uses of fallthrough comments to fallthrough macro. > > Signed-off-by: Miaohe Lin Applied to net-next.

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Christoph Hellwig
On Wed, Aug 19, 2020 at 12:33:37AM +0800, Coly Li wrote: > On 2020/8/19 00:24, Christoph Hellwig wrote: > > I think we should go for something simple like this instead: > > This idea is fine to me. Should a warning message be through here? IMHO > the driver still sends an improper page in, fix it

Re: [PATCH v2 0/3] Add Broadcom VK driver

2020-08-18 Thread Kees Cook
On Wed, Aug 05, 2020 at 05:46:28PM -0700, Scott Branden wrote: > This patch series drops previous patches in [1] > that were incorporated by Kees Cook into patch series > "Introduce partial kernel_read_file() support" [2]. > > Remaining patches are contained in this series to add Broadcom VK drive

Re: [PATCH v2] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory

2020-08-18 Thread Thiago Jung Bauermann
Christoph Hellwig writes: > On Mon, Aug 17, 2020 at 06:46:58PM -0300, Thiago Jung Bauermann wrote: >> POWER secure guests (i.e., guests which use the Protection Execution >> Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but >> they don't need the SWIOTLB memory to be i

Re: [PATCH net] net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe()

2020-08-18 Thread David Miller
From: Wang Hai Date: Tue, 18 Aug 2020 21:44:04 +0800 > Fix the missing free_netdev() before return from > gemini_ethernet_port_probe() in the error handling case. > > Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit > ethernet") > Reported-by: Hulk Robot > Signed-off-by: Wa

Re: [PATCH] ethernet: cirrus: Remove unused macros

2020-08-18 Thread David Miller
From: Alex Dewar Date: Tue, 18 Aug 2020 15:06:01 +0100 > Remove a couple of unused #defines in cs89x0.h. > > Signed-off-by: Alex Dewar Applied to net-next.

Re: [PATCH 03/11] fs: don't allow splice read/write without explicit ops

2020-08-18 Thread Christoph Hellwig
On Tue, Aug 18, 2020 at 12:39:34PM -0700, Kees Cook wrote: > On Mon, Aug 17, 2020 at 09:32:04AM +0200, Christoph Hellwig wrote: > > default_file_splice_write is the last piece of generic code that uses > > set_fs to make the uaccess routines operate on kernel pointers. It > > implements a "fallbac

Re: [PATCH 08/11] x86: make TASK_SIZE_MAX usable from assembly code

2020-08-18 Thread Christoph Hellwig
On Tue, Aug 18, 2020 at 12:44:49PM -0700, Kees Cook wrote: > On Mon, Aug 17, 2020 at 09:32:09AM +0200, Christoph Hellwig wrote: > > For 64-bit the only hing missing was a strategic _AC, and for 32-bit we > > typo: thing > > > need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE > > d

Re: [PATCH] libceph: Convert to use the preferred fallthrough macro

2020-08-18 Thread Jeff Layton
On Tue, 2020-08-18 at 08:26 -0400, Miaohe Lin wrote: > Convert the uses of fallthrough comments to fallthrough macro. > > Signed-off-by: Miaohe Lin > --- > net/ceph/ceph_hash.c| 20 ++-- > net/ceph/crush/mapper.c | 2 +- > net/ceph/messenger.c| 4 ++-- > net/ceph/mon_cl

Re: [PATCH] sched/cputime: Mark function as __maybe_unused

2020-08-18 Thread Alex Dewar
On Tue, Aug 18, 2020 at 11:13:10AM -0700, Nick Desaulniers wrote: > On Tue, Aug 18, 2020 at 10:04 AM Alex Dewar wrote: > > > > Depending on config options, account_other_time() may not be called > > anywhere. Add __maybe_unused flag to fix clang warning. > > Just curious, would moving this defini

Re: [PATCH 03/11] fs: don't allow splice read/write without explicit ops

2020-08-18 Thread Kees Cook
On Tue, Aug 18, 2020 at 09:54:46PM +0200, Christoph Hellwig wrote: > On Tue, Aug 18, 2020 at 12:39:34PM -0700, Kees Cook wrote: > > On Mon, Aug 17, 2020 at 09:32:04AM +0200, Christoph Hellwig wrote: > > > default_file_splice_write is the last piece of generic code that uses > > > set_fs to make the

Re: [PATCH 08/11] x86: make TASK_SIZE_MAX usable from assembly code

2020-08-18 Thread Kees Cook
On Tue, Aug 18, 2020 at 09:55:39PM +0200, Christoph Hellwig wrote: > On Tue, Aug 18, 2020 at 12:44:49PM -0700, Kees Cook wrote: > > On Mon, Aug 17, 2020 at 09:32:09AM +0200, Christoph Hellwig wrote: > > > For 64-bit the only hing missing was a strategic _AC, and for 32-bit we > > > > typo: thing >

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Nick Desaulniers
On Tue, Aug 18, 2020 at 12:25 PM Nick Desaulniers wrote: > > On Tue, Aug 18, 2020 at 12:19 PM Linus Torvalds > wrote: > > > > On Tue, Aug 18, 2020 at 12:03 PM H. Peter Anvin wrote: > > > > > > I'm not saying "change the semantics", nor am I saying that playing > > > whack-a-mole *for a limited t

<    5   6   7   8   9   10   11   12   13   14   >