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 39AB7C4332F for ; Wed, 19 Oct 2022 20:00:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B51956B0072; Wed, 19 Oct 2022 16:00:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B01E56B0073; Wed, 19 Oct 2022 16:00:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C9A66B0074; Wed, 19 Oct 2022 16:00:12 -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 8A6C96B0072 for ; Wed, 19 Oct 2022 16:00:12 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4A66A40D8B for ; Wed, 19 Oct 2022 20:00:12 +0000 (UTC) X-FDA: 80038765464.24.AFB8DCC Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by imf09.hostedemail.com (Postfix) with ESMTP id CE32C14003B for ; Wed, 19 Oct 2022 20:00:11 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id v11so3601391wmd.1 for ; Wed, 19 Oct 2022 13:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Y2N+V1uC9FDjbZcJb9aKbA76091h0TpDZZKWHaAmAek=; b=Lw4jVYTIUktL0VD/hUyxuK2pdB+TLLlMZirRYUqhs2U98/w8T/30PXKiSQ70UgVAq6 +grAdpBFztsHMbqs06MBtqGFYggBuQ8eB5hLxlopjVREuCd6GoyGxs5nbQQMkDUAsspT YhQ9IztsM9nZHCvOhL03IV/fnoWIqaxZ0utZhXJVoblGjV2OUVXW5EiT9sjDw6u7+lUt 9ZQvxCuqtpyMDdIxf6qk3fgrd6wCkkmmNjf4LKAopOmbVPc/vI+MkblfYwX6EnXL/YVt U5YgOhvlpQ8y6+A+Fx25TgNIreQUA+4XldEr3KiLCwcLqj9JsYgRtuPqCqw88ukO8vGV 0fMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y2N+V1uC9FDjbZcJb9aKbA76091h0TpDZZKWHaAmAek=; b=rMFUJAnRLmCEXi3QBU2qrXJVaIYZ19vnwfetnasQSnMxGnd7aduYnF9rdTY/MZN+42 tM1fET8Qoo7fInU1ZvmHQXxsXsZb4VhtZdQt+bx2PRcBYbsUeaf6VWzPli/ZWMsb9rKX 0heAnx2tUxeKvege+WJsXPbjZFQPH5BBy2EFhjYl7coeR0guoPVcceF126xZ+dDtZfDM sZfmviUw0M0ERmSo8PUTKsfaAq2W9GjDCErCbzmp+zo9BgzEmJm1Kt3YxJPCBfup/8YV YpqkQ/Yd2uB7vGOcQmf2LlNjXorvZTpkk9bhzE/c4Jv0y7S9r5+AkOt9nfKMsSKm9Zto hZJw== X-Gm-Message-State: ACrzQf31BBWMenWXR2Fjgn+smFzEspnQ70IWHIp/hkUFtmqPcBLIMjaL +ecPSmNAZ4FNtv27wopNSnonvQ== X-Google-Smtp-Source: AMsMyM6B3pwfghBShw4QCFh8wsWBS8bi/WgiLJm5OdtkiIadPOi40t5IpnUu2dUWkrkhhaqvsZnpVw== X-Received: by 2002:a05:600c:a45:b0:3bc:c676:a573 with SMTP id c5-20020a05600c0a4500b003bcc676a573mr28289654wmq.118.1666209610271; Wed, 19 Oct 2022 13:00:10 -0700 (PDT) Received: from elver.google.com ([2a00:79e0:9c:201:b751:df72:2e0f:684c]) by smtp.gmail.com with ESMTPSA id ay18-20020a5d6f12000000b0022e62529888sm945871wrb.67.2022.10.19.13.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 13:00:09 -0700 (PDT) Date: Wed, 19 Oct 2022 22:00:02 +0200 From: Marco Elver To: youling 257 Cc: Alexander Viro , Alexei Starovoitov , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Biggers , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Stephen Rothwell , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 18/43] instrumented.h: add KMSAN support Message-ID: References: <20220915150417.722975-19-glider@google.com> <20221019173620.10167-1-youling257@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.7 (2022-08-07) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666209611; a=rsa-sha256; cv=none; b=5nc+vGL05HJ8dOnhgWIdnlYxYRkHkCK+weFI5MjUMkXxNNNwvDFkud4xrl23Wq1vknekr8 B2DrzqYbX8adL7jScn35Wv9bbeCJF44sMETrKnXttfsTfpBPEGbSjx5iFkNhiggKY0hI40 /zIAhs9ItFOzSHKLDM2kyRqiMJQ5DSM= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Lw4jVYTI; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of elver@google.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=elver@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666209611; 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:dkim-signature; bh=Y2N+V1uC9FDjbZcJb9aKbA76091h0TpDZZKWHaAmAek=; b=37vEq0B0MvOFkkA2dkqDShR9cXQcY0/rLz3eGaFutEAt4ma7MZjWJSAc9TSHqDWnwCQvWR pszoQCRlurZnqiZEUlm1047Hun4kmPaKfPW3P3qxdxgx3sRq3okwB7/g2xCX1FYoGA9E9p RIkx4p++hkojUU7NDfLL1CeTmCoBRdM= X-Stat-Signature: 4yyxx5q8kpuoaw66c55jgr9iehmze9ch X-Rspamd-Queue-Id: CE32C14003B X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Lw4jVYTI; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of elver@google.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=elver@google.com X-Rspamd-Server: rspam11 X-HE-Tag: 1666209611-15472 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: On Thu, Oct 20, 2022 at 03:29AM +0800, youling 257 wrote: [...] > > What arch? > > If x86, can you try to revert only the change to > > instrument_get_user()? (I wonder if the u64 conversion is causing > > issues.) > > > arch x86, this's my revert, > https://github.com/youling257/android-mainline/commit/401cbfa61cbfc20c87a5be8e2dda68ac5702389f > i tried different revert, have to remove kmsan_copy_to_user. There you reverted only instrument_put_user() - does it fix the issue? If not, can you try only something like this (only revert instrument_get_user()): diff --git a/include/linux/instrumented.h b/include/linux/instrumented.h index 501fa8486749..dbe3ec38d0e6 100644 --- a/include/linux/instrumented.h +++ b/include/linux/instrumented.h @@ -167,9 +167,6 @@ instrument_copy_from_user_after(const void *to, const void __user *from, */ #define instrument_get_user(to) \ ({ \ - u64 __tmp = (u64)(to); \ - kmsan_unpoison_memory(&__tmp, sizeof(__tmp)); \ - to = __tmp; \ }) Once we know which one of these is the issue, we can figure out a proper fix. Thanks, -- Marco