From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96567C3DA7F for ; Thu, 15 Aug 2024 12:39:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 012286B00DB; Thu, 15 Aug 2024 08:39:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F04846B00DC; Thu, 15 Aug 2024 08:39:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF29F6B00DD; Thu, 15 Aug 2024 08:39:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C23996B00DB for ; Thu, 15 Aug 2024 08:39:22 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3DD34161599 for ; Thu, 15 Aug 2024 12:39:22 +0000 (UTC) X-FDA: 82454435364.17.C1A31DD Received: from greygoose-centos7.csh.rit.edu (greygoose-centos7.csh.rit.edu [129.21.49.170]) by imf04.hostedemail.com (Postfix) with ESMTP id 6DB4440006 for ; Thu, 15 Aug 2024 12:39:20 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=rit.edu (policy=quarantine); spf=none (imf04.hostedemail.com: domain of mstrodl@freedom.csh.rit.edu has no SPF policy when checking 129.21.49.170) smtp.mailfrom=mstrodl@freedom.csh.rit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723725479; h=from:from:sender: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: in-reply-to:in-reply-to:references:references; bh=M7jaOaC1aBLEHrYvKFbx2tRYCEXEJ6g//XoA9u/vjmY=; b=bBZzVqe0CqqWklqH04oW04xZwl4kK3GHqK74cezWPG5+ocKWavXET9g5L1iXXEHDu5VoEl nmwxPE3sPqee+yMA6SS/iabfmP1Yb+UW2mgR+4ykNZnlxLkLEPGjICos4c1bfnNW32pzG1 3bTAQsAxHzgnJzugJBM75jE1nDiTLhQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723725479; a=rsa-sha256; cv=none; b=lKDNZAqDU6swc2XCBZBFdu+N4xDqh3QKTG8IwNebKcSMb6EQbTH8lX1l14go123MSUnH31 vxoMjIxCDP3kQRk906j9ksP0a32dtx3c7qRna0ARF69AJTCyuhPnRlNLBR2r52bF7I7f2m iLmoYXxT6yHgcwr/Sk8edA5J+fz6CW4= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=rit.edu (policy=quarantine); spf=none (imf04.hostedemail.com: domain of mstrodl@freedom.csh.rit.edu has no SPF policy when checking 129.21.49.170) smtp.mailfrom=mstrodl@freedom.csh.rit.edu Received: from localhost (localhost [127.0.0.1]) by greygoose-centos7.csh.rit.edu (Postfix) with ESMTP id 3E67F4010D16; Thu, 15 Aug 2024 08:39:19 -0400 (EDT) X-Virus-Scanned: amavisd-new at csh.rit.edu Received: from greygoose-centos7.csh.rit.edu ([127.0.0.1]) by localhost (mail.csh.rit.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id c9L37Hq50jD0; Thu, 15 Aug 2024 08:39:18 -0400 (EDT) Received: from freedom.csh.rit.edu (freedom.csh.rit.edu [129.21.49.182]) by greygoose-centos7.csh.rit.edu (Postfix) with ESMTPS id 781D345735E9; Thu, 15 Aug 2024 08:39:18 -0400 (EDT) Date: Thu, 15 Aug 2024 08:39:17 -0400 From: Mary Strodl To: Thomas Gleixner Cc: Mary Strodl , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, urezki@gmail.com, hch@infradead.org, linux-mm@kvack.org, lee@kernel.org, andi.shyti@kernel.org, linux-i2c@vger.kernel.org, s.hauer@pengutronix.de, christian.gmeiner@gmail.com Subject: Re: [PATCH v4 1/2] x86: Add basic support for the Congatec CGEB BIOS interface Message-ID: References: <20240814184731.1310988-2-mstrodl@csh.rit.edu> <87sev6m14n.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sev6m14n.ffs@tglx> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6DB4440006 X-Stat-Signature: 7ww9iautwan4u5dywmi897bcpm6g46oz X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Rspam-User: X-Rspam: Yes X-HE-Tag: 1723725560-771955 X-HE-Meta: U2FsdGVkX19p91XxEu6pBXchIZUpORsFQZ4yrdU2xMN4buadpfzwjrO/BeV5q45AxBPRrngQY0zpPna8+NPagCQgCRFQezU68MVeQrkXrCXXO9jcwSiv8Za+6pIOOvmk435F0W108zwOcy4JsumGhcRRYniisCOFe4Ymx3D1UJuUPJjjsd8ttsO0XBG+VoWHRTpWpHjA79afAz2VVKyYpwyXQsLXX8tIdNjv419VI5ex96QTFm77F+Z+Z33ON6CiWAsfYHuFr2tAjpPAilCZBfCwDE+oTdA8Wc/ffnvd3YyBlwJjDMItpCCWw5WYji0ZzDHGVfhFPd7MB8zRsbCINOKkousKnwyoJZM/EFDGCW+ekXOxsNmsFr5d0wAu6eXrZqB+1JOO1zNgp5xkF4F7cLZSgrkCFCtbnwEWQsSozIuhjSPopncroIJkoKinE59DazKEiu+WzZMU+uFucNf+DaS2MQpkHjMFSKnQOdPiaV57AJ/byDgNSsSjSm1lfKGWtcnx2QxRzUYGudwvnWH5jUioL/NzAMHmm30pYkN0dpcSXdO+olU6k6B0yS3uaKuce2ObZvFgxQ7tAgsARZZrI5A7b2aC6aLAdfn7HboQGzD/WkTh9BMLEvwy0vJygCEfzT+C0C8daFfNWs+RGmLIk0z/3KoRGdEK9wl2GoT/KUfGN1TIlFzp72GY7otbm3Z8CMY7ObHRb+mxEiK2dzf8ho9GVwXiizWzVkm7zdsg0eJUkgsXlqzqH988FtjsYVg5ZAPn/mYNcOgNdRmBQUjabVYaMtOYo1OIhV4ZVOD+trviBc1xkhMQBH1/Al1uiFkJJg3v8Dn6WA4Ao3HQII9+JzWpTO6bCsmZ9A+8DoUGgDoNlwGNG6afPQ/E1W2kqNgAvfj0DUo6GSHmSETutIEnLN1dcMTdL7PSZC306rzb/iTTQDyqP6oW368JvPx+MZGwJ3uTJPss0WU37UjtbKE lEzpG74S 5WiLGW+TrriGhvl7ZTxSZGZ2YB17N7VnMCmnUIed55+FGN/NX9KycANbkHLz3CvC3iM42Dn+OdTfUwj1yOwSzI/DAnynizYcJWqI/sG/ZXKLNiy+hqPbTCZC2i4l+82bJhH3EBv1hIfn0VN+Sc8KZ/Df6vTPTa9A+KZ8JKC652mk64OoGysM/1k9N10X0aV5u+JU8YlLaa/hfSemya/w1M1nYbg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Aug 15, 2024 at 02:17:12PM +0200, Thomas Gleixner wrote: > So this caught the attention of my mail filter because the subsystem > prefix is 'x86:' while it obviously should be 'mfd:' Sorry! Originally there was some debate as to where it belonged and the commit message was never updated. > This Signed-off-by chain is invalid. See Documentation/process/ My bad. I was following the example set by last time this was brought up for review by Christian. Would you like only my Signed-off-by? Or something else? > Aisde of that. How is any of this supposed to work. What is the user > mode helper doing and why does this need this netlink indirection? The first time I posted the series I was asked to move the BIOS stuff into userspace. Personally, I'm not convined that makes it any less terrible, but I obliged. > Seriously? RWX mappings? Yeah. In my testing, it wouldn't work without writable mappings. > So this copies a code blob out of the BIOS region into user space and > lets user space use this blob to interact with the BIOS extension, > right? Yep. > So an i2c transfer does a full round trip: > > i2c::xfer -> cgeb -> netlink -> user helper -> execute random code -> > user helper -> netlink -> cgeb -> ... Looks right. I'm not thrilled about it either, but the vmalloc people wanted it in userspace. For our usecase, we didn't intend to have much throughput so it still worked okay for us. > Has anyone tried to analyze what this BIOS provided code blob is > actually doing? I have no idea what the licensing on the BIOS blob is, I didn't want to run afoul of any copyright stuff by disassembling it to find out what it does. I suppose I could pull the blob off my hardware and watch what it does in qemu? > All it does is to poke at a range of IOPORTS with in*(), out*() and that > poking mechanism depends on the generation of that CGEB implementation. > > Congatec even provides the GPL2 licenced source for this pokery as a > kernel driver. The only driver I've found from them is the one that runs blobs in the BIOS. Where did you find the IOPORT stuff? > Thanks, > > tglx Thanks for taking time to read through this!