Re: [PATCH v3 2/2] fs/fcntl: f_setown, avoid undefined behaviour

2017-06-13 Thread zhong jiang
On 2017/6/13 20:13, Jeff Layton wrote: > On Tue, 2017-06-13 at 13:35 +0200, Jiri Slaby wrote: >> fcntl(0, F_SETOWN, 0x8000) triggers: >> UBSAN: Undefined behaviour in fs/fcntl.c:118:7 >> negation of -2147483648 cannot be represented in type 'int': >> CPU: 1 PID: 18261 Comm: syz-executor Not tai

Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write mem

2017-05-01 Thread zhong jiang
ping anyone has any objections. On 2017/4/27 19:49, zhongjiang wrote: > From: zhong jiang > > Recently, I found the following issue, it will result in the panic. > > [ 168.739152] mmap1: Corrupted page table at address 7f3e6275a002 > [ 168.745039] PGD 61f4a1067 &g

Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write mem

2017-05-02 Thread zhong jiang
On 2017/5/3 4:54, David Rientjes wrote: > On Thu, 27 Apr 2017, zhongjiang wrote: > >> From: zhong jiang >> >> Recently, I found the following issue, it will result in the panic. >> >> [ 168.739152] mmap1: Corrupted page table at address 7f3e6275

Re: [PATCH] mm: correct the comment when reclaimed pages exceed the scanned pages

2017-06-07 Thread zhong jiang
On 2017/6/7 16:31, zhongjiang wrote: > The commit e1587a494540 ("mm: vmpressure: fix sending wrong events on > underflow") declare that reclaimed pages exceed the scanned pages due > to the thp reclaim. it is incorrect because THP will be spilt to normal > page and loop again. which will result in

Re: mm, something wring in page_lock_anon_vma_read()?

2017-06-08 Thread zhong jiang
On 2017/6/8 21:59, Vlastimil Babka wrote: > On 06/08/2017 03:44 PM, Xishi Qiu wrote: >> On 2017/5/23 17:33, Vlastimil Babka wrote: >> >>> On 05/23/2017 11:21 AM, zhong jiang wrote: >>>> On 2017/5/23 0:51, Vlastimil Babka wrote: >>>>> On 05/20/20

Re: [PATCH] mm: correct the comment when reclaimed pages exceed the scanned pages

2017-06-08 Thread zhong jiang
On 2017/6/8 14:46, Minchan Kim wrote: > On Wed, Jun 07, 2017 at 04:31:06PM +0800, zhongjiang wrote: >> The commit e1587a494540 ("mm: vmpressure: fix sending wrong events on >> underflow") declare that reclaimed pages exceed the scanned pages due >> to the thp reclaim. it is incorrect because THP wi

Re: [PATCH] signal: Avoid undefined behaviour in kill_something_info

