[PATCH v2] arm64: armv8_deprecated: Checking return value for memory allocation

2019-10-07 Thread Yunfeng Ye
There are no return value checking when using kzalloc() and kcalloc() for memory allocation. so add it. Signed-off-by: Yunfeng Ye --- v1 -> v2: - return error code when memory allocation failure arch/arm64/kernel/armv8_deprecated.c | 57 +++- 1 file changed, 43

Re: [PATCH 4.4 00/36] 4.4.196-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:18, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.4.196 release. > There are 36 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: [PATCH 4.9 00/47] 4.9.196-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:20, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.9.196 release. > There are 47 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: [PATCH 4.19 000/106] 4.19.78-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:20, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.19.78 release. > There are 106 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses s

Re: [PATCH 5.2 000/137] 5.2.20-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:19, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.2.20 release. > There are 137 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sh

Re: System hangs if NVMe/SSD is removed during suspend

2019-10-07 Thread Jan Kara
On Fri 04-10-19 07:32:40, Jens Axboe wrote: > On 10/4/19 5:01 AM, Mika Westerberg wrote: > > On Fri, Oct 04, 2019 at 11:59:26AM +0200, Rafael J. Wysocki wrote: > >> On Friday, October 4, 2019 10:03:40 AM CEST Mika Westerberg wrote: > >>> On Thu, Oct 03, 2019 at 09:50:33AM -0700, Tejun Heo wrote: >

Re: [PATCH -next 00/34] rtc: use devm_platform_ioremap_resource() to simplify code

2019-10-07 Thread Alexandre Belloni
On 06/10/2019 18:29:19+0800, YueHaibing wrote: > devm_platform_ioremap_resource() internally have platform_get_resource() > and devm_ioremap_resource() in it. So instead of calling them separately > use devm_platform_ioremap_resource() directly. > > YueHaibing (34): > rtc: asm9260: use devm_plat

Re: [PATCH 5.3 000/166] 5.3.5-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:19, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.3.5 release. > There are 166 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses sho

Re: [PATCH 4.14 00/68] 4.14.148-stable review

2019-10-07 Thread Jon Hunter
On 06/10/2019 18:20, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.14.148 release. > There are 68 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses s

[PATCH 2/2] iio: light: Add support for ADUX1020 sensor

2019-10-07 Thread Manivannan Sadhasivam
Add initial support for Analog Devices ADUX1020 Photometric sensor. Only proximity mode has been enabled for now. Signed-off-by: Manivannan Sadhasivam --- drivers/iio/light/Kconfig| 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/adux1020.c | 783 ++

[PATCH 1/2] dt-bindings: iio: light: Add binding for ADUX1020

2019-10-07 Thread Manivannan Sadhasivam
Add devicetree binding for Analog Devices ADUX1020 Photometric sensor. Signed-off-by: Manivannan Sadhasivam --- .../bindings/iio/light/adux1020.txt | 22 +++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/adux1020.txt d

[PATCH 0/2] Add support for ADUX1020 sensor

2019-10-07 Thread Manivannan Sadhasivam
Hello, This patchset adds initial IIO driver support for ADUX1020 Photometric sensor from Analog Devices. This sensor is usable for multiple optical measurement applications, including gesture control and proximity sensing. This initial driver includes support for only proximity mode with event b

[PATCH net 1/6] rxrpc: Fix call ref leak

2019-10-07 Thread David Howells
When sendmsg() finds a call to continue on with, if the call is in an inappropriate state, it doesn't release the ref it just got on that call before returning an error. This causes the following symptom to show up with kasan: BUG: KASAN: use-after-free in rxrpc_send_keepalive+0x8a2/0x940

Re: [PATCH] media: dt-bindings: media: Fixup Allwinner A10 CSI binding

2019-10-07 Thread Amit Kucheria
On Mon, Oct 7, 2019 at 3:35 PM Maxime Ripard wrote: > > On Sat, Oct 05, 2019 at 04:15:57PM +0530, Amit Kucheria wrote: > > On Thu, Oct 3, 2019 at 5:22 PM Maxime Ripard wrote: > > > > > > Hi, > > > > > > On Thu, Oct 03, 2019 at 04:52:24PM +0530, Amit Kucheria wrote: > > > > This new binding fails

[PATCH net 0/6] rxrpc: Syzbot-inspired fixes

2019-10-07 Thread David Howells
are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes-20191007 and can also be found on the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (6): rxrpc: Fi

[PATCH net 2/6] rxrpc: Fix trace-after-put looking at the put peer record

2019-10-07 Thread David Howells
rxrpc_put_peer() calls trace_rxrpc_peer() after it has done the decrement of the refcount - which looks at the debug_id in the peer record. But unless the refcount was reduced to zero, we no longer have the right to look in the record and, indeed, it may be deleted by some other thread. Fix this

