From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753148AbdF3VyV (ORCPT ); Fri, 30 Jun 2017 17:54:21 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:35594 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbdF3VyU (ORCPT ); Fri, 30 Jun 2017 17:54:20 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170630160450.4093529-1-arnd@arndb.de> From: Kees Cook Date: Fri, 30 Jun 2017 14:54:18 -0700 X-Google-Sender-Auth: MEPA7VM5hoY_LrTHrZHHWAo1ffs Message-ID: Subject: Re: [PATCH v2] ARM: fix randomized task_struct To: Arnd Bergmann Cc: "kernel-hardening@lists.openwall.com" , Russell King , Will Deacon , "linux-arm-kernel@lists.infradead.org" , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook wrote: > On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann wrote: >> With the new task struct randomization, we can run into a build >> failure for certain random seeds: >> >> arch/arm/kernel/entry-armv.S: Assembler messages: >> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096) >> >> Only two constants in asm-offset.h are affected, and I'm changing >> both of them here to work correctly in all configurations. >> >> One more macro has the problem, but is currently unused, so this >> removes it instead of adding complexity. >> >> Suggested-by: Ard Biesheuvel >> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout") >> Signed-off-by: Arnd Bergmann > > Looks great, thanks! > > Reviewed-by: Kees Cook > > Russell, if you're happy with it can you Ack this? I'd like to carry > the change in the randstruct tree (so all the dependencies are in the > same tree). I've also forced stack_canary into the end of task_struct and inflated the size of the struct (to match randomization inflation due to intentionally poor bitfield packing), verified the resulting .o files have the adjustment and boot tested both cases. Tested-by: Kees Cook -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 From: keescook@chromium.org (Kees Cook) Date: Fri, 30 Jun 2017 14:54:18 -0700 Subject: [PATCH v2] ARM: fix randomized task_struct In-Reply-To: References: <20170630160450.4093529-1-arnd@arndb.de> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook wrote: > On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann wrote: >> With the new task struct randomization, we can run into a build >> failure for certain random seeds: >> >> arch/arm/kernel/entry-armv.S: Assembler messages: >> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096) >> >> Only two constants in asm-offset.h are affected, and I'm changing >> both of them here to work correctly in all configurations. >> >> One more macro has the problem, but is currently unused, so this >> removes it instead of adding complexity. >> >> Suggested-by: Ard Biesheuvel >> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout") >> Signed-off-by: Arnd Bergmann > > Looks great, thanks! > > Reviewed-by: Kees Cook > > Russell, if you're happy with it can you Ack this? I'd like to carry > the change in the randstruct tree (so all the dependencies are in the > same tree). I've also forced stack_canary into the end of task_struct and inflated the size of the struct (to match randomization inflation due to intentionally poor bitfield packing), verified the resulting .o files have the adjustment and boot tested both cases. Tested-by: Kees Cook -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Sender: keescook@google.com In-Reply-To: References: <20170630160450.4093529-1-arnd@arndb.de> From: Kees Cook Date: Fri, 30 Jun 2017 14:54:18 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: [kernel-hardening] Re: [PATCH v2] ARM: fix randomized task_struct To: Arnd Bergmann Cc: "kernel-hardening@lists.openwall.com" , Russell King , Will Deacon , "linux-arm-kernel@lists.infradead.org" , LKML List-ID: On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook wrote: > On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann wrote: >> With the new task struct randomization, we can run into a build >> failure for certain random seeds: >> >> arch/arm/kernel/entry-armv.S: Assembler messages: >> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096) >> >> Only two constants in asm-offset.h are affected, and I'm changing >> both of them here to work correctly in all configurations. >> >> One more macro has the problem, but is currently unused, so this >> removes it instead of adding complexity. >> >> Suggested-by: Ard Biesheuvel >> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout") >> Signed-off-by: Arnd Bergmann > > Looks great, thanks! > > Reviewed-by: Kees Cook > > Russell, if you're happy with it can you Ack this? I'd like to carry > the change in the randstruct tree (so all the dependencies are in the > same tree). I've also forced stack_canary into the end of task_struct and inflated the size of the struct (to match randomization inflation due to intentionally poor bitfield packing), verified the resulting .o files have the adjustment and boot tested both cases. Tested-by: Kees Cook -Kees -- Kees Cook Pixel Security