Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5677347imm; Mon, 23 Jul 2018 04:14:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbBPNcbL1cYHaJk84M7oW1c0ZLQ2Yl4K97z0zcHdXTOJE9fHNZmvClhAQ6MoMfCc+6wg8z X-Received: by 2002:a63:dd09:: with SMTP id t9-v6mr11988383pgg.370.1532344443572; Mon, 23 Jul 2018 04:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532344443; cv=none; d=google.com; s=arc-20160816; b=N2CX5dyRto3zJ3r5GMgXoEWhJXB2AhgCzKo/9+OA/QKCMnRZ5VAgovovyJmrPEIdfi sQ7oi3xRWtcWf+Y0Cq/M7EaQbfjJ7YfOcXA3648V9/XM1qpOgR3Gk9omvTlcnFdzRMhv uuLZtTB0BzyDE6wY0s1AHhos3mhzptQyG49iPMxLzZ2VxBVVMgCrrGmos0rpYmCqNiPl yDVhyp6F8NRT/6MN10lta9wldWAn1fE+k5xzIJ5eTYE+JAAwWse6U2xSfSxZlDdBkZtu Dmor1CRDL3QdwoydPyw3NNxy4pAo/+DKJmCmeiQhP9jCZpMdixZ5FeGttCdhUM7c58f2 Q9XA== 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:arc-authentication-results; bh=53Bms48kLbc+Q2hZq9XbxepqTQh/eklUn7b6ooiplh4=; b=J+nN2ShN+O2pk82x29gSaPlqSSdTi9JRx4HK9/Ooi2vkbAdNDNxBwZiPDE3BZ0rwvW Ty7JdqV6ddIwwevdshRkwpDEg6demtCzJLDlRGLzc/1gIcAqpm6pUiLcIqYdlSXB2H60 6w1xmdb37gw+A5kvh1jLVKenCu7CSued8Xj/tu9WR7TBXEWtN0xE/0+5RS8xULsEBD7+ YALhh30GZzYgtnw3PVdbSDKHWmC3Ke0YmTplsozZeQ9fVRUkqSRDJ5uatBHitej02imN EvsfRPgf1H2um/PdVRjsiiUYmwgkiPkKnLfF6Kp+ai3NRICPSfOXe4S075kyk0/uaXKf a30w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="0GQRoM/Y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si7676040pld.80.2018.07.23.04.13.48; Mon, 23 Jul 2018 04:14:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="0GQRoM/Y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2388036AbeGWMNk (ORCPT + 99 others); Mon, 23 Jul 2018 08:13:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:37686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387823AbeGWMNk (ORCPT ); Mon, 23 Jul 2018 08:13:40 -0400 Received: from linux-8ccs (charybdis-ext.suse.de [195.135.221.2]) (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 AC0BD20846; Mon, 23 Jul 2018 11:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532344378; bh=53Bms48kLbc+Q2hZq9XbxepqTQh/eklUn7b6ooiplh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0GQRoM/Y7IQ7fhjc0Qsqud8ntt+Qju/XWKEhjbzXvyK08S7nIf1igRhneFlUERCup tax0/FIUAlLR8EQkElEUhNNK43pH2OGbZKdYxCplO/PIDUdx+YAMTSIrvNTTQ7whyX xjKTwhS2nmhFNPh+5TBnxCzz4NWUjomQhifTGyPo= Date: Mon, 23 Jul 2018 13:12:51 +0200 From: Jessica Yu To: Martijn Coenen Cc: LKML , Masahiro Yamada , Michal Marek , Geert Uytterhoeven , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Alan Stern , Greg Kroah-Hartman , Oliver Neukum , Arnd Bergmann , Stephen Boyd , Philippe Ombredanne , Kate Stewart , Sam Ravnborg , linux-kbuild@vger.kernel.org, linux-m68k , USB list , USB Storage list , linux-scsi@vger.kernel.org, Linux-Arch , Martijn Coenen , Sandeep Patil , Iliyan Malchev , Joel Fernandes Subject: Re: [PATCH 2/6] module: add support for symbol namespaces. Message-ID: <20180723111251.x2cam6bcuglr4hhz@linux-8ccs> References: <20180716122125.175792-1-maco@android.com> <20180716122125.175792-3-maco@android.com> <20180719163208.5xvrafugpcbhh7kj@linux-8ccs> <20180720144916.fyqpmrtgt23sax6n@linux-8ccs> 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.11-default x86_64 User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Martijn Coenen [20/07/18 17:42 +0200]: >On Fri, Jul 20, 2018 at 4:49 PM, Jessica Yu wrote: >> Thanks. Also, it looks like we're currently just warning (in both >> modpost and on module load) if a module uses symbols from a namespace >> it doesn't import. Are you also planning to eventually introduce >> namespace enforcement? > >This is something I've definitely been thinking about, and was curious >what others would think. My main concern with enforcement is that it >will start failing to load out-of-tree modules that use newly >namespaced symbols. On the other hand, I think those modules will need >to be rebuilt anyway to be able to load, because the changes to struct >kernel_symbol make them incompatible with the current kernel. That >could be another reason for having these symbols in a special section >(with its own struct namespaced_kernel_symbol); but on the other hand, >it would make the module loader more complex just to facilitate >out-of-tree drivers, and I'm not sure where the trade-off between >those two falls. IMO I don't think we should bend over backwards to accommodate out-of-tree modules - modifying the module loader to recognize even more special sections to accommodate these OOT modules would be where we'd draw the line I think. >> It'd be trivial to fail the module build in >> modpost as well as reject the module on load if it uses an exported >> symbol belonging to a namespace it doesn't import. Although, I'd go >> with the warnings for a development cycle or two, to gently introduce >> the change in API and let other subsystems as well as out-of-tree >> module developers catch up. > >An approach like that makes sense to me. Another alternative would be >to make it a CONFIG_ option, and let distros/etc. decide what they are >comfortable with. I think going forward I would prefer to have export namespaces to be a normal and regular part of kernel API (as in, we shouldn't require a new option for it), and that the warnings for 1-2 cycles are courteous enough - but anyone with stronger opinions about this should speak up. Thanks, Jessica