aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-17openvswitch: fix a use after freeLi RongQing1-1/+2
pskb_may_pull() called by arphdr_ok can change skb->data, so put the arp setting after arphdr_ok to avoid the use the freed memory Fixes: 0714812134d7d ("openvswitch: Eliminate memset() from flow_extract.") Cc: Jesse Gross <[email protected]> Cc: Eric Dumazet <[email protected]> Signed-off-by: Li RongQing <[email protected]> Acked-by: Jesse Gross <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17ipv4: dst_entry leak in ip_send_unicast_reply()Vasily Averin1-3/+9
ip_setup_cork() called inside ip_append_data() steals dst entry from rt to cork and in case errors in __ip_append_data() nobody frees stolen dst entry Fixes: 2e77d89b2fa8 ("net: avoid a pair of dst_hold()/dst_release() in ip_append_data()") Signed-off-by: Vasily Averin <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17perf script: Add period as a default output columnJiri Olsa1-3/+6
Adding period as a default output column in script command fo hardware, software and raw events. If PERF_SAMPLE_PERIOD sample type is defined in perf.data, following will be displayed in perf script output: $ perf script ls 8034 57477.887209: 250000 task-clock: ffffffff81361d72 memset ([kernel.kallsyms]) ls 8034 57477.887464: 250000 task-clock: ffffffff816f6d92 _raw_spin_unlock_irqrestore ([kernel.kallsyms]) ls 8034 57477.887708: 250000 task-clock: ffffffff811a94f0 do_munmap ([kernel.kallsyms]) ls 8034 57477.887959: 250000 task-clock: 34080916c6 get_next_seq (/usr/lib64/libc-2.17.so) ls 8034 57477.888208: 250000 task-clock: 3408079230 _IO_doallocbuf (/usr/lib64/libc-2.17.so) ls 8034 57477.888717: 250000 task-clock: ffffffff814242c8 n_tty_write ([kernel.kallsyms]) ls 8034 57477.889285: 250000 task-clock: 3408076402 fwrite_unlocked (/usr/lib64/libc-2.17.so) Signed-off-by: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: "Jen-Cheng(Tommy) Huang" <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jen-Cheng(Tommy) Huang <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2014-10-17perf script: Add period data columnJiri Olsa2-2/+12
Adding period data column to be displayed in perf script. It's possible to get period values using -f option, like: $ perf script -f comm,tid,time,period,ip,sym,dso :26019 26019 52414.329088: 3707 ffffffff8105443a native_write_msr_safe ([kernel.kallsyms]) :26019 26019 52414.329088: 44 ffffffff8105443a native_write_msr_safe ([kernel.kallsyms]) :26019 26019 52414.329093: 1987 ffffffff8105443a native_write_msr_safe ([kernel.kallsyms]) :26019 26019 52414.329093: 6 ffffffff8105443a native_write_msr_safe ([kernel.kallsyms]) ls 26019 52414.329442: 537558 3407c0639c _dl_map_object_from_fd (/usr/lib64/ld-2.17.so) ls 26019 52414.329442: 2099 3407c0639c _dl_map_object_from_fd (/usr/lib64/ld-2.17.so) ls 26019 52414.330181: 1242100 34080917bb get_next_seq (/usr/lib64/libc-2.17.so) ls 26019 52414.330181: 3774 34080917bb get_next_seq (/usr/lib64/libc-2.17.so) ls 26019 52414.331427: 1083662 ffffffff810c7dc2 update_curr ([kernel.kallsyms]) ls 26019 52414.331427: 360 ffffffff810c7dc2 update_curr ([kernel.kallsyms]) Signed-off-by: Jiri Olsa <[email protected]> Acked-by: David Ahern <[email protected]> Cc: "Jen-Cheng(Tommy) Huang" <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jen-Cheng(Tommy) Huang <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2014-10-17ipv4: clean up cookie_v4_check()Cong Wang3-7/+6
We can retrieve opt from skb, no need to pass it as a parameter. And opt should always be non-NULL, no need to check. Cc: Krzysztof Kolasa <[email protected]> Cc: Eric Dumazet <[email protected]> Tested-by: Krzysztof Kolasa <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17ipv4: share tcp_v4_save_options() with cookie_v4_check()Cong Wang3-29/+21
cookie_v4_check() allocates ip_options_rcu in the same way with tcp_v4_save_options(), we can just make it a helper function. Cc: Krzysztof Kolasa <[email protected]> Cc: Eric Dumazet <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17ipv4: call __ip_options_echo() in cookie_v4_check()Cong Wang1-1/+1
commit 971f10eca186cab238c49da ("tcp: better TCP_SKB_CB layout to reduce cache line misses") missed that cookie_v4_check() still calls ip_options_echo() which uses IPCB(). It should use TCPCB() at TCP layer, so call __ip_options_echo() instead. Fixes: commit 971f10eca186cab238c49da ("tcp: better TCP_SKB_CB layout to reduce cache line misses") Cc: Krzysztof Kolasa <[email protected]> Cc: Eric Dumazet <[email protected]> Reported-by: Krzysztof Kolasa <[email protected]> Tested-by: Krzysztof Kolasa <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17atm: simplify lanai.c by using module_pci_driverMichael Opdenacker1-21/+1
This simplifies the lanai.c driver by using the module_pci_driver() macro, at the expense of losing only debugging messages. Signed-off-by: Michael Opdenacker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-17crypto: memzero_explicit - make sure to clear out sensitive dataDaniel Borkmann7-13/+13
Recently, in commit 13aa93c70e71 ("random: add and use memzero_explicit() for clearing data"), we have found that GCC may optimize some memset() cases away when it detects a stack variable is not being used anymore and going out of scope. This can happen, for example, in cases when we are clearing out sensitive information such as keying material or any e.g. intermediate results from crypto computations, etc. With the help of Coccinelle, we can figure out and fix such occurences in the crypto subsytem as well. Julia Lawall provided the following Coccinelle program: @@ type T; identifier x; @@ T x; ... when exists when any -memset +memzero_explicit (&x, -0, ...) ... when != x when strict @@ type T; identifier x; @@ T x[...]; ... when exists when any -memset +memzero_explicit (x, -0, ...) ... when != x when strict Therefore, make use of the drop-in replacement memzero_explicit() for exactly such cases instead of using memset(). Signed-off-by: Daniel Borkmann <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Hannes Frederic Sowa <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Acked-by: Herbert Xu <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2014-10-17random: add and use memzero_explicit() for clearing dataDaniel Borkmann3-6/+23
zatimend has reported that in his environment (3.16/gcc4.8.3/corei7) memset() calls which clear out sensitive data in extract_{buf,entropy, entropy_user}() in random driver are being optimized away by gcc. Add a helper memzero_explicit() (similarly as explicit_bzero() variants) that can be used in such cases where a variable with sensitive data is being cleared out in the end. Other use cases might also be in crypto code. [ I have put this into lib/string.c though, as it's always built-in and doesn't need any dependencies then. ] Fixes kernel bugzilla: 82041 Reported-by: [email protected] Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Cc: Alexey Dobriyan <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Cc: [email protected]
2014-10-17perf evsel: No need to drag util/cgroup.hArnaldo Carvalho de Melo4-1/+5
The only thing we need is a forward declaration for 'struct cgroup_sel', that is inside 'struct perf_evsel'. Include cgroup.h instead on the tools that support cgroups. Cc: Adrian Hunter <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jean Pihet <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2014-10-17perf evlist: Add missing 'struct option' forward declarationArnaldo Carvalho de Melo1-0/+2
It was being found, by chance, because evsel.h needlessly includes util/cgroup.h, which will be sorted out in a following patch. Cc: Adrian Hunter <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jean Pihet <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2014-10-17perf evsel: Move exit stuff from __delete to __exitArnaldo Carvalho de Melo1-5/+5
So that when an evsel is embedded into other struct it can free up resources calling perf_evsel__exit(). Cc: Adrian Hunter <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jean Pihet <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2014-10-17s390/uprobes: fix kprobes dependencyJan Willeke2-2/+2
If kprobes is disabled uprobes will not compile. Fix this by including the correct header files. Signed-off-by: Jan Willeke <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-10-17s390: wire up bpf syscallHeiko Carstens3-1/+4
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-10-17spi/rockchip: spi controller must be disabled in tx callback tooAddy Ke1-1/+3
Signed-off-by: Addy Ke <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-10-17ntb: Adding split BAR support for Haswell platformsDave Jiang3-60/+210
On the Haswell platform, a split BAR option to allow creation of 2 32bit BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Jon Mason <[email protected]>
2014-10-17ntb: use errata flag set via DID to implement workaroundDave Jiang2-9/+42
Instead of using a module parameter, we should detect the errata via PCI DID and then set an appropriate flag. This will be used for additional errata later on. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Jon Mason <[email protected]>
2014-10-17ntb: conslidate reading of PPD to move platform detection earlierDave Jiang1-28/+98
To simplify some of the platform detection code. Move the platform detection to a function to be called earlier. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Jon Mason <[email protected]>
2014-10-17ntb: move platform detection to separate functionDave Jiang1-27/+47
Move the platform detection function to separate functions to allow easier maintenence. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Jon Mason <[email protected]>
2014-10-17NTB: debugfs device entryJon Mason3-2/+107
Create a debugfs entry for the NTB device to log the basic device info, as well as display the error count on a number of registers. Signed-off-by: Jon Mason <[email protected]>
2014-10-17Revert "Btrfs: race free update of commit root for ro snapshots"Chris Mason2-36/+33
This reverts commit 9c3b306e1c9e6be4be09e99a8fe2227d1005effc. Switching only one commit root during a transaction is wrong because it leads the fs into an inconsistent state. All commit roots should be switched at once, at transaction commit time, otherwise backref walking can often miss important references that were only accessible through the old commit root. Plus, the root item for the snapshot's root wasn't getting updated and preventing the next transaction commit to do it. This made several users get into random corruption issues after creation of readonly snapshots. A regression test for xfstests will follow soon. Cc: [email protected] # 3.17 Signed-off-by: Filipe Manana <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2014-10-17Merge branch 'int340x-thermal' of .git into nextZhang Rui22-408/+1867
2014-10-17Thermal: int340x thermal: select ACPI fan driverZhang Rui2-1/+2
we share the same driver for both ACPI predefined Fan device and INT3404 Fan device, thus we should select the ACPI Fan driver when int340x thermal drivers are enabeld. Signed-off-by: Zhang Rui <[email protected]>
2014-10-17kprobes/x86: Remove stale ARCH_SUPPORTS_KPROBES_ON_FTRACE defineAnton Blanchard1-1/+0
Commit e7dbfe349d12 ("kprobes/x86: Move ftrace-based kprobe code into kprobes-ftrace.c") switched from using ARCH_SUPPORTS_KPROBES_ON_FTRACE to CONFIG_KPROBES_ON_FTRACE but missed removing the define. Signed-off-by: Anton Blanchard <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-10-17ARM: dts: Explicitly set dr_mode on exynos5420-arndale-octaSjoerd Simons1-0/+4
Explicitly set the dr_mode for the second dwc3 controller on the Arndale Octa board to host mode. This is required to ensure the controller is initialized in the right mode if the kernel is build with USB gadget support. Reported-By: Andreas Faerber <[email protected]> Signed-off-by: Sjoerd Simons <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2014-10-17ARM: dts: Explicitly set dr_mode on exynos Peach boardsSjoerd Simons3-2/+18
In case the optional dr_mode property isn't set in the dwc3 nodes the the controller will go into OTG mode if both USB host and USB gadget functionality are enabled in the kernel configuration. Unfortunately this results in USB not working on exynos5420-peach-pit and exynos5800-peach-pi with such a kernel configuration unless manually change the mode. To resolve that explicitly configure the dual role mode as host. Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Andreas Faerber <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2014-10-16drm/radeon: reduce sparse false positive warningsMichele Curti11-0/+11
include radeon_asic.h header file in the various xxx_dpm.c files to reduce sparse false positive warnings. Not so great patch in itself, but reducing warning count from 391 to 258 may help to see real problems.. Signed-off-by: Michele Curti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-10-16drm/radeon: fix vm page table block size calculationAlex Deucher1-1/+1
The page offset is 12 bits. For example if we have an 8 GB VM, we'd need 33 bits. The number of bits needed for PD + PT is 21 (33 - 12 or log2(8) + 18), not 20 (log2(8) + 17). Noticed by Alexey during code review. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-10-16drm/ttm: Don't evict BOs outside of the requested placement rangeMichel Dänzer1-3/+17
The radeon driver uses placement range restrictions for several reasons, in particular to make sure BOs in VRAM can be accessed by the CPU, e.g. during a page fault. Without this change, TTM could evict other BOs while trying to satisfy the requested placement, even if the evicted BOs were outside of the requested placement range. Doing so didn't free up any space in the requested placement range, so the (potentially high) eviction cost was incurred for no benefit. Nominating for stable because radeon driver changes in 3.17 made this much more noticeable than before. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84662 Cc: [email protected] Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-10-16drm/ttm: Don't skip fpfn check if lpfn is 0 in ttm_bo_mem_compatMichel Dänzer1-4/+4
Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-10-16drm/radeon: use gart memory for DMA ring testsAlex Deucher3-18/+26
Avoids HDP cache flush issues when using vram which can cause ring test failures on certain boards. Signed-off-by: Alex Deucher <[email protected]> Cc: Alexander Fyodorov <[email protected]> Cc: [email protected]
2014-10-16drm/radeon: fix speaker allocation setupAlex Deucher3-8/+8
If the sad_count is 0, set the hw to stereo and change the error message to a warn. A lot of monitors don't set the speaker allocation block. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-10-16drm/radeon: initialize sadb to NULL in the audio codeAlex Deucher3-3/+3
Fixes kfree of the sadb buffer when it's NULL. Signed-off-by: Alex Deucher <[email protected]>
2014-10-17powerpc: Only do dynamic DMA zone limits on platforms that need itMichael Ellerman1-0/+8
Scott's patch 1c98025c6c95 "Dynamic DMA zone limits" changed dma_direct_alloc_coherent() to start using dev->coherent_dma_mask. That seems fair enough, but it exposes the fact that some of the drivers we care about on IBM platforms aren't setting the coherent mask. The proper fix is to have drivers set the coherent mask and also have the platform code honor it. For now, just restrict the dynamic DMA zone limits to the platforms that need it. Signed-off-by: Michael Ellerman <[email protected]> Acked-by: Scott Wood <[email protected]>
2014-10-16Input: xpad - add Thrustmaster as Xbox 360 controller vendorTommi Rantala1-0/+1
Add Thrustmaster as Xbox 360 controller vendor. This is required for example to make the GP XID (044f:b326) gamepad work. Signed-off-by: Tommi Rantala <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-10-16Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing WheelTommi Rantala1-0/+1
Add the USB ID for the Xbox 360 Thrustmaster Ferrari 458 Racing Wheel. Signed-off-by: Tommi Rantala <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-10-16Input: max77693-haptic - fix state check in imax77693_haptic_disable()Jaewon Kim1-1/+1
The check to see whether the device is already disabled in max77693_haptic_disable() was inversed, this change corrects it. Signed-off-by: Jaewon Kim <[email protected]> Reviewed-by: Chanwoo Choi <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-10-16Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backendChang Huaixin1-2/+2
xenkbd_disconnect_backend doesn't free grant table entry. This bug affects live migration. xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref to handle grant table entry which doesn't really free an entry. Thus every time we do xenkbd_resume, grant table entry increses by one. As an grant table entry occupies 8 bytes, an grant table page has at most 512 entries. Every 512 times we do xenkdb_resume, grant table pages increses by one. After around 3500 times of live migration, grant table pages will increase by 7, causing too many pages to populate and hitting max_pages limit when assigning pages.Thus assign_pages will fail, so will live migration. Signed-off-by: Chang Huaixin <[email protected]> Acked-by: David Vrabel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-10-16Check minimum response length on query_network_interfaceSteve French1-4/+7
Acked-by: Shirish Pargaonkar <[email protected]> Signed-off-by: Steve French <[email protected]>
2014-10-16Workaround Mac server problemSteve French1-3/+10
Mac server returns that they support CIFS Unix Extensions but doesn't actually support QUERY_FILE_UNIX_BASIC so mount fails. Workaround this problem by disabling use of Unix CIFS protocol extensions if server returns an EOPNOTSUPP error on QUERY_FILE_UNIX_BASIC during mount. Signed-off-by: Steve French <[email protected]>
2014-10-16Remap reserved posix characters by default (part 3/3)Steve French11-77/+88
This is a bigger patch, but its size is mostly due to a single change for how we check for remapping illegal characters in file names - a lot of repeated, small changes to the way callers request converting file names. The final patch in the series does the following: 1) changes default behavior for cifs to be more intuitive. Currently we do not map by default to seven reserved characters, ie those valid in POSIX but not in NTFS/CIFS/SMB3/Windows, unless a mount option (mapchars) is specified. Change this to by default always map and map using the SFM maping (like the Mac uses) unless the server negotiates the CIFS Unix Extensions (like Samba does when mounting with the cifs protocol) when the remapping of the characters is unnecessary. This should help SMB3 mounts in particular since Samba will likely be able to implement this mapping with its new "vfs_fruit" module as it will be doing for the Mac. 2) if the user specifies the existing "mapchars" mount option then use the "SFU" (Microsoft Services for Unix, SUA) style mapping of the seven characters instead. 3) if the user specifies "nomapposix" then disable SFM/MAC style mapping (so no character remapping would be used unless the user specifies "mapchars" on mount as well, as above). 4) change all the places in the code that check for the superblock flag on the mount which is set by mapchars and passed in on all path based operation and change it to use a small function call instead to set the mapping type properly (and check for the mapping type in the cifs unicode functions) Signed-off-by: Steve French <[email protected]>
2014-10-16Allow conversion of characters in Mac remap range (part 2)Steve French2-26/+83
The previous patch allowed remapping reserved characters from directory listenings, this patch adds conversion the other direction, allowing opening of files with any of the seven reserved characters. Signed-off-by: Steve French <[email protected]> Reviewed-by: Shirish Pargaonkar <[email protected]>
2014-10-16Allow conversion of characters in Mac remap range. Part 1Steve French5-33/+107
This allows directory listings to Mac to display filenames correctly which have been created with illegal (to Windows) characters in their filename. It does not allow converting the other direction yet ie opening files with these characters (followon patch). There are seven reserved characters that need to be remapped when mounting to Windows, Mac (or any server without Unix Extensions) which are valid in POSIX but not in the other OS. : \ < > ? * | We used the normal UCS-2 remap range for this in order to convert this to/from UTF8 as did Windows Services for Unix (basically add 0xF000 to any of the 7 reserved characters), at least when the "mapchars" mount option was specified. Mac used a very slightly different "Services for Mac" remap range 0xF021 through 0xF027. The attached patch allows cifs.ko (the kernel client) to read directories on macs containing files with these characters and display their names properly. In theory this even might be useful on mounts to Samba when the vfs_catia or new "vfs_fruit" module is loaded. Currently the 7 reserved characters look very strange in directory listings from cifs.ko to Mac server. This patch allows these file name characters to be read (requires specifying mapchars on mount). Two additional changes are needed: 1) Make it more automatic: a way of detecting enough info so that we know to try to always remap these characters or not. Various have suggested that the SFM approach be made the default when the server does not support POSIX Unix extensions (cifs mounts to Samba for example) so need to make SFM remapping the default unless mapchars (SFU style mapping) specified on mount or no mapping explicitly requested or no mapping needed (cifs mounts to Samba). 2) Adding a patch to map the characters the other direction (ie UTF-8 to UCS-2 on open). This patch does it for translating readdir entries (ie UCS-2 to UTF-8) Signed-off-by: Steve French <[email protected]> Reviewed-by: Shirish Pargaonkar <[email protected]>
2014-10-16mfsymlinks support for SMB2.1/SMB3. Part 2 query symlinkSteve French3-1/+75
Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks via the "Minshall/French" symlink format already used for cifs mounts when mfsymlinks mount option is used (and also used by Apple). http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks This second patch adds support to query them (recognize them as symlinks and read them). Third version of patch makes minor corrections to error handling. Signed-off-by: Steve French <[email protected]> Reviewed-by: Stefan Metzmacher <[email protected]>
2014-10-16Add mfsymlinks support for SMB2.1/SMB3. Part 1 create symlinkSteve French3-1/+68
Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks via the "Minshall/French" symlink format already used for cifs mounts when mfsymlinks mount option is used (and also used by Apple). http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks This first patch adds support to create them. The next patch will add support for recognizing them and reading them. Although CIFS/SMB3 have other types of symlinks, in the many use cases they aren't practical (e.g. either require cifs only mounts with unix extensions to Samba, or require the user to be Administrator to Windows for SMB3). This also helps enable running additional xfstests over SMB3 (since some xfstests directly or indirectly require symlink support). Signed-off-by: Steve French <[email protected]> CC: Stefan Metzmacher <[email protected]>
2014-10-16Allow mknod and mkfifo on SMB2/SMB3 mountsSteve French8-30/+55
The "sfu" mount option did not work on SMB2/SMB3 mounts. With these changes when the "sfu" mount option is passed in on an smb2/smb2.1/smb3 mount the client can emulate (and recognize) fifo and device (character and device files). In addition the "sfu" mount option should not conflict with "mfsymlinks" (symlink emulation) as we will never create "sfu" style symlinks, but using "sfu" mount option will allow us to recognize existing symlinks, created with Microsoft "Services for Unix" (SFU and SUA). To enable the "sfu" mount option for SMB2/SMB3 the calling syntax of the generic cifs/smb2/smb3 sync_read and sync_write protocol dependent function needed to be changed (we don't have a file struct in all cases), but this actually ended up simplifying the code a little. Signed-off-by: Steve French <[email protected]>
2014-10-16add defines for two new file attributesSteve French1-0/+2
Signed-off-by: Steve French <[email protected]> Reviewed-by: Shirish Pargaonkar <[email protected]>
2014-10-16netlink: fix description of portidNicolas Dichtel1-1/+1
Avoid confusion between pid and portid. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-10-16Merge branch 'master' of ↵David S. Miller7-16/+32
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-10-16 This series contains updates to fm10k and ixgbe. Matthew provides two fixes for fm10k, first sets the flag to fetch the host state before kicking off the service task that reads the host state when bringing the interface up. The second makes sure that we release the mailbox lock after detecting an error and before we return the error code. Andy Zhou provides a compile fix for fm10k, when the driver is compiled into the kernel and the VXLAN driver is compiled as a module. Emil provides a fix for ixgbe to prevent against a panic by trying to dereference a NULL pointer in ixgbe_ndo_set_vf_spoofchk(). ==================== Signed-off-by: David S. Miller <[email protected]>