Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp59424iol; Wed, 8 Jun 2022 21:49:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhHvuAZLKRekWuEXoOkvh8aedJsiBAZYOr31fmyGQGkMnCaso4bvKji1HYpG+fS1ygRd+B X-Received: by 2002:a17:906:f84:b0:711:eda5:db31 with SMTP id q4-20020a1709060f8400b00711eda5db31mr7929313ejj.397.1654750189403; Wed, 08 Jun 2022 21:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654750189; cv=none; d=google.com; s=arc-20160816; b=e9z8c4UOeXbp4c6R7ZJecjbEBxCBjdzx2LrgTO1yETSwrEXVBnJJlg9XHArQKNNqN2 EGkV1erXNC6nO/huEGmk0VWoDPDuPCnOkt8Nov9R97yVs4xIWRboKUSZqx7TmHCDRnHn ydBt1VbPuRjPHJt5GWOUK8h5/0Assl7CPlfLMB+Vtj1YFENf6UoPS67tyEpppKWfBr1p xeqoMGbMC53uynADl7v5/sGQx/uMmIriHYJaE5bga34JoA/DLOSjTYJKRsQyPnlpoykp i4h+RkN7AoJfy5GyK/cNOQzAqeIQTVJYHGtHCXm6Z1mEjHKf19aEseE+reAKoVOLgKXK thww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=b3rmiXnqnQvrQyYg9SUNxtDhpmIUn2vL8Kr4S9dc+T8=; b=WPztAsSiLcM8Ab8zoWz1rd12mjEqYB4ftMQM13FVRmLpgVqOyiT11WsRzfo82pyclM x77DcxpzvV0RMJ0XHnEC0C6SUwMrAaMK1uZ4dwvgLfttaO2PCw0y1v4RKVnSByPWHuu7 yD/JI1MZzx6VYZfJVDPfqG0Z0RFl5TEbiB7dL2AjhH2KUUfvdrg/RZUFeV6j5sT7wbYF THyDAc8QL4XbnYg/1gnoYkhRUHD3QuZkjdRtNhl6AUlBh+rablt4QkyJ9LUAvYnByIlH hZB2NeaqQOULR0x8I+0yVFZcgWmZaKGDP/1tgFGemo93M17kiRzNcQc8gkTvYsILR+8U o/lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw9-20020a1709066a0900b006e8c309996esi2084083ejc.551.2022.06.08.21.49.24; Wed, 08 Jun 2022 21:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234595AbiFIDtI (ORCPT + 99 others); Wed, 8 Jun 2022 23:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbiFIDtD (ORCPT ); Wed, 8 Jun 2022 23:49:03 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A57232C; Wed, 8 Jun 2022 20:49:01 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id EFD956732D; Thu, 9 Jun 2022 05:48:52 +0200 (CEST) Date: Thu, 9 Jun 2022 05:48:52 +0200 From: Christoph Hellwig To: Luis Chamberlain Cc: Song Liu , Christoph Hellwig , Masami Hiramatsu , Jarkko Sakkinen , Guo Ren , Jarkko Sakkinen , Linux Kernel Mailing List , Nathaniel McCallum , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , "Naveen N. Rao" , Anil S Keshavamurthy , Steven Rostedt , Kees Cook , "Peter Zijlstra (Intel)" , Nathan Chancellor , Josh Poimboeuf , Mark Rutland , "Eric W. Biederman" , Marco Elver , Dan Li , Sami Tolvanen , Ard Biesheuvel , "Russell King (Oracle)" , Nick Desaulniers , Linus Walleij , Chen Zhongjin , Nicolas Pitre , Mark Brown , Luis Machado , Geert Uytterhoeven , Joey Gouly , Masahiro Yamada , Andrew Morton , Andrey Konovalov , Kefeng Wang , Atsushi Nemoto , Guenter Roeck , Dave Anglin , Christophe Leroy , Alexei Starovoitov , Nicholas Piggin , Daniel Axtens , "Aneesh Kumar K.V" , Jordan Niethe , Anup Patel , Atish Patra , Changbin Du , Heiko Stuebner , Liao Chang , Philipp Tomsich , Wu Caize , Emil Renner Berthing , Alexander Egorenkov , Thomas Richter , Tobias Huschle , Ilya Leoshkevich , Tom Lendacky , Daniel Bristot de Oliveira , Michael Roth , "Kirill A. Shutemov" , Javier Martinez Canillas , Miroslav Benes , =?iso-8859-1?Q?Andr=E9?= Almeida , Tiezhu Yang , Dmitry Torokhov , Aaron Tomlin , Linux ARM , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , sparclinux , linux-modules@vger.kernel.org Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images Message-ID: <20220609034852.GA30873@lst.de> References: <20220608000014.3054333-1-jarkko@profian.com> <20220608232115.ccd4399f4a1d133e9b65c2a9@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 08, 2022 at 01:26:19PM -0700, Luis Chamberlain wrote: > No, that was removed because it has only one user. That is only part of the story. The other part is that the overall kernel simply does not have any business allocating exutable memory. Executable memory is a very special concept for modules or module-like code like kprobes, and should not be exposed as a general concept. Especially as executable memory really should not also be writable for security reasons. In other words, we should actually never allocate executable memory, every. We might seal memory and then mark it executable after having written to it, which is how modules and kprobes are implemented on all modern Linux ports anyway.