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 780C9C3DA61 for ; Thu, 18 Jul 2024 21:31:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F7F16B0089; Thu, 18 Jul 2024 17:31:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A8A96B0092; Thu, 18 Jul 2024 17:31:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EDA046B0093; Thu, 18 Jul 2024 17:31:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D12186B0089 for ; Thu, 18 Jul 2024 17:31:09 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 853D040265 for ; Thu, 18 Jul 2024 21:31:09 +0000 (UTC) X-FDA: 82354169058.23.8226B70 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 8ECFEC0027 for ; Thu, 18 Jul 2024 21:31:06 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Vft36ehP; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721338234; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=w5nX+9AHxCF7p55806SMbDD0W0iR00eIVBjwYyL8j9A=; b=LcIR6iAHSTNr9V+pFihtjwq1mLfYd3T7j4fUtXtrscNh1kYnBXy+a3U/o14dMs3murdOwd ng4q+OYMyp6RX+2L67mLpLee66V8e9jU+aP5++lhbi7QLEEFZAhdTFnlrJYasZife8zHew FN/a/WkOE3YW14IwIpD+h4NZbTUK80g= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Vft36ehP; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721338234; a=rsa-sha256; cv=none; b=CPEGCRZNpKvhBptW+H5kgS9fHIgbb7mBNPRmls5e+4Q+QOaqIwUqDQ19m5zIiXHZhGkPe9 E0kvY0MP3W+S3rYv3DukAdWuAGenwcj/y4zVe9zpHARkAsG7cfkb4CLeGX+rr73gvBs7Pp ZwmgUFX2YugL5Z/F8TuNIVdc4PxCxCE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 654A961B6D; Thu, 18 Jul 2024 21:31:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 974B4C116B1; Thu, 18 Jul 2024 21:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1721338265; bh=ARBvX8mj5eWPQmirLy7aQUikr/98jNK8xQyoOm2j3I4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Vft36ehPzncdDBemuIjaHV1xNxpNl2fRCgnXCDYjtSa6Ymu9M+DmFHxO5AKyxz/1a /tTZjLClrCDhwYAP+RKWGbNtWPkdKdyi3qVxUVifctsE/gV7wrwzb8Aj/zSVb401CJ CVrTvCuBJjc5iKUwXTadwldJR0uOVbpHalkU/c6M= Date: Thu, 18 Jul 2024 14:31:03 -0700 From: Andrew Morton To: Mary Strodl Cc: Matthew Wilcox , Christoph Hellwig , Mary Strodl , linux-kernel@vger.kernel.org, urezki@gmail.com, 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 1/3] mm: vmalloc: export __vmalloc_node_range Message-Id: <20240718143103.82e33c556b2d1b6145ae43e0@linux-foundation.org> In-Reply-To: References: <20240718011504.4106163-1-mstrodl@csh.rit.edu> <20240718011504.4106163-2-mstrodl@csh.rit.edu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: 8cq1xrzdkefxsq1iewkwanhk7h8nm1uy X-Rspam-User: X-Rspamd-Queue-Id: 8ECFEC0027 X-Rspamd-Server: rspam02 X-HE-Tag: 1721338266-95163 X-HE-Meta: U2FsdGVkX1/VBGZ3MYfTb8mpJ0Xr9XLpcFQcaKztrD7AUIl1VuBvV1LSUFYRlQnlrMNa+AxrVNWWQDm0J+NUVeHuxkTTX6Lo7rx1QhxtAd1TAQ2A1ihLcF3PcXV2m/fSJe1ka+qQPu7Eeo62lSEtNfNib1HNb2QK/aohFfV9ehLJXqaLQnDjAIjYXP0WNjswB8F9wNKwwV0TN2iF241ZkuGXyTuP2tIBiJjq7Whx8/CFtxzXzLUbVsZ+hcBLyQkzy9myRKxDCXU5PXgBTafsEFIZwpg7DQpk14ygKsnczRWfgqWPVGqalASyG8R786TB8oGKDunaZAAq/XnLkGC35pvxu3aV9f3ob2bJXHJWvmgryIdRoWczPvwQ8jhD7UAKQWe2Fqst6TdbkQGyllPqgvzeFa8D1YVKlIA35lSxrxl17poynzuEK0QQIhA4bo++nzeRitPQQPjfNGw+wKxKS2J5zLffqeEEOcLscD3ml/bgETPPsPghO0v+pHTdGQJa9rW8U2t9q/8TNsPTxglwPLzaMTzbu9p0S8VY6eHJ0Sdi2JNP9QtViDYNhiXYnSPpdNZEHet6F6RavWS1H+yM/WYY38dCOzLTYe71wsek/U2k4dv9mznI6FNJjVc1Rc6hCgOaiM0Bh5emC9VB3FjuY3klkQIF+1SropDiFXmaKfkw5iJRKXjI75GCRj8Doec3ihFe6EdUnahH6PFAbRXU7puIFz/pavDWEfGmzNALUQ62IJ+Dvv2hT2o02KFpIagRwkE+fP9ynnM9I2km+7mAYd5DystUwxflgll0Ch6NEtUs1WVBHar1/r2AiE6UHttVeEicuQkfqGvPB4SXoNwEf//HNQe37vqdZzhG4BM9GBXs+ywmo2U+uAghpyf/m4vu1dmTotbhYF7DXHExBJeHkLIZb1viy4n4Hxd6yX8k9hGzLaB7BsGD3J3S+4A5lpj/vPfTNgqPl5zh3Huvz0a J/dD+eIg U7WE1eh4eCBB2Y4JV8zXGzyIRfbuHr2JDFDSwbNHOyCd/o/iCYAsXttJw3YotiBKb39E36Ol/eA+TxUmDu9Cmu5j3jdxCtu9RFiw2p26HPGq80Qn0E2I11wMVpGooGpcLb3y4ANSAIV4n+CJ4Ib0wujXRBOrl4lXzcvuU4sUMK6DfU41lPO0wRSUolSQY+JvFlRKYA+qQrtSYvdnQ3KnfqMHHFNaVqXRWVYfaAjSK6n5EdPEjUOpG6AcgCR10zgPFuGmm9AfDCydIZrfe4jTi/5NusDwMzer2RDA4k7E1bdRMXy26qTtKlRv+GUXEaGarSmgaoqh/1b5e40DizKlxT2sLftqSng5YyLmm 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, 18 Jul 2024 09:20:15 -0400 Mary Strodl wrote: > On Thu, Jul 18, 2024 at 01:53:23PM +0100, Matthew Wilcox wrote: > > That does work, but I would assume that since this BIOS exists to > > communicate with the hardware that it'd need various special privileges > > and that running in ring 3 would not work. > > Exactly. > > > Ultimately, better off running the whole thing inside a VM and passing > > the device through to the guest. Or ignoring the BIOS entirely and > > implementing direct access to the hardware. But neither of these > > approaches is "a way to do what I'm trying to do", they're entirely > > different approaches to making this hardware work. > > If I ran the whole thing inside a VM, I would still need support in the > kernel, right? > > As far as I know, there is no documentation on Congatec's side about the > underlying interface. Obviously I could disassemble the blob in the BIOS > and figure it out, but I suspect that will have much less hardware > compatibility and be subject to random breakage if they make a BIOS > update or something. Plus, I would probably run afoul of copyright if I > wrote a driver after doing that. > > I'm not really thrilled that this is their design either, but I'm not > sure that there is a better answer... > The hardware is weird, but we should try to support it in some fashion. But without making dangerous functionality more widely available. So we're looking for some solution which can be fully contained within that hardware's driver. Dumb idea, there will be other ideas: is it practical to take that code blob out of the BIOS, put it into a kernel module (as a .byte table in a .s file and suitable C interfacing), compile that up and insmod that module?