[PATCH net 6/6] rxrpc: Fix call crypto state cleanup

2019-10-07 Thread David Howells
Fix the cleanup of the crypto state on a call after the call has been disconnected. As the call has been disconnected, its connection ref has been discarded and so we can't go through that to get to the security ops table. Fix this by caching the security ops pointer in the rxrpc_call struct and

[PATCH net 5/6] rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record

2019-10-07 Thread David Howells
The rxrpc_peer record needs to hold a reference on the rxrpc_local record it points as the peer is used as a base to access information in the rxrpc_local record. This can cause problems in __rxrpc_put_peer(), where we need the network namespace pointer, and in rxrpc_send_keepalive(), where we nee

Re: Lease semantic proposal

2019-10-07 Thread Jan Kara
On Mon 30-09-19 18:42:33, Dave Chinner wrote: > On Wed, Sep 25, 2019 at 04:46:03PM -0700, Ira Weiny wrote: > > On Tue, Sep 24, 2019 at 08:26:20AM +1000, Dave Chinner wrote: > > > Hence, AFIACT, the above definition of a F_RDLCK|F_LAYOUT lease > > > doesn't appear to be compatible with the semantics

Re: [PATCH] quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list

2019-10-07 Thread Jan Kara
On Thu 26-09-19 16:34:08, Chengguang Xu wrote: > It is meaningless to increase DQST_LOOKUPS number while iterating > over dirty/inuse list, so just avoid it. > > Signed-off-by: Chengguang Xu Yeah, makes sense. I've queued up your patch. Thanks!

Re: [PATCH v2] quota: code cleanup for hash bits calculation

2019-10-07 Thread Jan Kara
On Mon 23-09-19 21:52:23, Chengguang Xu wrote: > Code cleanup for hash bits calculation by > calling ilog2(). > > Signed-off-by: Chengguang Xu Thanks! I've queued your patch. Honza > --- > v1->v2: > - Calculate hash bits by direct

[PATCH net 4/6] rxrpc: Fix trace-after-put looking at the put call record

2019-10-07 Thread David Howells
rxrpc_put_call() calls trace_rxrpc_call() after it has done the decrement of the refcount - which looks at the debug_id in the call record. But unless the refcount was reduced to zero, we no longer have the right to look in the record and, indeed, it may be deleted by some other thread. Fix this

[PATCH net 3/6] rxrpc: Fix trace-after-put looking at the put connection record

2019-10-07 Thread David Howells
rxrpc_put_*conn() calls trace_rxrpc_conn() after they have done the decrement of the refcount - which looks at the debug_id in the connection record. But unless the refcount was reduced to zero, we no longer have the right to look in the record and, indeed, it may be deleted by some other thread.

Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery

