Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1178869ybg; Thu, 4 Jun 2020 03:10:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGo5i6a33vV0BAOg6ks84Nz3RTlK7kw1aBYO27fgrIMyZlmT7O+l/BZxMS639UE5ZWOf2o X-Received: by 2002:a17:906:e298:: with SMTP id gg24mr3155241ejb.120.1591265417699; Thu, 04 Jun 2020 03:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591265417; cv=none; d=google.com; s=arc-20160816; b=NOQF2uPAsQZU1k0SO+gIGmL2Vm8emVt+ant3m5YSogrohnIuVY2/0NPaGxjQokO/Fm 9CznVT0uzRMLPAub64XL8IPLyA+ghK33TKQWdD8tJp4/3p/FmMnC3IP99TE61u4PnW+2 QethXbuc9su2SV7Zon6CXCwUZeopQhp9SlCABkzh72ZdBzM59aRhL/m+AHrDta5vb+xL aoEE51aJgwDCITNr6Qm+bwj6zWeikD41eoaEkNxu7uE+v5fIEV4CBl1h0+RbgOVQ4HMW oag9JibKGOkvDHl9k9lQEEje05fzDrP+McXZXkEBi2zKLttZw2uXSpbssie03KxjnUPt Fkrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MSoPfCD32setc2DCvXKU3KrsCtKnZs3ZtbYkiynJsdI=; b=mDVANDeYUC8s89/9rCGTuHM7E30gS8gUyYL5U4XljLQ0WslsWK4O6fZ7biP99iVDOW G2VgUHXtaeP5yyT/7Tzl+keaagvR6RvbVeOPxncI38dug2ssvsxQpRZ81cSFKDvDU6ju VVdB7fVG3L/dp5tPEWaE0x21wAkB0mfMOTbF/B2SOkGwA1qRCYJkEMmIeNYOOL5lD4mv rM3uNrX0k0Qw2R1DuhJ8abfDWmIeYR3XfOWBFTk5CaxBh1urSGDCOpGqnpW5kg+1wEMd r2LB1rV3dUur/74SryyjnFEFHPqGdh9xfwK02sKsTOdhIiispYgts4XLVfFFC6NTW/M+ s6rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J2kq0P1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si1425484edr.359.2020.06.04.03.09.54; Thu, 04 Jun 2020 03:10:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J2kq0P1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbgFDJts (ORCPT + 99 others); Thu, 4 Jun 2020 05:49:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727971AbgFDJtr (ORCPT ); Thu, 4 Jun 2020 05:49:47 -0400 Received: from linux-8ccs.fritz.box (p57a23121.dip0.t-ipconnect.de [87.162.49.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD91E206C3; Thu, 4 Jun 2020 09:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591264187; bh=MSoPfCD32setc2DCvXKU3KrsCtKnZs3ZtbYkiynJsdI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J2kq0P1U2CPSwhdf6nV7CGyGhL37w7q03AsTcECfhGcd8tMhCc642E9qKUmbHjqnz KcEPZJKWuxaw2P+39n1TSGHwbo4A3rMA1SgEpBJwcVXOQdWpvc3bKJaFdHfZRiHbmW e3Xay1sTJ0okbeWTmWKUsbxoOSuvhlZQbMntPeGs= Date: Thu, 4 Jun 2020 11:49:42 +0200 From: Jessica Yu To: Miroslav Benes Cc: Cheng Jian , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, chenwandun@huawei.com, xiexiuqi@huawei.com, bobo.shaobowang@huawei.com, huawei.libin@huawei.com, jikos@kernel.org Subject: Re: [PATCH] module: make module symbols visible after init Message-ID: <20200604094942.GA14963@linux-8ccs.fritz.box> References: <20200603141200.17745-1-cj.chengjian@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux linux-8ccs 4.12.14-lp150.12.61-default x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Miroslav Benes [03/06/20 19:00 +0200]: >> In commit 0bd476e6c671 ("kallsyms: unexport kallsyms_lookup_name() and >> kallsyms_on_each_symbol()") restricts the invocation for kernel unexported >> symbols, but it is still incorrect to make the symbols of non-LIVE modules >> visible to the outside. > >Why? It could easily break something somewhere. I didn't check properly, >but module states are not safe to play with, so I'd be conservative here. Fully agree here. And it is not incorrect to make the symbols of non-live modules visible via kallsyms. For one, kallsyms needs to be able to see a module's symbols already even while in the COMING state, because we can already oops/panic inside the module during parse_args(), and symbol resolution via kallsyms is needed here even though the module is not live. I have not checked carefully yet if there are other users of kallsyms out there that might need to see module symbols even when it is still coming, but for the first reason alone I would not make this change. Jessica