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]
Date:	Wed, 31 Jan 2007 15:19:51 +0100
From:	Duncan Sands <duncan.sands@...h.u-psud.fr>
To:	Simon Arlott <e5d74fcd64729b17de1hc0yh0003aeoo@...nder.lp0.eu>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] cxacru: Store all device status information and report it when atm_proc_read is called.

Hi Simon,

> +static int cxacru_proc_read(struct usbatm_data *usbatm_instance,
> +	struct atm_dev *atm_dev, loff_t * pos, char *page)
> +{
> +	struct cxacru_data *instance = usbatm_instance->driver_data;
> +	u32 *cxinf = instance->cxinf_status;
> +	int left = *pos;

if there was no successfull call to cxacru_poll_status before this,
then you will output junk.  Please initialize cxinf_status to something
sensible in cxacru_bind.

> +       if (!left--)
> +               return sprintf(page, "MAC=%02x:%02x:%02x:%02x:%02x:%02x\n",
> +                                       atm_dev->esi[0], atm_dev->esi[1],
> +                                       atm_dev->esi[2], atm_dev->esi[3],
> +                                       atm_dev->esi[4], atm_dev->esi[5]);

Rather than duplicating code in usbatm, I think it would be better to
split the various output bits in usbatm_atm_proc_read into their own
functions, and export them, so they can be called from both
usbatm_atm_proc_read and cxacru_proc_read.

Best wishes,

Duncan.
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