1. 18 Aug, 2012 1 commit
    • Mike Frysinger's avatar
      x32: Use compat shims for {g,s}etsockopt · 515c7af8
      Mike Frysinger authored
      Some of the arguments to {g,s}etsockopt are passed in userland pointers.
      If we try to use the 64bit entry point, we end up sometimes failing.
      
      For example, dhcpcd doesn't run in x32:
      	# dhcpcd eth0
      	dhcpcd[1979]: version 5.5.6 starting
      	dhcpcd[1979]: eth0: broadcasting for a lease
      	dhcpcd[1979]: eth0: open_socket: Invalid argument
      	dhcpcd[1979]: eth0: send_raw_packet: Bad file descriptor
      
      The code in particular is getting back EINVAL when doing:
      	struct sock_fprog pf;
      	setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &pf, sizeof(pf));
      
      Diving into the kernel code, we can see:
      include/linux/filter.h:
      	struct sock_fprog {
      		unsigned short len;
      		struct sock_filter __user *filter;
      	};
      
      net/core/sock.c:
      	case SO_ATTACH_FILTER:
      		ret = -EINVAL;
      		if (optlen == sizeof(struct sock_fprog)) {
      			struct sock_fprog fprog;
      
      			ret = -EFAULT;
      			if (copy_from_user(&fprog, optval, sizeof(fprog)))
      				break;
      
      			ret = sk_attach_filter(&fprog, sk);
      		}
      		break;
      
      arch/x86/syscalls/syscall_64.tbl:
      	54 common setsockopt sys_setsockopt
      	55 common getsockopt sys_getsockopt
      
      So for x64, sizeof(sock_fprog) is 16 bytes.  For x86/x32, it's 8 bytes.
      This comes down to the pointer being 32bit for x32, which means we need
      to do structure size translation.  But since x32 comes in directly to
      sys_setsockopt, it doesn't get translated like x86.
      
      After changing the syscall table and rebuilding glibc with the new kernel
      headers, dhcp runs fine in an x32 userland.
      
      Oddly, it seems like Linus noted the same thing during the initial port,
      but I guess that was missed/lost along the way:
      	https://lkml.org/lkml/2011/8/26/452
      
      [ hpa: tagging for -stable since this is an ABI fix. ]
      
      Bugzilla: https://bugs.gentoo.org/423649Reported-by: default avatarMads <mads@ab3.no>
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Link: http://lkml.kernel.org/r/1345320697-15713-1-git-send-email-vapier@gentoo.org
      Cc: H. J. Lu <hjl.tools@gmail.com>
      Cc: <stable@vger.kernel.org> v3.4..v3.5
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      515c7af8
  2. 14 Aug, 2012 2 commits
  3. 10 Aug, 2012 1 commit
  4. 08 Aug, 2012 6 commits
    • Suresh Siddha's avatar
      x86, avx: don't use avx instructions with "noxsave" boot param · c6fd893d
      Suresh Siddha authored
      Clear AVX, AVX2 features along with clearing XSAVE feature bits,
      as part of the parsing "noxsave" parameter.
      
      Fixes the kernel boot panic with "noxsave" boot parameter.
      
      We could have checked cpu_has_osxsave along with cpu_has_avx etc, but Peter
      mentioned clearing the feature bits will be better for uses like
      static_cpu_has() etc.
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Link: http://lkml.kernel.org/r/1343755754.2041.2.camel@sbsiddha-desk.sc.intel.com
      Cc: <stable@vger.kernel.org>	# v3.5
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      c6fd893d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f4ba394c
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Missed rcu_assign_pointer() in mac80211 scanning, from Johannes
          Berg.
      
       2) Allow devices to limit the number of segments that an individual
          TCP TSO packet can use at a time, to deal with device and/or driver
          specific limitations.  From Ben Hutchings.
      
       3) Fix unexpected hard IPSEC expiration after setting the date.  From
          Fan Du.
      
       4) Memory leak fix in bxn2x driver, from Jesper Juhl.
      
       5) Fix two memory leaks in libertas driver, from Daniel Drake.
      
       6) Fix deref of out-of-range array index in packet scheduler generic
          actions layer.  From Hiroaki SHIMODA.
      
       7) Fix TX flow control errors in mlx4 driver, from Yevgeny Petrilin.
      
       8) Fix CRIS eth_v10.c driver build, from Randy Dunlap.
      
       9) Fix wrong SKB freeing in LLC protocol layer, from Sorin Dumitru.
      
      10) The IP output path checks neigh lookup errors incorrectly, it needs
          to use IS_ERR().  From Vasiliy Kulikov.
      
      11) An estimator leak leads to deref of freed memory in timer handler,
          fix from Hiroaki SHIMODA.
      
      12) TCP early demux in ipv6 needs to use DST cookies in order to
          validate the RX route properly.  Fix from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        net: ipv6: fix TCP early demux
        net: Use PTR_RET rather than if(IS_ERR(.. [1]
        net_sched: act: Delete estimator in error path.
        ip: fix error handling in ip_finish_output2()
        llc: free the right skb
        ixp4xx_eth: fix ptp_ixp46x build failure
        drivers/atm/iphase.c: fix error return code
        tcp_output: fix sparse warning for tcp_wfree
        drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data
        batman-adv: select an internet gateway if none was chosen
        mISDN: Bugfix for layer2 fixed TEI mode
        igb: don't break user visible strings over multiple lines in igb_ethtool.c
        igb: correct hardware type (i210/i211) check in igb_loopback_test()
        igb: Fix for failure to init on some 82576 devices.
        cris: fix eth_v10.c build error
        cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
        isdnloop: fix and simplify isdnloop_init()
        hyperv: Move wait completion msg code into rndis_filter_halt_device()
        net/mlx4_core: Remove port type restrictions
        net/mlx4_en: Fixing TX queue stop/wake flow
        ...
      f4ba394c
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-fixes-for-v3.6-rc1' of... · bf44ce83
      Linus Torvalds authored
      Merge tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
      
      Pull pinctrl fixes from Linus Walleij:
       - Move MXS pinctrl registration to poscore_initcall
       - Fix up various devm_* managed resources code paths
       - Fix one function group in the Nomadik driver
       - Update MAINTAINERS
      
      * tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        drivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data
        MAINTAINERS: fix a few pinctrl related entries
        pinctrl-sirf: remove devm_kfree at error path
        pinctrl/nomadik: fix hsi function group list
        pinctrl/pinctrl-u300: remove unneeded devm_kfree call
        pinctrl: mxs: register driver at postcore_initcall time
      bf44ce83
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 7f46f9c1
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
       "These patches fix a couple of issues.  First of all a few problems
        with ACS on x86 introduced in the last merge window, where ACS did not
        work on AMD and a NULL pointer dereference when there ran against
        SR-IOV devices.
      
        The patches fallen out of coccinelle checks fix a possible invalid
        memory reference and a possible memory leak.  The other patches mostly
        fix build errors and warnings and a wrong return value."
      
      * tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix ACS path checking
        iommu/intel: Fix ACS path checking
        iommu/amd: Fix pci_request_acs() call-place
        iommu/exynos: Fix build error
        iommu/tegra: smmu: Fix error initial value at domain_init
        iommu/tegra: smmu: Cleanup with lesser nest
        iommu: Add missing forward declaration in include file
        iommu: Include linux/types.h
        iommu/intel: add missing free_domain_mem
        iommu/tegra: remove invalid reference to list iterator variable
      7f46f9c1
    • Linus Torvalds's avatar
      Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6666cabf
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Containing only a few really small/trivial fixes.  The only urgent fix
        is a regression fix of HDMI codec probing, introduced in 3.6-rc1.  The
        rest are HD-audio specific fixes and a copule of minor bug fixes in
        PCM core and the old emu10k1."
      
      * tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
        ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
        ALSA: hda - remove redundant auto quirks for conexant 506x
        ALSA: hda - remove quirk for Dell Vostro 1015
        ALSA: hda - add dock support for Thinkpad X230
        ALSA: hda - Fix regression of HDMI codec probing
        ALSA: hda - add dock support for Thinkpad T430s
        ALSA: emu10k1: Avoid access to invalid pages when period=1
        ALSA: PCM: Fix possible memory leaks in the error path
      6666cabf
    • David Henningsson's avatar
      ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad · 012e7eb1
      David Henningsson authored
      The same ID is twice in the quirk table, so the second one is not used.
      Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
      Cc: <stable@vger.kernel.org> [v3.2+]
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      012e7eb1
  5. 07 Aug, 2012 8 commits
  6. 06 Aug, 2012 16 commits
  7. 05 Aug, 2012 3 commits
    • Linus Torvalds's avatar
      Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of... · 42a579a0
      Linus Torvalds authored
      Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull timers and perf fixes from Ingo Molnar:
       "Timers:
       - Fix another timekeeping bug
      
       Pef:
         - Make clean brace expansion fix for some shells, from Palmer Cox
      
         - Warn user just once per guest kernel when not finding kernel info,
           from David Ahern
      
         - perf test fix from Jiri Olsa
      
         - Fix error handling on event creation in perf top, from David Ahern
      
         - Fix check on perf_target__strnerror, from Namhyung Kim
      
         - Save the whole cmdline, from David Ahern
      
        There's this infrastructure change:
      
         - Prep work for the DWARF CFI post unwinder, so that it doesn't use
           perf_session in lots of places, just evlist/evsel is enough.
      
        which is a late infrastructure change that prepare for future feature
        work - we wanted it upstream to simplify the fixes/development patch
        flows."
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        time: Fix adjustment cleanup bug in timekeeping_adjust()
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Remove brace expansion from clean target
        perf kvm top: Limit guest kernel info message to once
        perf tools: Introduce intlist
        perf tools: Change strlist to use the new rblist
        perf tools: Introducing rblist
        perf kvm: Use strtol for walking guestmount directory
        perf tool: Save cmdline from user in file header vs what is passed to record
        perf top: Error handling for counter creation should parallel perf-record
        perf session: Remove no longer used synthesize_sample method
        perf evsel: Adopt parse_sample method from perf_event
        perf evlist: Introduce perf_evlist__parse_sample
        perf session: Use perf_evlist__id_hdr_size more extensively
        perf session: Use perf_evlist__sample_id_all more extensively
        perf session: Use perf_evlist__sample_type more extensively
        perf evsel: Precalculate the sample size
        perf target: Fix check on buffer size
        perf symbols: Fix array sizes for binary types arrays
        perf test: Fix parse events automated tests
      42a579a0
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 8a06bf14
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core fixes and some late updates from Arnaldo Carvalho de Melo:
      
       * Make clean brace expansion fix for some shells, from Palmer Cox
      
       * Warn user just once per guest kernel when not finding kernel info,
         from David Ahern
      
       * perf test fix from Jiri Olsa
      
       * Fix error handling on event creation in perf top, from David Ahern
      
       * Fix check on perf_target__strnerror, from Namhyung Kim
      
       * Save the whole cmdline, from David Ahern
      
       * Prep work for the DWARF CFI post unwinder, so that it doesn't
         uses perf_session in lots of places, just evlist/evsel is enough.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8a06bf14
    • Ingo Molnar's avatar
      time: Fix adjustment cleanup bug in timekeeping_adjust() · 1d17d174
      Ingo Molnar authored
      Tetsuo Handa reported that sporadically the system clock starts
      counting up too quickly which is enough to confuse the hangcheck
      timer to print a bogus stall warning.
      
      Commit 2a8c0883 "time: Move xtime_nsec adjustment underflow handling
      timekeeping_adjust" overlooked this exit path:
      
              } else
                      return;
      
      which should really be a proper exit sequence, fixing the bug as a
      side effect.
      
      Also make the flow more readable by properly balancing curly
      braces.
      
      Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
      Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: john.stultz@linaro.org
      Cc: a.p.zijlstra@chello.nl
      Cc: richardcochran@gmail.com
      Cc: prarit@redhat.com
      Link: http://lkml.kernel.org/r/20120804192114.GA28347@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1d17d174
  8. 04 Aug, 2012 3 commits