Arnd Bergmann | 5 Nov 17:26
Picon
Gravatar

[PATCH 05/25] net: move ppp specific ioctl32 handlers

This moves all ioctl32 code for ppp close to the
native ioctl implementation.

CC: linux-ppp <at> vger.kernel.org
CC: netdev <at> vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd <at> arndb.de>

Index: linux-2.6.14-rc/drivers/net/ppp_generic.c
===================================================================
--- linux-2.6.14-rc.orig/drivers/net/ppp_generic.c	2005-11-05 02:41:10.000000000 +0100
+++ linux-2.6.14-rc/drivers/net/ppp_generic.c	2005-11-05 02:41:29.000000000 +0100
@@ -46,6 +46,8 @@
 #include <linux/rwsem.h>
 #include <linux/stddef.h>
 #include <linux/device.h>
+#include <linux/compat.h>
+
 #include <net/slhc_vj.h>
 #include <asm/atomic.h>

@@ -837,12 +839,189 @@
 	return err;
 }

+#ifdef CONFIG_COMPAT
+/* FIXME: These could be better integrated into the driver */
+
+struct sock_fprog32 {
+	unsigned short	len;
+	compat_caddr_t	filter;
(Continue reading)

Arnd Bergmann | 5 Nov 17:26
Picon
Gravatar

[PATCH 00/25] reduce code in fs/compat_ioctl.c

On Sünnavend 05 November 2005 00:51, Christoph Hellwig wrote:
> On Sat, Nov 05, 2005 at 12:10:46AM +0100, Arnd Bergmann wrote:
> >
> > BTW, I now have a set of 25 patches that moves all handlers from
> > fs/compat_ioctl.c over to the respective drivers and subsystems,
> > but I'm not sure how to best test that.
> > I intend to at least give it a test run on my Opteron for the whatever
> > ioctls I normally use, but the rest is just guesswork. Christoph,
> > can you review those patches?
> 
> I'm not sure moving everything from fs/compat_ioctl.c is a good idea.
> Everything that is just in a single driver or subsystem that has
> common ioctl code - sure.  else it doesn't make a lot of sense.

Ok, here is my full set of patches, let's see which ones are
sensible and which ones we are better off without.

Getting rid of fs/compat_ioctl.c completely could at least simplify
the compat_sys_ioctl() code a bit and would also make sure that
we only build the handlers into the kernel that can be used
potentially, which reduces the binary size.

The patch set is still largely untested, except for a single
compile test, but at least some of the patches are very simple,
so maybe I can get a quick ack or nack on them.

In general, I'm just moving over the handlers to the respective
subsystem without changing the logic, so the patch should not
have any effect on the ioctl operation itself, but it also
means that the handlers still use compat_alloc_user_space
(Continue reading)

Warren Turkal | 7 Nov 11:00

linux ppp problem

I know this is not a normal use case, but I am hoping that an oops can be 
avoided in this case. I was using a cell phone as /dev/ttyACM0 and the cell 
phone came unconnected. The kernel then oopsed.

It looks like the kernel is removing the ttyACM device before the ppp0 driver 
has a chance to let it go.

If I can do anything else to help, please let me know by CC as I am not a 
member of this list.

Here is the oops from my logs.

Nov  7 03:31:32 localhost kernel: usb 1-2: USB disconnect, address 2
Nov  7 03:31:33 localhost kernel: Unable to handle kernel NULL pointer 
dereference at virtual address 0000000c
Nov  7 03:31:33 localhost kernel:  printing eip:
Nov  7 03:31:33 localhost kernel: c01ad03f
Nov  7 03:31:33 localhost kernel: *pde = 00000000
Nov  7 03:31:33 localhost kernel: Oops: 0000 [#1]
Nov  7 03:31:33 localhost kernel: SMP 
Nov  7 03:31:33 localhost kernel: Modules linked in: ppp_deflate zlib_deflate 
bsd_comp ppp_async crc_ccitt ppp_generic slhc wacom radeon drm binfmt_misc 
rfcomm l2cap bluetooth af_packet ipv6 lp thermal fan button ac battery xfs 
exportfs cdc_acm acpi_cpufreq freq_table processor cpufreq_userspace video 
sbp2 scsi_mod eth1394 pcmcia firmware_class ohci1394 ieee1394 snd_maestro3 
e100 mii yenta_socket rsrc_nonstatic pcmcia_core intel_agp agpgart shpchp 
pci_hotplug snd_intel8x0m snd_ac97_codec snd_ac97_bus snd_pcm_oss 
snd_mixer_oss snd_pcm snd_timer snd uhci_hcd i2c_i801 soundcore i2c_core 
usbcore snd_page_alloc floppy parport_pc parport rtc pcspkr ide_cd serio_raw 
cdrom unix reiserfs dm_mod ide_disk ide_generic generic piix ide_core evdev 
(Continue reading)

Ali Usman | 7 Nov 12:28
Picon
Favicon

ASSISTANCE

ARTS & CRAFT COMPANY PLC.
DL0311 VAUXHALL CROSS LONDON
UNITED KINGDOM.
E-MAIL:aliusman4 <at> yahoo.com

Attn:Sir/Ma,

With due respect to you, I am sorry for any inconveniences or embarrassement 
this my letter of assistance may cause you. I am writing following an 
impressive information we got about you through a consultancy firm under 
UK/USA/CA. CHAMBER OF COMMERCE AND INDUSTRY. Thus we assured your capability 
and reliability to champion a business of great magnitude.

I am Mr.Ali Usman, the managing director of the above mentioned company. 
Base on the assurance given on your behalf, my company has appoint you as 
our debt collector from our overseas creditors. The creditors always send us 
CHEQUES for our payment, but foreign cheque take LONGER time to clear and 
sometimes some of them got lost on transit, which impact a great lost to 
this Company. It is on this effect, we the management outstand a dept 
collect or overseas. You haven been selected on these contract, the 
management has agreed that any debt YOU collected on our behalf, 5% is 
allowed for you as your share while the remaining will be remitted to us 
through wire transfer on our coparate  account.

To commence on this transaction, you are to send the following in your 
reply:
1. Name you want the cheque to be raised.
2. Direct telephone and fax numbers
3. Mailing address
4. Your company name if any.
(Continue reading)

James Cameron | 7 Nov 23:37
Picon
Favicon

Re: linux ppp problem

I've also seen something like this on 2.6.13.4 using a CDMA modem on
/dev/ttyACM0.  I'm not sure what caused the event cascade, but I suspect
it was a provider network disconnection.  /dev/ttyACM0 becomes useless
after this happens.  Reconnecting the modem causes it to show up as
/dev/ttyACM1, which responds as normal.  ppp 2.4.3.

--

-- 
James Cameron
http://ftp.hp.com.au/sigs/jc/
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Warren Turkal | 7 Nov 23:42

Re: linux ppp problem

On Monday 07 November 2005 04:37 pm, James Cameron wrote:
> I've also seen something like this on 2.6.13.4 using a CDMA modem on
> /dev/ttyACM0.  I'm not sure what caused the event cascade, but I suspect
> it was a provider network disconnection.  /dev/ttyACM0 becomes useless
> after this happens.  Reconnecting the modem causes it to show up as
> /dev/ttyACM1, which responds as normal.  ppp 2.4.3.

I see the same behavior here.

wt
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Warren Turkal | 7 Nov 23:47

Re: linux ppp problem

On Monday 07 November 2005 04:37 pm, James Cameron wrote:
> I've also seen something like this on 2.6.13.4 using a CDMA modem on

I just noticed that the old pppd process is still up, and I can't poff it. I 
think the ttyACM0 device is still held open by this pppd process, and that 
may be what causes udev to allocate ttyACM1 instead.

wt
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jay Nitikman | 12 Nov 19:03

ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data) fails

My working vpn connection stopped working "suddenly". I did some testing 
and discovered that the call:

ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data)

