GoboLinux Downloads Documentation Community Recipes Screenshots

GoboLinux Recipe & Package Search Tool

71 versions of Linux.

ProgramAgeSizeByWWWSummary
Linux 4.13.2-r1 809  88794 Luca...
The Linux Kernel.
Linux 4.9.16-r3 980  100651 Luca...
The Linux Kernel.
Linux 4.9.4-r5 1036  99374 Luca...
The Linux Kernel.
Linux 4.8.2-r2 1102  89394 Luca...
The Linux Kernel.
Linux 4.7.4-r1 1172  82767 Luca...
The Linux Kernel.
Linux 4.7.0-r4 1227  82585 Luca...
The Linux Kernel.
Linux 3.13.3-r1 2107  252629 Luca...
The Linux Kernel.
Linux 3.12.6-r1 2167  238949 Luca...
The Linux Kernel.
Linux 3.9.4-r2 2362  70048 Luca...
The Linux Kernel.
Linux 3.7.1-r2 2535  67579 Luca...
The Linux Kernel.
Linux 3.5.0-r1 2686  124391 Luca...
The Linux Kernel.
Linux 3.4.4-r1 2686  124348 Luca...
The Linux Kernel.
Linux 3.3.6-r1 2686  124410 Luca...
The Linux Kernel.
Linux 3.2.12-r2 2814  124345 Luca...
The Linux Kernel.
Linux 3.2.7-r1 2844  123550 Mich...
The Linux Kernel.
Linux 3.1.1-r1 2949  122907 Mich...
The Linux Kernel.
Linux 3.0.4-r4 3010  122754 Luca...
The Linux Kernel.
Linux 2.6.36.3-r1 3233  116087 Diog...
The Linux Kernel.
Linux 2.6.32.3-r1 3611  117990 Luca...
The Linux Kernel.
Linux 2.6.32-r1 3652  117751 Luca...
The Linux Kernel.
Linux 2.6.31.6-r3 3657  126499 Luca...
The Linux Kernel.
Linux 2.6.30.5-r1 3736  166102 Jona...
The Linux Kernel.
Linux 2.6.29.1-r1 3879  117500 Luca...
The Linux Kernel.
Linux 2.6.28.7-r1 3935  115518 Giam...
The Linux Kernel.
Linux 2.6.28.1-r1 3935  115487 Giam...
The Linux Kernel.
Linux 2.6.28-r1 3935  116681 Mich...
The Linux Kernel.
Linux 2.6.27.8-r1 3935  134160 Giam...
The Linux Kernel.
Linux 2.6.27.4-r3 3935  149529 Luca...
The Linux Kernel.
Linux 2.6.25.17-r1 3935  172834 Giam...
The Linux Kernel.
Linux 2.6.25.16-r1 3935  166500 Giam...
The Linux Kernel.
Linux 2.6.25.10-r2 3935  165320 Giam...
The Linux Kernel.
Linux 2.6.25.7-r1 3935  157294 Giam...
The Linux Kernel.
Linux 2.6.25.4-r1 3935  133017 Hopp...
The Linux Kernel.
Linux 2.6.25-r1 3935  133216 Luca...
The Linux Kernel.
Linux 2.6.24.4-r5 3935  150733
The Linux Kernel.
Linux 2.6.24.3-r5 3935  150221 Luca...
The Linux Kernel.
Linux 2.6.24.2-r3 3935  146488 Giam...
The Linux Kernel.
Linux 2.6.24.1-r1 3935  146454 Giam...
The Linux Kernel.
Linux 2.6.24-r1 3935  146428 Luca...
The Linux Kernel.
Linux 2.6.23.8-r4 3935  155842 Luca...
The Linux Kernel.
Linux 2.6.22.7-r4 3935  114727 Luca...
The Linux Kernel.
Linux 2.6.22.1-r1 3935  121391 Luca...
The Linux Kernel.
Linux 2.6.21.1-r3 3935  118854 Luca...
The Linux Kernel.
Linux 2.6.20.7-r1 3935  117945 Luca...
The Linux Kernel.
Linux 2.6.20.4-r3 3935  151150 Luca...
The Linux Kernel.
Linux 2.6.20-r1 3935  106429 Luca...
The Linux Kernel.
Linux 2.6.18.3-r2 3935  111124 Luca...
The Linux Kernel.
Linux 2.6.17.11-r1 3935  164053 Luca...
The Linux Kernel.
Linux 2.6.17.3-r1 3935  165067 Luca...
The Linux Kernel.
Linux 2.6.16.20-r1 3935  133625 Luca...
The Linux Kernel.
Linux 2.6.16.14-r1 3935  168270 Luca...
The Linux Kernel.
Linux 2.6.15.5-r1 3935  224686 Jona...
The Linux Kernel.
Linux 2.6.15.2-r1 3935  177165 Carl...
The Linux Kernel.
Linux 2.6.15.1-r1 3935  149219 Jona...
The Linux Kernel.
Linux 2.6.15-r1 3935  149214 Luca...
The Linux Kernel.
Linux 2.6.14.4-r1 3935  150166 Jona...
The Linux Kernel.
Linux 2.6.14.3-r1 3935  150060 Jona...
The Linux Kernel.
Linux 2.6.14.2-r1 3935  149791 Carl...
The Linux Kernel.
Linux 2.6.13.4-r1 3935  149559 Luca...
The Linux Kernel.
Linux 2.6.13.2-r1 3935  56611 Jona...
The Linux Kernel.
Linux 2.6.13.1-r1 3935  56378 Luca...
The Linux Kernel.
Linux 2.6.12.2-r1 3935  50355 Luca...
The Linux Kernel.
Linux 2.6.11.9-r1 3935  98969 Luca...
The Linux Kernel.
Linux 2.6.11.8-r1 3935  109424 Jona...
The Linux Kernel.
Linux 2.6.11-r1 3935  99032 Luca...
The Linux Kernel.
Linux 2.6.10-r1 3935  65969 Luca...
The Linux Kernel.
Linux 2.6.9-r1 3935  278461 Luca...
The Linux Kernel.
view entry at GitHub | download recipe.bz2 file
01-Makefile.patch
02-gobohide.patch
03-devfs.patch
04-squashfs2.0.patch
05-squashfs-gobohide.patch
06-linux-abi.patch
07-fusion-full.patch
08-aic7xxx-fix.patch
09-cpia-deadlock-fix.patch
10-hpt366-fix.patch
11-i8xx_tco-reboot-fix.patch
12-net-DOS-fix.patch
13-oom-kill-fix.patch
14-parport_pc-unload-fix.patch
15-ppp-fix.patch
16-smbfs-leak-fix.patch
17-usb-visor-fix.patch
18-cddvd-cmdfilter-drop.patch
19-cfq2-20041019.patch
20-fix-bad-segment-coalescing-in-blk_recalc_rq_segments.patch
21-vm-pages_scanned-active_list.patch
22-staircase9.1.patch
23-block_fix.patch
24-buildfix.patch
25-defaultcfq.patch
26-mwII.patch
27-mwII.patch
28-supermount-ng207.patch
29-qla2xxx.patch
Recipe
Resources/Dependencies
Resources/Description
dot-config
--- linux.vanilla-2.6.9/drivers/usb/serial/visor.c	2004-10-20 22:33:09.000000000 \
+0100
+++ linux-2.6.9/drivers/usb/serial/visor.c	2004-10-24 17:26:59.000000000 +0100
@@ -381,10 +381,17 @@
 	.read_bulk_callback =	visor_read_bulk_callback,
 };
 
