Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2040422imu; Thu, 24 Jan 2019 06:19:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN6waWKdd/LoNkL3JMroIWaQhMkJIL6lLhem15QtlIfuIyhRckMvB/oh4kXGoQ5yiBXhj6LM X-Received: by 2002:a62:1709:: with SMTP id 9mr6549890pfx.249.1548339556013; Thu, 24 Jan 2019 06:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548339555; cv=none; d=google.com; s=arc-20160816; b=m/QycHCxsqvw2n3Fa2negI03FMBbWo25CooC92GQd9KdE+slZgclSaFIdNHHwjMbUv OUAc6irAA3Yukfkt49Z3rtOuoSeGtNPY5faxiSV/SSjSWJEdYWzbx+KHp9xMcT9Q9HwY KCQZNwgGUE9NhY7jsKxFsTAH56dKx/ZJT+E2gfuLE525H9FO7l18zFOqrwUomp5IticT AqLCQQBjbp+l1ZCtowfUHL6vQXtZ+04NWQyWVInmVvO9y0xH0K8sgYZmmOw628eXdSMG fc+5vZn6VQULvj4b3J35vFm4tlp7WbKGvVw+vN7ZbOEe6UrF847uuNOUwTrAs+3LpoKh ndpw== 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=Skgo5z9eJrMNa3iKEaytgJwZNUVdVDbHbeZE63F3NTM=; b=gumAmSuHT8eMY+s2sNmQ3St6dj6PCM3BD7pMaQWxbEgViUqv2J9YcDKPAlydMXPfaz 3tO7Mbnp+RArvpFJCJfyvw9jHFz4xlKbxGOOGZ+wyTxK6pO2Yt0leqPSVG1Szp2n7/tZ IU4rAC5jNRk+NsPBQxswBcZLxBpvTjR4IOGc9XdaLwqE6gq4TYf3m5jaGaYXpDYjRqFH /9HECf6f4CKhQWhha3+zNVurmA8UnfUchFVBqouPGYpcdka9ac8UcD/0NNb86T0rGw2N JlB/zeyVsoJXWAskcfXsi2eUZ+d462K70WQsUs5d4Mj6yMmBGMfF08HGVTv+yXyq7Pvo MnAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=yNHjIS0R; 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 b186si22815621pfb.24.2019.01.24.06.18.59; Thu, 24 Jan 2019 06:19:15 -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=@joelfernandes.org header.s=google header.b=yNHjIS0R; 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 S1728289AbfAXOSY (ORCPT + 99 others); Thu, 24 Jan 2019 09:18:24 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36205 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727562AbfAXOSX (ORCPT ); Thu, 24 Jan 2019 09:18:23 -0500 Received: by mail-qt1-f195.google.com with SMTP id t13so6674017qtn.3 for ; Thu, 24 Jan 2019 06:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Skgo5z9eJrMNa3iKEaytgJwZNUVdVDbHbeZE63F3NTM=; b=yNHjIS0RUjmjSVgNCZuEmnai/AWXdZdxhVo5KnKrxFp3CLCpxQ1O/FHQSPzhDnoCz+ 4km35tLrGopa6q5oXvRlY9UWTkOCCM309D5pLu1ZCsr7UlXnSwIpkajKcWmHXZC7QbH6 ZlcC6Xh4DNGrDG8F2yWbCFEPwCpVqkWh0/AQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Skgo5z9eJrMNa3iKEaytgJwZNUVdVDbHbeZE63F3NTM=; b=Kg8thEabEpA+fh23XH8x9mCAs6gCuU2Ysq89xNsy3/lZ41Es+1YkLSmXpWk2y6+lDj mIhYUPUhLDKCHUHsCGzK4crcAQwMZKg3AODW5KyjhWB4esvnS3BV/5rJ8+rve7NCMQg8 f/uMOdLFoF+ZiyAajhWl14T6xPYUGZXth11194ccy7tlGCtBfzziJmqlPEMhheTnvwQn rXo7HGOTJ02TSIUIP4iE0CVVlnYQqr1OtBWE4s6LD0BzUB53NLp5kPMNJGGZojObdCbp ODytmwnquDUumfD0FT7a+zvCNC4AgZIR6tGir7HaxNGS3pCisXWl2pT36aZ25TKm7LlL NH6g== X-Gm-Message-State: AJcUukeBI1Tum4bLMCi3oEyQsKGqX02mWWDIuADiJpg4Nw8mXnEBiV4L quN+UjXrtgCBfoVO9NNQm7s8Tw== X-Received: by 2002:a0c:d0a8:: with SMTP id z37mr6326530qvg.86.1548339502151; Thu, 24 Jan 2019 06:18:22 -0800 (PST) Received: from localhost ([2620:0:1004:1100:cca9:fccc:8667:9bdc]) by smtp.gmail.com with ESMTPSA id r24sm76718067qtr.2.2019.01.24.06.18.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 06:18:20 -0800 (PST) Date: Thu, 24 Jan 2019 09:18:20 -0500 From: Joel Fernandes To: Daniel Colascione Cc: Karim Yaghmour , "H. Peter Anvin" , Greg KH , Christoph Hellwig , linux-kernel , Andrew Morton , ast@kernel.org, atish patra , Borislav Petkov , Ingo Molnar , Jan Kara , Jonathan Corbet , Kees Cook , kernel-team@android.com, "open list:DOCUMENTATION" , Manoj Rao , Masahiro Yamada , Paul McKenney , "Peter Zijlstra (Intel)" , Randy Dunlap , rostedt@goodmis.org, Thomas Gleixner , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , yhs@fb.com Subject: Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel Message-ID: <20190124141820.GA75378@google.com> References: <20190119103606.GA17400@kroah.com> <8BD4CB7A-944C-4EC5-A198-1D85C9EE28D6@zytor.com> <20190120161003.GB23827@google.com> <20190121014553.GD23827@google.com> <20190122133901.GA189736@google.com> <117d2f96-b0e9-2376-69b7-836fa0c52539@opersys.com> <20190124023216.GA75730@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190124023216.GA75730@google.com> 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 On Wed, Jan 23, 2019 at 09:32:16PM -0500, Joel Fernandes wrote: > On Wed, Jan 23, 2019 at 02:37:47PM -0800, Daniel Colascione wrote: > > On Wed, Jan 23, 2019 at 1:29 PM Karim Yaghmour > > wrote: > [...] > > > Personally I advocated a more aggressive approach with Joel in private: > > > just put the darn headers straight into the kernel image, it's the > > > *only* artifact we're sure will follow the Android device whatever > > > happens to it (like built-in ftrace). > > > > I was thinking along similar lines. Ordinarily, we make loadable > > kernel modules. What we kind of want here is a non-loadable kernel > > module --- or a non-loadable section in the kernel image proper. I'm > > not familiar with early-stage kernel loader operation: I know it's > > possible to crease discardable sections in the kernel image, but can > > we create sections that are never slurped into memory in the first > > place? If not, maybe loading and immediately discarding the header > > section is good enough. > > I am happy to see if I can shrink it down further. Especially using xz and > stripping all comments period. I am optimistic this can be brought down > further to a point where it would make sense to everyone to build it into the > kernel. Lets see. > > Last time I stripped comments, it went down by ~40%. What I haven't tried is > doing this *with* xz compression. I am also open to brainstorming what else > can be stripped. Removing comments (/* */) with xz compression brings it down to 3.3MB. thanks, - Joel