Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Dmitry Vyukov
On Sun, Jan 14, 2018 at 1:13 AM, Daniel Borkmann wrote: > On 01/13/2018 02:58 AM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b >> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >>

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Dmitry Vyukov
On Sun, Jan 14, 2018 at 1:13 AM, Daniel Borkmann wrote: > On 01/13/2018 02:58 AM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b >> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >> compiler: gcc (GCC) 7.1.1

Re: [PATCH v1 3/4] ARM: dts: add pwm pins for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:33:23PM +0800, hao_zhang wrote: >> This patch add pwm pins for r40. >> >> Signed-off-by: hao_zhang > > You should order your patches differently. We try to be as

Re: [PATCH v1 3/4] ARM: dts: add pwm pins for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:33:23PM +0800, hao_zhang wrote: >> This patch add pwm pins for r40. >> >> Signed-off-by: hao_zhang > > You should order your patches differently. We try to be as bisectable > as possible, and if we just apply this

Re: [PATCH v1 4/4] ARM: dts: add pwm node for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:34:12PM +0800, hao_zhang wrote: >> This patch add pwm node for r40. >> >> Signed-off-by: hao_zhang >> --- >> arch/arm/boot/dts/sun8i-r40.dtsi | 13 +

Re: [PATCH v1 4/4] ARM: dts: add pwm node for r40.

2018-01-13 Thread Hao Zhang
2018-01-11 20:47 GMT+08:00 Maxime Ripard : > Hi, > > On Thu, Jan 11, 2018 at 07:34:12PM +0800, hao_zhang wrote: >> This patch add pwm node for r40. >> >> Signed-off-by: hao_zhang >> --- >> arch/arm/boot/dts/sun8i-r40.dtsi | 13 + >> 1 file changed, 13 insertions(+) >> >> diff --git

warning: '______f' is static but declared in inline function in

2018-01-13 Thread Randy Dunlap
Hi, I regularly get 50 MB - 60 MB files during kernel randconfig builds. These large files mostly contain (many repeats of; e.g., 124,594): In file included from ../include/linux/string.h:6:0, from ../include/linux/uuid.h:20, from

warning: '______f' is static but declared in inline function in

2018-01-13 Thread Randy Dunlap
Hi, I regularly get 50 MB - 60 MB files during kernel randconfig builds. These large files mostly contain (many repeats of; e.g., 124,594): In file included from ../include/linux/string.h:6:0, from ../include/linux/uuid.h:20, from

Re: [PATCH 3/3] tracing: don't set parser->cont if it has reached the end of input buffer

2018-01-13 Thread Du, Changbin
On Fri, Jan 12, 2018 at 10:31:08AM -0500, Steven Rostedt wrote: [...] > > Thanks, so now I unstand why below corner case. The userspace try to set the > > filter with a unrecognized symbole name (e.g "abcdefg"). > > open("/sys/kernel/debug/tracing/set_ftrace_filter", O_WRONLY|O_TRUNC) = 3 > >

Re: [PATCH 3/3] tracing: don't set parser->cont if it has reached the end of input buffer

2018-01-13 Thread Du, Changbin
On Fri, Jan 12, 2018 at 10:31:08AM -0500, Steven Rostedt wrote: [...] > > Thanks, so now I unstand why below corner case. The userspace try to set the > > filter with a unrecognized symbole name (e.g "abcdefg"). > > open("/sys/kernel/debug/tracing/set_ftrace_filter", O_WRONLY|O_TRUNC) = 3 > >

Re: [PATCH v3 1/3] PCI/AER: factor out error reporting from AER

2018-01-13 Thread poza
On 2018-01-13 06:27, Bjorn Helgaas wrote: On Mon, Jan 08, 2018 at 01:25:03PM +0530, Oza Pawandeep wrote: This patch factors out error reporting callbacks, which are currently tightly coupled with AER. DPC should be able to call these callbacks when DPC trigger event occurs. Signed-off-by:

Re: [PATCH v3 1/3] PCI/AER: factor out error reporting from AER

