Re: [PATCH 2/3] hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race

2018-12-18 Thread Andrew Morton
On Mon, 17 Dec 2018 16:17:52 -0800 Mike Kravetz wrote: > ... > > > As you suggested in a comment to the subsequent patch, it would be better to > > combine the patches and remove the dead code when it becomes dead. I will > > work on that. Actually some of the code in patch 3 applies to patch 1

Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

2018-12-18 Thread Andrew Morton
On Tue, 18 Dec 2018 08:36:55 +0100 Michal Hocko wrote: > > > Signed-off-by: Oscar Salvador > > Acked-by: Michal Hocko Thanks. > > cc:stable? > > See http://lkml.kernel.org/r/20181217152936.gr30...@dhcp22.suse.cz. I > believe nobody is simply using gigantic pages and hotplug at the same > ti

Re: kernel BUG at fs/inode.c:LINE!

2018-12-18 Thread Andrew Morton
On Tue, 18 Dec 2018 19:34:57 +0800 Ian Kent wrote: > > See > > https://www.ozlabs.org/~akpm/mmotm/broken-out/autofs-fix-possible-inode-leak-in-autofs_fill_super.patch > > > > I think this will fix it, I'll forward it to Andrew if you agree: > > Actually, looking at it again the above patch is

Re: [PATCH mm] kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning

2018-12-18 Thread Andrew Morton
On Tue, 18 Dec 2018 14:30:33 +0100 Andrey Konovalov wrote: > Instead of changing cache->align to be aligned to KASAN_SHADOW_SCALE_SIZE > in kasan_cache_create() we can reuse the ARCH_SLAB_MINALIGN macro. > > ... > > --- a/arch/arm64/include/asm/kasan.h > +++ b/arch/arm64/include/asm/kasan.h > @

Re: [PATCH] include/linux/nodemask.h: Use nr_node_ids instead of MAX_NUMNODES in nodemask_pr_args

2018-12-18 Thread Andrew Morton
On Tue, 18 Dec 2018 12:30:31 -0500 Waiman Long wrote: > When viewing the /proc//status file, one can see output lines like > > Cpus_allowed: ,, > Cpus_allowed_list: 0-95 > Mems_allowed: > ,,,,,,,0

Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

2018-12-17 Thread Andrew Morton
On Mon, 17 Dec 2018 23:51:13 +0100 Oscar Salvador wrote: > v1 -> v2: > - Fix the logic for skipping pages by Michal > > --- Please be careful with the "^---$". It signifies end-of-changelog, so I ended up without a changelog! > >From e346b151037d3c37feb10a981a4d2a25018acf81 Mon Sep 17 0

Re: [PATCH 6/7] sctp: Convert to genradix

2018-12-17 Thread Andrew Morton
On Mon, 17 Dec 2018 08:19:28 -0500 Kent Overstreet wrote: > @@ -535,9 +470,6 @@ int sctp_send_add_streams(struct sctp_association *asoc, > goto out; > } > > - stream->incnt = incnt; > - stream->outcnt = outcnt; > - > asoc->strreset_outstanding = !!out + !!in;

Re: [PATCH v13 19/25] kasan: add hooks implementation for tag-based mode

2018-12-17 Thread Andrew Morton
On Mon, 17 Dec 2018 20:33:42 +0100 Andrey Konovalov wrote: > > Curiosity, did you try your patches with SLUB red zoning enabled? > > Since the area used for the Redzone is just after the payload, aligning the > > object_size independently from the allocator could have side effects, at > > least

Re: [PATCH 0/3] hugetlbfs: use i_mmap_rwsem for better synchronization

2018-12-14 Thread Andrew Morton
On Mon, 3 Dec 2018 12:08:47 -0800 Mike Kravetz wrote: > These patches are a follow up to the RFC, > http://lkml.kernel.org/r/20181024045053.1467-1-mike.krav...@oracle.com > Comments made by Naoya were addressed. > > There are two primary issues addressed here: > 1) For shared pmds, huge PE poin

Re: [PATCH] kernel/hung_task.c: Break RCU locks based on jiffies.

2018-12-14 Thread Andrew Morton
On Sat, 15 Dec 2018 00:17:38 +0900 Tetsuo Handa wrote: > check_hung_uninterruptible_tasks() is currently calling rcu_lock_break() > for every 1024 threads. But check_hung_task() is very slow if printk() > was called, and is very fast otherwise. If many threads within some 1024 > threads called p

Re: [PATCH 2/2] checkpatch: add Co-developed-by to signature tags

2018-12-14 Thread Andrew Morton
On Fri, 14 Dec 2018 18:35:28 +0100 Jorge Ramirez-Ortiz wrote: > As per Documentation/process/submitting-patches, Co-developed-by is a > valid signature. > I'm with Joe - I find this tag kinda useless and duplicative. But whatever. But as the documentation says, Co-developed-by must be accomp

Re: [PATCH][v6] filemap: drop the mmap_sem for all blocking operations

2018-12-12 Thread Andrew Morton
On Wed, 12 Dec 2018 10:27:57 -0500 Josef Bacik wrote: > v5->v6: > - added more comments as per Andrew's suggestion. > - fixed the fpin leaks in the two error paths that were pointed out. > hm, > --- a/mm/filemap.c~filemap-drop-the-mmap_sem-for-all-blocking-operations-v6 > +++ a/mm/filemap.c >

