Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp827532pxb; Fri, 22 Apr 2022 12:03:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO56wqPCwGL28SUrD+deEjuItS4QnbG9j+tYqSxGEWpsz4oeSys/y6P4bSpcl4RuNimUBo X-Received: by 2002:a9d:518b:0:b0:605:4768:18e3 with SMTP id y11-20020a9d518b000000b00605476818e3mr2376713otg.264.1650654201860; Fri, 22 Apr 2022 12:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654201; cv=none; d=google.com; s=arc-20160816; b=G0aCgv/s5cGN6eJOZGfgYm522e+G0cvr0sKHR5JNMy2ixmCDMeDjQIgZEqYPfM1O9o VSeL4U69jRkto8HUT+aDHm6ivBPOFKt0XYDMGkTJZ5ipTyOtKKYySm86qT57Xioix5mi 3oYOGArwA8S10Xq8q1umnMY1CbApJ4vvOlEUoXcAv7orX5Y2XYE5h1RwAFQrYTWVM/qg PIEDe6WSUh30e5QrrvDZZT8Vjr2FXAOxEc5My6YDR2PSIVrjWfzdwg8N39TWwPJ9HFLX mCG8Fdqmlv4vHZrbMD+FydhkPinKa8cxEM0Cb4XdcAZRxNCZXvx+Q8GJgYizgG03iN0j 2BSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n+5mdjCoCf0ii1KcjNSILRnfR+lLzv1OJKI293EFGy8=; b=KetTwcIEw+2qhlIzQ84eRzLb5O9Irvg487hFxSotY1rsu2yneBJoeQ9zJUZtPBxSYl 2kX7C2QL7KeIGUXyetXkmyi9MxXYKnwX10jalL0YZlKwAeFx6cdYGU2/gJ46BVNiHwr0 tqrrnx529Zj2z2rHFFQGVenpYn8KZz9mnjMpMyRuw7h2lX4OpURhrqpKbNru3RlDAsxG 5LCkJVHBpfWTYQeoE9mgx4DAX5a6VUbSNoGyj5NmZAoono1vft6RtXJ/svxxfRdCSDCB f4vymS3mhu17HjuKHplwriGBLBt28JHaGTl++A2+riq/oFZEIj5SELNW9QpPJkKgaIhJ MrAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oKyy2mWY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i1-20020aca2b01000000b002ec8ec73a18si4809966oik.0.2022.04.22.12.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:03:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oKyy2mWY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4E1C1472FA; Fri, 22 Apr 2022 11:24:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385599AbiDUHN4 (ORCPT + 99 others); Thu, 21 Apr 2022 03:13:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239658AbiDUHNx (ORCPT ); Thu, 21 Apr 2022 03:13:53 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C203C140DC; Thu, 21 Apr 2022 00:11:04 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 23L7Aw1B035971; Thu, 21 Apr 2022 02:10:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1650525058; bh=n+5mdjCoCf0ii1KcjNSILRnfR+lLzv1OJKI293EFGy8=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=oKyy2mWYUcwJx9cMCyiVlOl8RUv/ToL5I3DBUZYFjWRhj/CE7mXCpgAViVzG0T4um Z34fZSatjDkOVR4N10kArIbqt2cHc5f605eRJC3L1Zr/LwM9z9t8gAgjRASUAhbo9b sZHxDTYCuYAHMC03PZjGRXiFVIzPpGwyEVuYMZlw= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 23L7AwYN124547 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 21 Apr 2022 02:10:58 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 21 Apr 2022 02:10:58 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Thu, 21 Apr 2022 02:10:58 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 23L7Av0s070769; Thu, 21 Apr 2022 02:10:57 -0500 Date: Thu, 21 Apr 2022 12:40:56 +0530 From: Pratyush Yadav To: Mark Brown CC: Tudor Ambarus , Michael Walle , Miquel Raynal , Takahiro Kuwano , , Subject: Re: [PATCH v2] spi: spi-mem: check if data buffers are on stack Message-ID: <20220421071056.4o33vlhoqarod3ow@ti.com> References: <20220420102022.3310970-1-p.yadav@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 On 20/04/22 02:04PM, Mark Brown wrote: > On Wed, Apr 20, 2022 at 03:50:22PM +0530, Pratyush Yadav wrote: > > The buffers passed in the data phase must be DMA-able. Programmers often > > don't realise this requirement and pass in buffers that reside on the > > stack. This can be hard to spot when reviewing code. Reject ops if their > > data buffer is on the stack to avoid this. > > > > Signed-off-by: Pratyush Yadav > > Acked-by: Mark Brown > > --- > > > > Changes in v2: > > - Include task_stack.h. It might not get included indirectly on some > > platforms and can cause build failures. > > - Add a WARN_ON_ONCE() for debuggability. > > - Add Mark's Ack. > > Since this is now an isolated patch does that mean whatever meant that I > acked rather than applying this patch has gone in and I can now apply it > directly? Yes, you should be able to apply it directly. Miquel's spi-mem-ecc branch is now in 5.18-rc1 and later. Though this patch never conflicted with that branch to begin with. The spi-mem-ecc branch does not touch spi_mem_check_op() as far as I can see. -- Regards, Pratyush Yadav Texas Instruments Inc.