diff mbox

[Oneiric,SRU] remove security_sk_clone calls from compat-wireless-3.2

Message ID 4F3D9F23.4060109@canonical.com
State New
Headers show

Commit Message

James M. Leddy Feb. 17, 2012, 12:28 a.m. UTC
From: James M. Leddy <james.leddy@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/914689

=== Oneiric SRU Justification ===
There is an abi incompatibility with current compat-wireless lbm and 
what we have in 3.0. That means that we have no way to load the 
bluetooth modules. This is a serious problem for anyone that has a newer 
wireless card but also wants to use bluetooth.

== Fix ==
Remove the security_sk_clone call. This is just a call to copy over 
security information when cloning a socket, but it's something that we 
have never had in linux-3.0. This call was not exported in the linux-3.0 
code which is why we can't load the module with that call included

== Test Case ==
Install inux-backports-modules-3.0.0 for Oneiric and confirm that you 
can't load bluetooth module or drivers like btusb because of symbol 
resolution errors. Apply the patch and notice that you cand load 
bluetooth and drivers with no problems.

There is no risk of regression since LBM is an elective install. I've 
attached the patch as bzr output, please let me know if git commit 
output is necessary.

Alternately, you can merge this branch:
https://code.launchpad.net/~jm-leddy/ubuntu/oneiric/linux-backports-modules-3.0.0/fix-914689

Comments

Tim Gardner Feb. 17, 2012, 12:52 a.m. UTC | #1
On 02/16/2012 05:28 PM, James M. Leddy wrote:
> From: James M. Leddy <james.leddy@canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/914689
>
> === Oneiric SRU Justification ===
> There is an abi incompatibility with current compat-wireless lbm and
> what we have in 3.0. That means that we have no way to load the
> bluetooth modules. This is a serious problem for anyone that has a newer
> wireless card but also wants to use bluetooth.
>
> == Fix ==
> Remove the security_sk_clone call. This is just a call to copy over
> security information when cloning a socket, but it's something that we
> have never had in linux-3.0. This call was not exported in the linux-3.0
> code which is why we can't load the module with that call included
>
> == Test Case ==
> Install inux-backports-modules-3.0.0 for Oneiric and confirm that you
> can't load bluetooth module or drivers like btusb because of symbol
> resolution errors. Apply the patch and notice that you cand load
> bluetooth and drivers with no problems.
>
> There is no risk of regression since LBM is an elective install. I've
> attached the patch as bzr output, please let me know if git commit
> output is necessary.
>
> Alternately, you can merge this branch:
> https://code.launchpad.net/~jm-leddy/ubuntu/oneiric/linux-backports-modules-3.0.0/fix-914689
>
>
>

I've been investigating this. The patch is fine, but we also need to fix 
the root cause in upstream cw-3.1 or we'll just have this problem next 
time we update.

rtg
Brad Figg Feb. 17, 2012, 2:30 a.m. UTC | #2
On 02/16/2012 04:28 PM, James M. Leddy wrote:
> From: James M. Leddy <james.leddy@canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/914689
>
> === Oneiric SRU Justification ===
> There is an abi incompatibility with current compat-wireless lbm and what we have in 3.0. That means that we have no way to load the bluetooth modules. This is a serious problem for anyone that has a newer wireless card but also wants to use bluetooth.
>
> == Fix ==
> Remove the security_sk_clone call. This is just a call to copy over security information when cloning a socket, but it's something that we have never had in linux-3.0. This call was not exported in the linux-3.0 code which is why we can't load the module
> with that call included
>
> == Test Case ==
> Install inux-backports-modules-3.0.0 for Oneiric and confirm that you can't load bluetooth module or drivers like btusb because of symbol resolution errors. Apply the patch and notice that you cand load bluetooth and drivers with no problems.
>
> There is no risk of regression since LBM is an elective install. I've attached the patch as bzr output, please let me know if git commit output is necessary.
>
> Alternately, you can merge this branch:
> https://code.launchpad.net/~jm-leddy/ubuntu/oneiric/linux-backports-modules-3.0.0/fix-914689
>
>
James M. Leddy Feb. 22, 2012, 7:37 p.m. UTC | #3
From: "James M. Leddy" <james.leddy@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/914689 

I've altered it so that the fix is more in line with upstream commits:

  545ece91974440f6447bbd27a44775bdaeee8212
  0c51ea9ee6ad49b34dadf92798f7109f12cd0490

=== Oneiric SRU Justification ===
There is an abi incompatibility with current compat-wireless lbm and
what we have in 3.0. That means that we have no way to load the
bluetooth modules. This is a serious problem for anyone that has a newer
wireless card but also wants to use bluetooth.

