From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YFMgLEG3kGGcUgEAgWs5BA (envelope-from ) for ; Sun, 14 Nov 2021 08:14:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mEnJJ0G3kGH2LAAAB5/wlQ (envelope-from ) for ; Sun, 14 Nov 2021 07:14:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ED56231166 for ; Sun, 14 Nov 2021 08:14:08 +0100 (CET) Received: from localhost ([::1]:47562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mm9iJ-0000VT-0x for larch@yhetil.org; Sun, 14 Nov 2021 02:14:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm9i9-0000VE-SX for help-guix@gnu.org; Sun, 14 Nov 2021 02:13:57 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:46779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm9i7-0003eD-ED for help-guix@gnu.org; Sun, 14 Nov 2021 02:13:57 -0500 Date: Sun, 14 Nov 2021 07:13:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1636874031; bh=adncDUaTc6Rtd3BYP29SsdRpl44xmHa17uA2jDI14yA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=rC7Kw/goNZln2LjS8AtYRSo54/iTwYuFFxIQ/X2pac3RiqnhzyoLJLabHOF6ANBzO 43Rsrw3+7nt8QBH0EQt9M0duWCghJekDHtvZhOZGrxGhudCWs59PncxLTdzL11WelE bdxmV6Q7vgwyo0YjnyjeslMI4kgEOzcPMDO5cTRM= To: Tobias Geerinckx-Rice From: phodina Cc: help-guix Subject: Re: Custom libre kernel configuration devolving into Anbox review I guess Message-ID: In-Reply-To: <87ee7kjhzw.fsf@nckx> References: <2cc0eaa33fd6bd50b5ecc0dab0ef2491@tobias.gr> <877dddhrcp.fsf@nckx> <87ee7kjhzw.fsf@nckx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.16; envelope-from=phodina@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: phodina Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636874049; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=adncDUaTc6Rtd3BYP29SsdRpl44xmHa17uA2jDI14yA=; b=Lqv41+ck5AVACsuzlpCBsgm6+DTXfZ5de+R55vz2274UpeHntbXvW7ptO4LVXNGwwseq5C Z+WcE6D7Ljco8tADe1esKLmqhNQreiCct8ejeRwwDN8hXjwIrMfaJEFb3TAtpxKCK24Qvc 9exnBLK2bChwhea5XkcTifayWd+qrwWBLWPP8icAVDcnGbiaZyRMK1wWWl17lttNCf5EaA nEwhVpao65TjlMfanUr+RyMAnKvmWTuvPNNHYQYKZ6On1naHwfRoU/Tlonut7K+Ba7R4f1 UkE8k3GptOcj7cVxngfmU9yg02cEuf+6/ql6ckCEJ46p3/nGu4dkpR43NmSQOg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636874049; a=rsa-sha256; cv=none; b=WZotReebNSnag0ck/BKPP32rpaX2JhCv9GjsUklLB1vsKlA4ZL9aM0VqQ6ivWvWi2uWpa6 CfG7Z4FXIZaeM2sgfg7dXJNzm7hZGbkcfue+nVGxSzgRKafD+0jB2uEe+8bjDeXveUdiO4 eHxlkBSLM0iOSHTyMLzyOUH0YvIaCIfYN2UkiVK+V/O8k3a85JD48o5k456Qwqs2VAwhch v/6lx1cUOlEt9Wj6SHcro7mUBkkgYk3a6pN17xJwFJWqISHmZE/yLRlYWkxR6aLqMtBdHP tCLP7xevtyuxnMr381ylVD+Tw2VUubqMZdy2Avg005VkSiFswosPbOHIrtrxUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b="rC7Kw/go"; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b="rC7Kw/go"; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: ED56231166 X-Spam-Score: -3.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: MBjmCKJsImR9 Tobias, On Saturday, November 13th, 2021 at 1:23 PM, Tobias Geerinckx-Rice wrote: > Petr, > > phodina =E5=86=99=E9=81=93=EF=BC=9A > > > Though the issue seems to come from the Archlinux Wiki[1] where > they = supply wrong CONFIG options. > > Well=E2=80=A6 yes, it's a wiki. The Arch one in particular has a reputati= on to uphold. > > Still, it[1] doesn't suggest either of the problematic > > - ("CONFIG_ASHMEM" . m) > - ("CONFIG_ANDROID_BINDER_IPC" . m) > > values. These can't work: > > config ASHMEM > > bool "Enable the Anonymous Shared Memory Subsystem" > > config ANDROID_BINDER_IPC > > bool "Android Binder IPC Driver" > > So don't waste time hunting down dependencies which don't exist. The = third-party modules[2] were never part of Linux and are by now well obsolet= e. I checked the kernel KConfig help on that one and compared the options with= Fedora 35, where I have a running Waydroid instance. > > From the same wiki: > > > CONFIG_ANDROID_BINDER_DEVICES=3D"binder,hwbinder,vndbinder" > > > > [lalala lala] > > > > With your new kernel, you will need to append the following to > your > > > > boot arguments: > > > > binder.devices=3Dbinder,hwbinder,vndbinder,anbox-binder,\ > > > > anbox-hwbinder,anbox-vndbinder > > Why does it first recommend a different value from what =E2=80=98you will= need=E2=80=99 to boot with later? Merely because it's the Kconfig default?= This does not fill me with confidence. As you already mentioned this sounds fishy. I'm also noticing the inconsist= encies and would like to get it right here in Guix. > > Later(!) on, it suggests yet a third, seemingly preferred, option: > > > scripts/config --set-str CONFIG_ANDROID_BINDER_DEVICES "" > > > > [because] > > > > Not everybody was happy with the binder module in Linux. To > address > > > > the issues, binderfs was created. One has to choose between the > old > > > > and the new way when compiling the kernel. With the options > [above], > > > > one will use binderfs instead. > > So=E2=80=A6 maybe that's the cool (and more secure) new thing and we shou= ld be using binderfs without any DEVICES instead? Is binderfs some kind of = /dev/pts for them? Have you tested Waydroid without any? I'm trying to test/port Waydroid now on Guix. However, firstly it requires = the modification of the kernel as already discussed (though not resolved on= what exact configuration is needed). Secondly there needs to be the Waydroid Python userspace app. I've created = a patch for that here [1]. Still awaits review. In order to run Waydroid you need Wayland compositor and LXD service. The l= atter is not yet implemented. I've found a patch implementing the support, = but it need some polishing [2]. Though at the current state the LXD runs. After adding the LXD service to the system I managed to initiate the Waydro= id. But as I attempt to open a session I get error regarding not running waylan= d session which is strange. # waydroid.py session start Password: [07:40:41] XDG Session is not "wayland" The official setup is Debian with systemd, so I'll investigate this issue f= urther on the repo's github issues. On Fedora and Archlinux I don't have this issue. > > I'm picky because I want to suggest the following, which makes it importa= nt that at least one person understands these changes and that we get them = right: > > Do we really need yet another kernel variant? Building nearly-identical k= ernels on CI is quite expensive, especially on ARM. Let's not add them ligh= tly. > I totally agree with you as another kernel variant is huge demand on the CI= resources. On the other hand people not wanting running the Android apps o= n their machine would probably prefer to have this disabled, right? Also is it possible to add the kernel variant but mark it not to build on t= he CI? > Is this code so dubious =E2=80=94 compared to the rest of CONFIG_STAGING,= which we already enable =E2=80=94 that it must be quarantined in a separat= e kernel? If so, why? > Well you add additional code complexity, creating kernel which needs more r= esources and creating a potential security issue with new syscall. Though I= 'm not expert in this area and it definitely need deeper discussion. I also used/I'm using Fedora/Archlinux and the current status there is that= they these setting are not enabled by default in the "main" kernel, but th= ey build one - Zen (Arch) and XanMod (Fedora) - where these options are ena= bled. Don't know the reason why they separate it, IMHO it might be due to the rea= sons mentioned above. > Do these options make practical sense to enable on non-ARM kernels? Does = Android run on them? > Yes, you can run Android images for x86 [3]. You can play Android game or i= n my case I run unfortuantely a proprietary messaging app to chat with frie= nds without touching the phone. At the moment I run Waydroid on my x86 machine and on PinePhone (aarch64). > Why was CONFIG_ANDROID_BINDERFS set to #f in your previous patch[0]? Typo= ? Evolved knowledge? > Yes, this was a typo. Sorry for the confusion. > I often forget to do so myself but still recommend adding a human-readabl= e =E2=80=98v1 -> v2=E2=80=99 changelog (that won't be added to the git comm= it message) to explain such changes and catch any unintented ones. > Good idea, I'll add it to my list of this to check. > Kind regards, > > T G-R > > PS: Another nitpick, but as CONFIG_ANDROID =E2=80=98unlocks=E2=80=99 CONF= IG_ASHMEM, please move the latter to the end of the list. Sure. > > [0]: https://issues.guix.gnu.org/51771#1 > > [1]: https://wiki.archlinux.org/title/Waydroid > > [2]: https://github.com/anbox/anbox-modules/issues/75 [1]: https://issues.guix.gnu.org/51737 [2]: https://issues.guix.gnu.org/50133 [3]: https://www.android-x86.org/ [4]: https://googleprojectzero.blogspot.com/2016/12/bitunmap-attacking-and= roid-ashmem.html