K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:48 +0000 (16:56 -0800)]
drivers: hv: Cleanup the kvp related state in hyperv.h
Now cleanup the hyperv.h with regards to KVP definitions.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
59a084a70afa0678bda2a23a7bc7cc59664945c7)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:49 +0000 (16:56 -0800)]
tools: hv: Use hyperv.h to get the KVP definitions
Now use hyperv.h to get the KVP defines in the KVP user-mode code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
eab6af71f0b83a7f62b9c48be5b2c0a82a86fad3)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Haiyang Zhang [Sun, 5 Feb 2012 12:13:10 +0000 (12:13 +0000)]
net/hyperv: Remove the unnecessary memset in rndis_filter_send()
The memory has been allocated by kzalloc, so it's unnecessary to memset
again.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
bce60806de882cf15ad3a80a51e9878863a8fced)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Haiyang Zhang [Sun, 5 Feb 2012 12:13:09 +0000 (12:13 +0000)]
net/hyperv: Correct the assignment in netvsc_recv_callback()
The first assignment to variable "net" is wrong, but overridden by the
latter assignments. So the bug isn't manifested.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
6f4c44460750dd4eb9926a58ab1ad0ceacef8284)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Haiyang Zhang [Sun, 5 Feb 2012 12:13:08 +0000 (12:13 +0000)]
net/hyperv: Convert camel cased variables in rndis_filter.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
5fccab3b66d53883a97fc65e0c33f3ebf74e8ff9)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
K. Y. Srinivasan [Fri, 27 Jan 2012 23:55:58 +0000 (15:55 -0800)]
drivers: hv: kvp: Move the contents of hv_kvp.h to hyperv.h
In preparation for consolidating all KVP related defines into a single header file
that both the kernel and user level components can use, move the contents of
hv_kvp.h into hyperv.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
2939437ce8f2de07237eb2bcce29b6a699bfe799)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
K. Y. Srinivasan [Fri, 27 Jan 2012 23:55:57 +0000 (15:55 -0800)]
drivers: hv: kvp: Add/cleanup connector defines
The current KVP code carries some private connector related defines.
Update connector.h to have all the KVP defines. As part of this patch
get rid of some unused defines.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
4f03a2c934894f30a64d397df8c7c4de129c5b30)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
K. Y. Srinivasan [Sun, 8 Jan 2012 18:12:18 +0000 (10:12 -0800)]
drivers: hv: Get rid of some unnecessary code
The current code unnecessarily limits the number of offers we handle.
Get rid of this limitation. As part of this cleanup, also get rid of an
unused define - MAX_MSG_TYPES.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit
2897a563a55442379e5e59ec68c229a7f27fb7c6)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Chris Wilson [Thu, 22 Mar 2012 15:00:50 +0000 (15:00 +0000)]
drm/i915: Sanitize BIOS debugging bits from PIPECONF
Quoting the BSpec from time immemorial:
PIPEACONF, bits 28:27: Frame Start Delay (Debug)
Used to delay the frame start signal that is sent to the display planes.
Care must be taken to insure that there are enough lines during VBLANK
to support this setting.
An instance of the BIOS leaving these bits set was found in the wild,
where it caused our modesetting to go all squiffy and skewiff.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47271
Reported-and-tested-by: Eva Wang <evawang@linpus.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012
Reported-and-tested-by: Carl Richell <carl@system76.com>
Cc: stable@kernel.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry-picked from commit
f47166d2b0001fcb752b40c5a2d4db986dfbea68 drm-intel)
BugLink: http://bugs.launchpad.net/bugs/968307
Acked-by: Robert Hooker <sarvatt@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Daniel Vetter [Mon, 2 Apr 2012 15:36:57 +0000 (08:36 -0700)]
UBUNTU: SAUCE: (drop after 3.5) drm/i915: reinstate GM45 TV detection fix
BugLink: http://bugs.launchpad.net/bugs/638939
cherry picked from drm-intel-next-queue
This reverts commmit
d4b74bf07873da2e94219a7b67a334fc1c3ce649 which
reverted the origin fix
fb8b5a39b6310379d7b54c0c7113703a8eaf4a57.
We have at least 3 different bug reports that this fixes things and no
indication what is exactly wrong with this. So try again.
To make matters slightly more fun, the commit itself was cc: stable
whereas the revert has not been.
According to Peter Clifton he discussed this with Zhao Yakui and this
seems to be in contradiction of the GM45 PRM, but rumours have it that
this is how the BIOS does it ... let's see.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>
Cc: Zhao Yakui <yakui.zhao@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16236
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25913
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=14792
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara [Mon, 2 Apr 2012 15:37:08 +0000 (08:37 -0700)]
UBUNTU: [Config] Enable CONFIG_USBIP_CORE=m
BugLink: http://bugs.launchpad.net/bugs/900384
CONFIG_USBIP_CORE=m
CONFIG_USBIP_HOST=m
CONFIG_USBIP_VHCI_HCD=m
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Corentin Chary [Tue, 20 Mar 2012 08:53:12 +0000 (09:53 +0100)]
eeepc-wmi: refine quirks handling
BugLink: http://bugs.launchpad.net/bugs/969576
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
c55d995dd3cebffdeb2b7eff8acc813c56d62c97)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Corentin Chary [Tue, 20 Mar 2012 08:53:10 +0000 (09:53 +0100)]
asus-wmi: move WAPF variable into quirks_entry
BugLink: http://bugs.launchpad.net/bugs/969576
Some models work better with different values of wapf, so move the
variable into quriks_entry to make it more easy to give a specific
value to different models.
Based on original patch from AceLan Kao <acelan.kao@canonical.com>
Cc: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
6a2bcccdb3206950d28e343476d9050e23e79b7e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Julian Anastasov [Thu, 23 Feb 2012 20:40:43 +0000 (22:40 +0200)]
ACPICA: Fix regression in FADT revision checks
BugLink: http://bugs.launchpad.net/bugs/883441
commit
64b3db22c04586997ab4be46dd5a5b99f8a2d390 (2.6.39),
"Remove use of unreliable FADT revision field" causes regression
for old P4 systems because now cst_control and other fields are
not reset to 0.
The effect is that acpi_processor_power_init will notice
cst_control != 0 and a write to CST_CNT register is performed
that should not happen. As result, the system oopses after the
"No _CST, giving up" message, sometimes in acpi_ns_internalize_name,
sometimes in acpi_ns_get_type, usually at random places. May be
during migration to CPU 1 in acpi_processor_get_throttling.
Every one of these settings help to avoid this problem:
- acpi=off
- processor.nocst=1
- maxcpus=1
The fix is to update acpi_gbl_FADT.header.length after
the original value is used to check for old revisions.
https://bugzilla.kernel.org/show_bug.cgi?id=42700
https://bugzilla.redhat.com/show_bug.cgi?id=727865
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from commit
3e80acd1af40fcd91a200b0416a7616b20c5d647)
Signed-off-by: Colin King <colin.king@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Kees Cook [Fri, 30 Mar 2012 20:20:07 +0000 (13:20 -0700)]
UBUNTU: SAUCE: SECCOMP: adjust prctl constant
3.4-rc1 contains new prctl values that conflict with the ones chosen for
nnp, so push them forward with the hopes that we will align with the future.
Signed-off-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Kees Cook [Fri, 30 Mar 2012 20:19:08 +0000 (13:19 -0700)]
UBUNTU: SAUCE: SECCOMP: audit: always report seccomp violations
Violations of seccomp filters should always be reported, regardless
of audit context. This the minimal change version of what has been
proposed upstream: https://lkml.org/lkml/2012/3/23/332
Signed-off-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Tim Gardner [Fri, 30 Mar 2012 16:45:11 +0000 (10:45 -0600)]
Revert "sched: tg->se->load should be initialised to tg->shares"
Dropping since this patch never made it upstream.
This reverts commit
f55c2f6c615f6c975eae2d956b54bbc3e81de2f6.
Brad Figg [Fri, 30 Mar 2012 16:24:43 +0000 (09:24 -0700)]
sched: Fix nohz load accounting
BugLink: http://bugs.launchpad.net/bugs/838811
Various people reported nohz load tracking still being wrecked, but Doug
spotted the actual problem. We fold the nohz remainder in too soon,
causing us to loose samples and under-account.
So instead of playing catch-up up-front, always do a single load-fold
with whatever state we encounter and only then fold the nohz remainder
and play catch-up.
Reported-by: Doug Smythies <dsmythies@telus.net>
Reported-by: LesÃ…=82aw Kope=C4=87 <leslaw.kopec@nasza-klasa.pl>
Reported-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link:
http://lkml.kernel.org/n/tip-4v31etnhgg9kwd6ocgx3rxl8@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(backport of upstream:
c308b56b5398779cd3da0f62ab26b0453494c3d4)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ben Hutchings [Wed, 1 Feb 2012 09:32:25 +0000 (09:32 +0000)]
ethtool: Null-terminate filename passed to ethtool_ops::flash_device
BugLink: http://bugs.launchpad.net/bugs/921793
The parameters for ETHTOOL_FLASHDEV include a filename, which ought to
be null-terminated. Currently the only driver that implements
ethtool_ops::flash_device attempts to add a null terminator if
necessary, but does it wrongly. Do it in the ethtool core instead.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Thu, 19 Jan 2012 20:34:04 +0000 (20:34 +0000)]
be2net: create RSS rings even in multi-channel configs
BugLink: http://bugs.launchpad.net/bugs/921793
Currently RSS rings are not created in a multi-channel config.
RSS rings can be created on one (out of four) interfaces per port in a
multi-channel config. Doing this insulates the driver from a FW bug wherin
multi-channel config is wrongly reported even when not enabled. This also
helps performance in a multi-channel config, as one interface per port gets
RSS rings.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
stephen hemminger [Thu, 5 Jan 2012 19:10:25 +0000 (19:10 +0000)]
netdev: make net_device_ops const
BugLink: http://bugs.launchpad.net/bugs/921793
More drivers where net_device_ops should be const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ajit Khaparde [Fri, 30 Dec 2011 12:15:40 +0000 (12:15 +0000)]
be2net: query link status in be_open()
BugLink: http://bugs.launchpad.net/bugs/921793
be2net gets an async link status notification from the FW when it creates
an MCC queue. There are some cases in which this gratuitous notification
is not received from FW. To cover this explicitly query the link status
in be_open().
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ajit Khaparde [Fri, 30 Dec 2011 12:15:30 +0000 (12:15 +0000)]
be2net: fix range check for set_qos for a VF
BugLink: http://bugs.launchpad.net/bugs/921793
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Mon, 19 Dec 2011 01:53:35 +0000 (01:53 +0000)]
be2net: Fix INTx processing for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Lancer does not have HW registers to indicate the EQ causing the INTx
interrupt. As a result EQE entries of one EQ may be consumed when interrupt
is caused by another EQ. Fix this by arming CQs at the end of NAPI poll
routine to regenerate the EQEs.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ajit Khaparde [Thu, 15 Dec 2011 06:31:38 +0000 (06:31 +0000)]
be2net: Add support for Skyhawk cards
BugLink: http://bugs.launchpad.net/bugs/921793
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Tue, 13 Dec 2011 00:58:50 +0000 (00:58 +0000)]
be2net: refactor/cleanup vf configuration code
BugLink: http://bugs.launchpad.net/bugs/921793
- use adapter->num_vfs (and not the module param) to store the actual
number of vfs created. Use the same variable to reflect SRIOV
enable/disable state. So, drop the adapter->sriov_enabled field.
- use for_all_vfs() macro in VF configuration code
- drop the "vf_" prefix for the fields of be_vf_cfg; the prefix is
redundant and removing it helps reduce line wrap
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Tue, 13 Dec 2011 00:58:49 +0000 (00:58 +0000)]
be2net: fix ethtool ringparam reporting
BugLink: http://bugs.launchpad.net/bugs/921793
The ethtool "-g" option is supposed to report the max queue length and
user modified queue length for RX and TX queues. be2net doesn't support
user modification of queue lengths. So, the correct values for these
would be the max numbers.
be2net incorrectly reports the queue used values for these fields.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ajit Khaparde [Fri, 9 Dec 2011 13:53:17 +0000 (13:53 +0000)]
be2net: workaround to fix a bug in BE
BugLink: http://bugs.launchpad.net/bugs/921793
disable Tx vlan offloading in certain cases.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ajit Khaparde [Fri, 9 Dec 2011 13:53:09 +0000 (13:53 +0000)]
be2net: update some counters to display via ethtool
BugLink: http://bugs.launchpad.net/bugs/921793
update pmem_fifo_overflow_drop, rx_priority_pause_frames counters.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ivan Vecera [Thu, 8 Dec 2011 01:31:21 +0000 (01:31 +0000)]
be2net: netpoll support
BugLink: http://bugs.launchpad.net/bugs/921793
Add missing netpoll support.
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:53 +0000 (05:48 +0000)]
be2net: Fix non utilization of RX queues
BugLink: http://bugs.launchpad.net/bugs/921793
When non power of two MSIX vectors are given to driver, some RX queues
are not utilized. Program RSS table in such a way that all queues
are utilized.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:38 +0000 (05:48 +0000)]
be2net: Use new hash key
BugLink: http://bugs.launchpad.net/bugs/921793
This new hash key gives better distribution of packets across RX
queues.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:23 +0000 (05:48 +0000)]
be2net: Add error handling for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Detect error in Lancer by polling a HW register and
recover from this error if it is recoverable.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:06 +0000 (05:48 +0000)]
be2net: Fix error recovery paths
BugLink: http://bugs.launchpad.net/bugs/921793
When TX queues are created again after error recovery,
netif_set_real_num_tx_queues() is invoked to update number of real
TX queues created. rtnl lock needs to be held when invoking this routine.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:47:26 +0000 (05:47 +0000)]
be2net: Move to new SR-IOV implementation in Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
SR-IOV implementation is Lancer has changed in following ways -
1)PF driver assigns one MAC addresses for VF using COMMON_SET_IFACE_MAC_LIST.
2)VF driver queries its MAC address using COMMON_GET_IFACE_MAC_LIST command
and assigns it to its interface.
Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:45 +0000 (02:03 +0000)]
be2net: Use V1 query link status command for lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Use V1 version of query link status command for Lancer.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:32 +0000 (02:03 +0000)]
be2net: Fix VLAN promiscous mode for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
To enable VLAN promiscous mode, the HW interface should be created
with VLAN promiscous capability in Lancer. Add this capability during
creation of the HW interface.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:07 +0000 (02:03 +0000)]
be2net: Add EEPROM dump feature for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Implemented eeprom dump using ethtool feature for Lancer.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:02:43 +0000 (02:02 +0000)]
be2net: add register dump feature for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Implement register dump using ethtool for Lancer.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:02:23 +0000 (02:02 +0000)]
be2net: Fix TX queue create for Lancer
BugLink: http://bugs.launchpad.net/bugs/921793
Lancer uses V1 version of TXQ create. This command needs interface
id for TX queue creation. Rearrange code such that tx queue create
is after interface create. As TXQ create is now called after MCC
ring create use MCC instead of MBOX.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Thu, 10 Nov 2011 19:18:00 +0000 (19:18 +0000)]
be2net: stop issuing FW cmds if any cmd times out
BugLink: http://bugs.launchpad.net/bugs/921793
A FW cmd timeout (with a sufficiently large timeout value in the
order of tens of seconds) indicates an unresponsive FW. In this state
issuing further cmds and waiting for a completion will only stall the process.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Thu, 10 Nov 2011 19:17:59 +0000 (19:17 +0000)]
be2net: don't log more than one error on detecting EEH/UE errors
BugLink: http://bugs.launchpad.net/bugs/921793
Currently we're spamming error messages each time a FW cmd call is made
while in EEH/UE error state. One log msg on error detection is enough.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Thu, 10 Nov 2011 19:17:58 +0000 (19:17 +0000)]
be2net: stop checking the UE registers after an EEH error
BugLink: http://bugs.launchpad.net/bugs/921793
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Sathya Perla [Thu, 10 Nov 2011 19:17:57 +0000 (19:17 +0000)]
be2net: init (vf)_if_handle/vf_pmac_id to handle failure scenarios
BugLink: http://bugs.launchpad.net/bugs/921793
Initialize if_handle, vf_if_handle and vf_pmac_id with "-1" so that in
failure cases when be_clear() is called, we can skip over
if_destroy/pmac_del cmds if they have not been created.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rick Jones [Mon, 7 Nov 2011 13:29:27 +0000 (13:29 +0000)]
sweep the floors and convert some .get_drvinfo routines to strlcpy
BugLink: http://bugs.launchpad.net/bugs/921793
Per the mention made by Ben Hutchings that strlcpy is now the preferred
string copy routine for a .get_drvinfo routine, do a bit of floor
sweeping and convert some of the as-yet unconverted ethernet drivers to
it.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tim Gardner [Fri, 30 Mar 2012 15:16:21 +0000 (09:16 -0600)]
UBUNTU: SAUCE: remove __initdata from vesafb_fix
BugLink: http://bugs.launchpad.net/bugs/969309
OK. Then, I think we also want to fix these warnings probably introduced by
commit
a6021559 "UBUNTU: SAUCE: (no-up) Modularize vesafb".
WARNING: drivers/video/vesafb.o(.exit.text+0x42): Section mismatch in reference from the function vesafb_remove() to the (unknown reference) .init.data:(unknown)
The function __exit vesafb_remove() references
a (unknown reference) __initdata (unknown).
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
(unknown) so it may be used outside an init section.
WARNING: drivers/video/vesafb.o(.exit.text+0x4a): Section mismatch in reference from the function vesafb_remove() to the variable .init.data:vesafb_fix
The function __exit vesafb_remove() references
a variable __initdata vesafb_fix.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
vesafb_fix so it may be used outside an init section.
Reported-by: Tetsuo Honda <from-ubuntu@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft [Fri, 30 Mar 2012 15:38:51 +0000 (16:38 +0100)]
Revert "UBUNTU: SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo laptops"
This reverts commit
f5931d1fc7c699a650ca14a31f4b4bc620977389.
These have already been converted to udev rules so we no longer need
these to be quirked in the kernel.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Stefan Bader [Fri, 30 Mar 2012 14:52:13 +0000 (16:52 +0200)]
UBUNTU: d-i: Fix module name for dm-raid45
This was incorrectly named in the md-modules section.
BugLink: http://bugs.launchpad.net/bugs/969248
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Colin Ian King [Fri, 30 Mar 2012 10:13:54 +0000 (11:13 +0100)]
UBUNTU: SAUCE: PCI: Allow pcie_aspm=force to work even when FADT indicates it is unsupported
Submitted upstream.
BugLink: http://bugs.launchpad.net/bugs/962038
Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
ASPM is unsupported. However, the semantics of force should probably allow
for this, especially as they did before the ASPM disable rework with commit
3c076351c4027a56d5005a39a0b518a4ba393ce2
This patch just skips the clearing of any ASPM setup that the firmware has
carried out on this bus if pcie_aspm=force is being used.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Brad Figg [Thu, 29 Mar 2012 19:59:33 +0000 (12:59 -0700)]
UBUNTU: SAUCE (drop after 3.4) Quirk for enabling backlight hotkeys on Samsung N150P
BugLink: http://bugs.launchpad.net/bugs/875893
This patch is a very small part of a much larger patch that is upstream. I felt
the full patch was too invasive to try to backport.
(partial backport of upstream commit:
a979e2e2af7d5b4bb3b20f6a716c627bb23a6753)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Benjamin Larsson [Thu, 29 Mar 2012 17:58:16 +0000 (10:58 -0700)]
ata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to broken suspend functionality.
BugLink: http://bugs.launchpad.net/bugs/886850
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
(cherry picked from commit
b73fa4630e63e4d23407181c2bc0a54777bd0ce8)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Seth Forshee [Wed, 18 Jan 2012 19:44:11 +0000 (13:44 -0600)]
toshiba_acpi: Refuse to load on machines with buggy INFO implementations
BugLink: http://bugs.launchpad.net/bugs/810015
Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:
ACPI Error: Result stack is empty! State=
ffff88012d70f800 (
20110413/dswstate-98)
ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (
20110413/dsutils-646)
ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (
20110413/dsutils-763)
ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node
ffff880131175eb0), AE_AML_NO_RETURN_VALUE (
20110413/psparse-536)
ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node
ffff880131175ed8), AE_AML_NO_RETURN_VALUE (
20110413/psparse-536)
toshiba_acpi: ACPI INFO method execution failed
toshiba_acpi: Failed to query hotkey event
All known machines with this implementation also have a WMI interface
with event GUID
59142400-C6A3-40FA-BADB-
8A2652834100 which is not seen
on any other models. Refuse to load toshiba_acpi on machines with this
guid.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
f11f999e989061952f1a27bd0c49645a46d13173)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Azael Avalos [Wed, 18 Jan 2012 19:44:10 +0000 (13:44 -0600)]
toshiba_acpi: Support additional hotkey scancodes
BugLink: http://bugs.launchpad.net/bugs/810015
These scancodes are used by many of the models now supported with
the addition of TOS1900 device support.
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
af502837a08c8ca3495d3940d4c4eb4e19a3beaa)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Seth Forshee [Wed, 18 Jan 2012 19:44:09 +0000 (13:44 -0600)]
toshiba_acpi: Support alternate hotkey interfaces
BugLink: http://bugs.launchpad.net/bugs/810015
There are two types of problems that prevent hotkeys from working
on many of the machines supported by toshiba_acpi. The first of
these is the lack of a functioning SCI for hotkey events. For these
machines it is possible to filter the Fn keypresses from the
keyboard and generate a notification by executing the ACPI NTFY
method.
The second problem is a lack of support for HCI_SYSTEM_EVENT, which
is used for reading the hotkey scancodes. On these machines the
scancodes can be read by executing the ACPI NTFY method.
This patch fixes both problems by installing an i8042 filter when
the NTFY method is present to generate notifications and by
detecting which of INFO or HCI_SYSTEM_EVENT is supported for
reading scancodes. If neither method of reading scancodes is
supported, the hotkey input device is not registered.
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
29cd293f9f8cd76444657622980010b9364b1de6)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Seth Forshee [Wed, 18 Jan 2012 19:44:08 +0000 (13:44 -0600)]
ACPI: EC: Add ec_get_handle()
BugLink: http://bugs.launchpad.net/bugs/810015
toshiba_acpi needs to execute an AML method within the EC namespace
to make hotkeys work on some platforms. Provide an interface to
allow it to easily get a handle to the EC namespace for this purpose.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
3e2abc5a35d25442821e1733687b7abbc83b5072)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Dan Carpenter [Sun, 15 Jan 2012 11:28:20 +0000 (14:28 +0300)]
toshiba_acpi: make one-bit bitfields unsigned
BugLink: http://bugs.launchpad.net/bugs/810015
This doesn't change how the code works, but it silences a Sparse
complaint:
drivers/platform/x86/toshiba_acpi.c:121:37: error: dubious one-bit signed bitfield
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit
592b746c55b63770da25148ea3b56ed463a596b2)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Brad Figg [Thu, 29 Mar 2012 15:53:11 +0000 (08:53 -0700)]
UBUNTU: SAUCE (no-up) Provide a param for allowing the BIOS to handle changing the brightness on AC/battery status changes.
BugLink: http://bugs.launchpad.net/bugs/949311
We currently carry a SAUCE patch which lets the OS handle the brightness
levels automatically when connecting/disconnecting AC. There are some
laptops (MSI Wind) for which this doesn't work. Provide a driver param
which allows this behaviour to be overriden.
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Tim Gardner [Mon, 2 Apr 2012 14:41:40 +0000 (08:41 -0600)]
UBUNTU: Bump ABI
Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara [Fri, 30 Mar 2012 14:55:51 +0000 (07:55 -0700)]
UBUNTU: Start new release
Ignore: yes
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Leann Ogasawara [Thu, 29 Mar 2012 15:34:15 +0000 (08:34 -0700)]
UBUNTU: Ubuntu-3.2.0-21.34
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Tim Gardner [Thu, 29 Mar 2012 12:21:01 +0000 (06:21 -0600)]
UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata section for X86_32
BugLink: http://bugs.launchpad.net/bugs/968233
I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.
AR arch/x86/lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
The function load_elf_binary() references
the variable __cpuinitdata disable_nx.
This is often because load_elf_binary lacks a __cpuinitdata
annotation or the annotation of disable_nx is wrong.
load_elf_binary() is definitely called after initialization.
This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
this is not an upstream problem.
Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara [Wed, 28 Mar 2012 17:59:34 +0000 (10:59 -0700)]
UBUNTU: d-i: Add brcm*mac drivers to nic-modules
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Leann Ogasawara [Wed, 28 Mar 2012 17:56:27 +0000 (10:56 -0700)]
UBUNTU: d-i: Remove obsolete bcm43xx* drivers from nic-modules
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Leann Ogasawara [Wed, 28 Mar 2012 17:53:37 +0000 (10:53 -0700)]
UBUNTU: d-i: Add missing iwl* drivers to nic-modules
BugLink: http://bugs.launchpad.net/bugs/965116
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Leann Ogasawara [Wed, 28 Mar 2012 17:43:08 +0000 (10:43 -0700)]
UBUNTU: d-i: Fix iwl3945 driver name typo in nic-modules
s/ipw3945/iwl3945/ in nic-modules file
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Joel Sass [Tue, 10 Jan 2012 18:03:55 +0000 (13:03 -0500)]
drm/i915: Add Clientron E830 to the ignore LVDS list
BugLink: http://bugs.launchpad.net/bugs/907055
Signed-off-by: Joel Sass <jsass@disklessworkstations.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit
44306ab302687b519a31aa498b954c1e26f95a6b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Marc Gariepy [Thu, 9 Feb 2012 14:35:21 +0000 (09:35 -0500)]
drm/i915: Ignore LVDS on hp t5745 and hp st5747 thin client
Add a no_lvds quirk for the HP t5745 and HP st5747 thin clients
dmidecode for those thin clients are attached in thoses bugs:
BugLink: https://bugs.launchpad.net/bugs/911916
BugLink: https://bugs.launchpad.net/bugs/911920
Signed-off-by: Marc Gariepy <mgariepy@ubuntu.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit
f5b8a7ed0405d48fd096acce48fbefbed77fb055)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Tue, 27 Mar 2012 11:16:06 +0000 (04:16 -0700)]
UBUNTU: SAUCE: AppArmor: Fix change_onexec when called from a confined task
Patch submitted upstream, but not merged yet.
Fix failure in aa_change_onexec api when the request is made from a confined
task. This failure was caused by two problems
The AA_MAY_ONEXEC perm was not being mapped correctly for this case.
The executable name was being checked as second time instead of using the
requested onexec profile name, which may not be the same as the exec
profile name. This mistake can not be exploited to grant extra permission
because of the above flaw where the ONEXEC permission was not being mapped
so it will not be granted.
BugLink: http://bugs.launchpad.net/bugs/963756
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Linus Torvalds [Tue, 17 Jan 2012 23:35:37 +0000 (15:35 -0800)]
x86, tsc: Fix SMI induced variation in quick_pit_calibrate()
BugLink: http://bugs.launchpad.net/bugs/965586
pit_expect_msb() returns success wrongly in the below SMI scenario:
a. pit_verify_msb() has not yet seen the MSB transition.
b. we are close to the MSB transition though and got a SMI immediately after
returning from pit_verify_msb() which didn't see the MSB transition. PIT MSB
transition has happened somewhere during SMI execution.
c. returned from SMI and we noted down the 'tsc', saw the pit MSB change now and
exited the loop to calculate 'deltatsc'. Instead of noting the TSC at the MSB
transition, we are way off because of the SMI. And as the SMI happened
between the pit_verify_msb() and before the 'tsc' is recorded in the
for loop, 'delattsc' (d1/d2 in quick_pit_calibrate()) will be small and
quick_pit_calibrate() will not notice this error.
Depending on whether SMI disturbance happens while computing d1 or d2, we will
see the TSC calibrated value smaller or bigger than the expected value. As a
result, in a cluster we were seeing a variation of approximately +/- 20MHz in
the calibrated values, resulting in NTP failures.
[ As far as the SMI source is concerned, this is a periodic SMI that gets
disabled after ACPI is enabled by the OS. But the TSC calibration happens
before the ACPI is enabled. ]
To address this, change pit_expect_msb() so that
- the 'tsc' is the TSC in between the two reads that read the MSB
change from the PIT (same as before)
- the 'delta' is the difference in TSC from *before* the MSB changed
to *after* the MSB changed.
Now the delta is twice as big as before (it covers four PIT accesses,
roughly 4us) and quick_pit_calibrate() will loop a bit longer to get
the calibrated value with in the 500ppm precision. As the delta (d1/d2)
covers four PIT accesses, actual calibrated result might be closer to
250ppm precision.
As the loop now takes longer to stabilize, double MAX_QUICK_PIT_MS to 50.
SMI disturbance will showup as much larger delta's and the loop will take
longer than usual for the result to be with in the accepted precision. Or will
fallback to slow PIT calibration if it takes more than 50msec.
Also while we are at this, remove the calibration correction that aims to
get the result to the middle of the error bars. We really don't know which
direction to correct into, so remove it.
Reported-and-tested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/
1326843337.5291.4.camel@sbsiddha-mobl2
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
(cherry picked from commit
68f30fbee19cc67849b9fa8e153ede70758afe81)
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Tim Gardner [Sun, 25 Mar 2012 16:59:57 +0000 (10:59 -0600)]
UBUNTU: SAUCE: fsam7400: use UMH_WAIT_PROC consistently
BugLink: http://bugs.launchpad.net/bugs/963685
Inspired by Testuo Handa, "usermodehelper: use UMH_WAIT_PROC consistently"
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:50 +0000 (15:02 -0700)]
kmod: make __request_module() killable
BugLink: http://bugs.launchpad.net/bugs/963685
As Tetsuo Handa pointed out, request_module() can stress the system
while the oom-killed caller sleeps in TASK_UNINTERRUPTIBLE.
The task T uses "almost all" memory, then it does something which
triggers request_module(). Say, it can simply call sys_socket(). This
in turn needs more memory and leads to OOM. oom-killer correctly
chooses T and kills it, but this can't help because it sleeps in
TASK_UNINTERRUPTIBLE and after that oom-killer becomes "disabled" by the
TIF_MEMDIE task T.
Make __request_module() killable. The only necessary change is that
call_modprobe() should kmalloc argv and module_name, they can't live in
the stack if we use UMH_KILLABLE. This memory is freed via
call_usermodehelper_freeinfo()->cleanup.
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
1cc684ab75123efe7ff446eb821d44375ba8fa30)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:49 +0000 (15:02 -0700)]
kmod: introduce call_modprobe() helper
BugLink: http://bugs.launchpad.net/bugs/963685
No functional changes. Move the call_usermodehelper code from
__request_module() into the new simple helper, call_modprobe().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
3e63a93b987685f02421e18b2aa452d20553a88b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:49 +0000 (15:02 -0700)]
usermodehelper: ____call_usermodehelper() doesn't need do_exit()
BugLink: http://bugs.launchpad.net/bugs/963685
Minor cleanup. ____call_usermodehelper() can simply return, no need to
call do_exit() explicitely.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
5b9bd473e3b8a8c6c4ae99be475e6e9b27568555)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:48 +0000 (15:02 -0700)]
usermodehelper: kill umh_wait, renumber UMH_* constants
BugLink: http://bugs.launchpad.net/bugs/963685
No functional changes. It is not sane to use UMH_KILLABLE with enum
umh_wait, but obviously we do not want another argument in
call_usermodehelper_* helpers. Kill this enum, use the plain int.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
9d944ef32e83405a07376f112e9f02161d3e9731)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:47 +0000 (15:02 -0700)]
usermodehelper: implement UMH_KILLABLE
BugLink: http://bugs.launchpad.net/bugs/963685
Implement UMH_KILLABLE, should be used along with UMH_WAIT_EXEC/PROC.
The caller must ensure that subprocess_info->path/etc can not go away
until call_usermodehelper_freeinfo().
call_usermodehelper_exec(UMH_KILLABLE) does
wait_for_completion_killable. If it fails, it uses
xchg(&sub_info->complete, NULL) to serialize with umh_complete() which
does the same xhcg() to access sub_info->complete.
If call_usermodehelper_exec wins, it can safely return. umh_complete()
should get NULL and call call_usermodehelper_freeinfo().
Otherwise we know that umh_complete() was already called, in this case
call_usermodehelper_exec() falls back to wait_for_completion() which
should succeed "very soon".
Note: UMH_NO_WAIT == -1 but it obviously should not be used with
UMH_KILLABLE. We delay the neccessary cleanup to simplify the back
porting.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
d0bd587a80960d7ba7e0c8396e154028c9045c54)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:47 +0000 (15:02 -0700)]
usermodehelper: introduce umh_complete(sub_info)
BugLink: http://bugs.launchpad.net/bugs/963685
Preparation. Add the new trivial helper, umh_complete(). Currently it
simply does complete(sub_info->complete).
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
b3449922502f5a161ee2b5022a33aec8472fbf18)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Oleg Nesterov [Fri, 23 Mar 2012 22:02:46 +0000 (15:02 -0700)]
usermodehelper: use UMH_WAIT_PROC consistently
BugLink: http://bugs.launchpad.net/bugs/963685
A few call_usermodehelper() callers use the hardcoded constant instead of
the proper UMH_WAIT_PROC, fix them.
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
70834d3070c3f3015ab5c05176d54bd4a0100546)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara [Sat, 24 Mar 2012 07:52:26 +0000 (00:52 -0700)]
UBUNTU: Rebase to v3.2.13
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Andy Whitcroft [Fri, 23 Mar 2012 18:10:55 +0000 (18:10 +0000)]
UBUNTU: [Config]: enable CONFIG_DRM_LOAD_EDID_FIRMWARE
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Carsten Emde [Fri, 23 Mar 2012 18:10:54 +0000 (18:10 +0000)]
drm: allow loading an EDID as firmware to override broken monitor
Broken monitors and/or broken graphic boards may send erroneous or no
EDID data. This also applies to broken KVM devices that are unable to
correctly forward the EDID data of the connected monitor but invent
their own fantasy data.
This patch allows to specify an EDID data set to be used instead of
probing the monitor for it. It contains built-in data sets of frequently
used screen resolutions. In addition, a particular EDID data set may be
provided in the /lib/firmware directory and loaded via the firmware
interface. The name is passed to the kernel as module parameter of the
drm_kms_helper module either when loaded
options drm_kms_helper edid_firmware=edid/1280x1024.bin
or as kernel commandline parameter
drm_kms_helper.edid_firmware=edid/1280x1024.bin
It is also possible to restrict the usage of a specified EDID data set
to a particular connector. This is done by prepending the name of the
connector to the name of the EDID data set using the syntax
edid_firmware=[<connector>:]<edid>
such as, for example,
edid_firmware=DVI-I-1:edid/1920x1080.bin
in which case no other connector will be affected.
The built-in data sets are
Resolution Name
--------------------------------
1024x768 edid/1024x768.bin
1280x1024 edid/1280x1024.bin
1680x1050 edid/1680x1050.bin
1920x1080 edid/1920x1080.bin
They are ignored, if a file with the same name is available in the
/lib/firmware directory.
The built-in EDID data sets are based on standard timings that may not
apply to a particular monitor and even crash it. Ideally, EDID data of
the connected monitor should be used. They may be obtained through the
drm/cardX/cardX-<connector>/edid entry in the /sys/devices PCI directory
of a correctly working graphics adapter.
It is even possible to specify the name of an EDID data set on-the-fly
via the /sys/module interface, e.g.
echo edid/myedid.bin >/sys/module/drm_kms_helper/parameters/edid_firmware
The new screen mode is considered when the related kernel function is
called for the first time after the change. Such calls are made when the
X server is started or when the display settings dialog is opened in an
already running X server.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry-picked from
da0df92b57311aa1b26a2a90599ed16e1e968b90 drm-next)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tim Gardner [Fri, 23 Mar 2012 17:40:17 +0000 (11:40 -0600)]
UBUNTU: Add isci to debian scsi-modules udeb
BugLink: http://bugs.launchpad.net/bugs/963306
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 22 Mar 2012 17:13:52 +0000 (10:13 -0700)]
UBUNTU: SAUCE: Update aufs for build failure caused by apparmor backport
Fix build failure in aufs introduced by
commit
9cd98c046b57cd1bdbd53c3669f6cdd75edffd61
which has been backported from 3.4 as part of the AppArmor 3.4 backport
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Mon, 4 Oct 2010 22:03:36 +0000 (15:03 -0700)]
UBUNTU: SAUCE: AppArmor: basic networking rules
Base support for network mediation.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 22 Jul 2010 09:32:02 +0000 (02:32 -0700)]
UBUNTU: SAUCE: AppArmor: Add profile introspection file to interface
Add the dynamic profiles file to the interace, to allow load policy
introspection.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 19:16:02 +0000 (11:16 -0800)]
UBUNTU: SAUCE: AppArmor: Add the ability to mediate mount
Add the ability for apparmor to do mediation of mount operations. Mount
rules require an updated apparmor_parser (2.8 series) for policy compilation.
The basic form of the rules are.
[audit] [deny] mount [conds]* [device] [ -> [conds] path],
[audit] [deny] remount [conds]* [path],
[audit] [deny] umount [conds]* [path],
[audit] [deny] pivotroot [oldroot=<value>] <path>
remount is just a short cut for mount options=remount
where [conds] can be
fstype=<expr>
options=<expr>
Example mount commands
mount, # allow all mounts, but not umount or pivotroot
mount fstype=procfs, # allow mounting procfs anywhere
mount options=(bind, ro) /foo -> /bar, # readonly bind mount
mount /dev/sda -> /mnt,
mount /dev/sd** -> /mnt/**,
mount fstype=overlayfs options=(rw,upperdir=/tmp/upper/,lowerdir=/) -> /mnt/
umount,
umount /m*,
See the apparmor userspace for full documentation
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tetsuo Handa [Thu, 15 Mar 2012 06:41:17 +0000 (23:41 -0700)]
AppArmor: Fix location of const qualifier on generated string tables
Signed-off-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit
7e570145cb022beeb58e3f691e0418477b670223)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Jan Engelhardt [Wed, 14 Mar 2012 12:30:36 +0000 (13:30 +0100)]
AppArmor: add const qualifiers to string arrays
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit
2d4cee7e3a2b9f9c3237672cc136e20dbad0e2ce)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 15:07:53 +0000 (07:07 -0800)]
AppArmor: Add ability to load extended policy
Add the base support for the new policy extensions. This does not bring
any additional functionality, or change current semantics.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
ad5ff3db53c68c2f12936bc74ea5dfe0af943592)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 14:20:33 +0000 (06:20 -0800)]
AppArmor: Move path failure information into aa_get_name and rename
Move the path name lookup failure messages into the main path name lookup
routine, as the information is useful in more than just aa_path_perm.
Also rename aa_get_name to aa_path_name as it is not getting a reference
counted object with a corresponding put fn.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
57fa1e18091e66b7e1002816523cb218196a882e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 14:20:26 +0000 (06:20 -0800)]
AppArmor: Update dfa matching routines.
Update aa_dfa_match so that it doesn't result in an input string being
walked twice (once to get its length and another time to match)
Add a single step functions
aa_dfa_next
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
0fe1212d0539eb6c1e27d388711172d786e299cc)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 14:32:47 +0000 (06:32 -0800)]
AppArmor: Minor cleanup of d_namespace_path to consolidate error handling
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
3372b68a3c982611dcc30b3c872f8bbdee019e5e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 14:28:50 +0000 (06:28 -0800)]
AppArmor: Retrieve the dentry_path for error reporting when path lookup fails
When __d_path and d_absolute_path fail due to the name being outside of
the current namespace no name is reported. Use dentry_path to provide
some hint as to which file was being accessed.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
fbba8d89acea5d628d1d076b1d8962db438ff832)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Wed, 14 Mar 2012 12:53:40 +0000 (05:53 -0700)]
AppArmor: Add const qualifiers to generated string tables
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit
33e521acff709d275950ec5bf8dd577d873cd61e)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Sat, 10 Mar 2012 19:25:30 +0000 (11:25 -0800)]
AppArmor: Fix oops in policy unpack auditing
Post unpacking of policy a verification pass is made on x transition
indexes. When this fails a call to audit_iface is made resulting in an
oops, because audit_iface is expecting a valid buffer position but
since the failure comes from post unpack verification there is none.
Make the position argument optional so that audit_iface can be called
from post unpack verification.
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit
b1b4bc2ed94d157f3ed60c17a12b658ccb96a76f)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Sat, 10 Mar 2012 19:19:51 +0000 (11:19 -0800)]
AppArmor: Fix error returned when a path lookup is disconnected
The returning of -ESATLE when a path lookup fails as disconnected is wrong.
Since AppArmor is rejecting the access return -EACCES instead.
This also fixes a bug in complain (learning) mode where disconnected paths
are denied because -ESTALE errors are not ignored causing failures that
can change application behavior.
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit
ef9a762279c9ce98c592fb144b31898411feb94d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 14:21:30 +0000 (06:21 -0800)]
AppArmor: Fix the error case for chroot relative path name lookup
When a chroot relative pathname lookup fails it is falling through to
do a d_absolute_path lookup. This is incorrect as d_absolute_path should
only be used to lookup names for namespace absolute paths.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
28042fabf43b9a8ccfaa38f8c8187cc525e53fd3)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Wed, 22 Feb 2012 08:42:08 +0000 (00:42 -0800)]
AppArmor: fix mapping of META_READ to audit and quiet flags
The mapping of AA_MAY_META_READ for the allow mask was also being mapped
to the audit and quiet masks. This would result in some operations being
audited when the should not.
This flaw was hidden by the previous audit bug which would drop some
messages that where supposed to be audited.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
38305a4bab4be5d278443b057f7f5e97afb07f26)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Wed, 22 Feb 2012 08:32:30 +0000 (00:32 -0800)]
AppArmor: Fix underflow in xindex calculation
If the xindex value stored in the accept tables is 0, the extraction of
that value will result in an underflow (0 - 4).
In properly compiled policy this should not happen for file rules but
it may be possible for other rule types in the future.
To exploit this underflow a user would have to be able to load a corrupt
policy, which requires CAP_MAC_ADMIN, overwrite system policy in kernel
memory or know of a compiler error resulting in the flaw being present
for loaded policy (no such flaw is known at this time).
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
8b964eae204d791421677ec56b94a7b18cf8740d)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Wed, 22 Feb 2012 08:20:26 +0000 (00:20 -0800)]
AppArmor: Fix dropping of allowed operations that are force audited
The audit permission flag, that specifies an audit message should be
provided when an operation is allowed, was being ignored in some cases.
This is because the auto audit mode (which determines the audit mode from
system flags) was incorrectly assigned the same value as audit mode. The
shared value would result in messages that should be audited going through
a second evaluation as to whether they should be audited based on the
auto audit, resulting in some messages being dropped.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
ade3ddc01e2e426cc24c744be85dcaad4e8f8aba)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
John Johansen [Thu, 16 Feb 2012 15:06:41 +0000 (07:06 -0800)]
AppArmor: Add mising end of structure test to caps unpacking
The unpacking of struct capsx is missing a check for the end of the
caps structure. This can lead to unpack failures depending on what else
is packed into the policy file being unpacked.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
(cherry picked from commit
cdbd2884df8ad026143bb482a96d38e616947b17)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>