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 61DA9C4332F for ; Thu, 6 Oct 2022 12:55:05 +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=9ikm3Z+gKXRdjtJKpkQ4XPqFTbrk5WPEnMxauIm/x3Q=; b=q8fVHEqop/dhdgUNIEml3k3LCp cuZ4htn3SSQF9qOvquJHcdTAOwYlNESJgOCIS8Tnn4lHoHn6gGm0vLIivgrNSHSuGxuG8rGpmXZl/ Hq4ole6UZBwM9oM0US5MfOLxJVoeC1ckxckuJeDzfmqoT3XgXHEl7vJ1Y+1ckp2jLQ98e9SRGEXZV moyClzKdqnoGvP5vj+YWFab5t+1SvQNH22hs+C3LOmhUci2FjXw8TP+QWZVifSBLjZG3WnSbKppre YwEKwPQaiMwnnHzgGo+PsXJGYF50jDbWTzFMx4iEDu35Z5VDLtPbgnztAjGyu7iT/PprHz2cvphFp khqwuOyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogQO3-002SQN-N1; Thu, 06 Oct 2022 12:54:03 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogQO0-002SNb-4c for linux-arm-kernel@lists.infradead.org; Thu, 06 Oct 2022 12:54:01 +0000 Received: by mail-lf1-x133.google.com with SMTP id a29so2589434lfo.1 for ; Thu, 06 Oct 2022 05:53:56 -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; bh=jgwtLPJ++8LIBXvoR40Ojn/bqP9gjiaU+M/jYaXBo5k=; b=ckl50uFPWPylS0hGbvj8cr3bZ+XnkIx6hWD5aDIGMfrqr6xPMfSrWtn93ToxYD5lRp vJCeGeIDPsVKugYLYhsBh8TFIbuLHcqkkIbj8M8Ajk3mUuV6oTZwWXwMjmCmtx2OiiW4 mLdHN5XD190L0bTRcAItO1XAENJiH4SW9HQUQVtSoT2grWihidF8KO0IL+UfR4VLJ0qA UpsLtsk77dYkcE33svn+oFYxnPVBCfTqYcru1a00fpr8ebb5I4foZr0lJxR3PYYwt5HT lSFrLex0im4NGIzfLGU3Vb/DsgaXXEzuo8GD6bvvT1ZgVVkinh6QtGKmtNWWVg62yEfH yTYg== 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; bh=jgwtLPJ++8LIBXvoR40Ojn/bqP9gjiaU+M/jYaXBo5k=; b=MeMoxW3QD0U1+wSYniIJ1NV9aSHbbNR3TIADa2JJhGJgO7PB0p42I5zR5237oli2LJ 0dXc6gmzQM8uSPnSkEcbUV9EozVMLrgGhYaB9t/GSAnaxMDcpwsUxFCacsDzpqe/lN2P BWLxT5nTTz6u5wIhcQxXiPZvUIqJmlEP11+3bP8J+fF/ubnbv7vcsj3LkmGEuQzY7CiP W2WoYaUHD3BJz16ZtuLxl10DXIYPNDxRfoFqYlzKF5606vqFiKMwBl1njxcR7YaH88Ft ZZWJj3b44+qF1qwCSJTr4nhHGBNQWYz5tSaDdZ7/OCED5CCeWjdWuSQfawHQVTVrDsig UTgQ== X-Gm-Message-State: ACrzQf2dJv3TRU5VeykxWhILYMzhLms7jEV7t6+dbB7i0nagJiPqPGfV g0WjExZmL4xicxdw1xYbCOKwy4cFJzY= X-Google-Smtp-Source: AMsMyM54GsEvYJD0wKautAAAWm5cvHk0bNLRw0sbM04efA9nFAioyhHR5MF+cE9jwNmgDE6x4MHjnw== X-Received: by 2002:ac2:539c:0:b0:4a2:259c:c849 with SMTP id g28-20020ac2539c000000b004a2259cc849mr1847119lfh.323.1665060835453; Thu, 06 Oct 2022 05:53:55 -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 by37-20020a05651c1a2500b0026dce5839fdsm1584342ljb.94.2022.10.06.05.53.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Oct 2022 05:53:54 -0700 (PDT) Message-ID: <8ef99012-4959-a674-13c1-186b9c1c2cd4@gmail.com> Date: Thu, 6 Oct 2022 15:53:52 +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: Claudiu.Beznea@microchip.com, matti.vaittinen@fi.rohmeurope.com References: <63f54787a684eb1232f1c5d275a09c786987fe4a.1664782676.git.mazziesaccount@gmail.com> From: Matti Vaittinen In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221006_055400_215840_F8E9EF4C X-CRM114-Status: GOOD ( 14.81 ) 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, Eugen.Hristev@microchip.com, jic23@kernel.org 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 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) :) 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