Re: [PATCH v7] printk: hash addresses printed with %p

2017-10-26 Thread Greg KH
On Thu, Oct 26, 2017 at 12:59:08AM +0200, Jason A. Donenfeld wrote: > On Thu, Oct 26, 2017 at 12:27 AM, Tobin C. Harding wrote: > > How good is unlikely()? > > It places that branch way at the bottom of the function so that it's > less likely to pollute the icache. But always measure it. Lots o

Re: [PATCH v2] Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.

2017-10-26 Thread Lukas Wunner
On Wed, Oct 25, 2017 at 10:14:53PM -0700, =?UTF-8?q?Ronald=20Tschal=C3=A4r?= wrote: > Commit dec2c92880cc5435381d50e3045ef018a762a917 ("Bluetooth: hci_ldisc: > Use rwlocking to avoid closing proto races") introduced locks in > hci_ldisc that are held while calling the proto functions. These locks

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pavel Machek
On Thu 2017-10-26 08:25:02, Filip Matijević wrote: > Hi Pavel, > > On 10/25/2017 10:34 PM, Pavel Machek wrote: > > 3.5.3-nemo kernel seems to work > > I did take a quick look at the board-rm680.c since there are some > conditional statements with regards to system revision but I didn't > notice a

Re: [PATCH 4.13 85/85] xfs: move two more RT specific functions into CONFIG_XFS_RT

2017-10-26 Thread Greg Kroah-Hartman
On Wed, Oct 25, 2017 at 11:09:50PM +0200, Arnd Bergmann wrote: > On Tue, Oct 24, 2017 at 3:07 PM, Greg Kroah-Hartman > wrote: > > 4.13-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > From: Arnd Bergmann > > > > commit 785545c8982604fe3ba7

Re: [PATCH] sound: Convert timers to use timer_setup()

2017-10-26 Thread Mark Brown
On Wed, Oct 25, 2017 at 08:09:27AM -0700, Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list > pointer to all timer callbacks, switch to using the new timer_setup() > and from_timer() to pass the timer pointer explicitly. These are all the > "mechanical" changes rem

[PATCH] KVM: SVM: obey guest PAT

2017-10-26 Thread Paolo Bonzini
For many years some users of assigned devices have reported worse performance on AMD processors with NPT than on AMD without NPT, Intel or bare metal. The reason turned out to be that SVM is discarding the guest PAT setting and uses the default (PA0=PA4=WB, PA1=PA5=WT, PA2=PA6=UC-, PA3=UC). The g

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pavel Machek
On Wed 2017-10-25 14:28:07, Tony Lindgren wrote: > * Pavel Machek [171025 13:36]: > > Hi! > > > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on > > both. 4.13-rc2 with display and clock patches boots on phone "S", but > > does not on phone "P"; nothing nothing is received on

Re: [PATCH v5 00/13] gpio: Tight IRQ chip integration

2017-10-26 Thread Jon Hunter
Ping! On 23/10/17 09:47, Jon Hunter wrote: > Hi Linus, > > On 16/10/17 19:09, Jon Hunter wrote: >> Hi Linus, >> >> On 13/10/17 16:49, Thierry Reding wrote: >>> From: Thierry Reding >>> >>> Hi Linus, >>> >>> here's the latest series of patches that implement the tighter IRQ chip >>> integration.

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pali Rohár
On Thursday 26 October 2017 09:08:15 Pavel Machek wrote: > On Thu 2017-10-26 08:25:02, Filip Matijević wrote: > > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL, > > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel > > earlyprintk kernel params to get output ear

Re: [PATCH] coccinelle: fix verbose message about .cocci file being run

2017-10-26 Thread Nicolas Palix (LIG)
Le 26/10/17 à 06:55, Masahiro Yamada a écrit : If you run coccicheck with V=1 and COCCI=, you will see a strange path to the semantic patch file. For example, run the following: $ make V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck [ snip ] The semantic patch that makes this repo

Re: [PATCH] coccinelle: grep Options and Requires fields more precisely

2017-10-26 Thread Nicolas Palix (LIG)
Le 26/10/17 à 06:59, Julia Lawall a écrit : On Thu, 26 Oct 2017, Masahiro Yamada wrote: Currently, the required version for badzero.cocci is picked up from its "Comments:" line since it contains the word "Requires". Surprisingly, ld-version.sh can extract the version number from the string "

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pavel Machek
Hi! On Thu 2017-10-26 09:21:13, Pali Rohár wrote: > On Thursday 26 October 2017 09:08:15 Pavel Machek wrote: > > On Thu 2017-10-26 08:25:02, Filip Matijević wrote: > > > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL, > > > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and igno

[PATCH v2] kernel/kprobes: add check to avoid kprobe memory leak