2019-10-07 Thread Claudiu.Beznea
On 04.10.2019 23:39, Uwe Kleine-König wrote: > External E-Mail > > > On Fri, Oct 04, 2019 at 09:35:23AM +, claudiu.bez...@microchip.com wrote: >> Hi Kamel, >> >> On 02.10.2019 17:46, Kamel Bouhara wrote: >>> +static int at91_init_twi_recovery_info(struct platform_device *pdev, >>> +

Re: [PATCH 01/10] iio: imu: adis: rename txrx_lock -> state_lock

2019-10-07 Thread Ardelean, Alexandru
On Sun, 2019-10-06 at 10:06 +0100, Jonathan Cameron wrote: > [External] > > On Sun, 6 Oct 2019 09:53:33 +0100 > Jonathan Cameron wrote: > > > On Thu, 26 Sep 2019 14:18:03 +0300 > > Alexandru Ardelean wrote: > > > > > The lock can be extended a bit to protect other elements that are not > > > p

[PATCH] media: gspca: make array st6422_bridge_init static, makes object smaller

2019-10-07 Thread Colin King
From: Colin Ian King Don't populate the array st6422_bridge_init on the stack but instead make it static. Makes the object code smaller by 231 bytes. Before: textdata bss dec hex filename 3419 752 644235108b gspca/stv06xx/stv06xx_st6422.o After: text

Re: [PATCH 1/2] dt-bindings: iio: light: Add binding for ADUX1020

2019-10-07 Thread Ardelean, Alexandru
On Mon, 2019-10-07 at 15:40 +0530, Manivannan Sadhasivam wrote: > [External] > > Add devicetree binding for Analog Devices ADUX1020 Photometric > sensor. > Hey, Thanks for the patches. This dt-binding docs is in text format. dt-binding docs now need to be in YAML format. Also, patches for dt-

[PATCH 1/3] dt-bindings: media: Fix id path for sun4i-a10-csi

2019-10-07 Thread Alexandre Torgue
This commit fixes id path of allwinner,sun4i-a10-csi.yaml location. Fixes: c5e8f4ccd775 ("media: dt-bindings: media: Add Allwinner A10 CSI binding") Signed-off-by: Alexandre Torgue diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bind

[PATCH 2/3] dt-bindings: net: adi: Fix yaml verification issue

2019-10-07 Thread Alexandre Torgue
This commit fixes an issue seen during yaml check ("make dt_binding_check"). Each enum were not declared as uint32. "Documentation/devicetree/bindings/net/adi,adin.yaml: properties:adi,rx-internal-delay-ps: ..., 'enum': [1600, 1800, 2000, 2200, 2400], 'default': 2000} is not valid under any of the

[PATCH 0/3] Fixes for dt-bindings verification

2019-10-07 Thread Alexandre Torgue
Using "make dt_binding_check" on top v5.4-rc1 some errors are reported in several schemas. Those 3 patches allow to execute "make dt_binding_check" without issues. Most probably those patches have alread been sent. regards Alexandre Alexandre Torgue (3): dt-bindings: media: Fix id path for su

[PATCH 3/3] dt-bindings: regulator: Fix yaml verification for fixed-regulator schema

2019-10-07 Thread Alexandre Torgue
This commit fixes an issue seen during yaml check ("make dt_binding_check"). Compatible didn't seem to be seen as a string. Reported issue: "properties:compatible:enum:0: {'const': 'regulator-fixed'} is not of type 'string'" And "properties:compatible:enum:1: {'const': 'regulator-fixed-clock'} is

Re: [PATCH] staging: vt6656: align arguments with open parenthesis

2019-10-07 Thread Greg KH
On Sun, Oct 06, 2019 at 04:10:20PM -0300, Gabriela Bittencourt wrote: > Cleans up CHECKs of "Alignment should match open parenthesis" > > Signed-off-by: Gabriela Bittencourt > --- > drivers/staging/vt6656/rxtx.c | 63 +++ > 1 file changed, 41 insertions(+), 22 del

Re: [PATCH] staging: rtl8712: align arguments with open parenthesis

2019-10-07 Thread Greg KH
On Sun, Oct 06, 2019 at 07:20:15PM -0300, Gabriela Bittencourt wrote: > Cleans up checks of: "Alignment should match open parenthesis" > > Signed-off-by: Gabriela Bittencourt > --- > drivers/staging/rtl8712/osdep_service.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) You sent 2 diffe

Re: [PATCH] staging: rtl8712: align block comments

2019-10-07 Thread Greg KH
On Sun, Oct 06, 2019 at 05:34:20PM -0300, Gabriela Bittencourt wrote: > Cleans up warnings of "Block comments should align the * on each line" > > Signed-off-by: Gabriela Bittencourt > --- > drivers/staging/rtl8712/recv_linux.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > dif

Re: [PATCH] taskstats: fix data-race

2019-10-07 Thread Andrea Parri
Hi Christian, On Mon, Oct 07, 2019 at 01:52:16AM +0200, Christian Brauner wrote: > When assiging and testing taskstats in taskstats_exit() there's a race > when writing and reading sig->stats when a thread-group with more than > one thread exits: > > cpu0: > thread catches fatal signal and whole

RE: [RFT] rtc: da9063: Handle invalid IRQ from platform_get_irq_byname()

2019-10-07 Thread Adam Thomson
On 04 October 2019 16:05, Krzysztof Kozlowski wrote: > platform_get_irq_byname() might return -errno which later would be > cast to an unsigned int and used in request_irq(). > > Signed-off-by: Krzysztof Kozlowski This doesn't break the existing RTC functionality when running up on my test boar

[PATCH] x86/stackframe/32: repair 32-bit Xen PV

2019-10-07 Thread Jan Beulich
Once again RPL checks have been introduced which don't account for a 32-bit kernel living in ring 1 when running in a PV Xen domain. The case in FIXUP_FRAME has been preventing boot; adjust BUG_IF_WRONG_CR3 as well just in case. Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs")

Re: [PATCH v3 2/3] mm, page_owner: decouple freeing stack trace from debug_pagealloc

2019-10-07 Thread Qian Cai
> On Oct 7, 2019, at 5:18 AM, Vlastimil Babka wrote: > > The commit 8974558f49a6 ("mm, page_owner, debug_pagealloc: save and dump > freeing stack trace") enhanced page_owner to also store freeing stack trace, > when debug_pagealloc is also enabled. KASAN would also like to do this [1] to > imp

RE: [PATCH 5/7] regulator: da9211: switch to using devm_fwnode_gpiod_get

2019-10-07 Thread Adam Thomson
On 05 October 2019 00:10, Dmitry Torokhov wrote: > devm_gpiod_get_from_of_node() is being retired in favor of > devm_fwnode_gpiod_get_index(), that behaves similar to > devm_gpiod_get_index(), but can work with arbitrary firmware node. It > will also be able to support secondary software nodes. >

