lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEQGqFLIyxm5XENQ@smile.fi.intel.com>
Date:   Sat, 22 Apr 2023 19:09:12 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     kernel test robot <lkp@...el.com>
Cc:     Mehdi Djait <mehdi.djait.k@...il.com>, jic23@...nel.org,
        mazziesaccount@...il.com, oe-kbuild-all@...ts.linux.dev,
        krzysztof.kozlowski+dt@...aro.org, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 5/5] iio: accel: Add support for Kionix/ROHM
 KX132-1211 accelerometer

On Sat, Apr 22, 2023 at 07:19:44AM +0800, kernel test robot wrote:
> Hi Mehdi,
> 
> kernel test robot noticed the following build warnings:

I believe it's not just a warning, it's a full functional error in the code.

>    686	{
>    687		struct device *dev = regmap_get_device(data->regmap);
>    688		__le16 buf_status;
>    689		int ret, fifo_bytes;
>    690	
>    691		ret = regmap_bulk_read(data->regmap, data->chip_info->buf_status1,
>    692				       &buf_status, sizeof(buf_status));
>    693		if (ret) {
>    694			dev_err(dev, "Error reading buffer status\n");
>    695			return ret;
>    696		}
>    697	
>  > 698		buf_status &= data->chip_info->buf_smp_lvl_mask;
>    699		fifo_bytes = le16_to_cpu(buf_status);

You need to mask in the same endianess space, i.o.w. either on CPU or device side.

I believe you wanted to have fifo_bytes to be masked, but I'm not sure.

>    701		return fifo_bytes;
>    702	}

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