From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933435AbcHBDhB (ORCPT ); Mon, 1 Aug 2016 23:37:01 -0400 Received: from ozlabs.org ([103.22.144.67]:34378 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933371AbcHBDgx (ORCPT ); Mon, 1 Aug 2016 23:36:53 -0400 From: Michael Ellerman To: Jason Cooper , Kees Cook Cc: "Roberts\, William C" , Yann Droneaud , Linux-MM , LKML , "kernel-hardening\@lists.openwall.com" , Russell King - ARM Linux , Andrew Morton , "Theodore Ts'o" , Arnd Bergmann , Greg KH , Catalin Marinas , Will Deacon , Ralf Baechle , "benh\@kernel.crashing.org" , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86\@kernel.org" , Al Viro , Nick Kralevich , Jeffrey Vander Stoep , Daniel Cashman Subject: Re: [kernel-hardening] Re: [PATCH v2 1/7] random: Simplify API for random address requests In-Reply-To: <20160801231723.GG4541@io.lakedaemon.net> References: <20160728204730.27453-1-jason@lakedaemon.net> <20160730154244.403-1-jason@lakedaemon.net> <20160730154244.403-2-jason@lakedaemon.net> <20160731205632.GY4541@io.lakedaemon.net> <20160801231723.GG4541@io.lakedaemon.net> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Tue, 02 Aug 2016 13:35:13 +1000 Message-ID: <878twfonbi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jason Cooper writes: > On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: >> On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: >> >> I have no new call sites in mind, but it seems safe to add a BUG_ON to >> verify we don't gain callers that don't follow the correct >> expectations. (Or maybe WARN and return start.) > > No, I think BUG_ON is appropriate. afaict, the only time this will be > encountered is during the development process. Unless it's not. Why crash someone's system when you could just page align the value you're given? cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id 50D836B0005 for ; Mon, 1 Aug 2016 23:35:17 -0400 (EDT) Received: by mail-oi0-f72.google.com with SMTP id u142so340491382oia.2 for ; Mon, 01 Aug 2016 20:35:17 -0700 (PDT) Received: from ozlabs.org (ozlabs.org. [103.22.144.67]) by mx.google.com with ESMTPS id 37si812872ios.241.2016.08.01.20.35.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 20:35:16 -0700 (PDT) From: Michael Ellerman Subject: Re: [kernel-hardening] Re: [PATCH v2 1/7] random: Simplify API for random address requests In-Reply-To: <20160801231723.GG4541@io.lakedaemon.net> References: <20160728204730.27453-1-jason@lakedaemon.net> <20160730154244.403-1-jason@lakedaemon.net> <20160730154244.403-2-jason@lakedaemon.net> <20160731205632.GY4541@io.lakedaemon.net> <20160801231723.GG4541@io.lakedaemon.net> Date: Tue, 02 Aug 2016 13:35:13 +1000 Message-ID: <878twfonbi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Jason Cooper , Kees Cook Cc: "Roberts, William C" , Yann Droneaud , Linux-MM , LKML , "kernel-hardening@lists.openwall.com" , Russell King - ARM Linux , Andrew Morton , Theodore Ts'o , Arnd Bergmann , Greg KH , Catalin Marinas , Will Deacon , Ralf Baechle , "benh@kernel.crashing.org" , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , Al Viro , Nick Kralevich , Jeffrey Vander Stoep , Daniel Cashman Jason Cooper writes: > On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: >> On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: >> >> I have no new call sites in mind, but it seems safe to add a BUG_ON to >> verify we don't gain callers that don't follow the correct >> expectations. (Or maybe WARN and return start.) > > No, I think BUG_ON is appropriate. afaict, the only time this will be > encountered is during the development process. Unless it's not. Why crash someone's system when you could just page align the value you're given? cheers -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com From: Michael Ellerman In-Reply-To: <20160801231723.GG4541@io.lakedaemon.net> References: <20160728204730.27453-1-jason@lakedaemon.net> <20160730154244.403-1-jason@lakedaemon.net> <20160730154244.403-2-jason@lakedaemon.net> <20160731205632.GY4541@io.lakedaemon.net> <20160801231723.GG4541@io.lakedaemon.net> Date: Tue, 02 Aug 2016 13:35:13 +1000 Message-ID: <878twfonbi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [kernel-hardening] Re: [PATCH v2 1/7] random: Simplify API for random address requests To: Jason Cooper , Kees Cook Cc: "Roberts, William C" , Yann Droneaud , Linux-MM , LKML , "kernel-hardening@lists.openwall.com" , Russell King - ARM Linux , Andrew Morton , Theodore Ts'o , Arnd Bergmann , Greg KH , Catalin Marinas , Will Deacon , Ralf Baechle , "benh@kernel.crashing.org" , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , Al Viro , Nick Kralevich , Jeffrey Vander Stoep , Daniel Cashman List-ID: Jason Cooper writes: > On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: >> On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: >> >> I have no new call sites in mind, but it seems safe to add a BUG_ON to >> verify we don't gain callers that don't follow the correct >> expectations. (Or maybe WARN and return start.) > > No, I think BUG_ON is appropriate. afaict, the only time this will be > encountered is during the development process. Unless it's not. Why crash someone's system when you could just page align the value you're given? cheers