Re: [PATCH v2 0/6] media: cedrus: h264: Support multi-slice frames

2019-10-07 Thread Hans Verkuil
Hi Jernej, On 9/29/19 10:00 PM, Jernej Skrabec wrote: > This series adds support for decoding multi-slice H264 frames along with > support for V4L2_DEC_CMD_FLUSH and V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF. > > Code was tested by modified ffmpeg, which can be found here: > https://github.com/jernejsk/

Re: [PATCH] ARM: dts: imx6: Extend support for Phytec phycore i.MX6ULL SoM

2019-10-07 Thread Parthiban Nallathambi
On 10/6/19 10:23 AM, Shawn Guo wrote: On Thu, Sep 12, 2019 at 10:29:28PM +0200, Parthiban Nallathambi wrote: Extend Phycore i.MX6UL SoM for i.MX6ULL with on board eMMC. Phycore i.MX6ULL is deployed with same carrier board Segin as the pins are compatible with UL version. Signed-off-by: Parth

[PATCH] stop_machine: avoid potential race behaviour

2019-10-07 Thread Mark Rutland
Both multi_cpu_stop() and set_state() access multi_stop_data::state racily using plain accesses. These are subject to compiler transformations which could break the intended behaviour of the code, and this situation is detected by KCSAN on both arm64 and x86 (splats below). Let's improve matters b

Re: [PATCH] perf tools: Fix mode setting in copyfile_mode_ns()

2019-10-07 Thread Jiri Olsa
On Mon, Oct 07, 2019 at 10:02:21AM +0300, Adrian Hunter wrote: > slow_copyfile() opens the file by name, so "write" permissions must not > be removed in copyfile_mode_ns() before calling slow_copyfile(). > > Example: > > Before: > $ sudo chmod +r /proc/kcore > $ sudo setcap "cap_sys_admin,ca

Re: [PATCH] media: dt-bindings: media: Fixup Allwinner A10 CSI binding

2019-10-07 Thread Maxime Ripard
On Mon, Oct 07, 2019 at 03:45:29PM +0530, Amit Kucheria wrote: > On Mon, Oct 7, 2019 at 3:35 PM Maxime Ripard wrote: > > > > On Sat, Oct 05, 2019 at 04:15:57PM +0530, Amit Kucheria wrote: > > > On Thu, Oct 3, 2019 at 5:22 PM Maxime Ripard wrote: > > > > > > > > Hi, > > > > > > > > On Thu, Oct 03,

Re: [PATCH] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
On Mon, Oct 07, 2019 at 12:40:39PM +0200, Andrea Parri wrote: > Hi Christian, > > On Mon, Oct 07, 2019 at 01:52:16AM +0200, Christian Brauner wrote: > > When assiging and testing taskstats in taskstats_exit() there's a race > > when writing and reading sig->stats when a thread-group with more than

Re: [PATCH] kasan: fix the missing underflow in memmove and memcpy with CONFIG_KASAN_GENERIC=y

2019-10-07 Thread Dmitry Vyukov
On Mon, Oct 7, 2019 at 11:50 AM Walter Wu wrote: > > On Mon, 2019-10-07 at 17:28 +0800, Walter Wu wrote: > > On Mon, 2019-10-07 at 11:10 +0200, Dmitry Vyukov wrote: > > > On Mon, Oct 7, 2019 at 11:03 AM Walter Wu > > > wrote: > > > > > > > > On Mon, 2019-10-07 at 10:54 +0200, Dmitry Vyukov wrote

