Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp901276imu; Fri, 7 Dec 2018 10:38:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/VOKwjPlyoW8Gp7W80GgU1ZLHo2dip2+kXJuzv315+22PtivL6ct6tMtIEw60G8iLZeescr X-Received: by 2002:a62:9f01:: with SMTP id g1mr3274353pfe.223.1544207911229; Fri, 07 Dec 2018 10:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544207911; cv=none; d=google.com; s=arc-20160816; b=QBBca4veggLdOc+IGzihjoIozmQpPv8jta8Hy7eAAvxZaC1xbwbnU15VZDYh71wLi1 lmF0iWnh1XPSmQXt+MArIgxx1k7NKnqWlKKy2IgEArjeo4wp1vgyNpQuZX01o8uwFcvC yAEaG90Aspt2dJ5vQcqeddGoA+FS2atQAejGXTw6jnWTdNkKCCpmkJSKmWeEwwtrCZ3Z J5sBOSxMf1pZJxYqvZQVQosXLE1G8cSUgMJqIhWhbcI3dNVknO0Ogkalqm9goqXmvkcA RbdvCKElzd+qtcMqch3EdTM2/Ht/i/KMN2/toDDo0fUW4QkAiQGnmyJUgd2g55pcJ8pC K2Cw== 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=59viu8g67J1hJGG27Yjr5cyTTyZ+Px83OvtPnvkNwkY=; b=xBs2eeC3wGjwEzFB6wx9w2AV5OvYAFsNK+ZhGWb7mrwYE0uUMmXxOxa+2HFkPolTaW USLr/u0BkJNvMwFzjUCPJc/SqQY8bb76IJnEuyEUSgN69U/LTWldnF9evFhXppNAHIRl ffU6xUfChL6Gp6nTA+YyjYyvIGG3SMx4lLeLJflav0SoU7NKhjcxI8jdA1jPVfHAQ/DZ YRLqcmr4awGDnpZe4+D/3EdiFTdLwZzDCsIRlr+zIHLeOFIO6h/LohQ+djhT/U9LPXSb TaGCFbs8kPugyOR1/2IyJrwvp76u3OqCOS2jKYsiHs94JID1CmQG2O3EkHGaw92l8RYp yqiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GuKD7Mfz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si3349885pgb.319.2018.12.07.10.38.15; Fri, 07 Dec 2018 10:38:31 -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=@gmail.com header.s=20161025 header.b=GuKD7Mfz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726126AbeLGSfl (ORCPT + 99 others); Fri, 7 Dec 2018 13:35:41 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:32998 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbeLGSfl (ORCPT ); Fri, 7 Dec 2018 13:35:41 -0500 Received: by mail-qt1-f193.google.com with SMTP id l11so5580028qtp.0; Fri, 07 Dec 2018 10:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=59viu8g67J1hJGG27Yjr5cyTTyZ+Px83OvtPnvkNwkY=; b=GuKD7Mfzo7FW/kd/BN6igpoX4F2xUx/mz+6DnHzbMYbvxZznHQen9axXdg4fvA4+ce 3QkormnRCFCSvt/rHmZN3Yc2+x7ERKGatMxAZunDMjZ5k9v87bMGnUE0XW/bCk+LgA5A ObOyoELTAgUEPSYeln3aNk5xKRLPHGEfRiPjWEwU4B7g7Q0LN0DXYDf7h8L8TZpVinQo SRRcfV8W5W9M2dcmBHX/OoqMZNPOSETBgOQFveoIRTfGaOI52duOpEPCaadqJeFvYcoU rwzbgLYDC+ykcxIUBMUoeu+XqO2XLQ9pWkvbb/dc+k4K6R5OyLBFaWy5Nais5ETdpfaX yItA== 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=59viu8g67J1hJGG27Yjr5cyTTyZ+Px83OvtPnvkNwkY=; b=BHtHEYBxS0VaM2VmIncFPMqAQ4Um8HsXQnf65jNhK4qGMEBG7Zuse9a5GKFUpXQqZ9 A+CnzK2WLKeEZiSm/wz83uBXYEE73R2LRWta6F7Rr4CvHcuNyoeFGnMa2D8hhZJtjWdk TJzdCzoJpbN2VNUeetCb5s1brDDvJzAMJZUgeYiJ9cptddy3UQrBxYxbINe6DlHDLmLe 7jBkSduOIuoSPV1ons7+cqDXIjecxTfkdzaou5jMlU9G40pxdH8+ZWJrW1vjWBJePJvL fmBx6Lwey7iL56Mct115R8OoERFmKo6YWECxU+hKmpqH8/I/tovtt+ZB53PwW3vZwONx FJ9w== X-Gm-Message-State: AA+aEWbejlamyzcOoyaFKZ6jCgSQA4unlm4TakiM1m8qiTK70iZu/Ov8 p7TrvMLQOtgI4rzUfGwhww== X-Received: by 2002:ac8:3986:: with SMTP id v6mr3072102qte.1.1544207740021; Fri, 07 Dec 2018 10:35:40 -0800 (PST) Received: from kmo-pixel ([69.5.123.9]) by smtp.gmail.com with ESMTPSA id w201sm3917368qkw.11.2018.12.07.10.35.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 10:35:38 -0800 (PST) Date: Fri, 7 Dec 2018 13:35:35 -0500 From: Kent Overstreet To: Kieran Bingham Cc: Luis Chamberlain , Brendan Higgins , Matthew Wilcox , Eryu Guan , Eric Sandeen , jeffm@suse.com, Sasha Levin , Greg KH , Kees Cook , shuah@kernel.org, Joel Stanley , mpe@ellerman.id.au, joe@perches.com, brakmo@fb.com, rostedt@goodmis.org, Tim.Bird@sony.com, khilman@baylibre.com, Julia Lawall , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Linux Kernel Mailing List , jdike@addtoit.com, richard@nod.at, linux-um@lists.infradead.org, Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Herring , dan.j.williams@intel.com, linux-nvdimm@lists.01.org, Frank Rowand , Knut Omang , Felix Guo , Petr Mladek , fsdevel@vger.kernel.org Subject: Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel Message-ID: <20181207183535.GA31228@kmo-pixel> References: <20181128193636.254378-1-brendanhiggins@google.com> <20181128193636.254378-12-brendanhiggins@google.com> <841cf4ae-501b-05ae-5863-a51010709b67@ideasonboard.com> <20181204204701.GT28501@garbanzo.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Dec 06, 2018 at 12:32:47PM +0000, Kieran Bingham wrote: > Oh - although, yes - there are some good concepts there - but I'm a bit > weary of how easy it would be to 'run' the said test against multiple > kernel version libraries... there would be a lot of possible ABI > conflicts perhaps. > > My main initial idea for a libumlinux is to provide infrastructure such > as our linked-lists and other kernel formatting so that we can take > kernel code directly to userspace for test and debug (assuming that > there are no hardware dependencies or things that we can't mock out) I think this would be a really wonderful to make happen, and could potentially be much wore widely useful than for just running tests, by making it easier to share code between both kernel and userspace. For bcachefs I've got a shim layer that lets me build almost everything in fs/bcachefs and use it as a library in the userspace bcachefs-tools - e.g. for fsck and migrate. Mine was a quick and dirty hack, but even so it's been _extremely_ useful and a major success - I think if this became something more official a lot of uses would be found for it. I'm not sure if you've actually started on this (haven't seen most of the thread yet), but if any of the bcachefs-tools shim code is useful feel free to steal it - I've got dirt-simple, minimum viable shims for the kthread api, workqueus, timers, the block layer, and assorted other stuff: https://evilpiepirate.org/git/bcachefs-tools.git/ Going forward, one issue is going to be that a libumllinux is going to want to shim some interfaces, and for other things it'll just want to pull in the kernel implementation - e.g. rhashtables. It might be nice if we could refactor things a bit so that things like rhashtables could be built as a standalone library, as is.