2018-01-13 Thread poza
On 2018-01-13 06:27, Bjorn Helgaas wrote: On Mon, Jan 08, 2018 at 01:25:03PM +0530, Oza Pawandeep wrote: This patch factors out error reporting callbacks, which are currently tightly coupled with AER. DPC should be able to call these callbacks when DPC trigger event occurs. Signed-off-by:

Re: Commit fc72ae40e303 broke x86-64 build environment.

2018-01-13 Thread vcaputo
On Sat, Jan 13, 2018 at 11:13:13PM -0600, Rob Landley wrote: > You've made the ORC unwinder part of allnoconfig, which means trying to > build "make ARCH=x86_64 allnoconfig" requires installing a new package > (libelf-dev) or else the build breaks. > > What's worse, if I go into menuconfig and

Re: Commit fc72ae40e303 broke x86-64 build environment.

2018-01-13 Thread vcaputo
On Sat, Jan 13, 2018 at 11:13:13PM -0600, Rob Landley wrote: > You've made the ORC unwinder part of allnoconfig, which means trying to > build "make ARCH=x86_64 allnoconfig" requires installing a new package > (libelf-dev) or else the build breaks. > > What's worse, if I go into menuconfig and

Hello,

2018-01-13 Thread mallory genest
-- Weekend Greetings , I was wondering if you got my previous Email to you regarding my proposal ? best regards

Hello,

2018-01-13 Thread mallory genest
-- Weekend Greetings , I was wondering if you got my previous Email to you regarding my proposal ? best regards

Commit fc72ae40e303 broke x86-64 build environment.

2018-01-13 Thread Rob Landley
You've made the ORC unwinder part of allnoconfig, which means trying to build "make ARCH=x86_64 allnoconfig" requires installing a new package (libelf-dev) or else the build breaks. What's worse, if I go into menuconfig and switch it back to frame pointer, the build STILL breaks: $ make -j 8

Commit fc72ae40e303 broke x86-64 build environment.

2018-01-13 Thread Rob Landley
You've made the ORC unwinder part of allnoconfig, which means trying to build "make ARCH=x86_64 allnoconfig" requires installing a new package (libelf-dev) or else the build breaks. What's worse, if I go into menuconfig and switch it back to frame pointer, the build STILL breaks: $ make -j 8

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-13 Thread jianchao.wang
Dear all Thanks for the kindly response and reviewing. That's really appreciated. On 01/13/2018 12:46 AM, Eric Dumazet wrote: >> Does this need to be dma_wmb(), and should it be in >> mlx4_en_update_rx_prod_db ? >> > +1 on dma_wmb() > > On what architecture bug was observed ? This issue was

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-13 Thread jianchao.wang
Dear all Thanks for the kindly response and reviewing. That's really appreciated. On 01/13/2018 12:46 AM, Eric Dumazet wrote: >> Does this need to be dma_wmb(), and should it be in >> mlx4_en_update_rx_prod_db ? >> > +1 on dma_wmb() > > On what architecture bug was observed ? This issue was

Re: [PATCHv2 5/7] printk: allow kmsg to be encrypted using public key encryption

2018-01-13 Thread Sergey Senozhatsky
Ccing Kees, Peter, Andrew, Steven On (01/13/18 23:34), Dan Aloni wrote: > This commit enables the kernel to encrypt the free-form text that > is generated by printk() before it is brought up to `dmesg` in > userspace. > > The encryption is made using one of the trusted public keys which > are

Re: [PATCHv2 5/7] printk: allow kmsg to be encrypted using public key encryption

2018-01-13 Thread Sergey Senozhatsky
Ccing Kees, Peter, Andrew, Steven On (01/13/18 23:34), Dan Aloni wrote: > This commit enables the kernel to encrypt the free-form text that > is generated by printk() before it is brought up to `dmesg` in > userspace. > > The encryption is made using one of the trusted public keys which > are

Re: [PATCH 04/11] signal/parisc: Document a conflict with SI_USER with SIGFPE

2018-01-13 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Helge Deller writes: > >> * Eric W. Biederman : >>> Setting si_code to 0 results in a userspace seeing an si_code of 0. >>> This is the same si_code as SI_USER. Posix and common sense requires >>> that

Re: [PATCH 04/11] signal/parisc: Document a conflict with SI_USER with SIGFPE

