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 7DACFC433DB for ; Wed, 27 Jan 2021 00:20:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3662020691 for ; Wed, 27 Jan 2021 00:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390075AbhA0AOu (ORCPT ); Tue, 26 Jan 2021 19:14:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730236AbhAZRFM (ORCPT ); Tue, 26 Jan 2021 12:05:12 -0500 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28DBCC061786 for ; Tue, 26 Jan 2021 09:00:09 -0800 (PST) Received: by mail-oi1-x234.google.com with SMTP id h192so19240108oib.1 for ; Tue, 26 Jan 2021 09:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EU+WTGu8bUI816wzRP2V2ST2vW8X+ERkOSMJ6GfAu7A=; b=pEMdUe1I+pz92rcVj3qrndpwiny2nUbbUT9WmvMR83b2whOeAhucNsaDELoIn2Dbro mPMtW1FeXb4aVdCgOLPc7KjI+XzgWFeNH3OU8VPiLPY4ZW5gxxYoyabLZ9XDsOmRcmwT AV2BlJrF5okewJUrUxknlRfEOTFBf0S2vq0VWvCzP7R4B3dFPgD2YlR6uiwlUBSGSl0J IUVj7S1vpZXFNyHS5CoyHU9R99ATSz0I7YDNuJHq9hqQwfoAXgUSj+p2NI7w0De4efON xTNCuo1oxoGemSpTOy0YbAl1i+90Q4G0Tu9UYQqF1spkrrPQQDdM8Mz04lLlbamV08Ba m2Fg== 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=EU+WTGu8bUI816wzRP2V2ST2vW8X+ERkOSMJ6GfAu7A=; b=foD/1obwhe1vVF9nU8KHLTpfZPECWLUHQX3914+JjKn897WITCWu9bZGZo6dbCKWEo YbddvldJxMI5r+NadgLCLQtmm/hgyo84pFqM/QKrkPjUDIMf2HCQACJuH+Qx/GgDAF3b Ph7d7JoN+hXClXy6fgUgaq53bzXuE+T2x8A1cwIfXW0l6cVU8rKAhqrBuWUSpLHnfH48 eq1w7w3BWe+U2CqP6noX7//ELMUpgr47JTsaRXF1TSGTL3qFuOCTWWYhXLh/jbTB9oIf e5tXV23badCXBeai6Whx4N8uxJ6lVswK0T8P8Ir2NSXSfQXJXANyW591rr75NiptailB BCCg== X-Gm-Message-State: AOAM5334IHPp0qiEBnw3dzYqGGBdB1hapjaguolYBL1FxvqbgYusk4t/ 9nHYO2fbC0MHVPK4gVaw21wQreQgjOwklQ== X-Google-Smtp-Source: ABdhPJzJ9rDz6FYhds6jaMVjB00+YT+kXxwNhRowzyxERbBRdSPVyHiBFunvQyxwQf01zmcyTS2XkQ== X-Received: by 2002:aca:d481:: with SMTP id l123mr360474oig.155.1611680408337; Tue, 26 Jan 2021 09:00:08 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id j8sm4236852oie.47.2021.01.26.09.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 09:00:07 -0800 (PST) Date: Tue, 26 Jan 2021 11:00:05 -0600 From: Bjorn Andersson To: Mark Rutland Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Courtney Cavin Subject: Re: Preemptible idr_alloc() in QRTR code Message-ID: References: <20210126104734.GB80448@C02TD0UTHF1T.local> <20210126145833.GM308988@casper.infradead.org> <20210126162154.GD80448@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126162154.GD80448@C02TD0UTHF1T.local> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 26 Jan 10:21 CST 2021, Mark Rutland wrote: > On Tue, Jan 26, 2021 at 02:58:33PM +0000, Matthew Wilcox wrote: > > On Tue, Jan 26, 2021 at 10:47:34AM +0000, Mark Rutland wrote: > > > Hi, > > > > > > When fuzzing arm64 with Syzkaller, I'm seeing some splats where > > > this_cpu_ptr() is used in the bowels of idr_alloc(), by way of > > > radix_tree_node_alloc(), in a preemptible context: > > > > I sent a patch to fix this last June. The maintainer seems to be > > under the impression that I care an awful lot more about their > > code than I do. > > > > https://lore.kernel.org/netdev/20200605120037.17427-1-willy@infradead.org/ > > Ah; I hadn't spotted the (glaringly obvious) GFP_ATOMIC abuse, thanks > for the pointer, and sorry for the noise. > I'm afraid this isn't as obvious to me as it is to you. Are you saying that one must not use GFP_ATOMIC in non-atomic contexts? That said, glancing at the code I'm puzzled to why it would use GFP_ATOMIC. > It looks like Eric was after a fix that trivially backported to v4.7 > (and hence couldn't rely on xarray) but instead it just got left broken > for months. :/ > > Bjorn, is this something you care about? You seem to have the most > commits to the file, and otherwise the official maintainer is Dave > Miller per get_maintainer.pl. > I certainly care about qrtr working and remember glancing at Matthew's patch, but seems like I never found time to properly review it. > It is very tempting to make the config option depend on BROKEN... > I hear you and that would be bad, so I'll make sure to take a proper look at this and Matthew's patch. Thanks, Bjorn