+struct visor_private {
+	spinlock_t lock;
+	int bytes_in;
+	int bytes_out;
+	int outstanding_urbs;
+};
 
-static int bytes_in;
-static int bytes_out;
+/* number of outstanding urbs to prevent userspace DoS from happening */
+#define URB_UPPER_LIMIT	42
 
+static int stats;
 
 /******************************************************************************
  * Handspring Visor specific driver functions
@@ -392,6 +399,8 @@
 static int visor_open (struct usb_serial_port *port, struct file *filp)
 {
 	struct usb_serial *serial = port->serial;
+	struct visor_private *priv = usb_get_serial_port_data(port);
+	unsigned long flags;
 	int result = 0;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
@@ -402,8 +411,11 @@
 		return -ENODEV;
 	}
 
-	bytes_in = 0;
-	bytes_out = 0;
+	spin_lock_irqsave(&priv->lock, flags);
+	priv->bytes_in = 0;
+	priv->bytes_out = 0;
+	priv->outstanding_urbs = 0;
+	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/*
 	 * Force low_latency on so that our tty_push actually forces the data
@@ -441,6 +453,7 @@
 
 static void visor_close (struct usb_serial_port *port, struct file * filp)
 {
+	struct visor_private *priv = usb_get_serial_port_data(port);
 	unsigned char *transfer_buffer;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
@@ -461,20 +474,32 @@
 		kfree (transfer_buffer);
 	}
 
-	/* Uncomment the following line if you want to see some statistics in your syslog \
*/
-	/* dev_info (&port->dev, "Bytes In = %d  Bytes Out = %d\n", bytes_in, bytes_out); \
*/
+	if (stats)
+		dev_info(&port->dev, "Bytes In = %d  Bytes Out = %d\n",
+			 priv->bytes_in, priv->bytes_out);
 }
 
 
 static int visor_write (struct usb_serial_port *port, int from_user, const unsigned \
char *buf, int count)
 {
+	struct visor_private *priv = usb_get_serial_port_data(port);
 	struct usb_serial *serial = port->serial;
 	struct urb *urb;
 	unsigned char *buffer;
+	unsigned long flags;
 	int status;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
+	spin_lock_irqsave(&priv->lock, flags);
+	if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
+		spin_unlock_irqrestore(&priv->lock, flags);
+		dev_dbg(&port->dev, "write limit hit\n");
+		return 0;
+	}
+	++priv->outstanding_urbs;
+	spin_unlock_irqrestore(&priv->lock, flags);
+
 	buffer = kmalloc (count, GFP_ATOMIC);
 	if (!buffer) {
 		dev_err(&port->dev, "out of memory\n");
@@ -514,7 +539,10 @@
 		count = status;
 		kfree (buffer);
 	} else {
-		bytes_out += count;
+		spin_lock_irqsave(&priv->lock, flags);
+		++priv->outstanding_urbs;
+		priv->bytes_out += count;
+		spin_unlock_irqrestore(&priv->lock, flags);
 	}
 
 	/* we are done with this urb, so let the host driver
@@ -555,6 +583,8 @@
 static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+	struct visor_private *priv = usb_get_serial_port_data(port);
+	unsigned long flags;
 
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree (urb->transfer_buffer);
@@ -565,6 +595,10 @@
 		dbg("%s - nonzero write bulk status received: %d",
 		    __FUNCTION__, urb->status);
 
+	spin_lock_irqsave(&priv->lock, flags);
+	--priv->outstanding_urbs;
+	spin_unlock_irqrestore(&priv->lock, flags);
+
 	schedule_work(&port->work);
 }
 
@@ -572,8 +606,10 @@
 static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
-	struct tty_struct *tty;
+	struct visor_private *priv = usb_get_serial_port_data(port);
 	unsigned char *data = urb->transfer_buffer;
+	struct tty_struct *tty;
+	unsigned long flags;
 	int i;
 	int result;
 
@@ -598,7 +634,9 @@
 		}
 		tty_flip_buffer_push(tty);
 	}
-	bytes_in += urb->actual_length;
+	spin_lock_irqsave(&priv->lock, flags);
+	priv->bytes_in += urb->actual_length;
+	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/* Continue trying to always read  */
 	usb_fill_bulk_urb (port->read_urb, port->serial->dev,
@@ -833,6 +871,22 @@
 	return num_ports;
 }
 
