From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 049ECC433F5 for ; Thu, 28 Apr 2022 08:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243966AbiD1I12 (ORCPT ); Thu, 28 Apr 2022 04:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbiD1I11 (ORCPT ); Thu, 28 Apr 2022 04:27:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68C59D4DE; Thu, 28 Apr 2022 01:24:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 74A0D61F97; Thu, 28 Apr 2022 08:24:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FA10C385A0; Thu, 28 Apr 2022 08:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651134252; bh=7Qn4QH+TeAmEKVEjCdFVC71kSPqcGYshxtlJcIsHtmo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wWlT5w0nDXoBbWDRSYmJ9MTt/Ykz36DoTHIWkhyeVDYGkurfe27rq23L+lpr+3Hlc eKeGyJoTE0gLRmJuA3nUNCYtaBGmRI4j87gJa27jrO6FlijfGQEO43Y0nsMbsIGWJl DrN9OKf25kTv6t3fdxmZGFQ6AqrrnmkfIVkFaxyk= Date: Thu, 28 Apr 2022 10:24:09 +0200 From: Greg KH To: Arnd Bergmann Cc: Sai Prakash Ranjan , Catalin Marinas , Steven Rostedt , Linux ARM , linux-arm-msm , Linux Kernel Mailing List , Marc Zyngier , quic_psodagud@quicinc.com, quic_tsoni@quicinc.com, Will Deacon Subject: Re: [PATCHv11 6/6] asm-generic/io: Add logging support for MMIO accessors Message-ID: References: <3de35c9f4a3a070d197bab499acefc709a6f5336.1645772606.git.quic_saipraka@quicinc.com> <96dc5e2e-5d88-52ce-c295-779603e668f2@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Apr 28, 2022 at 10:18:36AM +0200, Arnd Bergmann wrote: > On Thu, Apr 28, 2022 at 9:35 AM Greg KH wrote: > > > > On Thu, Apr 28, 2022 at 12:59:13PM +0530, Sai Prakash Ranjan wrote: > > > On 4/28/2022 11:21 AM, Greg KH wrote: > > > > On Thu, Apr 28, 2022 at 09:00:13AM +0530, Sai Prakash Ranjan wrote: > > > > > -D__NO_FORTIFY, -D__DISABLE_EXPORTS, -DDISABLE_BRANCH_PROFILING". > > > > Those are compiler flags that affect gcc, not kernel code functionality. > > It's normal for invasive instrumentation to need flags to disable them. If you > look at mm/kasan/Makefile, you see > > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > KCOV_INSTRUMENT := n > CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING > CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) > > all of which disable one of the instrumentation options, either per file > or per directory, in order to break recursion. That's not for logging stuff (which seems to change the functionality of the driver), it's for system-wide profiling/code-coverage/checking/etc type of stuff. Let's keep a #define at the top of the driver for the drivers that absolutely need this feature disabled as it is much easier to track that and to see how it affects things. If you put it in a Makefile, reviewers will miss it and wonder what is going on. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12560C433FE for ; Thu, 28 Apr 2022 08:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z2n1f4s7rF1fcrjpHcR9MJuVq7UWYIxRTEfU5k26V3Q=; b=tZFK/NzDQCVcC3 166ls8sirFr9L5Op3FN18dSb2D5XYsWDogGkLyd46lE7XqiUiqwxul2KOK81bnKqYvIAMcgP6V+An wIj1Fz2NWofp7HP3r/gYsn18ixqlPh6+53dJVDx+tezf/ESOaRQkJn/GGu+ouAx1vF4/8/1CY8Q5o 0akIQsf9a9bC3CP/PcZsU1ewRHsd0wgaGKtqBqq4Buwvsf4JaFo0eUEAAyIS2KP+rsylFYox0GdPZ r7hIDxsQL07lbFnAZLqEFfrpJzpP3//CUp0Ufh4X6z0K418YSLWFHz2NuKWV5n/FspnNND8X0R8Wy p+AKB86MSE+CYhKC8lDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njzRi-005VOc-Ds; Thu, 28 Apr 2022 08:24:18 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njzRf-005VNG-F4 for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 08:24:17 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EEC7DB82C2F; Thu, 28 Apr 2022 08:24:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FA10C385A0; Thu, 28 Apr 2022 08:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651134252; bh=7Qn4QH+TeAmEKVEjCdFVC71kSPqcGYshxtlJcIsHtmo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wWlT5w0nDXoBbWDRSYmJ9MTt/Ykz36DoTHIWkhyeVDYGkurfe27rq23L+lpr+3Hlc eKeGyJoTE0gLRmJuA3nUNCYtaBGmRI4j87gJa27jrO6FlijfGQEO43Y0nsMbsIGWJl DrN9OKf25kTv6t3fdxmZGFQ6AqrrnmkfIVkFaxyk= Date: Thu, 28 Apr 2022 10:24:09 +0200 From: Greg KH To: Arnd Bergmann Cc: Sai Prakash Ranjan , Catalin Marinas , Steven Rostedt , Linux ARM , linux-arm-msm , Linux Kernel Mailing List , Marc Zyngier , quic_psodagud@quicinc.com, quic_tsoni@quicinc.com, Will Deacon Subject: Re: [PATCHv11 6/6] asm-generic/io: Add logging support for MMIO accessors Message-ID: References: <3de35c9f4a3a070d197bab499acefc709a6f5336.1645772606.git.quic_saipraka@quicinc.com> <96dc5e2e-5d88-52ce-c295-779603e668f2@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_012415_704811_3B6A678A X-CRM114-Status: GOOD ( 16.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 28, 2022 at 10:18:36AM +0200, Arnd Bergmann wrote: > On Thu, Apr 28, 2022 at 9:35 AM Greg KH wrote: > > > > On Thu, Apr 28, 2022 at 12:59:13PM +0530, Sai Prakash Ranjan wrote: > > > On 4/28/2022 11:21 AM, Greg KH wrote: > > > > On Thu, Apr 28, 2022 at 09:00:13AM +0530, Sai Prakash Ranjan wrote: > > > > > -D__NO_FORTIFY, -D__DISABLE_EXPORTS, -DDISABLE_BRANCH_PROFILING". > > > > Those are compiler flags that affect gcc, not kernel code functionality. > > It's normal for invasive instrumentation to need flags to disable them. If you > look at mm/kasan/Makefile, you see > > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > KCOV_INSTRUMENT := n > CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING > CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) > > all of which disable one of the instrumentation options, either per file > or per directory, in order to break recursion. That's not for logging stuff (which seems to change the functionality of the driver), it's for system-wide profiling/code-coverage/checking/etc type of stuff. Let's keep a #define at the top of the driver for the drivers that absolutely need this feature disabled as it is much easier to track that and to see how it affects things. If you put it in a Makefile, reviewers will miss it and wonder what is going on. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel