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 34F18CCA473 for ; Thu, 9 Jun 2022 22:48:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235662AbiFIWsg (ORCPT ); Thu, 9 Jun 2022 18:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbiFIWsf (ORCPT ); Thu, 9 Jun 2022 18:48:35 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2874EA45D; Thu, 9 Jun 2022 15:48:33 -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 sin.source.kernel.org (Postfix) with ESMTPS id 4399ECE317A; Thu, 9 Jun 2022 22:48:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84D3BC36AFF; Thu, 9 Jun 2022 22:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654814909; bh=fXQHcxnj09/NTw2WTFOlO+YMcNuPa2JywCYJxs8h+OI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rbv9z7QeT/QQKBgEuJO5H6O/pF2I3A5hVtn+qNA4aWH96FTU6yVTEQwHQGjqaoYkT tFPL3zBi5AVCAkOoC2eoAi0xj+emtB7yPU39cgTU3RScBvLEpnCwZQqYQ8sLffVfQ8 Sx8qjpReQ0YkIwWrENf5Q0+QiPCd0A+cMbePFKYcfvT1TxMgB++pQoN4KkNxaqlLbw 9HBuekMBTr0Sf4IFP0xEd650ha3tmpj+fTktT3OylX/fHTt7m1VpHFcnD+AKYIqrH3 JmEUaeHvP+BNUIuP94Iqjo+6JRsKgf6ujoTYj4eO+d0UL22utEkOROjGi3GlR6kseU Ldl3iwq16Jcbw== Received: by mail-yb1-f180.google.com with SMTP id y188so14709363ybe.11; Thu, 09 Jun 2022 15:48:29 -0700 (PDT) X-Gm-Message-State: AOAM530xFRfgRJ3qRdVmUqP21HqcSPX/NrqYfXddDqdA165zUT8PNFGT HOY2zwXJCafTyzHLA/eacP9xc48fGvPt1pC/z6o= X-Google-Smtp-Source: ABdhPJzemSM5GrpgirpnnQNTEDsYpAOxmoxNmoSmK2+phEV9mudE18JL5yVLSDRq4A8vq3lyLIBxhhDyWWNd79LGZgg= X-Received: by 2002:a25:3b49:0:b0:664:5a43:5895 with SMTP id i70-20020a253b49000000b006645a435895mr1766286yba.9.1654814908410; Thu, 09 Jun 2022 15:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20220608000014.3054333-1-jarkko@profian.com> <20220608232115.ccd4399f4a1d133e9b65c2a9@kernel.org> <20220609034852.GA30873@lst.de> In-Reply-To: From: Song Liu Date: Thu, 9 Jun 2022 15:48:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images To: "Edgecombe, Rick P" Cc: "hch@lst.de" , "christophe.leroy@csgroup.eu" , "mcgrof@kernel.org" , "svens@linux.ibm.com" , "palmer@dabbelt.com" , "jpoimboe@kernel.org" , "paulus@samba.org" , "zepan@sipeed.com" , "iii@linux.ibm.com" , "deller@gmx.de" , "aou@eecs.berkeley.edu" , "joey.gouly@arm.com" , "anemo@mba.ocn.ne.jp" , "egorenar@linux.ibm.com" , "ast@kernel.org" , "ardb@kernel.org" , "mpe@ellerman.id.au" , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "npiggin@gmail.com" , "thomas.lendacky@amd.com" , "bp@alien8.de" , "davem@davemloft.net" , "x86@kernel.org" , "luis.machado@linaro.org" , "ebiederm@xmission.com" , "mbenes@suse.cz" , "mingo@redhat.com" , "jniethe5@gmail.com" , "mark.rutland@arm.com" , "linux@armlinux.org.uk" , "paul.walmsley@sifive.com" , "andreyknvl@gmail.com" , "dja@axtens.net" , "liaochang1@huawei.com" , "linux-modules@vger.kernel.org" , "huschle@linux.ibm.com" , "will@kernel.org" , "akpm@linux-foundation.org" , "James.Bottomley@hansenpartnership.com" , "guoren@kernel.org" , "nathan@kernel.org" , "dave.anglin@bell.net" , "rostedt@goodmis.org" , "atomlin@redhat.com" , "bristot@redhat.com" , "naveen.n.rao@linux.ibm.com" , "anup@brainfault.org" , "javierm@redhat.com" , "linux@roeck-us.net" , "linus.walleij@linaro.org" , "philipp.tomsich@vrull.eu" , "linux-arm-kernel@lists.infradead.org" , "ndesaulniers@google.com" , "samitolvanen@google.com" , "yangtiezhu@loongson.cn" , "aneesh.kumar@linux.ibm.com" , "geert@linux-m68k.org" , "hpa@zytor.com" , "heiko@sntech.de" , "nathaniel@profian.com" , "michael.roth@amd.com" , "rmk+kernel@armlinux.org.uk" , "Sakkinen, Jarkko" , "catalin.marinas@arm.com" , "borntraeger@linux.ibm.com" , "dave.hansen@linux.intel.com" , "wangkefeng.wang@huawei.com" , "tmricht@linux.ibm.com" , "hca@linux.ibm.com" , "jarkko@kernel.org" , "linux-parisc@vger.kernel.org" , "gor@linux.ibm.com" , "atishp@atishpatra.org" , "linuxppc-dev@lists.ozlabs.org" , "dmitry.torokhov@gmail.com" , "tglx@linutronix.de" , "kirill.shutemov@linux.intel.com" , "sparclinux@vger.kernel.org" , "broonie@kernel.org" , "tsbogend@alpha.franken.de" , "nico@fluxnic.net" , "masahiroy@kernel.org" , "agordeev@linux.ibm.com" , "kernel@esmil.dk" , "ashimida@linux.alibaba.com" , "elver@google.com" , "keescook@chromium.org" , "peterz@infradead.org" , "mhiramat@kernel.org" , "Keshavamurthy, Anil S" , "linux-riscv@lists.infradead.org" , "chenzhongjin@huawei.com" , "andrealmeid@igalia.com" , "changbin.du@intel.com" , "benh@kernel.crashing.org" , "linux-s390@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: On Thu, Jun 9, 2022 at 11:41 AM Edgecombe, Rick P wrote: > > On Thu, 2022-06-09 at 06:24 -0700, Luis Chamberlain wrote: [...] > > Like say for a next step we moved prog pack out of bpf into core code, > gave it it's own copy of module_alloc(), and then made kprobes use it. > Then we would have something with improved W^X guard rails, and kprobes > would not depend on modules anymore. I think maybe it's a step in the > right direction, even if it's not perfect. I was also thinking about where to put the prog pack allocator eventually. Shall it be part of mm code or module code? Btw, prog pack has more challenges with W^X requirement: 1. The arch need to have text poke mechanism; 2. Some users of prog pack need to learn to use the ROXbuffer with text poke, for example, how to calculate relative address differently. Thanks, Song 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 2EBBDC433EF for ; Thu, 9 Jun 2022 22:48:54 +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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sijbEUBgd/DjxSDu10m3JDEYE/43kHFaUEJsJwaYwMM=; b=HgM2cKdgY3sJQz EEeLwYcMox9na7emG218oo4jim36Mg+BW9XldTWc3xfDr15iQU5+V0LaHbMNJ9P+N4UqIKrmMB8GV 0oh/xWxl2ZBpqbJnKgEhQ/ZIvdcoZagXMayvpTggjpB5Ho0ZhLxUD7cKgTRNckJmxYOZR9ZHZpSpl NfOJyPMXZ63L5TMJJCwytn/F4zhG/t6ad8e4aKv4QxauZB5dL7emH6H01p2ekDweZ9W0wUl5jtk5Q mBAx6Iee3ES4AiDaByBD2tMfcCr9m94ymo4cdeLYQBBkVurbUDpTH6OvTIVRP8DqW4Jqn8b4Li2Va wS5UyG47T9V+8U1F4Y6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzQxK-004TIx-8x; Thu, 09 Jun 2022 22:48:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzQxG-004THn-KG; Thu, 09 Jun 2022 22:48:43 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 0E00261FC2; Thu, 9 Jun 2022 22:48:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FD70C341E4; Thu, 9 Jun 2022 22:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654814920; bh=fXQHcxnj09/NTw2WTFOlO+YMcNuPa2JywCYJxs8h+OI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tKaXvF9QRb62Y+vempgVpRbPDoZKp3cW4FtttO8/7E0uh+KETERHOu8TdTzwWAwrU xGtYH/7o85i8ECoYtdzu2/ShEXy+m07iogmJ9CUJeAlDjbQ2g3dhnnWKivbd6l611c ETEuLIgJTOC8tmx8PPLKakpM2Y2Dg6Cu1wXK+Dtq8oLRIw63QxqKIzj32OHFg3Gsw6 AGkKVZWTMj49Mv8nIzBDTZVpv3vfd2s0qEMP1rFfNqr6ubzI6iC51MVz/LLcWo+V7V Kl+ZJHKlUAAw9KLyuLFScyw6YZsSX2/8Tbyln3mxluYtmDgtXTwVPl4MHJ2O27WoCG e1lej69VaPWJw== Received: by mail-ot1-f41.google.com with SMTP id l9-20020a056830268900b006054381dd35so18437688otu.4; Thu, 09 Jun 2022 15:48:40 -0700 (PDT) X-Gm-Message-State: AOAM531PYbd9uSe7O3iEdaq+EGgKzG0m+XbREtEgdV/jFSW00WUTpAuC 4Jh6ZkSWch45QBZ+Nwd0mEI2P51UaUveXQLQEiM= X-Google-Smtp-Source: ABdhPJzemSM5GrpgirpnnQNTEDsYpAOxmoxNmoSmK2+phEV9mudE18JL5yVLSDRq4A8vq3lyLIBxhhDyWWNd79LGZgg= X-Received: by 2002:a25:3b49:0:b0:664:5a43:5895 with SMTP id i70-20020a253b49000000b006645a435895mr1766286yba.9.1654814908410; Thu, 09 Jun 2022 15:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20220608000014.3054333-1-jarkko@profian.com> <20220608232115.ccd4399f4a1d133e9b65c2a9@kernel.org> <20220609034852.GA30873@lst.de> In-Reply-To: From: Song Liu Date: Thu, 9 Jun 2022 15:48:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images To: "Edgecombe, Rick P" Cc: "hch@lst.de" , "christophe.leroy@csgroup.eu" , "mcgrof@kernel.org" , "svens@linux.ibm.com" , "palmer@dabbelt.com" , "jpoimboe@kernel.org" , "paulus@samba.org" , "zepan@sipeed.com" , "iii@linux.ibm.com" , "deller@gmx.de" , "aou@eecs.berkeley.edu" , "joey.gouly@arm.com" , "anemo@mba.ocn.ne.jp" , "egorenar@linux.ibm.com" , "ast@kernel.org" , "ardb@kernel.org" , "mpe@ellerman.id.au" , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "npiggin@gmail.com" , "thomas.lendacky@amd.com" , "bp@alien8.de" , "davem@davemloft.net" , "x86@kernel.org" , "luis.machado@linaro.org" , "ebiederm@xmission.com" , "mbenes@suse.cz" , "mingo@redhat.com" , "jniethe5@gmail.com" , "mark.rutland@arm.com" , "linux@armlinux.org.uk" , "paul.walmsley@sifive.com" , "andreyknvl@gmail.com" , "dja@axtens.net" , "liaochang1@huawei.com" , "linux-modules@vger.kernel.org" , "huschle@linux.ibm.com" , "will@kernel.org" , "akpm@linux-foundation.org" , "James.Bottomley@hansenpartnership.com" , "guoren@kernel.org" , "nathan@kernel.org" , "dave.anglin@bell.net" , "rostedt@goodmis.org" , "atomlin@redhat.com" , "bristot@redhat.com" , "naveen.n.rao@linux.ibm.com" , "anup@brainfault.org" , "javierm@redhat.com" , "linux@roeck-us.net" , "linus.walleij@linaro.org" , "philipp.tomsich@vrull.eu" , "linux-arm-kernel@lists.infradead.org" , "ndesaulniers@google.com" , "samitolvanen@google.com" , "yangtiezhu@loongson.cn" , "aneesh.kumar@linux.ibm.com" , "geert@linux-m68k.org" , "hpa@zytor.com" , "heiko@sntech.de" , "nathaniel@profian.com" , "michael.roth@amd.com" , "rmk+kernel@armlinux.org.uk" , "Sakkinen, Jarkko" , "catalin.marinas@arm.com" , "borntraeger@linux.ibm.com" , "dave.hansen@linux.intel.com" , "wangkefeng.wang@huawei.com" , "tmricht@linux.ibm.com" , "hca@linux.ibm.com" , "jarkko@kernel.org" , "linux-parisc@vger.kernel.org" , "gor@linux.ibm.com" , "atishp@atishpatra.org" , "linuxppc-dev@lists.ozlabs.org" , "dmitry.torokhov@gmail.com" , "tglx@linutronix.de" , "kirill.shutemov@linux.intel.com" , "sparclinux@vger.kernel.org" , "broonie@kernel.org" , "tsbogend@alpha.franken.de" , "nico@fluxnic.net" , "masahiroy@kernel.org" , "agordeev@linux.ibm.com" , "kernel@esmil.dk" , "ashimida@linux.alibaba.com" , "elver@google.com" , "keescook@chromium.org" , "peterz@infradead.org" , "mhiramat@kernel.org" , "Keshavamurthy, Anil S" , "linux-riscv@lists.infradead.org" , "chenzhongjin@huawei.com" , "andrealmeid@igalia.com" , "changbin.du@intel.com" , "benh@kernel.crashing.org" , "linux-s390@vger.kernel.org" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_154842_771684_34C5590A X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Jun 9, 2022 at 11:41 AM Edgecombe, Rick P wrote: > > On Thu, 2022-06-09 at 06:24 -0700, Luis Chamberlain wrote: [...] > > Like say for a next step we moved prog pack out of bpf into core code, > gave it it's own copy of module_alloc(), and then made kprobes use it. > Then we would have something with improved W^X guard rails, and kprobes > would not depend on modules anymore. I think maybe it's a step in the > right direction, even if it's not perfect. I was also thinking about where to put the prog pack allocator eventually. Shall it be part of mm code or module code? Btw, prog pack has more challenges with W^X requirement: 1. The arch need to have text poke mechanism; 2. Some users of prog pack need to learn to use the ROXbuffer with text poke, for example, how to calculate relative address differently. Thanks, Song _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 7772DC43334 for ; Fri, 10 Jun 2022 11:25:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LKJYD16ssz3g6P for ; Fri, 10 Jun 2022 21:25:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=tKaXvF9Q; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=song@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=tKaXvF9Q; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LJzly3NxWz3bg4 for ; Fri, 10 Jun 2022 08:48:46 +1000 (AEST) 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 3EBECB830AE for ; Thu, 9 Jun 2022 22:48:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 527A2C341E5 for ; Thu, 9 Jun 2022 22:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654814920; bh=fXQHcxnj09/NTw2WTFOlO+YMcNuPa2JywCYJxs8h+OI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tKaXvF9QRb62Y+vempgVpRbPDoZKp3cW4FtttO8/7E0uh+KETERHOu8TdTzwWAwrU xGtYH/7o85i8ECoYtdzu2/ShEXy+m07iogmJ9CUJeAlDjbQ2g3dhnnWKivbd6l611c ETEuLIgJTOC8tmx8PPLKakpM2Y2Dg6Cu1wXK+Dtq8oLRIw63QxqKIzj32OHFg3Gsw6 AGkKVZWTMj49Mv8nIzBDTZVpv3vfd2s0qEMP1rFfNqr6ubzI6iC51MVz/LLcWo+V7V Kl+ZJHKlUAAw9KLyuLFScyw6YZsSX2/8Tbyln3mxluYtmDgtXTwVPl4MHJ2O27WoCG e1lej69VaPWJw== Received: by mail-yb1-f178.google.com with SMTP id r82so44128752ybc.13 for ; Thu, 09 Jun 2022 15:48:40 -0700 (PDT) X-Gm-Message-State: AOAM531bR+YMHiH6dE6Ffkjn8t/n96/J4axHXsdb3uYGO6SqH/HOcR5I rJZ85pvqyLghM76WFLHVCHQmgFe47xROXXa4Few= X-Google-Smtp-Source: ABdhPJzemSM5GrpgirpnnQNTEDsYpAOxmoxNmoSmK2+phEV9mudE18JL5yVLSDRq4A8vq3lyLIBxhhDyWWNd79LGZgg= X-Received: by 2002:a25:3b49:0:b0:664:5a43:5895 with SMTP id i70-20020a253b49000000b006645a435895mr1766286yba.9.1654814908410; Thu, 09 Jun 2022 15:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20220608000014.3054333-1-jarkko@profian.com> <20220608232115.ccd4399f4a1d133e9b65c2a9@kernel.org> <20220609034852.GA30873@lst.de> In-Reply-To: From: Song Liu Date: Thu, 9 Jun 2022 15:48:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images To: "Edgecombe, Rick P" Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Fri, 10 Jun 2022 21:09:20 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "ashimida@linux.alibaba.com" , "heiko@sntech.de" , "catalin.marinas@arm.com" , "linus.walleij@linaro.org" , "paulus@samba.org" , "agordeev@linux.ibm.com" , "hch@lst.de" , "javierm@redhat.com" , "geert@linux-m68k.org" , "borntraeger@linux.ibm.com" , "linux@roeck-us.net" , "andrealmeid@igalia.com" , "michael.roth@amd.com" , "npiggin@gmail.com" , "tglx@linutronix.de" , "andreyknvl@gmail.com" , "ndesaulniers@google.com" , "linux-kernel@vger.kernel.org" , "mcgrof@kernel.org" , "svens@linux.ibm.com" , "zepan@sipeed.com" , "guoren@kerne l.org" , "akpm@linux-foundation.org" , "mark.rutland@arm.com" , "luis.machado@linaro.org" , "anemo@mba.ocn.ne.jp" , "dave.hansen@linux.intel.com" , "joey.gouly@arm.com" , "James.Bottomley@hansenpartnership.com" , "linux-s390@vger.kernel.org" , "iii@linux.ibm.com" , "anup@brainfault.org" , "deller@gmx.de" , "Keshavamurthy, Anil S" , "mhiramat@kernel.org" , "thomas.lendacky@amd.com" , "gor@linux.ibm.com" , "philipp.tomsich@vrull.eu" , "dave.anglin@bell.net" , "linux-arm-kernel@lists.infradead.org" , "dja@axtens.net" , "nico@fluxnic.net" , "jark ko@kernel.org" , "ebiederm@xmission.com" , "aneesh.kumar@linux.ibm.com" , "bristot@redhat.com" , "wangkefeng.wang@huawei.com" , "kernel@esmil.dk" , "jniethe5@gmail.com" , "paul.walmsley@sifive.com" , "ast@kernel.org" , "will@kernel.org" , "masahiroy@kernel.org" , "Sakkinen, Jarkko" , "samitolvanen@google.com" , "naveen.n.rao@linux.ibm.com" , "elver@google.com" , "keescook@chromium.org" , "rostedt@goodmis.org" , "nathan@kernel.org" , "rmk+kernel@armlinux.org.uk" , "broonie@kernel.org" , "bp@alien8.de" , "egorenar@linux.ibm.com" , "tsbogend@alpha.franken.de" , "linux-parisc@vger.kernel.org" , "nathaniel@profian.com" , "dmitry.torokhov@gmail.com" , "davem@davemloft.net" , "kirill.shutemov@linux.intel.com" , "huschle@linux.ibm.com" , "peterz@infradead.org" , "hpa@zytor.com" , "sparclinux@vger.kernel.org" , "yangtiezhu@loongson.cn" , "mbenes@suse.cz" , "chenzhongjin@huawei.com" , "ardb@kernel.org" , "x86@kernel.org" , "linux@armlinux.org.uk" , "linux-riscv@lists.infradead.org" , "mingo@redhat.com" , "atomlin@redhat.com" , "aou@eecs.berkeley.edu" , "hca@linux.ibm.com" , "liaocha ng1@huawei.com" , "atishp@atishpatra.org" , "jpoimboe@kernel.org" , "tmricht@linux.ibm.com" , "linux-mips@vger.kernel.org" , "changbin.du@intel.com" , "palmer@dabbelt.com" , "linuxppc-dev@lists.ozlabs.org" , "linux-modules@vger.kernel.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jun 9, 2022 at 11:41 AM Edgecombe, Rick P wrote: > > On Thu, 2022-06-09 at 06:24 -0700, Luis Chamberlain wrote: [...] > > Like say for a next step we moved prog pack out of bpf into core code, > gave it it's own copy of module_alloc(), and then made kprobes use it. > Then we would have something with improved W^X guard rails, and kprobes > would not depend on modules anymore. I think maybe it's a step in the > right direction, even if it's not perfect. I was also thinking about where to put the prog pack allocator eventually. Shall it be part of mm code or module code? Btw, prog pack has more challenges with W^X requirement: 1. The arch need to have text poke mechanism; 2. Some users of prog pack need to learn to use the ROXbuffer with text poke, for example, how to calculate relative address differently. Thanks, Song