2017-06-05 Thread zhong jiang
On 2017/6/5 20:37, Oleg Nesterov wrote: > On 06/05, zhongjiang wrote: >> static int kill_something_info(int sig, struct siginfo *info, pid_t pid) >> { >> -int ret; >> +int ret, vpid; >> >> if (pid > 0) { >> rcu_read_lock(); >> @@ -1395,8 +1395,12 @@ static int kill_som

Re: [PATCH v2] signal: Avoid undefined behaviour in kill_something_info

2017-06-05 Thread zhong jiang
On 2017/6/5 21:09, Michal Hocko wrote: > On Mon 05-06-17 20:53:27, zhongjiang wrote: >> diff --git a/kernel/signal.c b/kernel/signal.c >> index ca92bcf..63148f7 100644 >> --- a/kernel/signal.c >> +++ b/kernel/signal.c >> @@ -1395,6 +1395,12 @@ static int kill_something_info(int sig, struct >> sigi

Re: [PATCH v2] signal: Avoid undefined behaviour in kill_something_info

2017-06-05 Thread zhong jiang
On 2017/6/5 21:31, Oleg Nesterov wrote: > On 06/05, zhongjiang wrote: >> --- a/kernel/signal.c >> +++ b/kernel/signal.c >> @@ -1395,6 +1395,12 @@ static int kill_something_info(int sig, struct >> siginfo *info, pid_t pid) >> >> read_lock(&tasklist_lock); >> if (pid != -1) { >> +

Re: [PATCH] fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found

2017-06-14 Thread zhong jiang
serland passed in an argument of 0. For anything else, we want to > return ESRCH if it doesn't refer to a valid pid. > > The relevant POSIX spec page is here: > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html > > Cc: Jiri Slaby > Cc: zhon

Re: [HMM 07/15] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v3

2017-06-14 Thread zhong jiang
On 2017/5/25 1:20, Jérôme Glisse wrote: > HMM (heterogeneous memory management) need struct page to support migration > from system main memory to device memory. Reasons for HMM and migration to > device memory is explained with HMM core patch. > > This patch deals with device memory that is un-ad

Re: [PATCH] x86/mm: Don't reenter flush_tlb_func_common()

2017-06-19 Thread zhong jiang
On 2017/6/19 12:48, Andy Lutomirski wrote: > It was historically possible to have two concurrent TLB flushes > targeting the same CPU: one initiated locally and one initiated > remotely. This can now cause an OOPS in leave_mm() at > arch/x86/mm/tlb.c:47: > > if (this_cpu_read(cpu_tlbstate.

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-12-01 Thread zhong jiang
+cc more mm maintainer. Any one has any object. please let me know. Thanks zhongjiang On 2017/11/29 17:13, zhong jiang wrote: > Currently, Arm64 and x86 use the common code wehn parsing numa node > in a acpi way. The arm64 will set the parsed node in numa_add_memblk, > but the x86 i

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-12-01 Thread zhong jiang
On 2017/12/1 16:58, Michal Hocko wrote: > On Fri 01-12-17 16:48:25, zhong jiang wrote: >> +cc more mm maintainer. >> >> Any one has any object. please let me know. > Please repost with the changelog which actually tells 1) what is the > problem 2) why do we need to

[RESEND] x86/numa: move setting parsed numa node to num_add_memblk

2017-12-01 Thread zhong jiang
emblk node. Signed-off-by: zhong jiang --- arch/x86/mm/amdtopology.c | 1 - arch/x86/mm/numa.c| 3 ++- drivers/acpi/numa.c | 5 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/amdtopology.c b/arch/x86/mm/amdtopology.c index 91f501b..7657042 100644 ---

[PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-11-29 Thread zhong jiang
it although it also still works. because the parsed node is unresonable. so we should skip related operate in this node. This patch just set node in various architecture individually. it is no functional change. Signed-off-by: zhong jiang --- arch/x86/mm/amdtopology.c | 1 - arch/x86/mm/numa.c

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-11-29 Thread zhong jiang
On 2017/11/29 20:03, Michal Hocko wrote: > On Wed 29-11-17 17:13:27, zhong jiang wrote: >> Currently, Arm64 and x86 use the common code wehn parsing numa node >> in a acpi way. The arm64 will set the parsed node in numa_add_memblk, >> but the x86 is not set in that , then

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-11-29 Thread zhong jiang
On 2017/11/29 21:01, Michal Hocko wrote: > On Wed 29-11-17 20:41:25, zhong jiang wrote: >> On 2017/11/29 20:03, Michal Hocko wrote: >>> On Wed 29-11-17 17:13:27, zhong jiang wrote: >>>> Currently, Arm64 and x86 use the common code wehn parsing numa node >>>

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-11-29 Thread zhong jiang
On 2017/11/29 21:33, Michal Hocko wrote: > On Wed 29-11-17 21:26:19, zhong jiang wrote: >> On 2017/11/29 21:01, Michal Hocko wrote: >>> On Wed 29-11-17 20:41:25, zhong jiang wrote: >>>> On 2017/11/29 20:03, Michal Hocko wrote: >>>>> On Wed 29-11-17

Re: [PATCH] x86/numa: move setting parse numa node to num_add_memblk

2017-11-29 Thread zhong jiang
On 2017/11/29 22:14, Dou Liyang wrote: > Hi Jiang, > > At 11/29/2017 09:44 PM, zhong jiang wrote: >> On 2017/11/29 21:33, Michal Hocko wrote: >>> On Wed 29-11-17 21:26:19, zhong jiang wrote: >>>> On 2017/11/29 21:01, Michal Hocko wrote: >>>>> On

Re: [RESEND] x86/numa: move setting parsed numa node to num_add_memblk

2017-12-11 Thread zhong jiang
On 2017/12/11 20:03, Michal Hocko wrote: > On Fri 01-12-17 18:13:52, zhong jiang wrote: >> The acpi table are very much like user input. it is likely to >> introduce some unreasonable node in some architecture. but >> they do not ingore the node and bail out in time.

Re: [PATCH v2 4/5] mm: memory_hotplug: Add memory hotremove probe device

2017-11-24 Thread zhong jiang
HI, Andrea I don't see "memory_add_physaddr_to_nid" in arch/arm64. Am I miss something? Thnaks zhongjiang On 2017/11/23 19:14, Andrea Reale wrote: > Adding a "remove" sysfs handle that can be used to trigger > memory hotremove manually, exactly simmetrically with > what happens with the "probe"

Re: [PATCH v2 4/5] mm: memory_hotplug: Add memory hotremove probe device

2017-11-24 Thread zhong jiang
t; On Fri 24 Nov 2017, 18:35, zhong jiang wrote: >> HI, Andrea >> >> I don't see "memory_add_physaddr_to_nid" in arch/arm64. >> Am I miss something? > When !CONFIG_NUMA it is defined in include/linux/memory_hotplug.h as 0. > In patch 1/5 of this series w

Re: [PATCH] z3fold: remove the unnecessary limit in z3fold_compact_page

2016-10-16 Thread zhong jiang
On 2016/10/15 3:25, Vitaly Wool wrote: > On Fri, Oct 14, 2016 at 3:35 PM, zhongjiang wrote: >> From: zhong jiang >> >> z3fold compact page has nothing with the last_chunks. even if >> last_chunks is not free, compact page will proceed. >> >> The patch j

Re: [PATCH v2] z3fold: fix the potential encode bug in encod_handle

2016-10-16 Thread zhong jiang
Hi, Vitaly About the following patch, is it right? Thanks zhongjiang On 2016/10/13 12:02, zhongjiang wrote: > From: zhong jiang > > At present, zhdr->first_num plus bud can exceed the BUDDY_MASK > in encode_handle, it will lead to the the caller handle_to_buddy > retu

Re: [PATCH v2] z3fold: fix the potential encode bug in encod_handle

2016-10-17 Thread zhong jiang
On 2016/10/17 20:03, Vitaly Wool wrote: > Hi Zhong Jiang, > > On Mon, Oct 17, 2016 at 3:58 AM, zhong jiang wrote: >> Hi, Vitaly >> >> About the following patch, is it right? >> >> Thanks >> zhongjiang >> On 2016/10/13 12:02, zhongjiang wro

Re: [PATCH v2] z3fold: fix the potential encode bug in encod_handle

2016-10-17 Thread zhong jiang
On 2016/10/17 20:03, Vitaly Wool wrote: > Hi Zhong Jiang, > > On Mon, Oct 17, 2016 at 3:58 AM, zhong jiang wrote: >> Hi, Vitaly >> >> About the following patch, is it right? >> >> Thanks >> zhongjiang >> On 2016/10/13 12:02, zhongjiang wro

Re: [PATCH v2] z3fold: fix the potential encode bug in encod_handle

2016-10-17 Thread zhong jiang
On 2016/10/17 23:30, Dan Streetman wrote: > On Mon, Oct 17, 2016 at 8:48 AM, zhong jiang wrote: >> On 2016/10/17 20:03, Vitaly Wool wrote: >>> Hi Zhong Jiang, >>> >>> On Mon, Oct 17, 2016 at 3:58 AM, zhong jiang wrote: >>>> Hi, Vitaly &

Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off enable

2016-08-20 Thread zhong jiang
On 2016/8/19 12:11, Ganapatrao Kulkarni wrote: > On Fri, Aug 19, 2016 at 9:30 AM, Ganapatrao Kulkarni > wrote: >> On Fri, Aug 19, 2016 at 7:28 AM, zhong jiang wrote: >>> On 2016/8/19 1:45, Ganapatrao Kulkarni wrote: >>>> On Thu, Aug 18, 2016 at 9:34 PM, Catalin

Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off enable

2016-08-23 Thread zhong jiang
On 2016/8/22 22:28, Catalin Marinas wrote: > On Sat, Aug 20, 2016 at 05:38:59PM +0800, zhong jiang wrote: >> On 2016/8/19 12:11, Ganapatrao Kulkarni wrote: >>> On Fri, Aug 19, 2016 at 9:30 AM, Ganapatrao Kulkarni >>> wrote: >>>> On Fri, Aug 19, 2016 at 7:28

[tip:x86/boot] x86/boot/KASLR: Make local variable mem_limit static

2018-07-30 Thread tip-bot for zhong jiang
Commit-ID: 5db1b1e1ee34871b1965b3f890e3ccbdb185fa52 Gitweb: https://git.kernel.org/tip/5db1b1e1ee34871b1965b3f890e3ccbdb185fa52 Author: zhong jiang AuthorDate: Mon, 30 Jul 2018 21:44:33 +0800 Committer: Thomas Gleixner CommitDate: Mon, 30 Jul 2018 19:46:03 +0200 x86/boot/KASLR: Make

[tip:core/debugobjects] debugobjects: Remove redundant NULL pointer check

2018-08-02 Thread tip-bot for Zhong Jiang
Commit-ID: 3ff4f80a74fd38398ae1bd8a458ba9c51aa0dd44 Gitweb: https://git.kernel.org/tip/3ff4f80a74fd38398ae1bd8a458ba9c51aa0dd44 Author: Zhong Jiang AuthorDate: Wed, 1 Aug 2018 00:24:58 +0800 Committer: Thomas Gleixner CommitDate: Thu, 2 Aug 2018 13:53:04 +0200 debugobjects: Remove

[tip:x86/platform] x86/platform/olpc: Use PTR_ERR_OR_ZERO()

2018-08-02 Thread tip-bot for zhong jiang
Commit-ID: c7ba9f7cb55926605983187a68624999b93abb94 Gitweb: https://git.kernel.org/tip/c7ba9f7cb55926605983187a68624999b93abb94 Author: zhong jiang AuthorDate: Wed, 1 Aug 2018 00:08:06 +0800 Committer: Thomas Gleixner CommitDate: Thu, 2 Aug 2018 14:25:40 +0200 x86/platform/olpc: Use

[tip:x86/cleanups] x86/iommu: Use NULL instead of 0

2018-08-02 Thread tip-bot for Zhong Jiang
Commit-ID: 0b2c1aec49ddb2260894df6c69ae7b34142ff936 Gitweb: https://git.kernel.org/tip/0b2c1aec49ddb2260894df6c69ae7b34142ff936 Author: Zhong Jiang AuthorDate: Sat, 21 Jul 2018 16:33:24 +0800 Committer: Thomas Gleixner CommitDate: Thu, 2 Aug 2018 14:33:19 +0200 x86/iommu: Use NULL

[tip:x86/mm] x86/mm/tlb: Make clear_asid_other() static

2018-07-24 Thread tip-bot for zhong jiang
Commit-ID: 387048f51aecaa083e660fe0f15ad339354b116e Gitweb: https://git.kernel.org/tip/387048f51aecaa083e660fe0f15ad339354b116e Author: zhong jiang AuthorDate: Sat, 21 Jul 2018 15:55:32 +0800 Committer: Ingo Molnar CommitDate: Tue, 24 Jul 2018 09:52:32 +0200 x86/mm/tlb: Make

[tip:x86/pti] x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION

2018-09-22 Thread tip-bot for zhong jiang
Commit-ID: 8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Gitweb: https://git.kernel.org/tip/8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Author: zhong jiang AuthorDate: Thu, 13 Sep 2018 10:49:45 +0800 Committer: Borislav Petkov CommitDate: Sat, 15 Sep 2018 14:57:05 +0200 x86/CPU: Fix unused

[tip:sched/core] sched/topology: Make local variables static

2018-09-10 Thread tip-bot for zhong jiang
Commit-ID: ace8031099f91480799b5929b4cccf2dcacc5136 Gitweb: https://git.kernel.org/tip/ace8031099f91480799b5929b4cccf2dcacc5136 Author: zhong jiang AuthorDate: Fri, 3 Aug 2018 20:37:32 +0800 Committer: Ingo Molnar CommitDate: Mon, 10 Sep 2018 15:10:57 +0200 sched/topology: Make local

<    1   2   3   4   5