Re: [PATCH] debugobjects: Move printk out of db lock critical sections

2018-12-12 Thread Andrew Morton
On Wed, 12 Dec 2018 17:28:14 -0500 Waiman Long wrote: > The db->lock is a raw spinlock and so the lock hold time is supposed > to be short. This will not be the case when printk() is being involved > in some of the critical sections. In order to avoid the long hold time, > in case some messages n

Re: [PATCH v13 00/25] kasan: add software tag-based mode for arm64

2018-12-11 Thread Andrew Morton
On Tue, 11 Dec 2018 16:00:19 + Will Deacon wrote: > > Yes, that was the intention of sending v13. Should have I sent a > > separate patch with v12->v13 fixes instead? I don't know what's the > > usual way to make changes to the patchset once it's in the mm tree. I usually convert replacement

Re: [PATCH 3/3] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Andrew Morton
On Tue, 11 Dec 2018 12:38:01 -0500 Josef Bacik wrote: > Currently we only drop the mmap_sem if there is contention on the page > lock. The idea is that we issue readahead and then go to lock the page > while it is under IO and we want to not hold the mmap_sem during the IO. > > The problem with

Re: [PATCH] /proc/kpagecount: return 0 for special pages that are never mapped

2018-12-07 Thread Andrew Morton
On Wed, 5 Dec 2018 22:07:37 -0800 Anthony Yznaga wrote: > Would you like me to submit a revised patch?  An -mm tree diff? Either is OK. I usually turn replacemensts into deltas so we can see what changed.

Re: [PATCH V4 0/3] * mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2018-12-07 Thread Andrew Morton
On Wed, 21 Nov 2018 14:52:56 +0530 "Aneesh Kumar K.V" wrote: > Subject: [PATCH V4 0/3] * mm/kvm/vfio/ppc64: Migrate compound pages out of > CMA region Asterisk in title is strange? > ppc64 use CMA area for the allocation of guest page table (hash page table). > We won't > be able to start gu

Re: [PATCH] checkstack.pl: fix for aarch64