in ccp_test() in sys-linux.c in pppd always returns EINVAL.

My kernel, 2.6.10-gentoo-r6, has MPPE compiled in, not as a module.
The ppp_dev_fd has a value of "22" which seems reasonable.  So it 
appears that PPPIOCSCOMPRESS is invalid.  Huh?

I am using Gentoo ppp-2.4.3-r9.

This has been working fine for months.  I have tried rebooting, both 
cold and warm.  I've tried rebuilding ppp-2.4.3-r9.  I've tried 
ppp-2.4.2-r15.  My vpn provider says that nothing has changed on their side.

Any ideas why that ioctl should fail and how to fix it?

--

-- 
-----------------
Jay Nitikman
jay <at> permeable.com
-----------------
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Jay Nitikman | 14 Nov 00:51

Re: ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data) fails

Okay, I have more information.  My boot log does not show the following 
line:

PPP MPPE Compression module registered

Which seems to be required in order for MPPE to be valid.  I have no 
idea what would prevent the compiled-in MPPE module from registering.

Any ideas would be helpful.

Jay

Jay Nitikman wrote:
> My working vpn connection stopped working "suddenly". I did some testing 
> and discovered that the call:
> 
> ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data)
> 
> in ccp_test() in sys-linux.c in pppd always returns EINVAL.
> 
> My kernel, 2.6.10-gentoo-r6, has MPPE compiled in, not as a module.
> The ppp_dev_fd has a value of "22" which seems reasonable.  So it 
> appears that PPPIOCSCOMPRESS is invalid.  Huh?
> 
> I am using Gentoo ppp-2.4.3-r9.
> 
> This has been working fine for months.  I have tried rebooting, both 
> cold and warm.  I've tried rebuilding ppp-2.4.3-r9.  I've tried 
> ppp-2.4.2-r15.  My vpn provider says that nothing has changed on their 
> side.
(Continue reading)

James Cameron | 14 Nov 01:10
Picon
Favicon

Re: ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data) fails

Try it as a module?  I've never got it to work statically compiled.

--

-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane