Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp363538rwl; Wed, 9 Aug 2023 16:06:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOMB+gt2qovxlbNZblZBZhLDXiGh62fjeSjhQT7d/iu+w0PPDgjVlVJHpdA0qP6QcqtFrH X-Received: by 2002:a17:906:18c:b0:99b:cfda:eded with SMTP id 12-20020a170906018c00b0099bcfdaededmr536192ejb.52.1691622391771; Wed, 09 Aug 2023 16:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691622391; cv=none; d=google.com; s=arc-20160816; b=a1VwS7SHLDipqa9Dbggx0skdPnDHWCI2puEmNN0t2N2YyvaqUXcWs+iOxWpYT5bo2l yFnw/PGpBJIyWLlixrcrnPOR7If4FSUjZ+s2Oz1WOsWCwBwj6zCcUIsNCuz6MJy+Mw2l A2RSddomTBo2X/Gr3Kkful3m0Ojp5vsRLBtnHOmaUjnf18ZUIVYf8WAfUa3cVlWg8iwW Gr1GVfWgX51dvKlmomwPC6uR7nqn1SkOTNdFxUlHRoxpalnic9nxj5C2dknpnjLhOQDr aPZBtTnCOwjFKRUgVugug4WIZiCRgg/GKIm5nyWWaKwCGAS7ykb9jd55Qe3yYtbAbSFU dp1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=cIgDDGI0U/kmgRUDb/c33NbEzNsUnqhE61AUxO5hcmw=; fh=o5rpXnmscWXJVOOJZEN3UobbaxOwMqH8nNQpRXULPA8=; b=WTd29dNkpPIQJBPsdP1ShMcjKmg8ilrAWNcpQ/jGwaqAdFPNxA9WxnId5vmpX3zVXS 4cdqlHw9BnIcAUNL2js1fsZTs1A+sLcUS9YycBLDpoTu+tBvfNh94uteoPAaVxZpQq07 roB6/RdnEqIHK69UakphfbXhmZG31xhCofXA+1dgYdAwV2CMPhKzQqulsqMb/mUvhwxX FzK6gYzgJnDLJzLASOP3NDYUFdpdhoZTCrd1WhAAiT0pb+L4pUnKSQfpE9LyTqv09ppN uRf/1GpKHZhJthDRzUEFGUc2AmjL88oDbzVe4LWO/G+bH7euFVz9JMBJ/gfsgP+W1UBp TJKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd2-20020a170906ce2200b00992e2779596si195837ejb.827.2023.08.09.16.06.07; Wed, 09 Aug 2023 16:06:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232288AbjHIWe6 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 9 Aug 2023 18:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232221AbjHIWe4 (ORCPT ); Wed, 9 Aug 2023 18:34:56 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D952BD2; Wed, 9 Aug 2023 15:34:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8EDBF635D288; Thu, 10 Aug 2023 00:34:45 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6b55IotJG3xt; Thu, 10 Aug 2023 00:34:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 2A724635D292; Thu, 10 Aug 2023 00:34:45 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1iNohkyg2VBA; Thu, 10 Aug 2023 00:34:45 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 0691C635D288; Thu, 10 Aug 2023 00:34:45 +0200 (CEST) Date: Thu, 10 Aug 2023 00:34:44 +0200 (CEST) From: Richard Weinberger To: hch Cc: Stephan Wurm , linux-block , Miquel Raynal , Vignesh Raghavendra , linux-mtd , linux-kernel , Johannes Eigner Message-ID: <366198994.5052941.1691620484888.JavaMail.zimbra@nod.at> In-Reply-To: <20230809141542.GA32614@lst.de> References: <1293911429.1782934.1691445776353.JavaMail.zimbra@nod.at> <20230809135308.GA32214@lst.de> <20230809141542.GA32614@lst.de> Subject: Re: ubiblock: null pointer dereference using scatterlist in work_queue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: ubiblock: null pointer dereference using scatterlist in work_queue Thread-Index: PSfkdM2AA1GzDUjTP1lykwQuXd+vkA== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "hch" > Yes. So the code needs to stop using sg_virt to work on highmem > setups and do the equivalent of scsi_kmap_atomic_sg. Best way > forward is probably to move scsi_kmap_atomic_sg to lib/scatterlist.c > (and also convert it to kmap_local instead of kmap_atomic while you're > at it) and then use that in ubiblock Will do so! So far I managed to get UBIblock work with scsi_kmap_atomic_sg(). Sadly now with kmap'ed memory a bounce buffer is needed since IO in UBI/MTD can sleep. Is there a strong reason why scsi_kmap_atomic_sg() needs IRQs disabled? Thanks, //richard