15 Nov, 2012

3 commits


13 Nov, 2012

11 commits

  • The current code holds on to this list until nfsd is shut down, but it's
    never touched once the grace period ends. Release that memory back into
    the wild when the grace period ends.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Remove the cl_recdir field from the nfs4_client struct. Instead, just
    compute it on the fly when and if it's needed, which is now only when
    the legacy client tracking code is in effect.

    The error handling in the legacy client tracker is also changed to
    handle the case where md5 is unavailable. In that case, we'll warn
    the admin with a KERN_ERR message and disable the client tracking.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • The current code requires that we md5 hash the name in order to store
    the client in the confirmed and unconfirmed trees. Change it instead
    to store the clients in a pair of rbtrees, and simply compare the
    cl_names directly instead of hashing them. This also necessitates that
    we add a new flag to the clp->cl_flags field to indicate which tree
    the client is currently in.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • When nfsd starts, the legacy reboot recovery code creates a tracking
    struct for each directory in the v4recoverydir. When the grace period
    ends, it basically does a "readdir" on the directory again, and matches
    each dentry in there to an existing client id to see if it should be
    removed or not. If the matching client doesn't exist, or hasn't
    reclaimed its state then it will remove that dentry.

    This is pretty inefficient since it involves doing a lot of hash-bucket
    searching. It also means that we have to keep relying on being able to
    search for a nfs4_client by md5 hashed cl_recdir name.

    Instead, add a pointer to the nfs4_client that indicates the association
    between the nfs4_client_reclaim and nfs4_client. When a reclaim operation
    comes in, we set the pointer to make that association. On gracedone, the
    legacy client tracker will keep the recdir around iff:

    1/ there is a reclaim record for the directory

    ...and...

    2/ there's an association between the reclaim record and a client record
    -- that is, a create or check operation was performed on the client that
    matches that directory.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Later callers will need to make changes to the record.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • We'll need to be able to call this from nfs4recover.c eventually.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Currently, it takes a client pointer, but later we're going to need to
    search for these records without knowing whether a matching client even
    exists.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Let's shoot for removing the nfsdcld upcall in 3.10. Most likely,
    no one is actually using it so I don't expect this warning to
    fire often (except maybe on misconfigured systems).

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • The usermodehelper upcall program can then decide to use this info as
    a (one-way) transition mechanism to the new scheme. When a "check"
    upcall occurs and the client doesn't exist in the database, we can
    look to see whether the directory exists. If it does, then we'd add
    the client to the database, remove the legacy recdir, and return
    success to the kernel to allow the recovery to proceed.

    For gracedone, we simply pass the v4recovery "topdir" so that the
    upcall can clean it out prior to returning to the kernel.

    A module parm is also added to disable the legacy conversion if
    the admin chooses.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • First, try to use the new usermodehelper upcall. It should succeed or
    fail quickly, so there's little cost to doing so.

    If it fails, and the legacy tracking dir exists, use that. If it
    doesn't exist then fall back to using nfsdcld.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Add a new client tracker upcall type that uses call_usermodehelper to
    call out to a program. This seems to be the preferred method of
    calling out to usermode these days for seldom-called upcalls. It's
    simple and doesn't require a running daemon, so it should "just work"
    as long as the binary is installed.

    The client tracking exit operation is also changed to check for a
    NULL pointer before running. The UMH upcall doesn't need to do anything
    at module teardown time.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     

11 Nov, 2012

3 commits


08 Nov, 2012

14 commits


21 Oct, 2012

2 commits

  • Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:
    "Main changes:
    - AArch64 Linux compilation fixes following 3.7-rc1 changes
    (MODULES_USE_ELF_RELA, update_vsyscall() prototype)
    - Unnecessary register setting in start_thread() (thanks to Al Viro)
    - ptrace fixes"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: fix alignment padding in assembly code
    arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
    arm64: ptrace: make structure padding explicit for debug registers
    arm64: No need to set the x0-x2 registers in start_thread()
    arm64: Ignore memory blocks below PHYS_OFFSET
    arm64: Fix the update_vsyscall() prototype
    arm64: Select MODULES_USE_ELF_RELA
    arm64: Remove duplicate inclusion of mmu_context.h in smp.c

    Linus Torvalds
     

20 Oct, 2012

