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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D286CC4741F for ; Thu, 1 Oct 2020 13:17:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A492D206B5 for ; Thu, 1 Oct 2020 13:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732235AbgJANRS (ORCPT ); Thu, 1 Oct 2020 09:17:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:55250 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732018AbgJANRM (ORCPT ); Thu, 1 Oct 2020 09:17:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0B2A4AF59; Thu, 1 Oct 2020 13:17:08 +0000 (UTC) Date: Thu, 1 Oct 2020 15:17:07 +0200 (CEST) From: Miroslav Benes To: Sami Tolvanen cc: Masahiro Yamada , Will Deacon , Steven Rostedt , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, jthierry@redhat.com, jpoimboe@redhat.com Subject: Re: [PATCH v4 04/29] objtool: Add a pass for generating __mcount_loc In-Reply-To: <20200929214631.3516445-5-samitolvanen@google.com> Message-ID: References: <20200929214631.3516445-1-samitolvanen@google.com> <20200929214631.3516445-5-samitolvanen@google.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sami, On Tue, 29 Sep 2020, Sami Tolvanen wrote: > From: Peter Zijlstra > > Add the --mcount option for generating __mcount_loc sections > needed for dynamic ftrace. Using this pass requires the kernel to > be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined > in Makefile. > > Link: https://lore.kernel.org/lkml/20200625200235.GQ4781@hirez.programming.kicks-ass.net/ > Signed-off-by: Peter Zijlstra > [Sami: rebased to mainline, dropped config changes, fixed to actually use > --mcount, and wrote a commit message.] > Signed-off-by: Sami Tolvanen > Reviewed-by: Kees Cook I am sorry to reply on v4. Should have been sooner. Julien has been sending patches to make objtool's check functionality arch-agnostic as much as possible. So it seems to me that the patch should be based on the effort I also wonder about making 'mcount' command separate from 'check'. Similar to what is 'orc' now. But that could be done later. See tip-tree/objtool/core for both. Thanks Miroslav 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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DADC4727C for ; Thu, 1 Oct 2020 13:18:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E186206B5 for ; Thu, 1 Oct 2020 13:18:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mq+x8yUO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E186206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject: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=yY2t725LaAez3Jxtl+f7nweIIwoV0J4aJUps7TIUckI=; b=mq+x8yUOg73WIMnz8BPFANpA0 2Z1WuwJG5VZH2s9owBpG0B8zCu/8xb6z1VnymO/NYsZuJXX+qJ5vehYP7VDBwZ0XfVn7uXH9eqQqi RX2A+4VrTdiw+fYBehetA1BZH0j9i+T7ovGtzyM5ZxMTF6msdrRn1gEI/SbjN4NIq/Mp16yuRhO5I 9NhCF3xM3KCL/8+aL6IAnMkKt/aU9jkHsNAa8z1g7nP59YfXCJ1LVBA/1/tmPdjA/Z9uFVdj5qWds mIz5A948DiI8guhDvJ1g+M18MTpXh1lUqr28Wvm7r34/T168iADM3YIhZPa9pQIe0MSPTX4/SWDRX /mHPRkdVQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNySO-0000PB-UR; Thu, 01 Oct 2020 13:17:12 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNySM-0000Nr-Bj for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2020 13:17:11 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0B2A4AF59; Thu, 1 Oct 2020 13:17:08 +0000 (UTC) Date: Thu, 1 Oct 2020 15:17:07 +0200 (CEST) From: Miroslav Benes To: Sami Tolvanen Subject: Re: [PATCH v4 04/29] objtool: Add a pass for generating __mcount_loc In-Reply-To: <20200929214631.3516445-5-samitolvanen@google.com> Message-ID: References: <20200929214631.3516445-1-samitolvanen@google.com> <20200929214631.3516445-5-samitolvanen@google.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201001_091710_508904_6D0B9705 X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, x86@kernel.org, Kees Cook , "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, jpoimboe@redhat.com, linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org, jthierry@redhat.com 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 Hi Sami, On Tue, 29 Sep 2020, Sami Tolvanen wrote: > From: Peter Zijlstra > > Add the --mcount option for generating __mcount_loc sections > needed for dynamic ftrace. Using this pass requires the kernel to > be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined > in Makefile. > > Link: https://lore.kernel.org/lkml/20200625200235.GQ4781@hirez.programming.kicks-ass.net/ > Signed-off-by: Peter Zijlstra > [Sami: rebased to mainline, dropped config changes, fixed to actually use > --mcount, and wrote a commit message.] > Signed-off-by: Sami Tolvanen > Reviewed-by: Kees Cook I am sorry to reply on v4. Should have been sooner. Julien has been sending patches to make objtool's check functionality arch-agnostic as much as possible. So it seems to me that the patch should be based on the effort I also wonder about making 'mcount' command separate from 'check'. Similar to what is 'orc' now. But that could be done later. See tip-tree/objtool/core for both. Thanks Miroslav _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2C4FC4741F for ; Thu, 1 Oct 2020 13:17:29 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 2438020754 for ; Thu, 1 Oct 2020 13:17:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2438020754 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-20075-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 18025 invoked by uid 550); 1 Oct 2020 13:17:20 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 18005 invoked from network); 1 Oct 2020 13:17:19 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Thu, 1 Oct 2020 15:17:07 +0200 (CEST) From: Miroslav Benes To: Sami Tolvanen cc: Masahiro Yamada , Will Deacon , Steven Rostedt , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, jthierry@redhat.com, jpoimboe@redhat.com Subject: Re: [PATCH v4 04/29] objtool: Add a pass for generating __mcount_loc In-Reply-To: <20200929214631.3516445-5-samitolvanen@google.com> Message-ID: References: <20200929214631.3516445-1-samitolvanen@google.com> <20200929214631.3516445-5-samitolvanen@google.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Hi Sami, On Tue, 29 Sep 2020, Sami Tolvanen wrote: > From: Peter Zijlstra > > Add the --mcount option for generating __mcount_loc sections > needed for dynamic ftrace. Using this pass requires the kernel to > be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined > in Makefile. > > Link: https://lore.kernel.org/lkml/20200625200235.GQ4781@hirez.programming.kicks-ass.net/ > Signed-off-by: Peter Zijlstra > [Sami: rebased to mainline, dropped config changes, fixed to actually use > --mcount, and wrote a commit message.] > Signed-off-by: Sami Tolvanen > Reviewed-by: Kees Cook I am sorry to reply on v4. Should have been sooner. Julien has been sending patches to make objtool's check functionality arch-agnostic as much as possible. So it seems to me that the patch should be based on the effort I also wonder about making 'mcount' command separate from 'check'. Similar to what is 'orc' now. But that could be done later. See tip-tree/objtool/core for both. Thanks Miroslav