2018-01-13 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Helge Deller writes: > >> * Eric W. Biederman : >>> Setting si_code to 0 results in a userspace seeing an si_code of 0. >>> This is the same si_code as SI_USER. Posix and common sense requires >>> that SI_USER not be a signal specific si_code.

Year 2018 to Year 3018: Top 15 Blacklisted Photographers in Singapore Unveiled

2018-01-13 Thread Turritopsis Dohrnii Teo En Ming
1. Mr. Turritopsis Dohrnii Teo En Ming is a TARGETED INDIVIDUAL (TI) since 2007, or perhaps even earlier. That is more than 10 years already. A TARGETED INDIVIDUAL (TI) is a person who is PERSECUTED, TARGETED, BLACKLISTED and MARKED by the [SINGAPORE] GOVERNMENT. Teo En Ming, who is a Targeted

Year 2018 to Year 3018: Top 15 Blacklisted Photographers in Singapore Unveiled

2018-01-13 Thread Turritopsis Dohrnii Teo En Ming
1. Mr. Turritopsis Dohrnii Teo En Ming is a TARGETED INDIVIDUAL (TI) since 2007, or perhaps even earlier. That is more than 10 years already. A TARGETED INDIVIDUAL (TI) is a person who is PERSECUTED, TARGETED, BLACKLISTED and MARKED by the [SINGAPORE] GOVERNMENT. Teo En Ming, who is a Targeted

Re: [PATCH bpf-next v5 5/5] error-injection: Support fault injection framework

2018-01-13 Thread Masami Hiramatsu
On Sat, 13 Jan 2018 22:28:29 +0900 Akinobu Mita wrote: > 2018-01-13 2:56 GMT+09:00 Masami Hiramatsu : > > Support in-kernel fault-injection framework via debugfs. > > This allows you to inject a conditional error to specified > > function using

Re: [PATCH bpf-next v5 5/5] error-injection: Support fault injection framework

2018-01-13 Thread Masami Hiramatsu
On Sat, 13 Jan 2018 22:28:29 +0900 Akinobu Mita wrote: > 2018-01-13 2:56 GMT+09:00 Masami Hiramatsu : > > Support in-kernel fault-injection framework via debugfs. > > This allows you to inject a conditional error to specified > > function using debugfs interfaces. > > > > Here is the result of

Year 2025: Top 15 Blacklisted Photographers in Singapore Unveiled

2018-01-13 Thread Turritopsis Dohrnii Teo En Ming
1. Mr. Turritopsis Dohrnii Teo En Ming is a TARGETED INDIVIDUAL (TI) since 2007, or perhaps even earlier. That is more than 10 years already. A TARGETED INDIVIDUAL (TI) is a person who is PERSECUTED, TARGETED, BLACKLISTED and MARKED by the [SINGAPORE] GOVERNMENT. Teo En Ming, who is a Targeted

Year 2025: Top 15 Blacklisted Photographers in Singapore Unveiled

2018-01-13 Thread Turritopsis Dohrnii Teo En Ming
1. Mr. Turritopsis Dohrnii Teo En Ming is a TARGETED INDIVIDUAL (TI) since 2007, or perhaps even earlier. That is more than 10 years already. A TARGETED INDIVIDUAL (TI) is a person who is PERSECUTED, TARGETED, BLACKLISTED and MARKED by the [SINGAPORE] GOVERNMENT. Teo En Ming, who is a Targeted

Re: [PATCH 1/2] microblaze: fix endian handling

2018-01-13 Thread kbuild test robot
Hi Arnd, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.15-rc7 next-20180112] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 1/2] microblaze: fix endian handling

2018-01-13 Thread kbuild test robot
Hi Arnd, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.15-rc7 next-20180112] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Alexei Starovoitov
On Sun, Jan 14, 2018 at 12:03:42AM +0200, Karim Eshapa wrote: > Use pointers to structure as arguments to function instead of coping > structures and less stack size. Also transfer TNUM(_v, _m) to > tnum.h file to be used in differnet files for creating anonymous structures > statically. > >

