From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbcHSBF3 (ORCPT ); Thu, 18 Aug 2016 21:05:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47733 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753928AbcHSBF0 (ORCPT ); Thu, 18 Aug 2016 21:05:26 -0400 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com Date: Thu, 18 Aug 2016 10:29:04 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Kees Cook , Laura Abbott , Daniel Micay , Joe Perches , Stephen Boyd , Syed Rameez Mustafa , Arnd Bergmann , Greg Kroah-Hartman , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , "Aneesh Kumar K.V" , "Kirill A. Shutemov" , Michael Ellerman , Andrew Morton , Dan Williams , Jan Kara , Thomas Gleixner , Josef Bacik , Ingo Molnar , Tejun Heo , Andrey Ryabinin , Nikolay Aleksandrov , Dmitry Vyukov , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH v3 0/5] bug: Provide toggle for BUG on data corruption Reply-To: paulmck@linux.vnet.ibm.com References: <1471470132-29499-1-git-send-email-keescook@chromium.org> <20160818094657.5572a19a@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160818094657.5572a19a@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16081817-0012-0000-0000-0000106ECA0F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005613; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000181; SDB=6.00746484; UDB=6.00351945; IPR=6.00519022; BA=6.00004668; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012379; XFM=3.00000011; UTC=2016-08-18 17:29:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16081817-0013-0000-0000-000044AABB24 Message-Id: <20160818172904.GS3482@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-18_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608180227 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 18, 2016 at 09:46:57AM -0400, Steven Rostedt wrote: > On Wed, 17 Aug 2016 14:42:07 -0700 > Kees Cook wrote: > > > This adds CONFIG_BUG_ON_DATA_CORRUPTION to trigger BUG()s when the kernel > > encounters unexpected data structure integrity as currently detected > > with CONFIG_DEBUG_LIST. > > > > Specifically list operations have been a target for widening flaws to gain > > "write anywhere" primitives for attackers, so this also consolidates the > > debug checking to avoid code and check duplication (e.g. RCU list debug > > was missing a check that got added to regular list debug). It also stops > > manipulations when corruption is detected, since worsening the corruption > > makes no sense. (Really, everyone should build with CONFIG_DEBUG_LIST > > since the checks are so inexpensive.) > > > > This is mostly a refactoring of similar code from PaX and Grsecurity, > > along with MSM kernel changes by Syed Rameez Mustafa. > > > > Along with the patches is a new lkdtm test to validate that setting > > CONFIG_DEBUG_LIST actually does what is desired. > > > > The series looks fine by me. > > Acked-by: Steven Rostedt Queued for further review and testing with Steven's Acked-by, thank you, Kees! Thanx, Paul > -- Steve > > > Thanks, > > > > -Kees > > > > v3: > > - fix MSM attribution, sboyd > > - use pr_err, joe > > > > v2: > > - consolidate printk/WARN/BUG/return logic into a CONFIG-specific macro > > - drop non-list BUGs, labbott >