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:	Fri, 14 Sep 2007 15:29:12 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	greearb@...delatech.com
Cc:	netdev@...r.kernel.org, kaber@...sh.net
Subject: Re: SO_BINDTODEVICE mismatch with man page & comments.

From: Ben Greear <greearb@...delatech.com>
Date: Fri, 14 Sep 2007 15:11:39 -0700

>  From user-space, does this imply that the 'empty string' we use to
> unbind must be at least 4 bytes long, but with the first byte /0?
>
> If so, I think it might be confusing for the comments to say use ""
> to unbind, since that would not be a long enough chunk of memory.
> 
> Maybe something like "Use a character array of at least 4 bytes in
> length with the first byte set to '/0'."

I realize this, I'll try to come up with some clean way to
deal with this.

I don't want to touch that "if (optlen < sizeof(int))" test
at all because it makes all of the logic incredibly complicated
because you then have to forcefully initialize the 'val' and
'valbool' if you bypass reading the int.

> This brings up another issue as well:  What if the device name is "tr1",
> to bind to it we'd have to pass in "tr1/0" and optlen of 4.  Not that this
> is difficult to do, but it does seem like a weird thing to have to do.

You always to account for the NULL termination, thus you always have
to pass in "strlen(X) + 1" as optlen.

But I see your point, and my answer is the same as the first one.

Instead of nit-picking, can you instead try the patch and let me
know if it makes things work for you?

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