From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: Re: [PATCH v3 04/13] mm: Track NR_KERNEL_STACK in KiB instead of number of stacks Date: Tue, 21 Jun 2016 12:46:25 +0300 Message-ID: <20160621094625.GA15970@esperanza> References: <053517e55aaf7ab1bbb7424abd89a1ac5535aa64.1466466093.git.luto@kernel.org> Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: <053517e55aaf7ab1bbb7424abd89a1ac5535aa64.1466466093.git.luto@kernel.org> To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Johannes Weiner , Michal Hocko , linux-mm@kvack.org List-Id: linux-arch.vger.kernel.org On Mon, Jun 20, 2016 at 04:43:34PM -0700, Andy Lutomirski wrote: > Currently, NR_KERNEL_STACK tracks the number of kernel stacks in a > zone. This only makes sense if each kernel stack exists entirely in > one zone, and allowing vmapped stacks could break this assumption. > > Since frv has THREAD_SIZE < PAGE_SIZE, we need to track kernel stack > allocations in a unit that divides both THREAD_SIZE and PAGE_SIZE on > all architectures. Keep it simple and use KiB. > > Cc: Vladimir Davydov > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: linux-mm@kvack.org > Signed-off-by: Andy Lutomirski Reviewed-by: Vladimir Davydov From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-db3on0130.outbound.protection.outlook.com ([157.55.234.130]:57301 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751491AbcFUKVZ (ORCPT ); Tue, 21 Jun 2016 06:21:25 -0400 Date: Tue, 21 Jun 2016 12:46:25 +0300 From: Vladimir Davydov Subject: Re: [PATCH v3 04/13] mm: Track NR_KERNEL_STACK in KiB instead of number of stacks Message-ID: <20160621094625.GA15970@esperanza> References: <053517e55aaf7ab1bbb7424abd89a1ac5535aa64.1466466093.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <053517e55aaf7ab1bbb7424abd89a1ac5535aa64.1466466093.git.luto@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Johannes Weiner , Michal Hocko , linux-mm@kvack.org Message-ID: <20160621094625.JQ9sJ48Y2OOmQjnCD6Jj_yb5zdNg_rogC24D3KKpMMA@z> On Mon, Jun 20, 2016 at 04:43:34PM -0700, Andy Lutomirski wrote: > Currently, NR_KERNEL_STACK tracks the number of kernel stacks in a > zone. This only makes sense if each kernel stack exists entirely in > one zone, and allowing vmapped stacks could break this assumption. > > Since frv has THREAD_SIZE < PAGE_SIZE, we need to track kernel stack > allocations in a unit that divides both THREAD_SIZE and PAGE_SIZE on > all architectures. Keep it simple and use KiB. > > Cc: Vladimir Davydov > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: linux-mm@kvack.org > Signed-off-by: Andy Lutomirski Reviewed-by: Vladimir Davydov