+static int generic_startup(struct usb_serial *serial)
+{
+	struct visor_private *priv;
+	int i;
+
+	for (i = 0; i < serial->num_ports; ++i) {
+		priv = kmalloc (sizeof(*priv), GFP_KERNEL);
+		if (!priv)
+			return -ENOMEM;
+		memset (priv, 0x00, sizeof(*priv));
+		spin_lock_init(&priv->lock);
+		usb_set_serial_port_data(serial->port[i], priv);
+	}
+	return 0;
+}
+
 static int clie_3_5_startup (struct usb_serial *serial)
 {
 	struct device *dev = &serial->dev->dev;
@@ -872,7 +926,7 @@
 		return -EIO;
 	}
 
-	return 0;
+	return generic_startup(serial);
 }
  
 static int treo_attach (struct usb_serial *serial)
@@ -911,7 +965,7 @@
 	COPY_PORT(serial->port[1], swap_port);
 	kfree(swap_port);
 
-	return 0;
+	return generic_startup(serial);
 }
 
 static int clie_5_attach (struct usb_serial *serial)
@@ -932,7 +986,7 @@
 	/* port 0 now uses the modified endpoint Address */
 	serial->port[0]->bulk_out_endpointAddress = serial->port[1]->bulk_out_endpointAddress;
 
-	return 0;
+	return generic_startup(serial);
 }
 
 static void visor_shutdown (struct usb_serial *serial)
@@ -1088,8 +1142,11 @@
 
 module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(stats, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(stats, "Enables statistics or not");
 
 module_param(vendor, ushort, 0);
 MODULE_PARM_DESC(vendor, "User specified vendor ID");
 module_param(product, ushort, 0);
 MODULE_PARM_DESC(product, "User specified product ID");
+
Linux 2.6.8.1-r1 3935  35576 Luca...
The Linux Kernel.
Linux 2.6.7-r1 3935  22610 Luca...
The Linux Kernel.
Linux 2.6.6-r1 3935  21958 Luca...
The Linux Kernel.
Linux 2.4.26-r1 3935  22359 Luca...
The Linux Kernel.