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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57BB8C433FE for ; Mon, 10 Oct 2022 09:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:MIME-Version: Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=94QHZ4k8IU0J6dNRafTIPgZRhxolVlyy9gGCSuanY7w=; b=h4LIUTHdhHGJtooSx7O5DY2Rln Ke+YwOGKuV2JqdtWXKHT2LBoHeZY2arh7szomKRcAdcG/+SPT6FG0XQJDW3DI7CuU9/TeIWm6v4zY kAoHNkwJ9C3pHR0o4GxR/IaNFRFIoIhhKPX+7PiM9iWMA/hxW6oCH6JTOHqaWae1Ykezu8yxW6kyR y9wLrY8iD1damGVCfFq2eR3xe9f6TZAqit6GTh6GCAf1Eq3nsSbtQoP+IA2b9qQ1I2Qr6VEeFD9+H q+YfRtvjiBWzPyBV1eQQzHiQdo37LZu9opxeunzyTc+fvYrXuS0OH4CRVGMRR1p5gyrCeoAUz+7eK rmHtdvJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohpDb-000DRn-Ts; Mon, 10 Oct 2022 09:37:04 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohpDZ-000DQp-79 for linux-arm-kernel@lists.infradead.org; Mon, 10 Oct 2022 09:37:02 +0000 Received: by mail-lf1-x134.google.com with SMTP id y5so15764617lfl.4 for ; Mon, 10 Oct 2022 02:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Nm0F1sSMUJ9fdz65rzhXe7v3qpKQDjjCCfQ7Okp8xuc=; b=gl6yVB2QcxSerh8SvMKGtqZD0FvjMXF6hxL1dDXx86UpxWmjaV1G23aEdVhY+/7s3s NICBg/nzN/OGs5hQ1/PvcihcJWukzN8SbIZPvHyfMxF9UntXvoEQSl49nGuatpFOR+1F NsiTiCtDrsfkOpDhcp3YOShxxyHzybwanQynYTAo/uA7xMyflZz/bh8moyTsXx7VJUJA CuAv7ZFlWM/7APUJZpL6UNyKGoygI3Ew2Z3+AqPA0/E/h3YZ/htkUnYQm3pGNUpRGPw0 wB9z2k3tigxwgbKbZYdyTeNbCmninHXwvobh/d2tptUE0V7n0Mimx7tiEHH7t/yJNc+W llhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nm0F1sSMUJ9fdz65rzhXe7v3qpKQDjjCCfQ7Okp8xuc=; b=uePW4cKQ/TClwPtRgtJuAm2n28QddoJKlikbfX2w/Evu+QXUI878NruqwpDZDB5hiW Iyx4NKQJazhPUqDjMgg6+FwrzcyyyYQsllj2haw+fSAZIE52G1Oro1bd1DDiLmDfwsUm aacmElb6pl2nUiABg79jLbybLyQQbxWhZ4nb4JOEw1jpFrk1lfGS6bB4Hd+/VMUNn5RP swurcdnxZA5NzCeHDB9cZkvPb4uUucarLi3bPvjlm/gSPXVzdLP+Rgl0h2oTuZPuv0Qu ygsOR0eXiPtIeYSggh+KqdhZblzXFNwBxx6u1tO+tOJOjPYL7xESZywVFLz8oZfSOTPg bX/A== X-Gm-Message-State: ACrzQf1yZWCGLiB+lO6Bwwlmjt+GnDUeNHf73AHGzdqMZ6OrV69PHlXX YRHFkoIenXgW/85HkoojyGs= X-Google-Smtp-Source: AMsMyM57/N4FnCS9z879rcxLoQe8DQEJlCizg9oxrgqjflT80JGrzZk2O1DY7ptuZC0hrJ9q9OcRQg== X-Received: by 2002:a05:6512:3483:b0:4a2:bc90:af77 with SMTP id v3-20020a056512348300b004a2bc90af77mr4965393lfr.453.1665394616799; Mon, 10 Oct 2022 02:36:56 -0700 (PDT) Received: from ?IPV6:2001:14ba:16f3:4a00::1? (dc75zzyyyyyyyyyyyyyyt-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::1]) by smtp.gmail.com with ESMTPSA id c22-20020a2e9d96000000b0026d920a8114sm1548747ljj.100.2022.10.10.02.36.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Oct 2022 02:36:56 -0700 (PDT) Message-ID: <41abe9f6-d633-664a-db93-0580b23e44e1@gmail.com> Date: Mon, 10 Oct 2022 12:36:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [RFT PATCH v3 10/10] iio: Don't silently expect attribute types Content-Language: en-US To: Jonathan Cameron References: <63f54787a684eb1232f1c5d275a09c786987fe4a.1664782676.git.mazziesaccount@gmail.com> <8ef99012-4959-a674-13c1-186b9c1c2cd4@gmail.com> <20221009183854.690e2780@jic23-huawei> From: Matti Vaittinen In-Reply-To: <20221009183854.690e2780@jic23-huawei> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221010_023701_311197_A62FA0A2 X-CRM114-Status: GOOD ( 22.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, linux-iio@vger.kernel.org, gwendal@chromium.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, miquel.raynal@bootlin.com, groeck@chromium.org, chrome-platform@lists.linux.dev, lars@metafoo.de, linmq006@gmail.com, u.kleine-koenig@pengutronix.de, alexandru.ardelean@analog.com, mihail.chindris@analog.com, Michael.Hennerich@analog.com, cosmin.tanislav@analog.com, nathan@kernel.org, andriy.shevchenko@linux.intel.com, bleung@chromium.org, linux-arm-kernel@lists.infradead.org, matti.vaittinen@fi.rohmeurope.com, Eugen.Hristev@microchip.com, Claudiu.Beznea@microchip.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/9/22 20:38, Jonathan Cameron wrote: > On Thu, 6 Oct 2022 15:53:52 +0300 > Matti Vaittinen wrote: > >> Hi Claudiu, >> >> On 10/6/22 11:35, Claudiu.Beznea@microchip.com wrote: >>> On 03.10.2022 11:13, Matti Vaittinen wrote: >>>> The iio_triggered_buffer_setup_ext() and the >>>> devm_iio_kfifo_buffer_setup_ext() were changed by >>>> commit 15097c7a1adc ("iio: buffer: wrap all buffer attributes into iio_dev_attr") >>>> to silently expect that all attributes given in buffer_attrs array are >>>> device-attributes. This expectation was not forced by the API - and some >>>> drivers did register attributes created by IIO_CONST_ATTR(). >>>> >>>> When using IIO_CONST_ATTRs the added attribute "wrapping" does not copy >>>> the pointer to stored string constant and when the sysfs file is read the >>>> kernel will access to invalid location. >>>> >>>> Change the function signatures to expect an array of iio_dev_attrs to >>>> avoid similar errors in the future. >>>> >>>> Signed-off-by: Matti Vaittinen >>> >>> Tested-by: Claudiu Beznea >>> >>> on SAMA5D2 >>> >> >> Thanks a ton for the testing! I do _really_ appreciate it :) I am now >> slightly more confident regarding the fix here - and a lot more >> confident that we do have an actual bug (as you explained in the reply >> to the first RFT) :) > > You analysis was sound, so I've long been convinced ;) > > Anyhow, one more coming through... > AD4130 v9 patch had same issue and so will also need updating with this > patch if it lands before yours. > > Other than that static macro being ugly (which I can't improve on!) > all looks good to me, but I'll let it sit a while longer. If nothing > else I want to rebase the fixes-togreg tree on rc1 before putting the first > part of this series on top of it then letting them soak in next for > a few days, Thanks Jonathan. Can you please ping me if you want me to rebase/rework the series? (I may combine this with the kx022a-series then, but naturally not all patches in the series need to be applied at once. Eg, fixes can be taken in faster, kx022a part can be iterated, iterated, iterated... ;] ). Yours -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel