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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0EC3C4363A for ; Fri, 23 Oct 2020 03:05:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0721E21775 for ; Fri, 23 Oct 2020 03:05:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="dvQpU+FB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0721E21775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0633D6B005D; Thu, 22 Oct 2020 23:05:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0157A6B0062; Thu, 22 Oct 2020 23:05:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6BD36B0068; Thu, 22 Oct 2020 23:05:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id BA9756B005D for ; Thu, 22 Oct 2020 23:05:28 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5317E8B74849 for ; Fri, 23 Oct 2020 03:05:28 +0000 (UTC) X-FDA: 77401699536.13.mind46_5f0477627256 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 2B7ED18140B60 for ; Fri, 23 Oct 2020 03:05:28 +0000 (UTC) X-HE-Tag: mind46_5f0477627256 X-Filterd-Recvd-Size: 7461 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Fri, 23 Oct 2020 03:05:27 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id a28so4199048ljn.3 for ; Thu, 22 Oct 2020 20:05:27 -0700 (PDT) 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=Na94wtC1BhSlnxPRS1UAdX72oiIY6E2rGP3IXkaaAPI=; b=dvQpU+FB9bJIevPoyZUx0Zefem4fScj4c1Gi0SaeCK5Q9yI9nesRnzjd+UaB+pY0Io MQlmn/KIjYgbmrUu++HqyEv1sajyLI/DtsrPFcq1odZmHAA9otSr14zvP3X3mR7rw59T axPQewjAT8o4TjKIP1JKavPS6yuA49BTh5Ujg= 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=Na94wtC1BhSlnxPRS1UAdX72oiIY6E2rGP3IXkaaAPI=; b=pnfdZ1GuglG5VkQjOlEyw+wNsKnZhCqdyKJG2gzL7Ygtiw+uRgMviQ5fjoV2OWhUxE DsOF2/D8FuMnr1i57vtk/KiyD8Rq1097TzpX+ubDQ1sOv0ZrWeNqEdcIm3CwR2DukRHZ Nbqm2CJOxe/XtfSiHBhpGbWG6DR0D2P3sDJODyfUH6q0ciWPeSV8av4fMXovxqimleWN 5KFWY/01SFyjJbqbCRPVh8TspES86rf04erzDpKbDF/b6IScs+4QPwyB471LPRg+K0HU UXc/mJfNSzdgv2xZj2DUfjWm7ItlcDqPachdlJ+ob9FLBkD6UamofjQ+IDUeuLoK+aTC 5L6g== X-Gm-Message-State: AOAM530xyJ238qhNwenvqrniyWCkFKODgCtyRa+z396FhhUGqwRNCTeG xufHl/BN31Nz63TqyR+L0jmn2CPBNCE15w== X-Google-Smtp-Source: ABdhPJz6xC/ET+kXtT4CnAhEsnhNQ5dfJRITCdhmz37C19rEmiEMsT5ppIhWm6hllZpPhq8zL87pTw== X-Received: by 2002:a2e:8986:: with SMTP id c6mr7836lji.29.1603422325785; Thu, 22 Oct 2020 20:05:25 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id t10sm13847ljk.53.2020.10.22.20.05.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Oct 2020 20:05:22 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id h6so292439lfj.3 for ; Thu, 22 Oct 2020 20:05:22 -0700 (PDT) X-Received: by 2002:a19:83c9:: with SMTP id f192mr33971lfd.148.1603422321812; Thu, 22 Oct 2020 20:05:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Thu, 22 Oct 2020 20:05:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [LTP] mmstress[1309]: segfault at 7f3d71a36ee8 ip 00007f3d77132bdf sp 00007f3d71a36ee8 error 4 in libc-2.27.so[7f3d77058000+1aa000] To: =?UTF-8?B?RGFuaWVsIETDrWF6?= Cc: Naresh Kamboju , Stephen Rothwell , "Matthew Wilcox (Oracle)" , zenglg.jy@cn.fujitsu.com, "Peter Zijlstra (Intel)" , Viresh Kumar , X86 ML , open list , lkft-triage@lists.linaro.org, "Eric W. Biederman" , linux-mm , linux-m68k , Linux-Next Mailing List , Thomas Gleixner , kasan-dev , Dmitry Vyukov , Geert Uytterhoeven , Christian Brauner , Ingo Molnar , LTP List , Al Viro Content-Type: multipart/mixed; boundary="000000000000eb07d805b24dd94f" 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: --000000000000eb07d805b24dd94f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 22, 2020 at 6:36 PM Daniel D=C3=ADaz w= rote: > > The kernel Naresh originally referred to is here: > https://builds.tuxbuild.com/SCI7Xyjb7V2NbfQ2lbKBZw/ Thanks. And when I started looking at it, I realized that my original idea ("just look for __put_user_nocheck_X calls, there aren't so many of those") was garbage, and that I was just being stupid. Yes, the commit that broke was about __put_user(), but in order to not duplicate all the code, it re-used the regular put_user() infrastructure, and so all the normal put_user() calls are potential problem spots too if this is about the compiler interaction with KASAN and the asm changes. So it's not just a couple of special cases to look at, it's all the normal cases too. Ok, back to the drawing board, but I think reverting it is probably the right thing to do if I can't think of something smart. That said, since you see this on x86-64, where the whole ugly trick with th= at register asm("%"_ASM_AX) is unnecessary (because the 8-byte case is still just a single register, no %eax:%edx games needed), it would be interesting to hear if the attached patch fixes it. That would confirm that the problem really is due to some register allocation issue interaction (or, alternatively, it would tell me that there's something else going on). Linus --000000000000eb07d805b24dd94f Content-Type: application/octet-stream; name=patch Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kglo76xr0 IGFyY2gveDg2L2luY2x1ZGUvYXNtL3VhY2Nlc3MuaCB8IDQgKystLQogMSBmaWxlIGNoYW5nZWQs IDIgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9hcmNoL3g4Ni9p bmNsdWRlL2FzbS91YWNjZXNzLmggYi9hcmNoL3g4Ni9pbmNsdWRlL2FzbS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