Re: [PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Alexei Starovoitov
On Sun, Jan 14, 2018 at 12:03:42AM +0200, Karim Eshapa wrote: > Use pointers to structure as arguments to function instead of coping > structures and less stack size. Also transfer TNUM(_v, _m) to > tnum.h file to be used in differnet files for creating anonymous structures > statically. > >

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

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:29 AM, Dmitry Vyukov wrote: > On Fri, Jan 12, 2018 at 11:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> c92a9a461dff6140c539c61e457aa97df29517d6 >>

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

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:29 AM, Dmitry Vyukov wrote: > On Fri, Jan 12, 2018 at 11:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> c92a9a461dff6140c539c61e457aa97df29517d6 >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master >> compiler: gcc (GCC) 7.1.1

Re: general protection fault in __bpf_map_put

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:16 AM, Dmitry Vyukov wrote: > On Wed, Jan 10, 2018 at 1:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> b4464bcab38d3f7fe995a7cb960eeac6889bec08 >>

Re: general protection fault in __bpf_map_put

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:16 AM, Dmitry Vyukov wrote: > On Wed, Jan 10, 2018 at 1:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> b4464bcab38d3f7fe995a7cb960eeac6889bec08 >> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master >> compiler: gcc (GCC) 7.1.1

Re: divide error in ___bpf_prog_run

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > 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 output is attached. >

Re: divide error in ___bpf_prog_run

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > 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 output is attached. >

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > 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 output is attached. >

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > 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 output is attached. >

[PATCH] input: Add driver for USB ELAN Touchpad

2018-01-13 Thread Alexandrov Stansilav
This is driver for usb touchpad found on HP Pavilion x2 10-p0xx laptop. On this device keyboard and touchpad connected as a single usb device with two interfaces: keyboard, which exposes ordinary keys and second interface is touchpad which also contains FlightMode button and audio mute led (which

[PATCH] input: Add driver for USB ELAN Touchpad

2018-01-13 Thread Alexandrov Stansilav
This is driver for usb touchpad found on HP Pavilion x2 10-p0xx laptop. On this device keyboard and touchpad connected as a single usb device with two interfaces: keyboard, which exposes ordinary keys and second interface is touchpad which also contains FlightMode button and audio mute led (which

[PATCH v2] x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros

2018-01-13 Thread Tom Lendacky
The PAUSE instruction is currently used in the retpoline and RSB filling macros as a speculation trap. The use of PAUSE was originally suggested because it showed a very, very small difference in the amount of cycles/time used to execute the retpoline as compared to LFENCE. On AMD, the PAUSE

[PATCH v2] x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros

2018-01-13 Thread Tom Lendacky
The PAUSE instruction is currently used in the retpoline and RSB filling macros as a speculation trap. The use of PAUSE was originally suggested because it showed a very, very small difference in the amount of cycles/time used to execute the retpoline as compared to LFENCE. On AMD, the PAUSE

[PATCH] x86/pti: Fix !PCID and sanitize defines

2018-01-13 Thread Thomas Gleixner
The switch to the user space page tables in the low level ASM code sets unconditionally bit 12 and bit 11 of CR3. Bit 12 is switching the base address of the page directory to the user part, bit 11 is switching the PCID to the PCID associated with the user page tables. This fails on a machine

[PATCH] x86/pti: Fix !PCID and sanitize defines

2018-01-13 Thread Thomas Gleixner
The switch to the user space page tables in the low level ASM code sets unconditionally bit 12 and bit 11 of CR3. Bit 12 is switching the base address of the page directory to the user part, bit 11 is switching the PCID to the PCID associated with the user page tables. This fails on a machine

[PATCH v5 05/14] nubus: Validate slot resource IDs

2018-01-13 Thread Finn Thain
While we are here, include the slot number in the related error messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git

[PATCH v5 05/14] nubus: Validate slot resource IDs

2018-01-13 Thread Finn Thain
While we are here, include the slot number in the related error messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c

[PATCH v5 04/14] nubus: Fix log spam

2018-01-13 Thread Finn Thain
Testing shows that a single Radius PrecisionColor 24X display board, which has 95 functional resources, produces over a thousand lines of log messages. Suppress these messages with pr_debug(). Remove some redundant messages relating to nubus_get_subdir() calls. Fix the format block debug messages

[PATCH v5 04/14] nubus: Fix log spam

2018-01-13 Thread Finn Thain
Testing shows that a single Radius PrecisionColor 24X display board, which has 95 functional resources, produces over a thousand lines of log messages. Suppress these messages with pr_debug(). Remove some redundant messages relating to nubus_get_subdir() calls. Fix the format block debug messages

[PATCH v5 09/14] nubus: Generalize block resource handling

2018-01-13 Thread Finn Thain
Scrap the specialized code to unpack video mode name resources and driver resources. It isn't useful. Instead, add a re-usable function to handle lists of block resources of any kind, and descend into the video mode table resource directory. Rename callers as nubus_get_foo(), consistent with their

[PATCH v5 09/14] nubus: Generalize block resource handling

2018-01-13 Thread Finn Thain
Scrap the specialized code to unpack video mode name resources and driver resources. It isn't useful. Instead, add a re-usable function to handle lists of block resources of any kind, and descend into the video mode table resource directory. Rename callers as nubus_get_foo(), consistent with their

[PATCH v5 06/14] nubus: Call proc_mkdir() not more than once per slot directory

2018-01-13 Thread Finn Thain
This patch fixes the following WARNING. proc_dir_entry 'nubus/a' already registered Modules linked in: CPU: 0 PID: 1 Comm: swapper Tainted: GW 4.13.0-00036-gd57552077387 #1 Stack from 01c1bd9c: 01c1bd9c 003c2c8b 01c1bdc0 0001b0fe 00322f4a 01c43a20 01c43b0c

[PATCH v5 08/14] nubus: Clean up whitespace

2018-01-13 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- include/linux/nubus.h | 58 +-- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/include/linux/nubus.h b/include/linux/nubus.h

[PATCH v5 07/14] nubus: Remove redundant code

2018-01-13 Thread Finn Thain
Eliminate unused values from struct nubus_dev to save wasted memory (a Radius PrecisionColor 24X card has about 95 functional resources and up to six such cards may be fitted). Also remove redundant static variable initialization, an unreachable !MACH_IS_MAC conditional, the unused

[PATCH v5 06/14] nubus: Call proc_mkdir() not more than once per slot directory

2018-01-13 Thread Finn Thain
This patch fixes the following WARNING. proc_dir_entry 'nubus/a' already registered Modules linked in: CPU: 0 PID: 1 Comm: swapper Tainted: GW 4.13.0-00036-gd57552077387 #1 Stack from 01c1bd9c: 01c1bd9c 003c2c8b 01c1bdc0 0001b0fe 00322f4a 01c43a20 01c43b0c

[PATCH v5 08/14] nubus: Clean up whitespace

2018-01-13 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- include/linux/nubus.h | 58 +-- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/include/linux/nubus.h b/include/linux/nubus.h index 3c7b236074b3..2d6f04055ebe 100644 ---

[PATCH v5 07/14] nubus: Remove redundant code

2018-01-13 Thread Finn Thain
Eliminate unused values from struct nubus_dev to save wasted memory (a Radius PrecisionColor 24X card has about 95 functional resources and up to six such cards may be fitted). Also remove redundant static variable initialization, an unreachable !MACH_IS_MAC conditional, the unused

[PATCH v5 10/14] nubus: Rework /proc/bus/nubus/s/ implementation

2018-01-13 Thread Finn Thain
The /proc/bus/nubus/s/ directory tree for any slot s is missing a lot of information. The struct file_operations methods have long been left unimplemented (hence the familiar compile-time warning, "Need to set some I/O handlers here"). Slot resources have a complex structure which varies

[PATCH v5 10/14] nubus: Rework /proc/bus/nubus/s/ implementation

2018-01-13 Thread Finn Thain
The /proc/bus/nubus/s/ directory tree for any slot s is missing a lot of information. The struct file_operations methods have long been left unimplemented (hence the familiar compile-time warning, "Need to set some I/O handlers here"). Slot resources have a complex structure which varies

[PATCH v5 11/14] nubus: Rename struct nubus_dev

2018-01-13 Thread Finn Thain
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct

[PATCH v5 11/14] nubus: Rename struct nubus_dev

2018-01-13 Thread Finn Thain
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct

[PATCH v5 12/14] nubus: Adopt standard linked list implementation

2018-01-13 Thread Finn Thain
This increases code re-use and improves readability. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain

[PATCH v5 12/14] nubus: Adopt standard linked list implementation

2018-01-13 Thread Finn Thain
This increases code re-use and improves readability. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 7 +++-- drivers/net/ethernet/cirrus/mac89x0.c | 6

[PATCH v5 14/14] nubus: Add support for the driver model

2018-01-13 Thread Finn Thain
This patch brings basic support for the Linux Driver Model to the NuBus subsystem. For flexibility, the matching of boards with drivers is left up to the drivers. This is also the approach taken by NetBSD. A board may have many functions, and drivers may have to consider many functional resources

[PATCH v5 14/14] nubus: Add support for the driver model

2018-01-13 Thread Finn Thain
This patch brings basic support for the Linux Driver Model to the NuBus subsystem. For flexibility, the matching of boards with drivers is left up to the drivers. This is also the approach taken by NetBSD. A board may have many functions, and drivers may have to consider many functional resources

[PATCH v5 13/14] nubus: Add expansion_type values for various Mac models

2018-01-13 Thread Finn Thain
Add an expansion slot attribute to allow drivers to properly handle cards like Comm Slot cards and PDS cards without declaration ROMs. This clarifies the logic for the Centris 610 model which has no Comm Slot but has an optional on-board SONIC device. Cc: "David S. Miller"

[PATCH v5 13/14] nubus: Add expansion_type values for various Mac models

2018-01-13 Thread Finn Thain
Add an expansion slot attribute to allow drivers to properly handle cards like Comm Slot cards and PDS cards without declaration ROMs. This clarifies the logic for the Centris 610 model which has no Comm Slot but has an optional on-board SONIC device. Cc: "David S. Miller" Tested-by: Stan

[PATCH v5 02/14] nubus: Fix up header split

2018-01-13 Thread Finn Thain
Due to the '#ifdef __KERNEL__' being located in the wrong place, some definitions from the kernel API were placed in the UAPI header during the scripted header split. Fix this. Also, remove the duplicate comment which is only relevant to the UAPI header. Fixes: 607ca46e97a1 ("UAPI: (Scripted)

[PATCH v5 02/14] nubus: Fix up header split

2018-01-13 Thread Finn Thain
Due to the '#ifdef __KERNEL__' being located in the wrong place, some definitions from the kernel API were placed in the UAPI header during the scripted header split. Fix this. Also, remove the duplicate comment which is only relevant to the UAPI header. Fixes: 607ca46e97a1 ("UAPI: (Scripted)

[PATCH v5 01/14] nubus: Avoid array underflow and overflow

2018-01-13 Thread Finn Thain
Check array indices. Avoid sprintf. Use buffers of sufficient size. Use appropriate types for array length parameters. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 29 +

[PATCH v5 01/14] nubus: Avoid array underflow and overflow

2018-01-13 Thread Finn Thain
Check array indices. Avoid sprintf. Use buffers of sufficient size. Use appropriate types for array length parameters. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 29 + drivers/nubus/proc.c | 12 ++-- include/linux/nubus.h

[PATCH v5 03/14] nubus: Use static functions where possible

2018-01-13 Thread Finn Thain
This fixes a couple of warnings from 'make W=1': drivers/nubus/nubus.c:790: warning: no previous prototype for 'nubus_probe_slot' drivers/nubus/nubus.c:824: warning: no previous prototype for 'nubus_scan_bus' Tested-by: Stan Johnson Signed-off-by: Finn Thain

[PATCH v5 03/14] nubus: Use static functions where possible

2018-01-13 Thread Finn Thain
This fixes a couple of warnings from 'make W=1': drivers/nubus/nubus.c:790: warning: no previous prototype for 'nubus_probe_slot' drivers/nubus/nubus.c:824: warning: no previous prototype for 'nubus_scan_bus' Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/nubus/nubus.c | 4 ++--

[PATCH v5 00/14] Modernization and fixes for NuBus subsystem

2018-01-13 Thread Finn Thain
This series begins with cleanups and fixes for the NuBus subsystem and finishes with a patch to add support for the Linux Driver Model. A separate series (which requires this one) modernizes NuBus drivers. Changes since v1: - Added the missing NULL check in nubus_device_remove(). - Squashed the

[PATCH v5 00/14] Modernization and fixes for NuBus subsystem

2018-01-13 Thread Finn Thain
This series begins with cleanups and fixes for the NuBus subsystem and finishes with a patch to add support for the Linux Driver Model. A separate series (which requires this one) modernizes NuBus drivers. Changes since v1: - Added the missing NULL check in nubus_device_remove(). - Squashed the

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Karim Eshapa
Use pointers to structure as arguments to function instead of coping structures and less stack size. Also transfer TNUM(_v, _m) to tnum.h file to be used in differnet files for creating anonymous structures statically. Signed-off-by: Karim Eshapa Thanks, Karim ---

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Karim Eshapa
Use pointers to structure as arguments to function instead of coping structures and less stack size. Also transfer TNUM(_v, _m) to tnum.h file to be used in differnet files for creating anonymous structures statically. Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 4

[PATCHv2 6/7] tools: add dmesg decryption program

2018-01-13 Thread Dan Aloni
Example execution: dmesg | dmesg-decipher Signed-off-by: Dan Aloni --- tools/Makefile | 9 +- tools/kmsg/.gitignore | 1 + tools/kmsg/Makefile | 14 ++ tools/kmsg/dmesg-decipher.c | 354 4

[PATCHv2 0/7] RFC: Public key encryption of dmesg by the kernel

2018-01-13 Thread Dan Aloni
Changes from v1 [1]: - Made suggested fixes following a review from Randy Dunlap - Modified the ASCII encoding of cipher text to base64 instead of hex, with newlines replaced by '~' ; updated dmesg-decipher for it too - Moved base64 code from fs/ceph to lib, and improved it a bit -

[PATCHv2 3/7] base64-armor: add bounds checking

2018-01-13 Thread Dan Aloni
Future use of the API can benefit from bounds checking. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 17 +++-- lib/base64-armor.c | 20 ++-- net/ceph/crypto.c| 2 +- 3 files changed, 30 insertions(+), 9

[PATCHv2 6/7] tools: add dmesg decryption program

2018-01-13 Thread Dan Aloni
Example execution: dmesg | dmesg-decipher Signed-off-by: Dan Aloni --- tools/Makefile | 9 +- tools/kmsg/.gitignore | 1 + tools/kmsg/Makefile | 14 ++ tools/kmsg/dmesg-decipher.c | 354 4 files changed, 377

[PATCHv2 0/7] RFC: Public key encryption of dmesg by the kernel

2018-01-13 Thread Dan Aloni
Changes from v1 [1]: - Made suggested fixes following a review from Randy Dunlap - Modified the ASCII encoding of cipher text to base64 instead of hex, with newlines replaced by '~' ; updated dmesg-decipher for it too - Moved base64 code from fs/ceph to lib, and improved it a bit -

[PATCHv2 3/7] base64-armor: add bounds checking

2018-01-13 Thread Dan Aloni
Future use of the API can benefit from bounds checking. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 17 +++-- lib/base64-armor.c | 20 ++-- net/ceph/crypto.c| 2 +- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git

[PATCHv2 2/7] Move net/ceph/armor to lib/ and add docs

2018-01-13 Thread Dan Aloni
Plus, add functions that assist in managing buffer bounds. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 65 ++ lib/Kconfig| 7 lib/Makefile | 1 +

[PATCHv2 2/7] Move net/ceph/armor to lib/ and add docs

2018-01-13 Thread Dan Aloni
Plus, add functions that assist in managing buffer bounds. Signed-off-by: Dan Aloni --- include/linux/base64-armor.h | 65 ++ lib/Kconfig| 7 lib/Makefile | 1 + net/ceph/armor.c =>

[PATCHv2 1/7] crypto: fix memory leak in rsa-kcs1pad encryption

2018-01-13 Thread Dan Aloni
The encryption mode of pkcs1pad never uses out_sg and out_buf, so there's no need to allocate the buffer, which presently is not even being freed. CC: Herbert Xu Signed-off-by: Dan Aloni --- crypto/rsa-pkcs1pad.c | 9 - 1 file changed, 9

Re: [PATCH v1] x86/retpoline: Use lfence in the retpoline/RSB filling RSB macros

2018-01-13 Thread Thomas Gleixner
On Sat, 13 Jan 2018, Tom Lendacky wrote: > On 1/13/2018 8:07 AM, Van De Ven, Arjan wrote: > >>> The RSB filling macro is applicable to AMD, and, if software is unable to > >>> verify that lfence is serializing on AMD (possible when running under a > >>> hypervisor), the generic retpoline support

[PATCHv2 1/7] crypto: fix memory leak in rsa-kcs1pad encryption

2018-01-13 Thread Dan Aloni
The encryption mode of pkcs1pad never uses out_sg and out_buf, so there's no need to allocate the buffer, which presently is not even being freed. CC: Herbert Xu Signed-off-by: Dan Aloni --- crypto/rsa-pkcs1pad.c | 9 - 1 file changed, 9 deletions(-) diff --git a/crypto/rsa-pkcs1pad.c

Re: [PATCH v1] x86/retpoline: Use lfence in the retpoline/RSB filling RSB macros

2018-01-13 Thread Thomas Gleixner
On Sat, 13 Jan 2018, Tom Lendacky wrote: > On 1/13/2018 8:07 AM, Van De Ven, Arjan wrote: > >>> The RSB filling macro is applicable to AMD, and, if software is unable to > >>> verify that lfence is serializing on AMD (possible when running under a > >>> hypervisor), the generic retpoline support

[PATCHv2 4/7] certs: allow in-kernel access of trusted keys

2018-01-13 Thread Dan Aloni
CC: David Howells Signed-off-by: Dan Aloni --- certs/system_keyring.c| 56 ++- include/keys/system_keyring.h | 3 +++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/certs/system_keyring.c

[PATCHv2 4/7] certs: allow in-kernel access of trusted keys

2018-01-13 Thread Dan Aloni
CC: David Howells Signed-off-by: Dan Aloni --- certs/system_keyring.c| 56 ++- include/keys/system_keyring.h | 3 +++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/certs/system_keyring.c b/certs/system_keyring.c index

[PATCHv2 5/7] printk: allow kmsg to be encrypted using public key encryption

2018-01-13 Thread Dan Aloni
This commit enables the kernel to encrypt the free-form text that is generated by printk() before it is brought up to `dmesg` in userspace. The encryption is made using one of the trusted public keys which are kept built-in inside the kernel. These keys are presently also used for verifying

[PATCHv2 7/7] docs: add dmesg encryption doc

2018-01-13 Thread Dan Aloni
Reviewed-by: Randy Dunlap Signed-off-by: Dan Aloni --- Documentation/admin-guide/dmesg-encryption.rst | 118 + Documentation/admin-guide/index.rst| 1 + 2 files changed, 119 insertions(+) create mode 100644

[PATCHv2 5/7] printk: allow kmsg to be encrypted using public key encryption

2018-01-13 Thread Dan Aloni
This commit enables the kernel to encrypt the free-form text that is generated by printk() before it is brought up to `dmesg` in userspace. The encryption is made using one of the trusted public keys which are kept built-in inside the kernel. These keys are presently also used for verifying

[PATCHv2 7/7] docs: add dmesg encryption doc

2018-01-13 Thread Dan Aloni
Reviewed-by: Randy Dunlap Signed-off-by: Dan Aloni --- Documentation/admin-guide/dmesg-encryption.rst | 118 + Documentation/admin-guide/index.rst| 1 + 2 files changed, 119 insertions(+) create mode 100644 Documentation/admin-guide/dmesg-encryption.rst

Re: [PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Ard Biesheuvel
On 13 January 2018 at 21:13, Arnd Bergmann wrote: > On targets that have different sizes for phys_addr_t and dma_addr_t, > we get a type mismatch error: > > drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': > drivers/net/ethernet/socionext/netsec.c:970:9:

Re: [PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Ard Biesheuvel
On 13 January 2018 at 21:13, Arnd Bergmann wrote: > On targets that have different sizes for phys_addr_t and dma_addr_t, > we get a type mismatch error: > > drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': > drivers/net/ethernet/socionext/netsec.c:970:9: error: passing

  1   2   3   4   >