Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp902040ybh; Wed, 15 Jul 2020 19:42:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3IauqMs1M+O0IpqI+5U525tvD7gqegMPw6Ntit6pa1NHFGqf913l6FuG+wGfaUFiDHLkv X-Received: by 2002:a05:6402:741:: with SMTP id p1mr2381196edy.222.1594867330221; Wed, 15 Jul 2020 19:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594867330; cv=none; d=google.com; s=arc-20160816; b=E/YNVENViZdMRr5LUMYEdWoQe2AypQgvkA/fMV02J8NhoRUwzQUBF9luJrQ29niO+r JqONcoXzx5+H/66MZS7LLa7g3Mp3U8u7xXYQ+vTifl+Vt2wqwrck2j1LwqEV5AOSXWgY V+uJhThkry9IYjB2dSYmoKCGkOf/uz6KMgfBcsMbDpkT8g+Tpujj0raOrBQdDQj+jtML S2UNFfqxx40nmjkFnaxM1yLVRPDyw5GbQ8EQihjQ2xDUAuxZDP1dItKwMgb6l9Vp6CDm PQjwxpyOjLzLe+UCFkFAwsGt0K4ftv3d8dE/ltjwITbGvG1k21F2UuKlUpelT0GbiCSE +FzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jqVUIDpGCAipRS+ecPG15XM7TieBrIaHAd9mloEKAfg=; b=Y0SY/LKVgtSPJjxdDpO9Fff3EjV/qc2HHcGT9EYJRUaql9S0i0YV3rWYcN2Mb1M2f9 GmW6OEkXJuHobQPZY21B9wVEjk1+f7UQaW3IEAMEhGwvKmFf6CuGLVYbgMznjAJ0nHsF NsCMvIpQBkByW7PEJxduA130xPL0LZMNctfNvcRgu3d07T546Bde4FjZ+9pxYT0q7suO S2Aa9LWC4i+G04JbQ2hlDje7qH+2A2iwTc3e7D308apo06cgyl2K2QFSNTqOR954DVQD 5iN/Hvp3R/dQ0/sMc0HSKrhG3B+PpVMh0wj3dPZkOIgK3orveiNqEBMUA6EPOc3IsEXg KV1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JHxuqay5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si2506584ejr.238.2020.07.15.19.41.47; Wed, 15 Jul 2020 19:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JHxuqay5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbgGPClo (ORCPT + 99 others); Wed, 15 Jul 2020 22:41:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgGPCln (ORCPT ); Wed, 15 Jul 2020 22:41:43 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94C7CC061755 for ; Wed, 15 Jul 2020 19:41:43 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id e8so4099444pgc.5 for ; Wed, 15 Jul 2020 19:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jqVUIDpGCAipRS+ecPG15XM7TieBrIaHAd9mloEKAfg=; b=JHxuqay54G74N6vgudi5DVmCfb4LywmFRGcKR/VpugHM8EUk43/s0CR2VP3/5kLIdx UvyJZpGYeun6i18sh6eYGHmfAvaouR2XxCQugfkAC5YUal7+JFzkKqNxJm/QVlqbFxeq Z/OHtPeZEPIIoWCPsB5YvZ+H78MRYn8SrV2cM= 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; bh=jqVUIDpGCAipRS+ecPG15XM7TieBrIaHAd9mloEKAfg=; b=WqUyC9VI4UOHEpyWiBNdeg6Zic95B2Pn2n+3UtHh8x7nDbpqsxY4SQK9sij0fCUtRN 2++3qi+nfF1qUGBYw/Q8Dg8O1yf2uNfy/9ILJkNOD7yrhplpwAoeejTx47pSc3adNBBh 96hBInaCEnfCkZR4ajgiTNWkX8yk1qE7kXKNybT92ZnOdCx+zCaBaLHYN7Y+DBsK5PdE kNpXIerjph46STHdV6k3ZgM/QQl7TNhxeXS3aZyRT4zWGhqpdDtX62glMqUL6GqrUzyI NyTKTPqEC5tHsA+3BUrH7kLtbUZKp9DTb6oeReaqspc70eQCNi2Zmxuzj+Iq9QXcVDp6 J6rg== X-Gm-Message-State: AOAM531fS4j785jLC57gZHKmBibd/Qi5sn5U3HCr+jQUYbIfPfEJ+MxA zf/Ozhm2hpwy1t4l/U09uy1cNA== X-Received: by 2002:a65:6883:: with SMTP id e3mr2401712pgt.5.1594867303051; Wed, 15 Jul 2020 19:41:43 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z2sm3271605pff.36.2020.07.15.19.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 19:41:42 -0700 (PDT) Date: Wed, 15 Jul 2020 19:41:41 -0700 From: Kees Cook To: David Gow Cc: Vitor Massaru Iha , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , Brendan Higgins , Shuah Khan , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [RFC 0/3] kunit: add support to use modules Message-ID: <202007151939.62EFE6F@keescook> References: <20200715031120.1002016-1-vitor@massaru.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 15, 2020 at 11:47:11AM +0800, David Gow wrote: > - The inheriting of the mm stuff still means that > copy_{from,to}_user() will only work if loaded as a module. This > really needs to be documented. (Ideally, we'd find a way of having > this work even for built-in tests, but I don't have any real ideas as > to how that could be done). I'd like to better understand this ... are there conditions where vm_mmap() doesn't work? I thought this would either use current() (e.g. how LKDTM uses it when getting triggered from debugfs), or use init_mm. I'd really like to see the mm patch more well described/justified. -- Kees Cook