Received: by 2002:ac0:cd8c:0:0:0:0:0 with SMTP id d12csp949imp; Sat, 9 Mar 2019 13:46:22 -0800 (PST) X-Google-Smtp-Source: APXvYqx+8vZxAwgj9+/Sq/cL4oDnTHrqk38++mgilkFN0Xo99CHsctLh9EM8R08QUP970mPDnlyw X-Received: by 2002:a62:e214:: with SMTP id a20mr24995572pfi.192.1552167982414; Sat, 09 Mar 2019 13:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552167982; cv=none; d=google.com; s=arc-20160816; b=iZEzQ+i4XcNzWbWUgpPVOHpHP05na3vrSLtuP82EhStoT3uOfBlLhQSaJKA+8J6oqa lnRejsejUv0ORMupw+YpF8WZRCs7yqudxmufh3EmJlJUMuqOri1nVfQII4tG+n8yv6Ms Q3sRCvlGKkcN9SkODPk4XS/JE61rgIDrnMzw7OPR8PIC8Xse/r6GnmYKO3Rp8A+K85aQ 7NP/3k65AZydQrLAmuP67NBbqif8wb9+cxmh/TetIv05/LBP67Fnza1GQTNSqwZ84QmN GlFAolEpi1UTARjEwPz4Aug4zZQAf1lRz1BoTUIsdC1bdtNLMgp3udjR0Twy38GHQ7tq Ug0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eL2DXtq/rP8TZ2jDYm6stKjkD38WT1ewH8UCn9iYD+I=; b=xMHa0jrXuJAd1cvs8L3a9LxQHr5Kr8I7S4rRYMhIycbV7XRDVGH1ITdEPaR5cQZTJp mzFru8pyyMqjiURfYJrpviMOiVuYvS2yUEDYoMS5P9R0I7/NKUDkdq7vC/hmioaCPbgK /KoqMTpIDYU2feUx7AkhPgImuHdYPdpXFtL5/bJWx/Rj+MdbStiCfFgiwVuEwUwZD5WT Nwqr/UHNegqrBTraz5bP78H0L3sBiDa/jfyjScGu5D8vQMKwDDWWSIx2DVPulJ5bgFmV ErfrTvxTHa7Y4reAH7K47hbOT9CMt6a8iMNFBmW3SABSZVgdZnMk0TV9C9gBXsEiJuSA hA8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@opersys-com.20150623.gappssmtp.com header.s=20150623 header.b=I42p6Egc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si1345344pgl.364.2019.03.09.13.45.37; Sat, 09 Mar 2019 13:46:22 -0800 (PST) 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=@opersys-com.20150623.gappssmtp.com header.s=20150623 header.b=I42p6Egc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbfCIVog (ORCPT + 99 others); Sat, 9 Mar 2019 16:44:36 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:39551 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbfCIVof (ORCPT ); Sat, 9 Mar 2019 16:44:35 -0500 Received: by mail-qk1-f195.google.com with SMTP id x6so653228qki.6 for ; Sat, 09 Mar 2019 13:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opersys-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eL2DXtq/rP8TZ2jDYm6stKjkD38WT1ewH8UCn9iYD+I=; b=I42p6EgcsXFpfzgTLZan7rfofg0KeBkp6V7wvWypbSB8xpTbYIW8en6hYzpCBVDaX8 /EhjhiamXTcRTteu3xKkvru9BpZ4UZPswSa2/WCQaehHDQjytBIyuvuUzBpCFGrQN8ZQ uJwuvRkBeJPdi9x2es/7oKpNw7S2UU6Z5fZZFrTWyZbfUeNikl/U8z7+3GxXuHz3YiGg gybNh8lMbKdWmVoqQQg5/XCgpyT8hc2FwNaWSi8UFDA22hCZud7lPNzRi56FAtKpzk+i c2f2jGZpNmHDCJsgbEN27RIMP1WM3MvnQBCzw3luLGR8NZl+qsjXt/R69u4mFBtKpkfl p7VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eL2DXtq/rP8TZ2jDYm6stKjkD38WT1ewH8UCn9iYD+I=; b=Rr/k5KkJEekg7mQelpmtcnj65OcHzFp7nAyeW2qf5XG2NBiJ7qMJKOmkOkHNYk+Mmj 8V4aMQVA68SfgGTdb5dodoaudWqWDePgmSaFIGad3XbTLkEfJbvPojDoknu3Eh4CM45F ummLOVpV4jzrjrJQspU0Hq/wtVSmMwVPb5DOl263QIXeCP5VuiSRVnBwNnhx/BQ01/Yq 9cXgTQNH4S5rbicGdCTrDRNOs9r8KWmDfHFFyvkzf+M5+XpI5fXmMWps84G5lfXLy3vA Bl6cJdsQZXRgVwND6TmeBmVXDFRNuB6tZ/RHRadxJcGmrltMkqbXjzfQt11D2M82AkgD rGeg== X-Gm-Message-State: APjAAAWnNYrOiYNgPPk9jyhSJ5Ia/wOi2m2Wr7AnT1Cd1JjThlq0jyNG sKQDvzvfvOrdDadaaCx++qwCmg== X-Received: by 2002:a37:4ec2:: with SMTP id c185mr19771016qkb.244.1552167874504; Sat, 09 Mar 2019 13:44:34 -0800 (PST) Received: from [192.168.202.103] (modemcable170.15-70-69.static.videotron.ca. [69.70.15.170]) by smtp.googlemail.com with ESMTPSA id r77sm832622qkl.89.2019.03.09.13.44.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 13:44:33 -0800 (PST) Subject: Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel To: Geert Uytterhoeven Cc: Greg KH , Joel Fernandes , LKML , Andrew Morton , Alexei Starovoitov , atish patra , Daniel Colascione , Dan Williams , Dietmar Eggemann , Guenter Roeck , Jonathan Corbet , Kees Cook , Android Kernel Team , "open list:DOCUMENTATION" , "open list:KERNEL SELFTEST FRAMEWORK" , linux-trace-devel@vger.kernel.org, Manoj Rao , Masahiro Yamada , Masami Hiramatsu , Qais Yousef , Randy Dunlap , Steven Rostedt , Shuah Khan , Yonghong Song References: <20190301160856.129678-1-joel@joelfernandes.org> <20190307150343.GB258852@google.com> <20190308140251.GC25768@kroah.com> <20190309071648.GE3882@kroah.com> <20190309121141.GA30173@kroah.com> From: Karim Yaghmour Message-ID: <3e84e1ef-e266-e983-5874-6c26ac7f38b8@opersys.com> Date: Sat, 9 Mar 2019 16:44:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On 3/9/19 2:26 PM, Geert Uytterhoeven wrote: > Thanks for the explanation! Happy this was useful :) > So how does this work, with kernel images and kernel modules supplied > by separate parties, not "bound" by the same kernel headers/API, as they > can be replaced separately? The thing with Android is that there isn't a "one size fits all". Google provides guidance, policies and at least one example implementation through the Pixel lines. Each vendor however is allowed a great degree of latitude with regards to what they decide to do. Personally, if I was advising a team working on an Android device where Joel's patch was available as part of their kernel I would just recommend that they build it in -- i.e. not as a module. Hence, there would be no module chasing game. With regards to Google's guidelines for manufacturers, though, Google states that CONFIG_MODVERSIONS needs to be enabled, see here: https://source.android.com/devices/architecture/kernel/modular-kernels FWIW, that doesn't mean that modules are actually used. Devices don't necessarily have to be using modules. > Isn't the need for kernel headers for user-space tools something different, > as this is limited to the uapi versions, which are less (almost not) subject > to change, compared to the kernel headers needed for compiling kernel > modules? Sorry, I should've been clearer. I'm including eBPF/BCC into the "user-space tools" here. That was in fact my prime motivation in encouraging Joel at the last LPC to look at this. I've been integrating the teaching of eBPF into my AOSP debugging and performance analysis class (see CC courseware here: http://www.opersys.com/training/android-debug-and-performance), and it was pretty messy trying to show people how to benefit from such tools under Android. Joel's present set of patches would obviate this problem. HTH, -- Karim Yaghmour CEO - Opersys inc. / www.opersys.com http://twitter.com/karimyaghmour