Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbdGZCh5 (ORCPT ); Tue, 25 Jul 2017 22:37:57 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:38404 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbdGZCh4 (ORCPT ); Tue, 25 Jul 2017 22:37:56 -0400 Message-ID: <1501036672.1196.5.camel@gmail.com> Subject: Re: [lkp-robot] [include/linux/string.h] 6974f0c455: kernel_BUG_at_lib/string.c From: Daniel Micay To: Kees Cook , Linus Torvalds Cc: kernel test robot , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , Masami Hiramatsu , Arnd Bergmann , Mark Rutland , Daniel Axtens , Rasmus Villemoes , Andy Shevchenko , Chris Metcalf , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Andrew Morton , LKML , LKP , Joe Perches Date: Tue, 25 Jul 2017 22:37:52 -0400 In-Reply-To: References: <20170720014238.GH27396@yexl-desktop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.4 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 817 Lines: 14 It was known that there are going to be bugs to work through, many of them relatively benign like the leaks of data near string constants (probably other string constants) in rodata. It makes sense to have it default to WARN with BUG / noreturn as a non-default configuration option for it, I guess with !COMPILE_TEST like UBSAN_SANITIZE_ALL. I don't think there's any sane way to bound the length of either reads / writes. It needs to either WARN + continue on into doing the overflow or use BUG. Trying to correct it might make things worse and would make this more complicated / bug-prone. It already has enough subtle edge cases to deal with. I think 'benign' is a better term than 'false positive' because there hasn't been a non-bug found yet. They're mostly not security vulns but they're undefined behavior.