Re: [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver

2019-10-07 Thread Greg Kroah-Hartman
On Sat, Oct 05, 2019 at 11:04:46PM +0200, Hans de Goede wrote: > Hi All, > > Here is a fix for the false-positive dev_err in platform_get_irq_byname() > discussed recently and reported here: > https://bugzilla.kernel.org/show_bug.cgi?id=205037 > > Since patch 2 depends on patch 1, I think it migh

Re: [PATCH RESEND v4] fs/epoll: Remove unnecessary wakeups of nested epoll that in ET mode

2019-10-07 Thread Roman Penyaev
On 2019-10-03 18:13, Jason Baron wrote: On 9/30/19 7:55 AM, Roman Penyaev wrote: On 2019-09-28 04:29, Andrew Morton wrote: On Wed, 25 Sep 2019 09:56:03 +0800 hev wrote: From: Heiher Take the case where we have:     t0 | (ew)     e0 | (et)     e1 | (l

[PATCH] net: hns: make arrays static, makes object smaller

2019-10-07 Thread Colin King
From: Colin Ian King Don't populate the arrays port_map and sl_map on the stack but instead make them static. Makes the object code smaller by 64 bytes. Before: textdata bss dec hex filename 495756872 64 56511dcbf hisilicon/hns/hns_dsaf_main.o After: text

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-07 Thread Sebastian Andrzej Siewior
On 2019-10-07 10:30:37 [+0200], Daniel Wagner wrote: > Hi, Hi Daniel, > On Fri, Oct 04, 2019 at 06:30:42PM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-10-04 18:20:41 [+0200], Uladzislau Rezki wrote: > > > If we have migrate_disable/enable, then, i think preempt_enable/disable > > > should

Re: [PATCH 1/3] dt-bindings: media: Fix id path for sun4i-a10-csi

2019-10-07 Thread Maxime Ripard
Hi Alexandre, On Mon, Oct 07, 2019 at 12:25:50PM +0200, Alexandre Torgue wrote: > This commit fixes id path of allwinner,sun4i-a10-csi.yaml location. > > Fixes: c5e8f4ccd775 ("media: dt-bindings: media: Add Allwinner A10 CSI > binding") > Signed-off-by: Alexandre Torgue I just merged a patch ad

[PATCH v2] taskstats: fix data-race

2019-10-07 Thread Christian Brauner
When assiging and testing taskstats in taskstats_exit() there's a race when writing and reading sig->stats when a thread-group with more than one thread exits: cpu0: thread catches fatal signal and whole thread-group gets taken down do_exit() do_group_exit() taskstats_exit() taskstats_tgid_all

Re: [PATCH] stop_machine: avoid potential race behaviour

2019-10-07 Thread Marco Elver
On Mon, 7 Oct 2019 at 12:45, Mark Rutland wrote: > > Both multi_cpu_stop() and set_state() access multi_stop_data::state > racily using plain accesses. These are subject to compiler > transformations which could break the intended behaviour of the code, > and this situation is detected by KCSAN on

Re: pivot_root(".", ".") and the fchdir() dance

2019-10-07 Thread Michael Kerrisk (man-pages)
Hello Eric, On 9/30/19 2:42 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: Hello Eric, A ping on my question below. Could you take a look please? Thanks, Michael The concern from our conversation at the container mini-summit was that there is a pathology if in your in

Re: [PATCH v6 4/4] net: phy: realtek: Add LED configuration support for RTL8211E

2019-10-07 Thread Pavel Machek
On Mon 2019-08-19 02:37:57, Andrew Lunn wrote: > > Yes, I believe the integration is neccessary. Using same binding is > > neccessary for that, but not sufficient. For example, we need > > compatible trigger names, too. > > Hi Pavel > > Please could you explain what you mean by compatible trigger

Re: [PATCH v3 0/7] add Tegra194 XUSB host and pad controller support

2019-10-07 Thread Greg KH
On Sat, Oct 05, 2019 at 12:28:59AM +0800, JC Kuo wrote: > Hi, > > This series introduces support for Tegra194 XUSB host and pad > controller. Tegra194 XUSB host and pad controller are highly > similar to the controllers found on Tegra186. Therefore, it's > possible to resue xhci-tegra.c and xusb-t

[PATCH] net: hns3: make array tick_array static, makes object smaller

2019-10-07 Thread Colin King
From: Colin Ian King Don't populate the array tick_array on the stack but instead make it static. Makes the object code smaller by 29 bytes. Before: textdata bss dec hex filename 19191 432 0 196234ca7 hisilicon/hns3/hns3pf/hclge_tm.o After: textdata

Re:

2019-10-07 Thread Austin S. Miller
Hello, I am Austin S. Miller. I need your assistance Thank you in advance Sincerely, Austin S. Miller

Re: [PATCH 5.3 000/166] 5.3.5-stable review

2019-10-07 Thread Greg Kroah-Hartman
On Mon, Oct 07, 2019 at 11:09:04AM +0100, Jon Hunter wrote: > > On 06/10/2019 18:19, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.3.5 release. > > There are 166 patches in this series, all will be posted as a response > > to this one. If anyone has any issu

Re: [PATCH 5/5] perf record: Put a copy of kcore into the perf.data directory

2019-10-07 Thread Jiri Olsa
On Fri, Oct 04, 2019 at 11:31:21AM +0300, Adrian Hunter wrote: SNIP > +} > + > static int record__mmap_evlist(struct record *rec, > struct evlist *evlist) > { > @@ -1383,6 +1417,12 @@ static int __cmd_record(struct record *rec, int argc, > const char **argv) >

Re: [PATCH 5/5] perf record: Put a copy of kcore into the perf.data directory

2019-10-07 Thread Jiri Olsa
On Fri, Oct 04, 2019 at 11:31:21AM +0300, Adrian Hunter wrote: SNIP > bool strict_freq; > bool sample_id; > bool no_bpf_event; > + bool kcore; > unsigned int freq; > unsigned int mmap_pages; > unsigned int auxtrace_mma

Re: [PATCH 4/5] perf tools: Support single perf.data file directory

2019-10-07 Thread Jiri Olsa
On Fri, Oct 04, 2019 at 11:31:20AM +0300, Adrian Hunter wrote: SNIP > u8 pad[8] = {0}; > > - if (!perf_data__is_pipe(data) && !perf_data__is_dir(data)) { > + if (!perf_data__is_pipe(data) && perf_data__is_single_file(data)) { > off_t file_offset; > int

[PATCH v3 0/6] Rewrite x86/ftrace to use text_poke()

2019-10-07 Thread Peter Zijlstra
Ftrace was one of the last W^X violators; these patches move it over to the generic text_poke() interface and thereby get rid of this oddity.

[PATCH v2 4/4] jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved

2019-10-07 Thread Peter Zijlstra
Nothing ensures the module exists while we're iterating mod->jump_entries in __jump_label_mod_text_reserved(), take a module reference to ensure the module sticks around. Signed-off-by: Peter Zijlstra (Intel) --- kernel/jump_label.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions

[PATCH v2 04/13] static_call: Avoid kprobes on inline static_call()s

2019-10-07 Thread Peter Zijlstra
Similar to how we disallow kprobes on any other dynamic text (ftrace/jump_label) also disallow kprobes on inline static_call()s. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/kprobes/opt.c |4 +- include/linux/static_call.h | 11 +++ kernel/kprobes.c |2 +

[PATCH v2 07/13] static_call: Simple self-test

2019-10-07 Thread Peter Zijlstra
Signed-off-by: Peter Zijlstra (Intel) --- arch/Kconfig |6 ++ kernel/static_call.c | 28 2 files changed, 34 insertions(+) --- a/arch/Kconfig +++ b/arch/Kconfig @@ -103,6 +103,12 @@ config STATIC_KEYS_SELFTEST help Boot time self

[PATCH v3 3/6] x86/alternatives,jump_label: Provide better text_poke() batching interface

2019-10-07 Thread Peter Zijlstra
Adding another text_poke_bp_batch() user made me realize the interface is all sorts of wrong. The text poke vector should be internal to the implementation. This then results in a trivial interface: text_poke_queue() - which has the 'normal' text_poke_bp() interface text_poke_finish() - whic

[RFC][PATCH 0/9] Variable size jump_label support

2019-10-07 Thread Peter Zijlstra
These here patches are something I've been poking at for a while, enabling jump_label to use 2 byte jumps/nops. It _almost_ works :-/ That is, you can build some kernels with it (x86_64-defconfig for example works just fine). The problem comes when GCC generates a branch into another section, mo

[PATCH v2 1/4] notifier: Fix broken error handling pattern

2019-10-07 Thread Peter Zijlstra
The current notifiers have the following error handling pattern all over the place: int err, nr; err = __foo_notifier_call_chain(&chain, val_up, v, -1, &nr); if (err & NOTIFIER_STOP_MASK) __foo_notifier_call_chain(&chain, val_down, v, nr-1, NULL) And aside

[PATCH v2 2/4] module: Fix up module_notifier return values.

2019-10-07 Thread Peter Zijlstra
While auditing all module notifiers I noticed a whole bunch of fail wrt the return value. Notifiers have a 'special' return semantics. As is; NOTIFY_DONE vs NOTIFY_OK is a bit vague; but notifier_from_errno(0) results in NOTIFY_OK and NOTIFY_DONE has a comment that says "Don't care". >From this I

[PATCH v2 03/13] static_call: Add inline static call infrastructure

2019-10-07 Thread Peter Zijlstra
From: Josh Poimboeuf Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls,

[PATCH v2 3/4] module: Properly propagate MODULE_STATE_COMING failure

2019-10-07 Thread Peter Zijlstra
Now that notifiers got unbroken; use the proper interface to handle notifier errors and propagate them. There were already MODULE_STATE_COMING notifiers that failed; notably: - jump_label_module_notifier() - tracepoint_module_notify() - bpf_event_notify() By propagating this error, we fix tho

[RFC][PATCH 9/9] jump_label, x86: Enable JMP8/NOP2 support

2019-10-07 Thread Peter Zijlstra
Enable and emit short JMP/NOP jump_label entries. A lot of the jumps are in fact short, like around tracepoints: 0920 : | 0920 : 920: 53 push %rbx| 920: 53

[RFC][PATCH 2/9] jump_label, x86: Factor out the __jump_table generation

2019-10-07 Thread Peter Zijlstra
Both arch_static_branch() and arch_static_branch_jump() have the same blurb to generate the __jump_table entry, share it. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/jump_label.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) --- a/arch/x86

[RFC][PATCH 3/9] jump_label, x86: Remove init NOP optimization

2019-10-07 Thread Peter Zijlstra
Instead of checking if the emitted (default) NOP is the ideal NOP, and conditionally rewrite the NOP, just rewrite the NOP. This shouldn't be a problem because init / module_load uses text_poke_early() which is cheap and this saves us from having to go figure out which NOP to compare against when

[PATCH v3 1/6] x86/alternatives: Teach text_poke_bp() to emulate instructions

2019-10-07 Thread Peter Zijlstra
In preparation for static_call and variable size jump_label support, teach text_poke_bp() to emulate instructions, namely: JMP32, JMP8, CALL, NOP2, NOP_ATOMIC5, INT3 The current text_poke_bp() takes a @handler argument which is used as a jump target when the temporary INT3 is hit by a different

[PATCH v2 10/13] static_call: Add static_cond_call()

2019-10-07 Thread Peter Zijlstra
Extend the static_call infrastructure to optimize the following common pattern: if (func_ptr) func_ptr(args...) For the trampoline (which is in effect a tail-call), we patch the JMP.d32 into a RET, which then directly consumes the trampoline call. For the in-line sites we

[PATCH v3 6/6] x86/mm: Remove set_kernel_text_r[ow]()

2019-10-07 Thread Peter Zijlstra
With the last and only user of these functions gone (ftrace) remove them as well to avoid ever growing new users. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/set_memory.h |2 -- arch/x86/mm/init_32.c | 28 arch/x86/mm/init_64.c

[RFC][PATCH 7/9] jump_label,objtool: Validate variable size jump labels

2019-10-07 Thread Peter Zijlstra
Since variable sized jump_label support is somewhat 'inspired', ensure objtool validates the tricky bits. Specifically it is important that the displacement for the 2 byte jump is limited to a single byte -- since this is the hardest part of the whole scheme and relies on somewhat dodgy GAS tricks.

[PATCH v2 01/13] compiler.h: Make __ADDRESSABLE() symbol truly unique

2019-10-07 Thread Peter Zijlstra
From: Josh Poimboeuf The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary symbol which has a unique name. However, if the macro is used multiple times from within another macro, the line number will always be the same, resulting in duplicate symbols. Make the temporary symbol

[RFC][PATCH 4/9] jump_label, x86: Improve error when we fail expected text

2019-10-07 Thread Peter Zijlstra
There is only a single usage site left, remove the function and extend the print to include more information, like the expected text and the patch type. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/jump_label.c | 23 ++- 1 file changed, 10 insertions(+), 13 del

[PATCH v2 05/13] x86/static_call: Add out-of-line static call implementation

2019-10-07 Thread Peter Zijlstra
From: Josh Poimboeuf Add the x86 out-of-line static call implementation. For each key, a permanent trampoline is created which is the destination for all static calls for the given key. The trampoline has a direct jump which gets patched by static_call_update() when the destination function cha

[RFC][PATCH v2 13/13] x86/perf, static_call: Optimize x86_pmu methods

2019-10-07 Thread Peter Zijlstra
Replace many of the indirect calls with static_call(). XXX run performance numbers Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/events/core.c | 136 +++-- 1 file changed, 98 insertions(+), 38 deletions(-) --- a/arch/x86/events/core.c +++ b/arc

[PATCH v2 0/4] Propagate module notifier errors

2019-10-07 Thread Peter Zijlstra
These patches came from the desire to propagate MODULE_STATE_COMING errors. While looking at that I spotted fail with a number of module notifiers themselves and with the whole notification business. I will probably add a notifier for MODULE_STATE_UNFORMED, but that is later. Fixing this error pr

[PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-07 Thread Peter Zijlstra
Move ftrace over to using the generic x86 text_poke functions; this avoids having a second/different copy of that code around. This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW. Cc: Steven Rostedt Cc

[PATCH v2 12/13] static_call: Allow early init

2019-10-07 Thread Peter Zijlstra
In order to use static_call() to wire up x86_pmu, we need to initialize earlier; copy some of the tricks from jump_label to enable this. Primarily we overload key->next to store a sites pointer when there are no modules, this avoids having to use kmalloc() to initialize the sites and allows us to

[PATCH v2 02/13] static_call: Add basic static call infrastructure

2019-10-07 Thread Peter Zijlstra
From: Josh Poimboeuf Static calls are a replacement for global function pointers. They use code patching to allow direct calls to be used instead of indirect calls. They give the flexibility of function pointers, but with improved performance. This is especially important for cases where retpo

[PATCH v2 06/13] x86/static_call: Add inline static call implementation for x86-64

2019-10-07 Thread Peter Zijlstra
From: Josh Poimboeuf Add the inline static call implementation for x86-64. For each key, a temporary trampoline is created, named __static_call_tramp_. The trampoline has an indirect jump to the destination function. Objtool uses the trampoline naming convention to detect all the call sites.

[PATCH v2 11/13] static_call: Handle tail-calls

2019-10-07 Thread Peter Zijlstra
GCC can turn our static_call(name)(args...) into a tail call, in which case we get a JMP.d32 into the trampoline (which then does a further tail-call). Teach objtool to recognise and mark these in .static_call_sites and adjust the code patching to deal with this. Signed-off-by: Peter Zijlstra (In

[RESEND] everything text-poke: ftrace, modules, static_call and jump_label

2019-10-07 Thread Peter Zijlstra
Because typing on a Monday is hard, here's a resend with the LKML address corrected. --- Hi All, Here are 4 series that have accumulated in my queue for a while and I figured I'd 'finish' and send out again. The first series is rewriting x86/ftrace to use the normal text_poke() interfaces we

Re: [PATCH v3] ARM: dts: imx6qdl-rex: add gpio expander pca9535

2019-10-07 Thread Shawn Guo
On Mon, Sep 16, 2019 at 12:43:53PM +0200, Gilles DOFFE wrote: > The pca9535 gpio expander is present on the Rex baseboard, but missing > from the dtsi. > The pca9535 is on i2c2 bus which is common to the three SOM > variants (Basic/Pro/Ultra), thus it is activated by default. > > Add also the new

[RFC][PATCH 1/9] jump_label, x86: Strip ASM jump_label support

2019-10-07 Thread Peter Zijlstra
In prepration for variable size jump_label support; remove all ASM bits that are not used. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/calling.h |2 +- arch/x86/include/asm/jump_label.h | 28 2 files changed, 5 insertions(+), 25 deletions(

[PATCH v3 2/6] x86/alternatives: Update int3_emulate_push() comment

2019-10-07 Thread Peter Zijlstra
Update the comment now that we've merged x86_32 support. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/text-patching.h |3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/include/asm/text-patching.h +++ b/arch/x86/include/asm/text-patching.h @@ -85,6 +85,9 @@ static inli

[PATCH v3 4/6] x86/alternatives: Add and use text_gen_insn() helper

2019-10-07 Thread Peter Zijlstra
Provide a simple helper function to create common instruction encodings. Signed-off-by: Peter Zijlstra (Intel) Cc: Steven Rostedt Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu --- arch/x86/include/asm/text-patching.h |2 + arch/x86/kernel/alternative.c| 36

[RFC][PATCH 6/9] jump_label, x86: Add variable length patching support

2019-10-07 Thread Peter Zijlstra
This allows the patching to to emit 2 byte JMP/NOP instruction in addition to the 5 byte JMP/NOP we already did. This allows for more compact code. This code is not yet used, as we don't emit shorter code at compile time yet. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/jump_l

Re: [PATCH] depmod: create and use System.map.no_namespaces

2019-10-07 Thread Jessica Yu
+++ Matthias Maennich [07/10/19 07:46 +0100]: Hi! On Sat, Oct 05, 2019 at 04:53:56PM +0900, Masahiro Yamada wrote: On Sat, Oct 5, 2019 at 3:25 AM Lucas De Marchi wrote: On Fri, Oct 4, 2019 at 2:57 AM Matthias Maennich wrote: depmod in its current version is not aware of symbol namespace i

[PATCH v2 08/13] tracepoints: Use static_call

2019-10-07 Thread Peter Zijlstra
From: Steven Rostedt [peterz: updated to new interface] Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) --- include/linux/tracepoint-defs.h |5 ++ include/linux/tracepoint.h | 75 ++-- include/trace/define_trace.h

Re: [RFC][PATCH 0/9] Variable size jump_label support

2019-10-07 Thread Ingo Molnar
[ Sorry, fixed the Cc:lkml line. ] * Peter Zijlstra wrote: > These here patches are something I've been poking at for a while, > enabling jump_label to use 2 byte jumps/nops. > > It _almost_ works :-/ > > That is, you can build some kernels with it (x86_64-defconfig for > example works jus

[RFC][PATCH 5/9] jump_label, x86: Introduce jump_entry_size()

2019-10-07 Thread Peter Zijlstra
This allows architectures to have variable sized jumps. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/jump_label.h |4 ++-- arch/x86/kernel/jump_label.c |5 + include/linux/jump_label.h|9 + kernel/jump_label.c |2 +- 4 file

[RFC][PATCH 8/9] jump_label,objtool: Generate possible statistics

2019-10-07 Thread Peter Zijlstra
x86_64-defconfigx86_64-allmodconfig-UBSAN-KASAN NOP2164121796 JMP848 114 NOP5101031042 JMP32 29 91 Which results in a possible 3*(1641+48) ~ 5k saving for defconfig and 3*(21796+114) ~

<    1   2   3   4   5   6   7   8   9   10   >