2018-12-07 Thread Andrew Morton
On Fri, 7 Dec 2018 14:58:43 -0500 Qian Cai wrote: > There is actually a space after "sp," like this, > > 280813c8: a9bb7bfdstp x29, x30, [sp, #-80]! > Confused. Why does this matter? Why is the patched version superior?

Re: [PATCH 2/2] mm/sparse: add common helper to mark all memblocks present

2018-12-07 Thread Andrew Morton
On Thu, 6 Dec 2018 10:40:31 -0700 Logan Gunthorpe wrote: > Hey Andrew, > > On 2018-11-07 1:12 p.m., Andrew Morton wrote: > > Acked-by: Andrew Morton > > > > I can grab both patches and shall sneak them into 4.20-rcX, but feel > > free to merge them into som

Re: [GIT PULL] Uprobes: Fix kernel oops with delayed_uprobe_remove()

2018-12-06 Thread Andrew Morton
On Thu, 6 Dec 2018 12:47:19 -0500 Steven Rostedt wrote: > > Uprobes: Fix kernel oops with delayed_uprobe_remove() > > There could be a race between task exit and probe unregister: > > exit_mm() > mmput() > __mmput() uprobe_unregister() >

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > If we drop the mmap_sem we have to redo the vma lookup which requires > redoing the fault handler. Chances are we will just come back to the > same page, so save this page in our vmf->cached_page and reuse it in the > next loop through the

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:11 -0500 Josef Bacik wrote: > Currently we only drop the mmap_sem if there is contention on the page > lock. The idea is that we issue readahead and then go to lock the page > while it is under IO and we want to not hold the mmap_sem during the IO. > > The problem with

Re: [PATCH 1/4] mm: infrastructure for page fault page caching

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:09 -0500 Josef Bacik wrote: > We want to be able to cache the result of a previous loop of a page > fault in the case that we use VM_FAULT_RETRY, Please explain here why we want to do that. > so introduce > handle_mm_fault_cacheable that will take a struct vm_fault dir

Re: [PATCH 0/4][V4] drop the mmap_sem when doing IO in the fault path

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:08 -0500 Josef Bacik wrote: > Now that we have proper isolation in place with cgroups2 we have started going > through and fixing the various priority inversions. Most are all gone now, > but > this one is sort of weird since it's not necessarily a priority inversion t

Re: [PATCH v5 1/2] kernel/signal: Signal-based pre-coredump notification

2018-12-04 Thread Andrew Morton
On Wed, 28 Nov 2018 16:15:35 -0800 Enke Chen wrote: > Thanks for your comments. You have indeed missed some of the prior reviews > and discussions. But that is OK. This is why it is best to update the changelog in response to the review discussion - if person A was wondering about something then

Re: [PATCH 7/7] lib/lzo: separate lzo-rle from lzo

2018-11-29 Thread Andrew Morton
On Thu, 29 Nov 2018 10:21:53 + Dave Rodgman wrote: > >> @@ -41,7 +41,7 @@ static DEFINE_IDR(zram_index_idr); > >> static DEFINE_MUTEX(zram_index_mutex); > >> > >> static int zram_major; > >> -static const char *default_compressor = "lzo"; > >> +static const char *default_compressor = "

Re: [PATCH] Security: Handle hidepid option correctly

2018-11-29 Thread Andrew Morton
> [PATCH] Security: Handle hidepid option correctly Why is this considered to be security sensitive? I can guess, but I'd like to know your reasoning. On Thu, 29 Nov 2018 19:08:21 +0800 d17103...@gmail.com wrote: > From: Cheng Yang > > The proc_parse_options() call from proc_mount() runs on

Re: [PATCH 1/3] add generic builtin command line

2018-11-28 Thread Andrew Morton
On Fri, 9 Nov 2018 09:34:31 -0800 Daniel Walker wrote: > This code allows architectures to use a generic builtin command line. > The state of the builtin command line options across architecture is > diverse. On x86 and mips they have pretty much the same code and the > code prepends the builtin

Re: [PATCH v3 7/7] zram: writeback throttle

2018-11-28 Thread Andrew Morton
On Tue, 27 Nov 2018 14:54:29 +0900 Minchan Kim wrote: > On small memory system, there are lots of write IO so if we use > flash device as swap, there would be serious flash wearout. > To overcome the problem, system developers need to design write > limitation strategy to guarantee flash health f

Re: [PATCH v3 5/7] zram: support idle/huge page writeback

2018-11-28 Thread Andrew Morton
On Tue, 27 Nov 2018 14:54:27 +0900 Minchan Kim wrote: > This patch supports new feature "zram idle/huge page writeback". > On zram-swap usecase, zram has usually many idle/huge swap pages. > It's pointless to keep in memory(ie, zram). > > To solve the problem, this feature introduces idle/huge p

Re: [PATCH v2 6/7] zram: add bd_stat statistics

2018-11-28 Thread Andrew Morton
On Tue, 27 Nov 2018 11:07:54 +0900 Minchan Kim wrote: > On Mon, Nov 26, 2018 at 12:58:33PM -0800, Andrew Morton wrote: > > On Mon, 26 Nov 2018 17:28:12 +0900 Minchan Kim wrote: > > > > > +File /sys/block/zram/bd_stat > > > + > > > +The stat file rep

Re: [PATCH 2/7] lib/lzo: clean-up by introducing COPY16

2018-11-27 Thread Andrew Morton
On Tue, 27 Nov 2018 16:19:31 + Dave Rodgman wrote: > From: Matt Sealey > > ... > > Signed-off-by: Matt Sealey Several of the From:Matt patches were missing your Signed-off-by:. I added it. [patch 5/7] had the signoffs in an inappropriate order - I switched them.

Re: [PATCH v2] panic: Avoid the extra noise dmesg

2018-11-26 Thread Andrew Morton
On Thu, 8 Nov 2018 21:05:03 +0800 Feng Tang wrote: > Sometimes when debugging kernel panic, we saw many extra noisy error > messages after the expected end: > > [ 35.743249] ---[ end Kernel panic - not syncing: Fatal exception > [ 35.749975] [ cut here ] What are the

Re: [PATCH] initramfs: clean old path before creating a hardlink

2018-11-26 Thread Andrew Morton
On Fri, 16 Nov 2018 15:12:48 +0800 Li Zhijian wrote: > Previously, sys_link() will fail due to the new path is already existed. > this case ofen appears when we use a concated initrd, below is an > sample: > > 1) prepare a basic rootfs, it contains a regular files rc.local > lizhijian@:~/yocto-t

Re: [RFC PATCH] panic: Add options to dump system info when panic happens

2018-11-26 Thread Andrew Morton
On Thu, 22 Nov 2018 15:10:31 +0800 Feng Tang wrote: > Kernel panic issues are always painful to debug, partially > because of it's not easy to get enough information of the > context when panic happens. > > And we have ramoops and kdump for that, while this commit > tries to a easier way to show

Re: [PATCH v2 6/7] zram: add bd_stat statistics

2018-11-26 Thread Andrew Morton
On Mon, 26 Nov 2018 17:28:12 +0900 Minchan Kim wrote: > +File /sys/block/zram/bd_stat > + > +The stat file represents device's backing device statistics. It consists of > +a single line of text and contains the following stats separated by > whitespace: > + bd_countsize of data written in ba

Re: [PATCH v2 7/7] zram: writeback throttle

2018-11-26 Thread Andrew Morton
On Mon, 26 Nov 2018 17:28:13 +0900 Minchan Kim wrote: > On small memory system, there are lots of write IO so if we use > flash device as swap, there would be serious flash wearout. > To overcome the problem, system developers need to design write > limitation strategy to guarantee flash health f

Re: [PATCH v2 1/7] zram: fix lockdep warning of free block handling

2018-11-26 Thread Andrew Morton
On Mon, 26 Nov 2018 17:28:07 +0900 Minchan Kim wrote: > > ... > > With writeback feature, zram_slot_free_notify could be called > in softirq context by end_swap_bio_read. However, bitmap_lock > is not aware of that so lockdep yell out. Thanks. > > The problem is not only bitmap_lock but it is a

Re: [PATCH -next 1/2] mm/memfd: make F_SEAL_FUTURE_WRITE seal more robust

2018-11-24 Thread Andrew Morton
On Thu, 22 Nov 2018 15:09:06 -0800 Joel Fernandes wrote: > Android uses ashmem for sharing memory regions. We are looking forward to > migrating all usecases of ashmem to memfd so that we can possibly remove > the ashmem driver in the future from staging while also benefiting from > using memfd

Re: [RFC PATCH 1/5] mm: print more information about mapping in __dump_page

2018-11-23 Thread Andrew Morton
On Wed, 7 Nov 2018 11:18:26 +0100 Michal Hocko wrote: > From: Michal Hocko > > __dump_page prints the mapping pointer but that is quite unhelpful > for many reports because the pointer itself only helps to distinguish > anon/ksm mappings from other ones (because of lowest bits > set). Sometime

Re: [PATCH v2 1/5] autofs - improve ioctl sbi checks

2018-11-23 Thread Andrew Morton
On Fri, 23 Nov 2018 18:41:50 +0800 Ian Kent wrote: > Al Viro made some suggestions to improve the implementation > of commit 0633da48f0 "fix autofs_sbi() does not check super > block type". > > The check is unnessesary in all cases except for ioctl usage > so placing the check in the super block

Re: [PATCH] locking/atomics: build atomic headers as required

2018-11-23 Thread Andrew Morton
On Fri, 23 Nov 2018 15:33:21 + Mark Rutland wrote: > Andrew and Ingo report that the check-atomics.sh script is simply too > slow to run for every kernel build, and it's impractical to make it > faster without rewriting it in something other than shell. > > Rather than committing the generat

Re: [PATCH] ipc/shm.c: removed 'int err' from shm_get_policy()

2018-11-21 Thread Andrew Morton
On Sun, 18 Nov 2018 23:49:11 + danielijrob...@gmail.com wrote: > removed unneeded variable in shm_get_policy() > > ... > > --- a/ipc/shm.c > +++ b/ipc/shm.c > @@ -461,11 +461,10 @@ static int shm_set_policy(struct vm_area_struct *vma, > struct mempolicy *new) > { > struct file *file =

Re: [PATCH v3] mm: use swp_offset as key in shmem_replace_page()

2018-11-21 Thread Andrew Morton
On Wed, 21 Nov 2018 14:54:42 -0700 Yu Zhao wrote: > We changed key of swap cache tree from swp_entry_t.val to > swp_offset. Need to do so in shmem_replace_page() as well. What are the user-visible effects of this change? > Fixes: f6ab1f7f6b2d ("mm, swap: use offset of swap entry as key of swap

Re: [PATCH] procfs: fix the output format in /proc/PID/wchan

2018-11-21 Thread Andrew Morton
On Mon, 19 Nov 2018 19:17:52 +0800 Yafang Shao wrote: > Just add the missing newline. > > ... > > --- a/fs/proc/base.c > +++ b/fs/proc/base.c > @@ -370,11 +370,12 @@ static int proc_pid_wchan(struct seq_file *m, struct > pid_namespace *ns, > wchan = get_wchan(task); > if (wchan && !

Re: [PATCH v4 1/3] kernel.h: disable type-checks in container_of() for Sparse

2018-11-21 Thread Andrew Morton
On Thu, 22 Nov 2018 12:14:20 +0900 Masahiro Yamada wrote: > When I tried to enable BUILD_BUG_ON for Sparse, the kbuild test robot > reported lots of "unknown expression" warnings from container_of(), > which seemed false positive. > > I addressed this in [1], but fixing Sparse is the right thin

Re: [PATCH -next 1/2] mm/memfd: make F_SEAL_FUTURE_WRITE seal more robust

2018-11-21 Thread Andrew Morton
kernel.org/r/20181108041537.39694-1-j...@joelfernandes.org Signed-off-by: Joel Fernandes (Google) Cc: John Stultz Cc: John Reck Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: Christoph Hellwig Cc: Al Viro Cc: Daniel Colascione Cc: J. Bruce Fields Cc: Jeff Layton Cc: Khalid Aziz Cc: Lei Yang Cc:

Re: [PATCH] ptrace: take into account saved_sigmask in PTRACE_{GET,SET}SIGMASK

2018-11-21 Thread Andrew Morton
On Mon, 19 Nov 2018 22:06:16 -0800 Andrei Vagin wrote: > There are a few system calls (pselect, ppoll, etc) which replace a task > sigmask while they are running in a kernel-space > > When a task calls one of these syscalls, the kernel saves a current > sigmask in task->saved_sigmask and sets a

Re: [PATCH v5] kernel/signal: Signal-based pre-coredump notification

2018-11-21 Thread Andrew Morton
On Wed, 21 Nov 2018 17:09:50 -0800 Enke Chen wrote: > Hi, Andrew: > > On 11/21/18 4:37 PM, Andrew Morton wrote: > > On Tue, 30 Oct 2018 17:46:29 +0100 Oleg Nesterov wrote: > > > >> On 10/29, Enke Chen wrote: > >>> > >>> Review

Re: [PATCH v2] Add /proc/pid_gen

2018-11-21 Thread Andrew Morton
On Wed, 21 Nov 2018 17:08:08 -0800 Daniel Colascione wrote: > Have you done much > retrospective long trace analysis? No. Have you? Of course you have, which is why I and others are dependent upon you to explain why this change is worth adding to Linux. If this thing solves a problem which we

Re: [PATCH v5] kernel/signal: Signal-based pre-coredump notification

2018-11-21 Thread Andrew Morton
On Tue, 30 Oct 2018 17:46:29 +0100 Oleg Nesterov wrote: > On 10/29, Enke Chen wrote: > > > > Reviewed-by: Oleg Nesterov > > Hmm. I didn't say this ;) > > But OK, feel free to keep this tag. > > I do not like this feauture. Why is that? > But I see no technical problems in this version > and

Re: [PATCH] mm/gup: finish consolidating error handling

2018-11-21 Thread Andrew Morton
On Wed, 21 Nov 2018 00:14:02 -0800 john.hubb...@gmail.com wrote: > Commit df06b37ffe5a4 ("mm/gup: cache dev_pagemap while pinning pages") > attempted to operate on each page that get_user_pages had retrieved. In > order to do that, it created a common exit point from the routine. > However, one ca

Re: [PATCHv3 1/6] atomics: add common header generation files

2018-11-21 Thread Andrew Morton
On Fri, 16 Nov 2018 02:51:21 + Mark Rutland wrote: > Hi Andrew, > > On Thu, Nov 15, 2018 at 03:10:48PM -0800, Andrew Morton wrote: > > On Tue, 4 Sep 2018 11:48:25 +0100 Mark Rutland > > wrote: > > > > > To minimize repetition, to allow for future re

Re: [PATCH v2] Add /proc/pid_gen

2018-11-21 Thread Andrew Morton
On Wed, 21 Nov 2018 12:54:20 -0800 Daniel Colascione wrote: > Trace analysis code needs a coherent picture of the set of processes > and threads running on a system. While it's possible to enumerate all > tasks via /proc, this enumeration is not atomic. If PID numbering > rolls over during snapsh

Re: [RFC PATCH 5/5] mm, memory_hotplug: be more verbose for memory offline failures

2018-11-15 Thread Andrew Morton
On Wed, 7 Nov 2018 11:18:30 +0100 Michal Hocko wrote: > From: Michal Hocko > > There is only very limited information printed when the memory offlining > fails: > [ 1984.506184] rac1 kernel: memory offlining [mem > 0x826-0x8267fff] failed due to signal backoff > > This tells us t

Re: [PATCHv3 1/6] atomics: add common header generation files

2018-11-15 Thread Andrew Morton
On Tue, 4 Sep 2018 11:48:25 +0100 Mark Rutland wrote: > To minimize repetition, to allow for future rework, and to ensure > regularity of the various atomic APIs, we'd like to automatically > generate (the bulk of) a number of headers related to atomics. > > This patch adds the infrastructure t

Re: [PATCHv3 1/6] atomics: add common header generation files

2018-11-15 Thread Andrew Morton
ripts/atomic/gen-atomic-long.sh: Permission denied scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-fallback.sh: Permission denied From: Andrew Morton Subject: scripts/atomic/check-atomics.sh: don't assume that scripts are executable patch(1) doesn't set the x bit o

Re: [PATCH AUTOSEL 3.18 8/9] mm/vmstat.c: assert that vmstat_text is in sync with stat_items_size

2018-11-15 Thread Andrew Morton
On Thu, 15 Nov 2018 17:37:18 -0500 Sasha Levin wrote: > On Thu, Nov 15, 2018 at 02:08:10PM -0800, Andrew Morton wrote: > >On Tue, 13 Nov 2018 00:52:51 -0500 Sasha Levin wrote: > > > >> From: Jann Horn > >> > >> [ Upstream commit f0ecf25a093fc0589f0a6

Re: [PATCH V4] binder: ipc namespace support for android binder

2018-11-15 Thread Andrew Morton
, it's mainly an android patch so I suggest this be taken via the android tree. Acked-by: Andrew Morton

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Andrew Morton
On Mon, 12 Nov 2018 12:57:34 +0300 Pavel Tikhomirov wrote: > If all pages are deleted from the mapping by memory reclaim and also > moved to the cleancache: > > __delete_from_page_cache > (no shadow case) > unaccount_page_cache_page > cleancache_put_page > page_cache_delete > mapp

Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Andrew Morton
On Mon, 12 Nov 2018 12:31:53 +0100 Jan Kara wrote: > > mm/truncate.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > The patch looks good but can you add a short comment before the > truncate_inode_pages() call explaining why it needs to be called always? > Something like: >

Re: [PATCH AUTOSEL 3.18 8/9] mm/vmstat.c: assert that vmstat_text is in sync with stat_items_size

2018-11-15 Thread Andrew Morton
On Tue, 13 Nov 2018 00:52:51 -0500 Sasha Levin wrote: > From: Jann Horn > > [ Upstream commit f0ecf25a093fc0589f0a6bc4c1ea068bbb67d220 ] > > Having two gigantic arrays that must manually be kept in sync, including > ifdefs, isn't exactly robust. To make it easier to catch such issues in > the

Re: [PATCH] mm: use managed_zone() for more exact check in zone iteration

2018-11-15 Thread Andrew Morton
On Thu, 15 Nov 2018 07:50:40 +0800 Wei Yang wrote: > For one zone, there are three digits to describe its space range: > > spanned_pages > present_pages > managed_pages > > The detailed meaning is written in include/linux/mmzone.h. This patch > concerns about the last two. > >

Re: [RFC PATCH 1/1] vmalloc: add test driver to analyse vmalloc allocator

2018-11-15 Thread Andrew Morton
On Thu, 15 Nov 2018 05:47:06 -0800 Matthew Wilcox wrote: > On Thu, Nov 15, 2018 at 01:57:50PM +0100, Michal Hocko wrote: > > On Thu 15-11-18 00:46:42, Matthew Wilcox wrote: > > > How about adding > > > > > > #ifdef CONFIG_VMALLOC_TEST > > > int run_internal_vmalloc_tests(void) > > > { > > > ...

Re: [RFC PATCH] mm, memory_hotplug: do not clear numa_node association after hot_remove

2018-11-14 Thread Andrew Morton
On Wed, 14 Nov 2018 08:14:42 +0100 Michal Hocko wrote: > It seems there were no objections here. So can we have it in linux-next > for a wider testing a possibly target the next merge window? > top-posting sucks! I already have this queued for 4.21-rc1.

Re: [RFC PATCH 1/1] vmalloc: add test driver to analyse vmalloc allocator

2018-11-14 Thread Andrew Morton
On Wed, 14 Nov 2018 16:17:37 +0100 Michal Hocko wrote: > On Tue 13-11-18 14:10:46, Andrew Morton wrote: > [...] > > > +static int vmalloc_test_init(void) > > > +{ > > > + __my_vmalloc_node_range = > > > + (void *) kallsyms_lookup_name(&

Re: [PATCH 2/2] fs/epoll: deal with wait_queue only once

2018-11-14 Thread Andrew Morton
On Wed, 14 Nov 2018 10:25:32 -0800 Davidlohr Bueso wrote: > There is no reason why we rearm the waitiqueue upon every > fetch_events retry (for when events are found yet send_events() > fails). If nothing else, this saves four lock operations per > retry, and furthermore reduces the scope of the

Re: UBSAN: Undefined behaviour in mm/page_alloc.c

2018-11-13 Thread Andrew Morton
On Wed, 14 Nov 2018 00:23:28 +0100 Vlastimil Babka wrote: > On 11/14/18 12:15 AM, Andrew Morton wrote: > > On Tue, 13 Nov 2018 10:43:05 +0100 Michal Hocko wrote: > > > >> --- a/mm/page_alloc.c > >> +++ b/mm/page_alloc.c > >> @@ -4364,6 +4353,1

Re: UBSAN: Undefined behaviour in mm/page_alloc.c

2018-11-13 Thread Andrew Morton
On Tue, 13 Nov 2018 10:43:05 +0100 Michal Hocko wrote: > From: Michal Hocko > Date: Fri, 9 Nov 2018 09:35:29 +0100 > Subject: [PATCH] mm, page_alloc: check for max order in hot path > > Konstantin has noticed that kvmalloc might trigger the following warning > [Thu Nov 1 08:43:56 2018] WARNING

Re: UBSAN: Undefined behaviour in mm/page_alloc.c

2018-11-13 Thread Andrew Morton
On Tue, 13 Nov 2018 10:43:05 +0100 Michal Hocko wrote: > Konstantin has noticed that kvmalloc might trigger the following warning > [Thu Nov 1 08:43:56 2018] WARNING: CPU: 0 PID: 6676 at mm/vmstat.c:986 > __fragmentation_index+0x54/0x60 > [...] > [Thu Nov 1 08:43:56 2018] Call Trace: > [Thu No

Re: [RFC PATCH 1/1] vmalloc: add test driver to analyse vmalloc allocator

2018-11-13 Thread Andrew Morton
On Tue, 13 Nov 2018 16:16:29 +0100 "Uladzislau Rezki (Sony)" wrote: > This adds a new kernel module for analysis of vmalloc allocator. It is > only enabled as a module. There are two main reasons this module should > be used for. Those are performance evaluation and stressing of vmalloc > subsys

Re: [PATCH 2/2] exec: increase BINPRM_BUF_SIZE to 256

2018-11-13 Thread Andrew Morton
On Tue, 13 Nov 2018 17:55:58 +0100 Oleg Nesterov wrote: > > However it would be basically cost-free to increase > > BINPRM_BUF_SIZE up to the point where sizeof(struct linux_binprm) == > > PAGE_SIZE? > > I don't think we should take sizeof(struct linux_binprm) into account, the > new members can

Re: [PATCH 2/2] exec: increase BINPRM_BUF_SIZE to 256

2018-11-12 Thread Andrew Morton
On Mon, 12 Nov 2018 17:09:56 +0100 Oleg Nesterov wrote: > Large enterprise clients often times run applications out of networked > file systems where the IT mandated layout of project volumes can end up > leading to paths that are longer than 128 characters. Bumping this up to > the next order of

Re: [PATCH v3] ksm: Assist buddy allocator to assemble 1-order pages

2018-11-09 Thread Andrew Morton
On Fri, 19 Oct 2018 15:33:39 +0300 Kirill Tkhai wrote: > v3: Comment improvements. > v2: Style improvements. > > try_to_merge_two_pages() merges two pages, one of them > is a page of currently scanned mm, the second is a page > with identical hash from unstable tree. Currently, we > merge the pa

Re: [PATCH v3 resend 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-11-09 Thread Andrew Morton
On Wed, 7 Nov 2018 20:15:36 -0800 "Joel Fernandes (Google)" wrote: > Android uses ashmem for sharing memory regions. We are looking forward > to migrating all usecases of ashmem to memfd so that we can possibly > remove the ashmem driver in the future from staging while also > benefiting from u

Re: [PATCH] slab.h: Avoid using & for logical and of booleans

2018-11-09 Thread Andrew Morton
s to compile without a branch or cmov by itself. > > The result should be more readable, without a sparse warning and probably also > faster for the common case. > > Reported-by: Bart Van Assche > Reported-by: Darryl T. Agostinelli > Suggested-by: Andrew Morton > Suggeste

Re: [PATCH v2 3/3] slab: use logical instead of bitwise operation in kmalloc_type()

2018-11-09 Thread Andrew Morton
On Fri, 9 Nov 2018 10:35:34 +0100 Johannes Berg wrote: > The operation here really is more logical than bitwise, even if > due to the setup the bitwise operation works fine. However, this > causes a complaint from sparse that the operation doesn't really > make sense due to the not. > > Use a

Re: [PATCH] mm:vmalloc add vm_struct for vm_map_ram

2018-11-08 Thread Andrew Morton
On Thu, 8 Nov 2018 19:14:49 +0800 Zhaoyang Huang wrote: > There is no caller and pages information etc for the area which is > created by vm_map_ram as well as the page count > VMAP_MAX_ALLOC. > Add them on in this commit. Well I can kind of see what this is doing - it increases the amount of

Re: [PATCH] z3fold: fix wrong handling of headless pages

2018-11-08 Thread Andrew Morton
On Thu, 8 Nov 2018 22:45:40 +0900 Jongseok Kim wrote: > Yes, you are right. > I think that's the best way to deal it. > Thank you. I did this: Link: http://lkml.kernel.org/r/20181105162225.74e8837d03583a9b707cf...@gmail.com Signed-off-by: Vitaly Wool Signed-off-by: Jongseok Kim Reported-by-

Re: [Bug 201637] New: hangup sinse 'x86/mm: Expand static page table for fixmap space' with CONFIG_RANDOMIZE_BASE enabled

2018-11-08 Thread Andrew Morton
(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Thu, 08 Nov 2018 13:48:25 + bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=201637 > > Bug ID: 201637 >Summary: hangup sins

Re: [LKP] d50d82faa0 [ 33.671845] WARNING: possible circular locking dependency detected

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 15:43:36 -0800 Andrew Morton wrote: > On Tue, 23 Oct 2018 08:30:04 +0800 kernel test robot > wrote: > > > Greetings, > > > > 0day kernel testing robot got the below dmesg and the first bad commit is > > > > https://git.kerne

Re: [LKP] d50d82faa0 [ 33.671845] WARNING: possible circular locking dependency detected

2018-11-07 Thread Andrew Morton
fer-16) failed with error -17 > > Link: > http://lkml.kernel.org/r/alpine.lrh.2.02.1806151817130.6...@file01.intranet.prod.int.rdu2.redhat.com > Signed-off-by: Mikulas Patocka > Reported-by: Mike Snitzer > Tested-by: Mike Snitzer > Cc: Christoph Lame

Re: [PATCH] scripts/spdxcheck: make python3 compliant

2018-11-07 Thread Andrew Morton
On Tue, 23 Oct 2018 09:08:02 +0200 Uwe Kleine-König wrote: > Without this change the following happens when using Python3 (3.6.6): > > $ echo "GPL-2.0" | python3 scripts/spdxcheck.py - > FAIL: 'str' object has no attribute 'decode' > Traceback (most recent call last): >

Re: [PATCH] z3fold: encode object length in the handle

2018-11-07 Thread Andrew Morton
On Mon, 29 Oct 2018 13:27:36 +0100 Vitaly Wool wrote: > Hi Andrew, > > Den tors 25 okt. 2018 kl 21:42 skrev Andrew Morton < > a...@linux-foundation.org>: > > > On Thu, 25 Oct 2018 11:28:21 +0200 Vitaly Wool > > wrote: > > > > > Reclaim and f

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 01:48:12 + chouryzhou(周威) wrote: > > > --- a/ipc/namespace.c > > > +++ b/ipc/namespace.c > > > @@ -56,6 +56,9 @@ static struct ipc_namespace *create_ipc_ns(struct > > user_namespace *user_ns, > > > ns->ucounts = ucounts; > > > > > > err = mq_init_ns(ns); > >

Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 08:21:07 +0200 Alexey Skidanov wrote: > > Why does this need "fixing"? Are there current callers which can > > misalign chunk_start_addr? Or is there a requirement that future > > callers can misalign chunk_start_addr? > > > I work on adding aligned allocation support for I

Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 08:27:31 +0200 Alexey Skidanov wrote: > > > On 11/7/18 12:15 AM, Andrew Morton wrote: > > On Tue, 6 Nov 2018 14:20:53 +0200 Alexey Skidanov > > wrote: > > > >> On success, gen_pool_first_fit_align() returns the bit number such that &

Re: [RFC PATCH 4/5] mm, memory_hotplug: print reason for the offlining failure

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 11:18:29 +0100 Michal Hocko wrote: > From: Michal Hocko > > The memory offlining failure reporting is inconsistent and insufficient. > Some error paths simply do not report the failure to the log at all. > When we do report there are no details about the reason of the failur

Re: [PATCH v2] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 17:45:16 +0300 Andrey Ryabinin wrote: > From: Arnd Bergmann > > gcc-8 complains about the prototype for this function: > > lib/ubsan.c:432:1: error: ignoring attribute 'noreturn' in declaration of a > built-in function '__ubsan_handle_builtin_unreachable' because it confl

Re: [PATCH 2/2] mm/sparse: add common helper to mark all memblocks present

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 13:36:34 -0700 Logan Gunthorpe wrote: > > Actually if both names suck, then there also is the option to rename both > > instead of adding a comment to explain the suckage. > > Ok, well, I wasn't expecting to take on a big rename like that as it > would create a patch touching

Re: [PATCH 1/2] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define

2018-11-07 Thread Andrew Morton
ge_alignment; > > +/* > + * Used for sizing the vmemmap region on some architectures > + */ > +#define STRUCT_PAGE_MAX_SHIFT(order_base_2(sizeof(struct page))) Much better. Acked-by: Andrew Morton

Re: [PATCH 2/2] mm/sparse: add common helper to mark all memblocks present

2018-11-07 Thread Andrew Morton
memblock_region_memory_end_pfn(reg)); > + } > +} > + I don't like the name much. To me, memblocks_present means "are memblocks present" whereas this actually means "memblocks are present". But whatever. A little covering comment which desc

Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-06 Thread Andrew Morton
On Fri, 26 Oct 2018 16:30:58 +0530 Arun KS wrote: > This series convert totalram_pages, totalhigh_pages and > zone->managed_pages to atomic variables. The whole point appears to be removal of managed_page_count_lock, yes? Why? What is the value of this patchset? If "performance" then are any

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-06 Thread Andrew Morton
On Mon, 29 Oct 2018 06:18:11 + chouryzhou(周威) wrote: > We are working for running android in container, but we found that binder is > not isolated by ipc namespace. Since binder is a form of IPC and therefore > should > be tied to ipc namespace. With this patch, we can run more than one a

Re: [PATCH] fs/proc: introduce /proc/stat2 file

2018-11-06 Thread Andrew Morton
On Mon, 29 Oct 2018 23:04:45 + Daniel Colascione wrote: > On Mon, Oct 29, 2018 at 7:25 PM, Davidlohr Bueso wrote: > > This patch introduces a new /proc/stat2 file that is identical to the > > regular 'stat' except that it zeroes all hard irq statistics. The new > > file is a drop in replacem

Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk

2018-11-06 Thread Andrew Morton
On Tue, 6 Nov 2018 14:20:53 +0200 Alexey Skidanov wrote: > On success, gen_pool_first_fit_align() returns the bit number such that > chunk_start_addr + (bit << order) is properly aligned. On failure, > the bitmap size parameter is returned. > > When the chunk_start_addr isn't aligned properly,

Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk

2018-11-06 Thread Andrew Morton
On Tue, 6 Nov 2018 14:20:53 +0200 Alexey Skidanov wrote: > On success, gen_pool_first_fit_align() returns the bit number such that > chunk_start_addr + (bit << order) is properly aligned. On failure, > the bitmap size parameter is returned. > > When the chunk_start_addr isn't aligned properly,

Re: [PATCH v4] mm/page_owner: clamp read count to PAGE_SIZE

2018-11-06 Thread Andrew Morton
On Thu, 1 Nov 2018 18:41:33 -0600 William Kucharski wrote: > > > > On Nov 1, 2018, at 3:47 PM, Andrew Morton wrote: > > > > - count = count > PAGE_SIZE ? PAGE_SIZE : count; > > + count = min_t(size_t, count, PAGE_SIZE); > > kbuf = kmallo

Re: [PATCH v8 4/4] Kselftest for module text allocation benchmarking

2018-11-06 Thread Andrew Morton
On Fri, 2 Nov 2018 12:25:20 -0700 Rick Edgecombe wrote: > This adds a test module in lib/, and a script in kselftest that does > benchmarking on the allocation of memory in the module space. Performance here > would have some small impact on kernel module insertions, BPF JIT insertions > and kp

Re: [PATCH v8 2/4] x86/modules: Increase randomization for modules

2018-11-06 Thread Andrew Morton
On Fri, 2 Nov 2018 12:25:18 -0700 Rick Edgecombe wrote: > This changes the behavior of the KASLR logic for allocating memory for the > text > sections of loadable modules. It randomizes the location of each module text > section with about 17 bits of entropy in typical use. This is enabled on

<    7   8   9   10   11   12   13   14   15   16   >