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-next>] [day] [month] [year] [list]
Message-ID: <1bb364cc-d167-4ef8-9d94-29b1774068f8@inria.fr>
Date: Wed, 2 Oct 2024 09:36:51 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Cristian Marussi <cristian.marussi@....com>
cc: Sudeep Holla <sudeep.holla@....com>, linux-kernel@...r.kernel.org, 
    oe-kbuild-all@...ts.linux.dev
Subject: drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING:
 scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change
 nonseekable_open -> stream_open. (fwd)

Hello,

I'm just forwarding this for your consideration. I don't know about this
issue.

julia

---------- Forwarded message ----------
Date: Wed, 2 Oct 2024 05:16:38 +0800
From: kernel test robot <lkp@...el.com>
To: oe-kbuild@...ts.linux.dev
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...ia.fr>
Subject: drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING:
    scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change
    nonseekable_open -> stream_open.

BCC: lkp@...el.com
CC: oe-kbuild-all@...ts.linux.dev
CC: linux-kernel@...r.kernel.org
TO: Cristian Marussi <cristian.marussi@....com>
CC: Sudeep Holla <sudeep.holla@....com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: b70c7996d4ffb2e02895132e8a79a37cee66504f firmware: arm_scmi: Make raw debugfs entries non-seekable
date:   6 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 6 months ago
config: arm64-randconfig-r053-20241001 (https://download.01.org/0day-ci/archive/20241002/202410020543.MuCto6Eo-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Julia Lawall <julia.lawall@...ia.fr>
| Closes: https://lore.kernel.org/r/202410020543.MuCto6Eo-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_scmi/raw_mode.c:924:8-24: WARNING: scmi_dbg_raw_mode_reset_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.

vim +924 drivers/firmware/arm_scmi/raw_mode.c

3c3d818a9317a5 Cristian Marussi 2023-01-18  886
3c3d818a9317a5 Cristian Marussi 2023-01-18  887  static int scmi_dbg_raw_mode_open(struct inode *inode, struct file *filp)
3c3d818a9317a5 Cristian Marussi 2023-01-18  888  {
7860701d1e6e6e Cristian Marussi 2023-01-18  889  	u8 id;
3c3d818a9317a5 Cristian Marussi 2023-01-18  890  	struct scmi_raw_mode_info *raw;
3c3d818a9317a5 Cristian Marussi 2023-01-18  891  	struct scmi_dbg_raw_data *rd;
7860701d1e6e6e Cristian Marussi 2023-01-18  892  	const char *id_str = filp->f_path.dentry->d_parent->d_name.name;
3c3d818a9317a5 Cristian Marussi 2023-01-18  893
3c3d818a9317a5 Cristian Marussi 2023-01-18  894  	if (!inode->i_private)
3c3d818a9317a5 Cristian Marussi 2023-01-18  895  		return -ENODEV;
3c3d818a9317a5 Cristian Marussi 2023-01-18  896
3c3d818a9317a5 Cristian Marussi 2023-01-18  897  	raw = inode->i_private;
3c3d818a9317a5 Cristian Marussi 2023-01-18  898  	rd = kzalloc(sizeof(*rd), GFP_KERNEL);
3c3d818a9317a5 Cristian Marussi 2023-01-18  899  	if (!rd)
3c3d818a9317a5 Cristian Marussi 2023-01-18  900  		return -ENOMEM;
3c3d818a9317a5 Cristian Marussi 2023-01-18  901
3c3d818a9317a5 Cristian Marussi 2023-01-18  902  	rd->rx.len = raw->desc->max_msg_size + sizeof(u32);
3c3d818a9317a5 Cristian Marussi 2023-01-18  903  	rd->rx.buf = kzalloc(rd->rx.len, GFP_KERNEL);
3c3d818a9317a5 Cristian Marussi 2023-01-18  904  	if (!rd->rx.buf) {
3c3d818a9317a5 Cristian Marussi 2023-01-18  905  		kfree(rd);
3c3d818a9317a5 Cristian Marussi 2023-01-18  906  		return -ENOMEM;
3c3d818a9317a5 Cristian Marussi 2023-01-18  907  	}
3c3d818a9317a5 Cristian Marussi 2023-01-18  908
3c3d818a9317a5 Cristian Marussi 2023-01-18  909  	rd->tx.len = raw->desc->max_msg_size + sizeof(u32);
3c3d818a9317a5 Cristian Marussi 2023-01-18  910  	rd->tx.buf = kzalloc(rd->tx.len, GFP_KERNEL);
3c3d818a9317a5 Cristian Marussi 2023-01-18  911  	if (!rd->tx.buf) {
3c3d818a9317a5 Cristian Marussi 2023-01-18  912  		kfree(rd->rx.buf);
3c3d818a9317a5 Cristian Marussi 2023-01-18  913  		kfree(rd);
3c3d818a9317a5 Cristian Marussi 2023-01-18  914  		return -ENOMEM;
3c3d818a9317a5 Cristian Marussi 2023-01-18  915  	}
3c3d818a9317a5 Cristian Marussi 2023-01-18  916
7860701d1e6e6e Cristian Marussi 2023-01-18  917  	/* Grab channel ID from debugfs entry naming if any */
7860701d1e6e6e Cristian Marussi 2023-01-18  918  	if (!kstrtou8(id_str, 16, &id))
7860701d1e6e6e Cristian Marussi 2023-01-18  919  		rd->chan_id = id;
7860701d1e6e6e Cristian Marussi 2023-01-18  920
3c3d818a9317a5 Cristian Marussi 2023-01-18  921  	rd->raw = raw;
3c3d818a9317a5 Cristian Marussi 2023-01-18  922  	filp->private_data = rd;
3c3d818a9317a5 Cristian Marussi 2023-01-18  923
b70c7996d4ffb2 Cristian Marussi 2024-03-15 @924  	return nonseekable_open(inode, filp);
3c3d818a9317a5 Cristian Marussi 2023-01-18  925  }
3c3d818a9317a5 Cristian Marussi 2023-01-18  926

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