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
| ||
|
Date: Wed, 9 Jul 2008 18:18:57 -0700 From: Andrew Morton <akpm@...ux-foundation.org> To: David Altobelli <david.altobelli@...com> Cc: linux-kernel@...r.kernel.org, greg@...ah.com, tony.camuso@...com Subject: Re: [PATCH][v5] HP iLO driver On Wed, 2 Jul 2008 09:38:53 -0600 David Altobelli <david.altobelli@...com> wrote: > A driver for the HP iLO/iLO2 management processor, which allows userspace > programs to query the management processor. Programs can open a channel > to the device (/dev/hpilo/dXccbN), and use this to send/receive queries. > The O_EXCL open flag is used to indicate that a particular channel cannot > be shared between processes. This driver will replace various packages > HP has shipped, including hprsm and hp-ilo. > > v4 -> v5 > Converted more macros to inline functions > Reorganized to remove kzalloc under spinlock > > v3 -> v4 > Removed an upper case variable and some extra parens > Converted some macros to inline functions > > v2 -> v3 > Moved code from drivers/char to drivers/misc > > v1 -> v2 > Changed device path to /dev/hpilo/dXccbN. > Removed a volatile from fifobar variable. > Changed ILO_NAME to remove spaces. > > > ... > > +static ssize_t ilo_write(struct file *fp, const char __user *buf, > + size_t len, loff_t *off) > +{ > + int err, pkt_id, pkt_len; > + struct ccb_data *data; > + struct ccb *driver_ccb; > + struct ilo_hwinfo *hw; > + void *pkt; > + > + data = fp->private_data; > + driver_ccb = &data->driver_ccb; > + hw = data->ilo_hw; > + > + if (is_device_reset(hw) || is_channel_reset(driver_ccb)) { > + /* > + * If the device has been reset, applications > + * need to close and reopen all ccbs. > + */ > + ilo_reset(hw); > + return -ENODEV; > + } Can multiple processes open and write to this "device"? If so, the above looks awfully racy. Perhaps vfs-level i_mutex coverage will save us on the write-versus-write side, but not on write-versus-read. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists