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=-5.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 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 64DACC43460 for ; Tue, 13 Apr 2021 18:11:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38FFA613C0 for ; Tue, 13 Apr 2021 18:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344236AbhDMSMI (ORCPT ); Tue, 13 Apr 2021 14:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244853AbhDMSMH (ORCPT ); Tue, 13 Apr 2021 14:12:07 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B92C5C06138C for ; Tue, 13 Apr 2021 11:11:47 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id f12so13464085qtf.2 for ; Tue, 13 Apr 2021 11:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=deASIC4Cs//Eazc/u/XWcQQJxVVHmY70qv8fjR7dmQ0=; b=f1oafAJnlk3HZCVbI0WmGcC3aKmkh9peaQZDVKl45CBBmswOaiI4V6c7Ka8uuqMLa4 XslQvOVPZbjmWO8N/z6jOkQ5+orkVAC4peUGEL3OXZ7qNjnVNl7WSc5iUIkvfEyRtuNR uNn5Uj0kxMvzkxM+VQHddlMqS6WluPgNK+d7M2cie+xZlyTmFKCIW5rPRvB6urO4iltq /nL623iSTdzyRZ8f3NxveXCzL6UnQdKIw8Km8FGFQxKsUfp5rkOT+WeFOyET/pdqxaOJ DybyZXRXuNoPNgfRBgDgFSlReLY2Zty6yfmbUdl0Qruyu3lW3qr+PVfMvezut/HZVvv+ UYxA== 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=deASIC4Cs//Eazc/u/XWcQQJxVVHmY70qv8fjR7dmQ0=; b=WchHAsHmNlyN2mjRpDj/R37XPpqBG0Rk145BU0di+QWkMjU3VMQtOlxVVfmNKHD4bA FMPIabKLp1ub9e6k2oZc04yohuV+QbnE2QwvL+Qtpj9T74vWrXuO9z/glu6OIuNcpllr MsE7WpUZvwcADCUDPrsRoxllHt3vdirhB0AkB57CtKscPoz3qE7EOKhJdkllqwCrjlhr kZpwdpMRW/685y6dpiuOwGJr5BmJdV4yHbK9ppAMQJGGQkiN8TbusO/cdJw+5VGjvUtl LJYdlCVdcaT8bXf6k28PbQUrEVVg/hDCF+jiTVDQInhTW8K2Gyia/1Fl1EdqZyYiOTA+ iVdg== X-Gm-Message-State: AOAM5338570QsARJpc+6ecjNshyKnKxeKa284cyArWVz8u8WUVyuIbst jo9X2zonS8oNvPaWpplUH7CiqA== X-Google-Smtp-Source: ABdhPJxc/WYUSF8qA754oyGOrB1wFH7/ryz6Ffn54ZT6mPInMZOSPnB91vdqHhpQB16Ah5jGJw8ebw== X-Received: by 2002:ac8:4a82:: with SMTP id l2mr2591555qtq.311.1618337506928; Tue, 13 Apr 2021 11:11:46 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id e3sm10340568qtj.28.2021.04.13.11.11.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 11:11:46 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lWNVp-005bD2-JG; Tue, 13 Apr 2021 15:11:45 -0300 Date: Tue, 13 Apr 2021 15:11:45 -0300 From: Jason Gunthorpe To: Dmitry Vyukov Cc: Dan Carpenter , Paolo Bonzini , syzbot , Andrew Morton , Borislav Petkov , Daniel Vetter , daniel.vetter@intel.com, "H. Peter Anvin" , Jim Mattson , James Morris , Joerg Roedel , KVM list , LKML , Linux Media Mailing List , Linux-MM , linux-security-module , m.szyprowski@samsung.com, Mauro Carvalho Chehab , Ingo Molnar , Sean Christopherson , "Serge E. Hallyn" , syzkaller-bugs , Tomasz Figa , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , the arch/x86 maintainers Subject: Re: [syzbot] WARNING in unsafe_follow_pfn Message-ID: <20210413181145.GK227011@ziepe.ca> References: <000000000000ca9a6005bec29ebe@google.com> <2db3c803-6a94-9345-261a-a2bb74370c02@redhat.com> <20210331042922.GE2065@kadam> <20210401121933.GA2710221@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: On Tue, Apr 13, 2021 at 07:20:12PM +0200, Dmitry Vyukov wrote: > > > Plus users are going to be seeing this as well. According to the commit > > > message for 69bacee7f9ad ("mm: Add unsafe_follow_pfn") "Unfortunately > > > there's some users where this is not fixable (like v4l userptr of iomem > > > mappings)". It sort of seems crazy to dump this giant splat and then > > > tell users to ignore it forever because it can't be fixed... 0_0 > > > > I think the discussion conclusion was that this interface should not > > be used by userspace anymore, it is obsolete by some new interface? > > > > It should be protected by some kconfig and the kconfig should be > > turned off for syzkaller runs. > > If this is not a kernel bug, then it must not use WARN_ON[_ONCE]. It > makes the kernel untestable for both automated systems and humans: It is a kernel security bug triggerable by userspace. > And if it's a kernel bug reachable from user-space, then I think this > code should be removed entirely, not just on all testing systems. Or > otherwise if we are not removing it for some reason, then it needs to > be fixed. Legacy embedded systems apparently require it. It should be blocked by a kconfig. Distributions and syzkaller runs should not enable that kconfig. What else can we do for insane uapi? Jason