2017-10-26 Thread JianKang Chen
The function register_kretprobe is used to initialize a struct kretprobe and allocate a list table for kprobe instance. However,in this function, there is a memory leak. The test case: static struct kretprobe rp; struct kretprobe *rps[10]={&rp ,&rp ,&rp , &rp ,&rp ,&rp ,&rp ,&rp ,&rp,&rp}; stat

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pali Rohár
On Thursday 26 October 2017 09:27:59 Pavel Machek wrote: > Hi! > > On Thu 2017-10-26 09:21:13, Pali Rohár wrote: > > On Thursday 26 October 2017 09:08:15 Pavel Machek wrote: > > > On Thu 2017-10-26 08:25:02, Filip Matijević wrote: > > > > Last time I couldn't get output on serial I used CONFIG_DEB

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Filip Matijević
On 10/26/2017 09:16 AM, Pavel Machek wrote: > "Uart pins not muxed in NOLO" would certainly explain my problems. In > 3.5.X, output works even in decompressor ("Uncompressing > kernel... done, booting linux"). IIRC bootloader passes some additional settings for gpio that kernel should apply (2.6 a

[PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

2017-10-26 Thread Li Wang
That would be very hard to get -ENOMEM returned in crst_table_upgrade() because the condition(addr + len <= TASK_SIZE) makes all 'end' value is smaller/equal than 'TASK_SIZE_TASK'. So let's move it to the upper layer. Fixes: 8ab867cb0806 (s390/mm: fix BUG_ON in crst_table_upgrade) Signed-off-by: L

Re: [PATCH 0/6] Boot-time switching between 4- and 5-level paging for 4.15, Part 1

2017-10-26 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > On Tue, Oct 24, 2017 at 02:47:41PM +0200, Ingo Molnar wrote: > > > > > > > > Making a variable that 'looks' like a constant macro dynamic in > > > > > > > > a rare Kconfig > > > > > > > > scenario is asking for trouble. > > > > > > > > > > > > > > We expect boot-

Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages

2017-10-26 Thread Michal Hocko
On Thu 26-10-17 11:47:07, Joonsoo Kim wrote: > On Tue, Oct 24, 2017 at 10:12:58AM +0200, Vlastimil Babka wrote: > > On 10/24/2017 06:44 AM, Joonsoo Kim wrote: > > >>> I'm not sure what is the confusing semantic you mentioned. I think > > >>> that set_migratetype_isolate() has confusing semantic and

Re: [PATCH 07/27] kexec_file: Disable at runtime if securelevel has been set

2017-10-26 Thread joeyli
Hi Mimi, Thank you for reviewing. On Mon, Oct 23, 2017 at 11:54:43AM -0400, Mimi Zohar wrote: > On Thu, 2017-10-19 at 15:51 +0100, David Howells wrote: > > From: Chun-Yi Lee > > > > When KEXEC_VERIFY_SIG is not enabled, kernel should not loads image > > through kexec_file systemcall if securele

Re: [PATCH] fs, mm: account filp and names caches to kmemcg

2017-10-26 Thread Michal Hocko
On Wed 25-10-17 15:49:21, Greg Thelen wrote: > Johannes Weiner wrote: > > > On Wed, Oct 25, 2017 at 09:00:57PM +0200, Michal Hocko wrote: [...] > >> So just to make it clear you would be OK with the retry on successful > >> OOM killer invocation and force charge on oom failure, right? > > > > Yea

[PATCH] perf probe: Restrict user to use only one executable with -V

2017-10-26 Thread Ravi Bangoria
If multiple executables (-x) are specified with 'perf probe', listing variables only considers first executable. Ex, $ perf probe -V do_sys_open -x ./test -V fun Failed to find debug information for address 40 Debuginfo analysis failed. Error: Failed to show vars. Available var

Re: [PATCH v9 02/29] x86/boot: Relocate definition of the initial state of CR0

2017-10-26 Thread Andy Lutomirski
On Tue, Oct 3, 2017 at 8:54 PM, Ricardo Neri wrote: > Both head_32.S and head_64.S utilize the same value to initialize the > control register CR0. Also, other parts of the kernel might want to access > this initial definition (e.g., emulation code for User-Mode Instruction > Prevention uses this

Re: [1/2,v2] fdmap(2)

2017-10-26 Thread Andy Lutomirski
> On Oct 19, 2017, at 5:34 PM, Alexey Dobriyan wrote: > > On 10/18/17, Andy Lutomirski wrote: >>> fdmap() is standalone thing. >>> >>> Next step is to design fdinfo(2) (?) which uses descriptors from >>> fdmap(2). Extending structures is done as usual: but version, >>> add new fields to the end.

Re: [kernel-hardening] [PATCH] fs: Use CAP_DAC_OVERRIDE to allow for file dedupe

2017-10-26 Thread Andy Lutomirski
On Sat, Oct 21, 2017 at 12:40 PM, Nicolas Belouin wrote: > > > On October 21, 2017 4:08:31 PM GMT+02:00, Nick Kralevich > wrote: >>On Sat, Oct 21, 2017 at 6:28 AM, Nicolas Belouin >>wrote: >>> In its current implementation the check is against CAP_SYS_ADMIN, >>> however this capability is bloat

Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters

2017-10-26 Thread Jose Abreu
Hi Florian, On 25-10-2017 20:34, Florian Fainelli wrote: > On 10/25/2017 07:04 AM, Jose Abreu wrote: >> This adds the documentation for TSN feature EST and FP. >> >> Signed-off-by: Jose Abreu >> Cc: David S. Miller >> Cc: Joao Pinto >> Cc: Giuseppe Cavallaro >> Cc: Alexandre Torgue >> Cc: Rob

[PATCH] platform/x86: dell-uart-backlight: new backlight driver for DELL AIO

2017-10-26 Thread AceLan Kao
The Dell AIO machines released after 2017 come with a UART interface to communicate with the backlight scalar board. This driver creates a standard backlight interface and talks to the scalar board through UART. In DSDT this uart port will be defined as Name (_HID, "DELL0501") Name (_CID, Ei

Re: [PATCH v2] dwc: dra7xx: Print link state to console for debug

2017-10-26 Thread Faiz Abbas
David, On Thursday 19 October 2017 06:56 PM, David Laight wrote: > From: Faiz Abbas >> Sent: 19 October 2017 14:09 >> On Thursday 19 October 2017 06:13 PM, Faiz Abbas wrote: >>> Enable support for printing the LTSSM link state for debugging PCI >>> when link is down. >>> >>> Signed-off-by: Faiz Ab

Re: [PATCH v9 25/29] x86/umip: Force a page fault when unable to copy emulated result to user

2017-10-26 Thread Andy Lutomirski
On Tue, Oct 3, 2017 at 8:54 PM, Ricardo Neri wrote: > fixup_umip_exception() will be called from do_general_protection(). If the > former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. > However, when emulation is successful but the emulated result cannot be > copied to user sp

[PATCH] iio/light/gp2ap020a00f: Use common error handling code in gp2ap020a00f_adjust_lux_mode()

2017-10-26 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 26 Oct 2017 09:50:21 +0200 * Add jump targets so that two error messages are stored only once at the end of this function implementation. * Adjust condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- d

Re: [PATCH V8 1/2] printk: remove tabular output for NULL pointer

2017-10-26 Thread Joe Perches
On Thu, 2017-10-26 at 17:27 +1100, Tobin C. Harding wrote: > Hi Joe, > > thanks for your review. > > On Wed, Oct 25, 2017 at 09:57:23PM -0700, Joe Perches wrote: > > On Thu, 2017-10-26 at 13:53 +1100, Tobin C. Harding wrote: > > > Currently pointer() checks for a NULL pointer argument and then if

Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps

2017-10-26 Thread David Miller
From: Andrew Lunn Date: Tue, 24 Oct 2017 11:22:34 +0200 >> In case of probe deferral, you get the full probe function to exit with >> an error, and that usually involves freeing the recently allocated >> dsa_switch instance, and then allocating a new one when probe is >> re-entered, so that shoul

Re: [PATCH net 2/3] net: mvpp2: fix invalid parameters order when calling the tcam init

2017-10-26 Thread David Miller
From: Antoine Tenart Date: Tue, 24 Oct 2017 11:41:27 +0200 > When calling mvpp2_prs_mac_multi_set() from mvpp2_prs_mac_init(), two > parameters (the port index and the table index) are inverted. Fixes > this. > > Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network > un

Re: [PATCH net 1/3] net: mvpp2: fix typo in the tcam setup

2017-10-26 Thread David Miller
From: Antoine Tenart Date: Tue, 24 Oct 2017 11:41:26 +0200 > This patch fixes a typo in the mvpp2_prs_tcam_data_cmp() function, as > the shift value is inverted with the data. > > Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network > unit") > Signed-off-by: Antoine Ten

Re: [PATCH] perf probe: Restrict user to use only one executable with -V

2017-10-26 Thread ravi
Oops! this will disable support for multiple functions from single binary. (-x binary -V fun1 -V fun2) Sorry for the noise. Please ignore the patch. Will revise it. Thanks, Ravi On Thursday 26 October 2017 01:21 PM, Ravi Bangoria wrote: If multiple executables (-x) are specified with 'perf pro

Re: [PATCH net 3/3] net: mvpp2: do not sleep in set_rx_mode

2017-10-26 Thread David Miller
From: Antoine Tenart Date: Tue, 24 Oct 2017 11:41:28 +0200 > This patch replaces GFP_KERNEL by GFP_ATOMIC to avoid sleeping in the > ndo_set_rx_mode() call which is called with BH disabled. > > Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network > unit") > Signed-off-b

Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!

2017-10-26 Thread Sander Eikelenboom
On 26/10/17 10:05, Sander Eikelenboom wrote: > On 26/10/17 00:02, Craig Bergstrom wrote: >> Thanks for the notification, my apologies for the breakage. I'll take a >> close look and see if I can figure out what went wrong. >> >> Sander, any chance you can send /proc/iomem and the inputs to the mma

Re: BUG: unable to handle kernel paging request in vsock_diag_dump

2017-10-26 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 08:14:01AM -0700, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console ou

Re: [PATCH v2,1/2] misc: rtsx: Move Realtek Card Reader Driver to misc

2017-10-26 Thread Lee Jones
On Wed, 25 Oct 2017, rui_f...@realsil.com.cn wrote: > From: Rui Feng > > Because Realtek card reader drivers are pcie and usb drivers, > and they bridge mmc subsystem and memstick subsystem, they are > not mfd drivers. Greg and Lee Jones had a discussion about > where to put the drivers, the res

Re: [v5,22/22] powerpc/mm: Add speculative page fault

2017-10-26 Thread kemi
Some regression is found by LKP-tools(linux kernel performance) on this patch series tested on Intel 2s/4s Skylake platform. The regression result is sorted by the metric will-it-scale.per_process_ops. Branch:Laurent-Dufour/Speculative-page-faults/20171011-213456(V4 patch series) Commit id:

[lkp-robot] [printk] 7f7c60e066: BUG:KASAN:slab-out-of-bounds

2017-10-26 Thread kernel test robot
FYI, we noticed the following commit (built with gcc-4.9): commit: 7f7c60e0663645e757e520245606fde9c6e326bb ("printk: hash addresses printed with %p") url: https://github.com/0day-ci/linux/commits/Tobin-C-Harding/printk-hash-addresses-printed-with-p/20171024-231922 in testcase: trinity with f

Re: [PATCH] KVM: SVM: obey guest PAT

2017-10-26 Thread David Hildenbrand
On 26.10.2017 09:13, Paolo Bonzini wrote: > For many years some users of assigned devices have reported worse > performance on AMD processors with NPT than on AMD without NPT, > Intel or bare metal. > > The reason turned out to be that SVM is discarding the guest PAT > setting and uses the default

Re: BUG: unable to handle kernel paging request in vsock_diag_dump

2017-10-26 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 08:14:01AM -0700, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console ou

[PATCH v2,1/2] misc: rtsx: Move Realtek Card Reader Driver to misc

2017-10-26 Thread rui_feng
From: Rui Feng Because Realtek card reader drivers are pcie and usb drivers, and they bridge mmc subsystem and memstick subsystem, they are not mfd drivers. Greg and Lee Jones had a discussion about where to put the drivers, the result is that misc is a good place for them, so I move all files to

[GIT PULL] Ceph fix for 4.14-rc7

2017-10-26 Thread Ilya Dryomov
Hi Linus, The following changes since commit bb176f67090ca54869fc1262c913aa69d2ede070: Linux 4.14-rc6 (2017-10-23 06:49:47 -0400) are available in the git repository at: https://github.com/ceph/ceph-client.git tags/ceph-for-4.14-rc7 for you to fetch changes up to 6c2838fbdedb9b72a81c931d49

[PATCH] Bluetooth: btusb: Add new NFA344A entry.

2017-10-26 Thread Bartosz Chronowski
This change allows proper low power mode entry in suspend. /sys/kernel/debug/usb/devices entry: T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e09f Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100

Re: [PATCH] iscsi-target: Convert timers to use timer_setup()

2017-10-26 Thread Kees Cook
On Wed, Oct 25, 2017 at 5:03 PM, Bart Van Assche wrote: > On Wed, 2017-10-25 at 16:10 +0200, Kees Cook wrote: >> However, maintainers: sorry to send this one -- it can't be merged >> yet, this uses timer_setup_on_stack() which is only in -next right >> now. If it looks okay, though, I can carry th

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pavel Machek
Hi! On Thu 2017-10-26 09:32:36, Pali Rohár wrote: > On Thursday 26 October 2017 09:27:59 Pavel Machek wrote: > > Hi! > > > > On Thu 2017-10-26 09:21:13, Pali Rohár wrote: > > > On Thursday 26 October 2017 09:08:15 Pavel Machek wrote: > > > > On Thu 2017-10-26 08:25:02, Filip Matijević wrote: > > >

Re: [PATCH RFC] random: fix syzkaller fuzzer test int overflow

2017-10-26 Thread Chen Feng
On 2017/10/25 16:49, Theodore Ts'o wrote: > Other people who have sent me fuzzer test reproducers are able to > reproduce syzkaller logs into a simple C program. Can you explain to > me what the heck: > >> r3 = syz_open_dev$urandom(&(0x7f00a000)="2f6465762f7572616e646f6d00", >> 0x0, 0x0) >

Re: [PATCH net-next 0/4] net: hns3: fix some bugs for HNS3 driver

2017-10-26 Thread David Miller
From: Lipeng Date: Tue, 24 Oct 2017 21:02:08 +0800 > This patchset fixes some bugs reported by Hisilicon test team. Series applied to net-next, thanks.

[PATCH 00/18] Pile o' entry/exit/sp0 changes

2017-10-26 Thread Andy Lutomirski
Hi all- Here's the first "real" version of this series. It's based on Linus' tree from a couple days ago. Changes from the old RFC version: - Rebase - Add Juergen's patch - Add some assertions - Cleanups Andy Lutomirski (17): x86/asm/64: Remove the restore_c_regs_and_iret label x86/asm/

[PATCH 16/18] x86/boot/32: Fix cpu_current_top_of_stack initialization at boot

2017-10-26 Thread Andy Lutomirski
cpu_current_top_of_stack's initialization forgot about TOP_OF_KERNEL_STACK_PADDING. This bug didn't matter because the idle threads never enter user mode. Signed-off-by: Andy Lutomirski --- arch/x86/kernel/smpboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/

[PATCH 02/18] x86/asm/64: Split the iret-to-user and iret-to-kernel paths

2017-10-26 Thread Andy Lutomirski
These code paths will diverge soon. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S| 32 +++- arch/x86/entry/entry_64_compat.S | 2 +- arch/x86/kernel/head_64.S| 2 +- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/arch

[PATCH 14/18] x86/boot/64: Stop initializing TSS.sp0 at boot

2017-10-26 Thread Andy Lutomirski
In my quest to get rid of thread_struct::sp0, I want to clean up or remove all of its readers. Two of them are in cpu_init() (32-bit and 64-bit), and they aren't needed. This is because we never enter userspace at all on the threads that CPUs are initialized in. Poison the initial TSS.sp0 and st

[PATCH 05/18] x86/asm/64: Shrink paranoid_exit_restore and make labels local

2017-10-26 Thread Andy Lutomirski
paranoid_exit_restore was a copy of restore_regs_and_return_to_kernel. Merge them and make the paranoid_exit internal labels local. Keeping .Lparanoid_exit makes the code a bit shorter because it allows a 2-byte jnz instead of a 5-byte jnz. Saves 96 bytes of text. (This is still a bit suboptima

[PATCH 07/18] x86/asm/64: Merge the fast and slow SYSRET paths

2017-10-26 Thread Andy Lutomirski
They did almost the same thing. Remove a bunch of pointless instructions (mostly hidden in macros) and reduce cognitive load by merging them. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/entry/ent

[PATCH 10/18] x86/asm/32: Pull MSR_IA32_SYSENTER_CS update code out of native_load_sp0()

2017-10-26 Thread Andy Lutomirski
This causees the MSR_IA32_SYSENTER_CS write to move out of the paravirt hook. This shouldn't affect Xen PV: Xen already ignores MSR_IA32_SYSENTER_ESP writes. In any event, Xen doesn't support vm86() in a useful way. Note to any potential backporters: This patch won't break lguest, as lguest didn

[PATCH 03/18] x86/asm/64: Move SWAPGS into the common iret-to-usermode path

2017-10-26 Thread Andy Lutomirski
All of the code paths that ended up doing IRET to usermode did SWAPGS immediately beforehand. Move the SWAPGS into the common code. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S| 26 ++ arch/x86/entry/entry_64_compat.S | 3 +-- 2 files changed, 11

[PATCH 08/18] xen: add xen nmi trap entry

2017-10-26 Thread Andy Lutomirski
From: Juergen Gross Instead of trying to execute any NMI via the bare metal's NMI trap handler use a Xen specific one for pv domains, like we do for e.g. debug traps. As in a pv domain the NMI is handled via the normal kernel stack this is the correct thing to do. This will enable us to get rid

[PATCH 09/18] x86/asm/64: De-Xen-ify our NMI code

2017-10-26 Thread Andy Lutomirski
Xen PV is fundamentally incompatible with our fancy NMI code: it doesn't use IST at all, and Xen entries clobber two stack slots below the hardware frame. Drop Xen PV support from our NMI code entirely. Cc: Juergen Gross Cc: Boris Ostrovsky Signed-off-by: Andy Lutomirski --- arch/x86/entry/en

[PATCH 18/18] x86/traps: Use a new on_thread_stack() helper to clean up an assertion

2017-10-26 Thread Andy Lutomirski
Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/processor.h | 6 ++ arch/x86/kernel/traps.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 562c575d8bc3..26fc33231cbd 100644 ---

[PATCH 13/18] x86/xen/64: Clean up SP code in cpu_initialize_context()

2017-10-26 Thread Andy Lutomirski
I'm removing thread_struct::sp0, and Xen's usage of it is slightly dubious and unnecessary. Use appropriate helpers instead. While we're at at, reorder the code slightly to make it more obvious what's going on. Cc: Juergen Gross Cc: Boris Ostrovsky Signed-off-by: Andy Lutomirski --- arch/x86

[PATCH 17/18] x86/asm/64: Remove thread_struct::sp0

2017-10-26 Thread Andy Lutomirski
On x86_64, we can easily calculate sp0 when needed instead of storing it in thread_struct. On x86_32, a similar cleanup would be possible, but it would require cleaning up the vm86 code first, and that can wait for a later cleanup series. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/

[PATCH 15/18] x86/asm/64: Remove all remaining direct thread_struct::sp0 reads

2017-10-26 Thread Andy Lutomirski
The only remaining readers in context switch code or vm86(), and they all just want to update TSS.sp0 to match the current task. Replace them all with a new helper update_sp0(). Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/switch_to.h | 6 ++ arch/x86/kernel/process_32.c | 2 +

[PATCH 12/18] x86/asm: Add task_top_of_stack() to find the top of a task's stack

2017-10-26 Thread Andy Lutomirski
This will let us get rid of a few places that hardcode accesses to thread.sp0. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 064b84722166..ad59cec

[PATCH 11/18] x86/asm/64: Pass sp0 directly to load_sp0()

2017-10-26 Thread Andy Lutomirski
load_sp0() had an odd signature: void load_sp0(struct tss_struct *tss, struct thread_struct *thread); Simplify it to: void load_sp0(unsigned long sp0); Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/paravirt.h | 5 ++--- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/

[PATCH 06/18] x86/asm/64: Use pop instead of movq in syscall_return_via_sysret

2017-10-26 Thread Andy Lutomirski
Saves 64 bytes. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index d6404a613df4..9dafafa3e0ec 100644 --- a/arch/x86/entry/entry_64.S +++ b/arc

Re: [PATCH v5 5/6] input: Add MediaTek PMIC keys support

2017-10-26 Thread Andi Shyti
Hi, On Wed, Sep 27, 2017 at 06:44:07PM +0800, Chen Zhong wrote: > This patch add support to handle MediaTek PMIC MT6397/MT6323 key > interrupts including pwrkey and homekey, also add setting for > long press key shutdown behavior. > > Signed-off-by: Chen Zhong if you want you can add: Reviewed

[PATCH 04/18] x86/asm/64: Simplify reg restore code in the standard IRET paths

2017-10-26 Thread Andy Lutomirski
The old code restored all the registers with movq instead of pop. In theory, this was done because some CPUs have higher movq throughput, but any gain there would be tiny and is almost certainly outweighed by the higher text size. This saves 96 bytes of text. Signed-off-by: Andy Lutomirski ---

Re: [PATCH] iommu: Limit the IOVA page range to the specified addresses

2017-10-26 Thread Alex Williamson
On Tue, 17 Oct 2017 16:22:01 -0500 Gary R Hook wrote: > From: amd > > The extent of pages specified when applying a reserved region should > include up to the last page of the range, but not the page following > the range. > > Signed-off-by: Gary R Hook > --- > drivers/iommu/amd_iommu.c |

[PATCH 01/18] x86/asm/64: Remove the restore_c_regs_and_iret label

2017-10-26 Thread Andy Lutomirski
The only user was the 64-bit opportunistic SYSRET failure path, and that path didn't really need it. This change makes the opportunistic SYSRET code a bit more straightforward and gets rid of the label. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S | 5 ++--- 1 file changed, 2 in

[PATCH] f2fs: show current cp state

2017-10-26 Thread Jaegeuk Kim
This patch shows whether checkpoint met any error case. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index d441660c3ba6..f7eec506ceea 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@

Re: BUG: unable to handle kernel paging request in vsock_diag_dump

2017-10-26 Thread Dmitry Vyukov
On Thu, Oct 26, 2017 at 10:18 AM, Stefan Hajnoczi wrote: > On Tue, Oct 24, 2017 at 08:14:01AM -0700, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f >> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >> compiler

Re: [PATCH 02/14] soundwire: Add SoundWire bus type

2017-10-26 Thread Vinod Koul
On Fri, Oct 20, 2017 at 09:31:34PM +0530, Vinod Koul wrote: > On Fri, Oct 20, 2017 at 12:45:28PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 19, 2017 at 08:33:18AM +0530, Vinod Koul wrote: > > > +struct bus_type sdw_bus_type = { > > > + .name = "soundwire", > > > + .match = sdw_bus_match, > >

Re: [PATCH] virtio/ringtest: fix up need_event math

2017-10-26 Thread Cornelia Huck
On Thu, 26 Oct 2017 04:48:01 +0300 "Michael S. Tsirkin" wrote: > last kicked event index must be updated unconditionally: > even if we don't need to kick, we do not want to re-check > the same entry for events. > > Signed-off-by: Michael S. Tsirkin > --- > tools/virtio/ringtest/ring.c | 24 +++

Re: [PATCH] rds: ib: Fix uninitialized variable

2017-10-26 Thread David Miller
From: Håkon Bugge Date: Tue, 24 Oct 2017 18:17:18 +0200 > send_flags needs to be initialized before calling > rds_ib_set_wr_signal_state(). > > Signed-off-by: Håkon Bugge > Acked-by: Santosh Shilimkar Applied.

Re: [PATCH] rds: Fix inaccurate accounting of unsignaled wrs

2017-10-26 Thread David Miller
From: Håkon Bugge Date: Tue, 24 Oct 2017 16:16:28 +0200 > The number of unsignaled work-requests posted to the IB send queue is > tracked by a counter in the rds_ib_connection struct. When it reaches > zero, or the caller explicitly asks for it, the send-signaled bit is > set in send_flags and th

[PATCH] trace: fix undefined tracing functions build error

2017-10-26 Thread Julien Thierry
When selecting CONFIG_PREEMPTIRQ_EVENTS without CONFIG_DEBUG_PREEMPT, trace_preempt_(en|dis)able_* names do not get defined. This causes a build error in function trace_preempt_off (kernel/trace/trace_irqsoff.c) when CONFIG_PREEMPT_TRACER is enabled. Similarly, when selecting CONFIG_PREEMPTIRQ_EVE

Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!

2017-10-26 Thread Sander Eikelenboom
On 26/10/17 00:02, Craig Bergstrom wrote: > Thanks for the notification, my apologies for the breakage. I'll take a > close look and see if I can figure out what went wrong. > > Sander, any chance you can send /proc/iomem and the inputs to the mmap call > that fail on your affected system? Hi Cr

Re: [PATCH] net: ethernet: fsl: don't en/disable refclk on open/close

2017-10-26 Thread Richard Leitner
On 10/23/2017 01:01 AM, Richard Leitner wrote: On 10/23/2017 12:48 AM, Florian Fainelli wrote On 10/22/2017 03:30 PM, Richard Leitner wrote: On 10/22/2017 08:31 PM, Florian Fainelli wrote: On 10/22/2017 06:11 AM, Richard Leitner wrote: ... But back to this patch: Is it OK the way it fixes

Re: [PATCH] PM / QoS: Fix device resume latency PM QoS

2017-10-26 Thread Rafael J. Wysocki
On Wed, Oct 25, 2017 at 10:06 PM, Andy Shevchenko wrote: > On Tue, Oct 24, 2017 at 11:49 AM, Rafael J. Wysocki > wrote: >> On Tuesday, October 24, 2017 7:54:09 AM CEST Ramesh Thomas wrote: >>> On 2017-10-20 at 13:27:34 +0200, Rafael J. Wysocki wrote: > >>> > static ssize_t pm_qos_resume_latency

[PATCH] iio/light/max44000: Use common error handling code in max44000_probe()

2017-10-26 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 26 Oct 2017 10:30:57 +0200 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "dev_err" by goto statements. * Adjust condition checks. This issue was detected

Re: [PATCH 09/18] x86/asm/64: De-Xen-ify our NMI code

2017-10-26 Thread Juergen Gross
On 26/10/17 10:26, Andy Lutomirski wrote: > Xen PV is fundamentally incompatible with our fancy NMI code: it > doesn't use IST at all, and Xen entries clobber two stack slots > below the hardware frame. > > Drop Xen PV support from our NMI code entirely. > > Cc: Juergen Gross > Cc: Boris Ostrovs

Re: [PATCH net-next] net: dsa: lan9303: Do not disable switch fabric port 0 at .probe

2017-10-26 Thread David Miller
From: Egil Hjelmeland Date: Tue, 24 Oct 2017 17:14:10 +0200 > Make the LAN9303 work when lan9303_probe() is called twice. > > For some unknown reason the LAN9303 switch fail to forward data when switch > fabric port 0 TX is disabled during probe. (Write of LAN9303_MAC_TX_CFG_0 > in lan9303_disab

Re: [PATCH] f2fs: fix to keep backward compatibility of flexible inline xattr feature

2017-10-26 Thread Jaegeuk Kim
Hi Chao, It seems this is a critical problem, so let me integrate this patch with your initial patch "f2fs: support flexible inline xattr size". Let me know, if you have any other concern. Thanks, On 10/25, Chao Yu wrote: > Previously, in inode layout, we will always reserve 200 bytes for inline

Re: [PATCH v7 1/3] PCI: Add support for wake irq

2017-10-26 Thread Rafael J. Wysocki
On Tue, Oct 24, 2017 at 10:10 PM, Bjorn Helgaas wrote: > Include "PCIe WAKE#" signal in the subject, since this is specifically > about that wire. > > On Mon, Oct 23, 2017 at 04:02:53PM -0700, Brian Norris wrote: >> + PM folks >> >> Hi Jeffy, >> >> It's probably good if you send the whole thing to

[PATCH 0/3] RDMA/hns: Add rereg mr & RoCEv2 support for hip08

2017-10-26 Thread Wei Hu (Xavier)
This patch-set introduce rereg mr support, RoCEv2 support for hip08. Wei Hu (Xavier) (3): RDMA/hns: Add rereg mr support for hip08 RDMA/hns: Generate gid type of RoCEv2 RDMA/hns: Configure sgid type for hip08 RoCE drivers/infiniband/hw/hns/hns_roce_cmd.h| 3 + drivers/infiniband/hw/h

[PATCH 2/3] RDMA/hns: Generate gid type of RoCEv2

2017-10-26 Thread Wei Hu (Xavier)
HNS_ROCE_CAP_FALG_ROCE_V1_V2 is added for selecting capability of RoCE in hns driver. When HNS_ROCE_CAP_FALG_ROCE_V1_V2 is set, driver will inform ib core that the related hns device can support RoCEv2, and ib core can generate the gid of the related type. Signed-off-by: Lijun Ou Signed-off-by: W

Re: [PATCH 13/18] x86/xen/64: Clean up SP code in cpu_initialize_context()

2017-10-26 Thread Juergen Gross
On 26/10/17 10:26, Andy Lutomirski wrote: > I'm removing thread_struct::sp0, and Xen's usage of it is slightly > dubious and unnecessary. Use appropriate helpers instead. > > While we're at at, reorder the code slightly to make it more obvious > what's going on. > > Cc: Juergen Gross > Cc: Bori

[PATCH 1/3] RDMA/hns: Add rereg mr support for hip08

2017-10-26 Thread Wei Hu (Xavier)
This patch adds rereg mr support for hip08. Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu --- drivers/infiniband/hw/hns/hns_roce_cmd.h| 3 + drivers/infiniband/hw/hns/hns_roce_device.h | 12 +++ drivers/infiniband/hw/hns/hns_r

Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps

2017-10-26 Thread Andrew Lunn
> > I just think there might be potential for regressions here. But i've > > not yet looked at the details to really know if there actually is. > > I realize there is still some trepidation about these patches, but it > seems like the only real way to find out if it causes regressions is > to appl

[PATCH] microblaze: add missing include to mmu_context_mm.h

2017-10-26 Thread Oded Gabbay
mmu_context_mm.h is using struct task_struct, which is defined in linux/sched.h. Source files that include mm_context_mm.h (directly or indirectly) and doesn't include linux/sched.h will generate an error. An example of that is drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c This patch adds an include

Re: [PATCH v2] PM / QoS: Fix device resume latency PM QoS

2017-10-26 Thread Rafael J. Wysocki
On Thu, Oct 26, 2017 at 4:00 AM, Ramesh Thomas wrote: > On 2017-10-25 at 00:16:25 -0700, Ramesh Thomas wrote: >> On 2017-10-24 at 13:35:05 +0200, Rafael J. Wysocki wrote: >> > From: Rafael J. Wysocki >> > >> >> [cut] >> >> > @@ -63,10 +60,14 @@ static bool default_suspend_ok(struct de >> > >> >

[PATCH 3/3] RDMA/hns: Configure sgid type for hip08 RoCE

2017-10-26 Thread Wei Hu (Xavier)
The hardware vendors need to generate RoCEv1 or RoCEv2 packet according to the sgid type configured. Besides, update the gid table size for hip08 RoCE device. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu --- drivers/infiniband/hw/h

Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another

2017-10-26 Thread Pavel Machek
Hi! > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on > > both. 4.13-rc2 with display and clock patches boots on phone "S", but > > does not on phone "P"; nothing nothing is received on serial port. > > > > There is some difference in the bootloaders: S's bootloader provides

arm64: ftrace: function_graph tracer not working without dynamic instrumentation

2017-10-26 Thread Julien Thierry
Hi, On arm64, I noticed that when CONFIG_DYNAMIC_FTRACE is not enabled, using the function_graph tracer in ftrace alway gives empty traces. The issues seems to be that the ftrace_trace_function is set to a function different than ftrace_stub when running mcount. If I allow mcount to continue

[PATCH net] net: stmmac: dwc-qos-eth: Fix typo in DT bindings parsing

2017-10-26 Thread Jose Abreu
According to DT bindings documentation we are expecting a property called "snps,read-requests" but we are parsing instead a property called "read,read-requests". This is clearly a typo. Fix it. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre T

Re: WARNING in refcount_sub_and_test

2017-10-26 Thread ChunYu Wang
Hi all, I am failed to reproduce it on target kernel with the reproducer file or replaying the target syzkaller description log file, do I made something wrong or there exists more subjects then the line in repro.txt: #{Threaded:true Collide:true Repeat:false Procs:1 Sandbox:namespace Fault:false

Re: alpha boot hang - 4.14-rc* regression

2017-10-26 Thread Lorenzo Pieralisi
On Wed, Oct 25, 2017 at 09:01:07PM +0300, Meelis Roos wrote: > > It is probably because I patched the wrong map_irq() function, > > I am trying to detect which one you are _actually_ using, if > > the patch below fails I will patch them all (which is what I > > have to do anyway). > > > > Please g

[PATCH] netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed

2017-10-26 Thread Ye Yin
When run ipvs in two different network namespace at the same host, and one ipvs transport network traffic to the other network namespace ipvs. 'ipvs_property' flag will make the second ipvs take no effect. So we should clear 'ipvs_property' when SKB network namespace changed. Signed-off-by: Ye Yin

Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!

2017-10-26 Thread Sander Eikelenboom
On 26/10/17 10:12, Sander Eikelenboom wrote: > On 26/10/17 10:05, Sander Eikelenboom wrote: >> On 26/10/17 00:02, Craig Bergstrom wrote: >>> Thanks for the notification, my apologies for the breakage. I'll take a >>> close look and see if I can figure out what went wrong. >>> >>> Sander, any chanc

  1   2   3   4   5   6   7   8   >