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]
Message-ID: <20100910071155.GA1263@darkside.kls.lan>
Date:	Fri, 10 Sep 2010 09:11:55 +0200
From:	"Mario 'BitKoenig' Holbe" <Mario.Holbe@...Ilmenau.DE>
To:	Ike Panhc <ike.pan@...onical.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	"platform-driver-x86@...r.kernel.org" 
	<platform-driver-x86@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	Thomas Renninger <trenn@...e.de>,
	Alan Cox <alan@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Corentin Chary <corentincj@...aif.net>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	"Brown, Len" <len.brown@...el.com>,
	Matthew Garrett <mjg@...hat.com>
Subject: Re: [PATCH 0/8] [Resend] ideapad: using EC command to control
 rf/camera power

On Fri, Sep 10, 2010 at 02:44:16PM +0800, Ike Panhc wrote:
> On 09/10/2010 02:17 AM, Mario 'BitKoenig' Holbe wrote:
> > Hmmm, with this version and no_bt_rfkill=1 I run into the same problem
> > as without the ideapad module: If I switch BT off in Windows and reboot
> > to Linux, the device remains invisible and I have no chance to switch it
> > back on again :/
> 
> The no_bt_rfkill is a stopgap for dual OS user. when BT is default on, user
> still have the BT sw rfkill registered as hci0. when BT is defualt off, user
> can re-insert module with no_bt_rfkill=0.
> 
> > I guess this is because the initial device activation does currently
> > only happen in ideapad_register_rfkill() via rfkill_init_sw_state()
> > which is not called if no_bt_rfkill=1.
> > A manual call to ideapad_rfk_set() (or ideapad_sync_rfk_state()?) in the
> > no_bt_rfkill=1 case would very likely solve this, but I don't know how
> > to provide this call with the correct arguments.
> 
> Sorry I do not get the point of a manual call. Could you explain more on this?
> 
> ideapad_rfk_set is called when user update /sys/class/rfkill/rfkill?/state and
> ideapad_sync_rfk_state is called when user touch the hw rfkill switch.

ideapad_rfk_set is also called in ideapad_register_rfkill:

static int ideapad_register_rfkill(struct acpi_device *adevice, int dev)
{
...
	if (no_bt_rfkill && (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH))
		return 0;
...
	rfkill_init_sw_state(priv->rfk[dev], 0);
}

The rfkill_init_sw_state call to unblock the device finally calls
ideapad_rfk_set. In the no_bt_rfkill=1 case rfkill_init_sw_state isn't
called, thus the device is not unblocked if it was blocked before.
Hence, if I prior disabled BT in Windows, the device remains invisible.
This is why I think a manual call to ideapad_rfk_set in the
no_bt_rfkill=1 case would make the BT device visible.

"manual" in terms of:
	if (no_bt_rfkill && (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH))
	{
		ideapad_rfk_set(???, 0);
		return 0;
	}

But I don't know what to provide as "???".


Mario
-- 
"Why are we hiding from the police, daddy?"      | J. E. Guenther
"Because we use SuSE son, they use SYSVR4."      | de.alt.sysadmin.recovery

Download attachment "signature.asc" of type "application/pgp-signature" (483 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