== Fix ==
Remove the security_sk_clone call. This is just a call to copy over
security information when cloning a socket, but it's something that we
have never had in linux-3.0. This call was not exported in the linux-3.0
code which is why we can't load the module with that call included

== Test Case ==
Install inux-backports-modules-3.0.0 for Oneiric and confirm that you
can't load bluetooth module or drivers like btusb because of symbol
resolution errors. Apply the patch and notice that you can load
bluetooth and drivers with no problems.

I have tested on an Oneiric kernel to make sure it is possible to
load the bluetooth module.

There is no risk of regression since LBM is an elective install. I've
attached the patch as bzr output, please let me know if git commit
output is necessary.

James M. Leddy (1):
  UBUNTU: Implement dummy security_sk_clone for compat-wireless

 updates/cw-3.1/include/linux/compat-3.1.h |   13 +++++++++++++
 updates/cw-3.2/include/linux/compat-3.1.h |   13 +++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
diff mbox

Patch

=== modified file 'updates/cw-3.1/net/bluetooth/l2cap_sock.c'
--- updates/cw-3.1/net/bluetooth/l2cap_sock.c	2011-11-21 18:03:30 +0000
+++ updates/cw-3.1/net/bluetooth/l2cap_sock.c	2012-02-16 18:10:28 +0000
@@ -942,8 +942,6 @@ 
 		chan->force_reliable = pchan->force_reliable;
 		chan->flushable = pchan->flushable;
 		chan->force_active = pchan->force_active;
-
-		security_sk_clone(parent, sk);
 	} else {
 
 		switch (sk->sk_type) {

=== modified file 'updates/cw-3.1/net/bluetooth/rfcomm/sock.c'
--- updates/cw-3.1/net/bluetooth/rfcomm/sock.c	2011-11-21 18:03:30 +0000
+++ updates/cw-3.1/net/bluetooth/rfcomm/sock.c	2012-02-16 18:10:31 +0000
@@ -265,8 +265,6 @@ 
 
 		pi->sec_level = rfcomm_pi(parent)->sec_level;
 		pi->role_switch = rfcomm_pi(parent)->role_switch;
-
-		security_sk_clone(parent, sk);
 	} else {
 		pi->dlc->defer_setup = 0;
 

=== modified file 'updates/cw-3.1/net/bluetooth/sco.c'
--- updates/cw-3.1/net/bluetooth/sco.c	2011-11-21 18:03:30 +0000
+++ updates/cw-3.1/net/bluetooth/sco.c	2012-02-16 18:10:24 +0000
@@ -406,7 +406,6 @@ 
 
 	if (parent) {
 		sk->sk_type = parent->sk_type;
-		security_sk_clone(parent, sk);
 	}
 }
 

=== modified file 'updates/cw-3.2/net/bluetooth/l2cap_sock.c'
--- updates/cw-3.2/net/bluetooth/l2cap_sock.c	2012-01-25 12:52:58 +0000
+++ updates/cw-3.2/net/bluetooth/l2cap_sock.c	2012-02-16 18:10:18 +0000
@@ -943,8 +943,6 @@ 
 		chan->force_reliable = pchan->force_reliable;
 		chan->flushable = pchan->flushable;
 		chan->force_active = pchan->force_active;
-
-		security_sk_clone(parent, sk);
 	} else {
 
 		switch (sk->sk_type) {

=== modified file 'updates/cw-3.2/net/bluetooth/rfcomm/sock.c'
--- updates/cw-3.2/net/bluetooth/rfcomm/sock.c	2012-01-25 12:52:58 +0000
+++ updates/cw-3.2/net/bluetooth/rfcomm/sock.c	2012-02-16 18:10:21 +0000
@@ -265,8 +265,6 @@ 
 
 		pi->sec_level = rfcomm_pi(parent)->sec_level;
 		pi->role_switch = rfcomm_pi(parent)->role_switch;
-
-		security_sk_clone(parent, sk);
 	} else {
 		pi->dlc->defer_setup = 0;
 

=== modified file 'updates/cw-3.2/net/bluetooth/sco.c'
--- updates/cw-3.2/net/bluetooth/sco.c	2012-01-25 12:52:58 +0000
+++ updates/cw-3.2/net/bluetooth/sco.c	2012-02-16 18:10:14 +0000
@@ -406,7 +406,6 @@ 
 
 	if (parent) {
 		sk->sk_type = parent->sk_type;
-		security_sk_clone(parent, sk);
 	}
 }