7 commits

  • An interesting effect of using the generic version of linkage.h
    is that the padding is defined in terms of x86 NOPs, which can have
    even more interesting effects when the assembly code looks like this:

    ENTRY(func1)
    mov x0, xzr
    ENDPROC(func1)
    // fall through
    ENTRY(func2)
    mov x0, #1
    ret
    ENDPROC(func2)

    Admittedly, the code is not very nice. But having code from another
    architecture doesn't look completely sane either.

    The fix is to add arm64's version of linkage.h, which causes the insertion
    of proper AArch64 NOPs.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas

    Marc Zyngier
     
  • The min/max call needed to have explicit types on some architectures
    (e.g. mn10300). Use clamp_t instead to avoid the warning:

    kernel/sys.c: In function 'override_release':
    kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]

    Reported-by: Fengguang Wu
    Signed-off-by: Kees Cook
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Pull perf fixes from Ingo Molnar:
    "Assorted small fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf python: Properly link with libtraceevent
    perf hists browser: Add back callchain folding symbol
    perf tools: Fix build on sparc.
    perf python: Link with libtraceevent
    perf python: Initialize 'page_size' variable
    tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter
    lib tools traceevent: Add back pevent assignment in __pevent_parse_format()
    perf hists browser: Fix off-by-two bug on the first column
    perf tools: Remove warnings on JIT samples for srcline sort key
    perf tools: Fix segfault when using srcline sort key
    perf: Require exclude_guest to use PEBS - kernel side enforcement
    perf tool: Precise mode requires exclude_guest

    Linus Torvalds
     
  • Namhyung Kim reported that the build fails with:

    GEN python/perf.so
    gcc: error: python_ext_build/tmp//../../libtraceevent.a: No such file or directory
    error: command 'gcc' failed with exit status 1
    cp: cannot stat `python_ext_build/lib/perf.so': No such file or directory
    make: *** [python/perf.so] Error 1

    We need to propagate the TE_PATH variable to the setup.py file.

    Reported-by: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/n/tip-8umiPbm4sxpknKivbjgykhut@git.kernel.org
    [ Fixed superfluous variable build error. ]
    Signed-off-by: Ingo Molnar

    Arnaldo Carvalho de Melo
     
  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    * The python binding needs to link with libtraceevent and to initialize
    the 'page_size' variable so that mmaping works again.

    * The callchain folding character that appears on the TUI just before
    the overhead had disappeared due to recent changes, add it back.

    * Intel PEBS in VT-x context uses the DS address as a guest linear address,
    even though its programmed by the host as a host linear address. This either
    results in guest memory corruption and or the hardware faulting and 'crashing'
    the virtual machine. Therefore we have to disable PEBS on VT-x enter and
    re-enable on VT-x exit, enforcing a strict exclude_guest.

    Kernel side enforcement fix by Peter Zijlstra, tooling side fix by David Ahern.

    * Fix build on sparc due to UAPI, fix from David Miller.

    * Fixes for the srclike sort key for unresolved symbols and when processing
    samples in JITted code, where we don't have an ELF file, just an special
    symbol table, fixes from Namhyung Kim.

    * Fix some leaks in libtraceevent, from Steven Rostedt.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Pull ARM soc fixes from Olof Johansson:
    "A set of fixes and some minor cleanups for -rc2:

    - A series from Arnd that fixes warnings in drivers and other code
    included by ARM defconfigs. Most have been acked by corresponding
    maintainers (and seem quite hard to argue not picking up anyway in
    the few exception cases).
    - A few misc patches from the list for integrator/vt8500/i.MX
    - A batch of fixes to OMAP platforms, fixing:
    - boot problems on beaglebone,
    - regression fixes for local timers
    - clockdomain locking fixes
    - a few boot/sparse warnings
    - For Tegra:
    - Clock rate calculation overflow fix
    - Revert a change that removed timer clocks and a fix for symbol
    name clashes
    - For Renesas:
    - IO accessor / annotation cleanups to remove warnings
    - For Kirkwood/Dove/mvebu:
    - Fixes for device trees for Dove (some minor cleanups, some fixes)
    - Fixes for the mvebu gpio driver
    - Fix build problem for Feroceon due to missing ifdefs
    - Fix lsxl DTS files"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
    ARM: kirkwood: fix buttons on lsxl boards
    ARM: kirkwood: fix LEDs names for lsxl boards
    ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
    gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
    ARM: dove: Add crypto engine to DT
    ARM: dove: Remove watchdog from DT
    ARM: dove: Restructure SoC device tree descriptor
    ARM: dove: Fix clock names of sata and gbe
    ARM: dove: Fix tauros2 device tree init
    ARM: dove: Add pcie clock support
    ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
    ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
    ARM: s3c: mark s3c2440_clk_add as __init_refok
    spi/s3c64xx: use correct dma_transfer_direction type
    ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
    ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
    ARM: OMAP: resolve sparse warning concerning debug_card_init()
    ARM: OMAP4: Fix twd_local_timer_register regression
    ARM: tegra: add tegra_timer clock
    ARM: tegra: rename tegra system timer
    ...

    Linus Torvalds
     
  • Emit the magic string that indicates a module has a signature after the
    signature data instead of before it. This allows module_sig_check() to
    be made simpler and faster by the elimination of the search for the
    magic string. Instead we just need to do a single memcmp().

    This works because at the end of the signature data there is the
    fixed-length signature information block. This block then falls
    immediately prior to the magic number.

    From the contents of the information block, it is trivial to calculate
    the size of the signature data and thus the size of the actual module
    data.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells