Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2112348imb; Sun, 3 Mar 2019 18:39:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzkNSf9uivAjswS2pvHJVNoYM/QeiB21NXJSpTtl141kDoXG01U+Vq6u/L94xIUGLq7nIRW X-Received: by 2002:a63:4f58:: with SMTP id p24mr16431398pgl.283.1551667142541; Sun, 03 Mar 2019 18:39:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551667142; cv=none; d=google.com; s=arc-20160816; b=Icft0A81RQvX26iPMSAKbuNUz5/xml7KtkIjPuu/koKHM7I011ewWhIk3pMwE+7eFQ O7//7H0VbTXNSA76MqYz5lsSgyGw9KSFL9txByyJ1F+20H3WyYu5nMDpyavJGjetAoAu cnBntULyGFRakc9rB+C03Mw0lpbIY9XKDg1OpsHd3h/pg11Wy6DfJLsMIpzmsJJ62vsI 4UrhxGb0bWZSAeUs8S6k8lEern/aI7u6soOSkD4JEBcM1hSZ/gUsOswOEwG3PnkTZo93 WS3IJ98OAHbRC0waMOvSBniHfNVmHYptOhKqsWchi4J7Skp1cvbo1Dlz5YkakbPBgnyk 1NSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4JrruaKr/DC29lA6rXyh+567cPmWV36kSmiJipTZUsY=; b=hT9PZYbCqrWaBZcp8WYr/GPzUxw9UEKDg383jAzNwyJLACezH51HCdRj0MNVWAf/cQ gUYflx5h/VL/7rlDL4l3AsZt0ObXB1oivu3tuTe2SochIpgYVVqpaHP8Kz+0Po501BOM 3ACwH41xMX8/vPyIScb6Uf7NM5BMd2Rgi7uy25lkuoigi4mC9KcUTKBW0cwsQkkHhXHq kMby3HheJKn+nj2OTjOLeCr0spEhWC7qSrdmHnzTluj6IEZuj2myHHjxoRnlP+oo7jhK uW+IyADS/OGB8Q6nFsjBu+5Ea4oUDDOT3w2/uIIdhMvAZBgB33eLXkvsKzhSdotTTgyA SZJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XAJuR9aG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si3959253pgs.147.2019.03.03.18.38.46; Sun, 03 Mar 2019 18:39:02 -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=@linux-foundation.org header.s=google header.b=XAJuR9aG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726182AbfCDCiU (ORCPT + 99 others); Sun, 3 Mar 2019 21:38:20 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:44057 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbfCDCiU (ORCPT ); Sun, 3 Mar 2019 21:38:20 -0500 Received: by mail-lj1-f194.google.com with SMTP id q128so2921870ljb.11 for ; Sun, 03 Mar 2019 18:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4JrruaKr/DC29lA6rXyh+567cPmWV36kSmiJipTZUsY=; b=XAJuR9aG9KY9lQh2pBmcElx3sE+8A5ktEUPGY4prQ7XEQkzfH03a+OOJdNPjZQ3ekl NPLMVaRx5AciOTI2z/LCFPhukCjBMxKeY/3ca6SV1ztzHF2weHLJSe0lpIaUoWDLwoDy fZ7m8cp985IF3IoFKXA+WZDGYJHxez2F/71xw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4JrruaKr/DC29lA6rXyh+567cPmWV36kSmiJipTZUsY=; b=o6VFsrbWRQjDNqyZGMsJurkYIhEwGDWs8yv6V7Cul6qplNYLN4p84T2eU8kbodwuli lqm9WDtSt8IT7K7Ohm3L9aD292Wi+HCH5H6z8O9WOby1PoK99e0HjRR3MtBCSXCaXSzf vYYuzM8sKZqmD03DHzjVQdhvMgtyDzhT8GBHdnEZmlJKVyRNwCtwoCEGXzWjTq0ddxDP dUzL4r+W+zoMQjmVBDmdIT214VSWdgYTrwpxIDXbT3U8LjUyWLls3vSu/P036SY3aifG cVT6ykGNEKMYYPDoU8CYcBXLa1RqQi6JetkLQPSnZRpgnA7PegiLONeX/GdUhA1wGbtZ Kdcw== X-Gm-Message-State: APjAAAVZG7Z/wdOhrB2GzUYBMNcObj6YRgzZcX0WBdcUudpbpjQQNnrS gTNjv6DT4x9Xw4NXqGdLRiigEOBmsG8= X-Received: by 2002:a2e:9b15:: with SMTP id u21mr9337526lji.82.1551667096619; Sun, 03 Mar 2019 18:38:16 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id y30sm1251196ljd.12.2019.03.03.18.38.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Mar 2019 18:38:16 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id d26so2378987lfa.1 for ; Sun, 03 Mar 2019 18:38:15 -0800 (PST) X-Received: by 2002:a19:c744:: with SMTP id x65mr8983080lff.148.1551667094892; Sun, 03 Mar 2019 18:38:14 -0800 (PST) MIME-Version: 1.0 References: <155136980507.2968.15165201054223875356.stgit@devbox> <20190303173954.kliegojbuigqi5tn@inn2.lkp.intel.com> <20190304101434.8429ffffb17813c0e7930130@kernel.org> In-Reply-To: <20190304101434.8429ffffb17813c0e7930130@kernel.org> From: Linus Torvalds Date: Sun, 3 Mar 2019 18:37:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [uaccess] 780464aed0: WARNING:at_arch/x86/include/asm/uaccess.h:#strnlen_user/0x To: Masami Hiramatsu Cc: kernel test robot , Steven Rostedt , Shuah Khan , Linux List Kernel Mailing , Andy Lutomirski , Ingo Molnar , Andrew Morton , Changbin Du , Jann Horn , Kees Cook , Andy Lutomirski , Alexei Starovoitov , Nadav Amit , Peter Zijlstra , Joel Fernandes , yhs@fb.com, lkp@01.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 3, 2019 at 5:14 PM Masami Hiramatsu wrote: > > I think it comes from WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS)) in > user_access_ok(). The call trace shows that strndup_user might be called > from kernel daemon context. Ahh, yes. We've had this before. We've gotten rid of the actual "use system calls", but we still have some of the init sequence in particular just calling the wrappers instead. And yes, ksys_mount() takes __user pointers. It would be a lot better to use "do_mount()", which is the interface that takes actual "char *" pointers. Linus