From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752010AbcBEJGz (ORCPT ); Fri, 5 Feb 2016 04:06:55 -0500 Received: from [69.252.207.38] ([69.252.207.38]:36234 "EHLO resqmta-ch2-06v.sys.comcast.net" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751206AbcBEJGw (ORCPT ); Fri, 5 Feb 2016 04:06:52 -0500 Date: Fri, 5 Feb 2016 03:06:30 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Joonsoo Kim cc: Andrew Morton , Pekka Enberg , David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slub: support left red zone In-Reply-To: <20160204062140.GB14877@js1304-P5Q-DELUXE> Message-ID: References: <1454566550-28288-1-git-send-email-iamjoonsoo.kim@lge.com> <20160204062140.GB14877@js1304-P5Q-DELUXE> Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Feb 2016, Joonsoo Kim wrote: > On Thu, Feb 04, 2016 at 03:15:50PM +0900, Joonsoo Kim wrote: > > SLUB already has red zone debugging feature. But, it is only positioned > > at the end of object(aka right red zone) so it cannot catch left oob. > > Although current object's right red zone acts as left red zone of > > previous object, first object in a slab cannot take advantage of > > Oops... s/previous/next. > > > this effect. This patch explicitly add left red zone to each objects > > to detect left oob more precisely. An access before the first object is an access outside of the page boundaries of a page allocated by the page allocator for the slab allocator since the first object starts at offset 0. And the page allocator debugging methods can catch that case. Do we really need this code? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by kanga.kvack.org (Postfix) with ESMTP id BEB834403D8 for ; Fri, 5 Feb 2016 04:06:32 -0500 (EST) Received: by mail-ig0-f175.google.com with SMTP id hb3so9626919igb.0 for ; Fri, 05 Feb 2016 01:06:32 -0800 (PST) Received: from resqmta-ch2-07v.sys.comcast.net (resqmta-ch2-07v.sys.comcast.net. [2001:558:fe21:29:69:252:207:39]) by mx.google.com with ESMTPS id x39si12202604ioi.207.2016.02.05.01.06.31 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 05 Feb 2016 01:06:31 -0800 (PST) Date: Fri, 5 Feb 2016 03:06:30 -0600 (CST) From: Christoph Lameter Subject: Re: [PATCH] mm/slub: support left red zone In-Reply-To: <20160204062140.GB14877@js1304-P5Q-DELUXE> Message-ID: References: <1454566550-28288-1-git-send-email-iamjoonsoo.kim@lge.com> <20160204062140.GB14877@js1304-P5Q-DELUXE> Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Joonsoo Kim Cc: Andrew Morton , Pekka Enberg , David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Thu, 4 Feb 2016, Joonsoo Kim wrote: > On Thu, Feb 04, 2016 at 03:15:50PM +0900, Joonsoo Kim wrote: > > SLUB already has red zone debugging feature. But, it is only positioned > > at the end of object(aka right red zone) so it cannot catch left oob. > > Although current object's right red zone acts as left red zone of > > previous object, first object in a slab cannot take advantage of > > Oops... s/previous/next. > > > this effect. This patch explicitly add left red zone to each objects > > to detect left oob more precisely. An access before the first object is an access outside of the page boundaries of a page allocated by the page allocator for the slab allocator since the first object starts at offset 0. And the page allocator debugging methods can catch that case. Do we really need this code? -- 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