From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754375AbcHWT3a (ORCPT ); Tue, 23 Aug 2016 15:29:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33326 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752758AbcHWT31 (ORCPT ); Tue, 23 Aug 2016 15:29:27 -0400 From: Josh Poimboeuf To: Linus Torvalds Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park , Nilay Vaish Subject: [PATCH 2/2] mm/usercopy: enable usercopy size checking for modern versions of gcc Date: Tue, 23 Aug 2016 14:28:28 -0500 Message-Id: In-Reply-To: <20160823160629.pgnwzl65zji5l76w@treble> References: <20160823160629.pgnwzl65zji5l76w@treble> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 23 Aug 2016 19:28:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a revert of: 2fb0815c9ee6 ("gcc4: disable __compiletime_object_size for GCC 4.6+") The goal of that commit was to silence the "provably correct" gcc warnings. But it went too far: it also disabled the runtime warnings. Now that the pretty much useless gcc warnings have been properly disposed of with the previous patch, re-enable this checking on modern versions of gcc so we can get the runtime warnings again. Signed-off-by: Josh Poimboeuf --- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index e294939..e7f7a68 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -158,7 +158,7 @@ #define __compiler_offsetof(a, b) \ __builtin_offsetof(a, b) -#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 +#if GCC_VERSION >= 40100 # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) #endif -- 2.7.4