kisskb: OK linus/axs101_defconfig/arcompact Wed Jan 15, 18:07

2020-01-14 Thread noreply
OK linus/axs101_defconfig/arcompact Wed Jan 15, 18:07 http://kisskb.ellerman.id.au/kisskb/buildresult/14095390/ Commit: Merge branch 'dhowells' (patches from DavidH) e033e7d4a8081852b2cca53e530e2c0f4e6769c0 Compiler: arc-buildroot-linux-uclibc-gcc (Buildroot 2015.08.1) 4.8.4 / GNU ld

kisskb: OK linus/axs103_smp_defconfig/arcv2 Wed Jan 15, 18:06

2020-01-14 Thread noreply
OK linus/axs103_smp_defconfig/arcv2 Wed Jan 15, 18:06 http://kisskb.ellerman.id.au/kisskb/buildresult/14095389/ Commit: Merge branch 'dhowells' (patches from DavidH) e033e7d4a8081852b2cca53e530e2c0f4e6769c0 Compiler: arc-linux-gcc.br_real (Buildroot 2016.11-git-00613-ge98b4dd) 6.2.1

Re: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2020-01-14 Thread Vineet Gupta
On 1/14/20 3:49 PM, Vineet Gupta wrote: > On 12/9/19 11:02 AM, Vineet Gupta wrote: >> ARC gcc generates FDCMP instructions which raises Invalid operation for >> signaling NaN only. This causes glibc iseqsig() primitives to fail (in >> the current ongoing glibc port to ARC) >> >> So split up the har

Re: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2020-01-14 Thread Vineet Gupta
On 12/9/19 11:02 AM, Vineet Gupta wrote: > ARC gcc generates FDCMP instructions which raises Invalid operation for > signaling NaN only. This causes glibc iseqsig() primitives to fail (in > the current ongoing glibc port to ARC) > > So split up the hard float compares into two categories and for un

Re: [RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Al Viro
On Tue, Jan 14, 2020 at 01:22:07PM -0800, Linus Torvalds wrote: > The fact is, copying a string from user space is *very* different from > copying a fixed number of bytes, and that whole dance with > > max_addr = user_addr_max(); > > is absolutely required and necessary. > > You complet

Re: [RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Vineet Gupta
On 1/14/20 1:49 PM, Linus Torvalds wrote: > On Tue, Jan 14, 2020 at 1:37 PM Vineet Gupta > wrote: >> >> On 1/14/20 12:42 PM, Arnd Bergmann wrote: >>> >>> What's wrong with the generic version on little-endian? Any >>> chance you can find a way to make it work as well for you as >>> this copy? >>

Re: [RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Vineet Gupta
On 1/14/20 1:22 PM, Linus Torvalds wrote: > On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta > wrote: >> >> This came up when switching ARC to word-at-a-time interface and using >> generic/optimized strncpy_from_user >> >> It seems the existing code checks for user buffer/string range multiple >> tim

Re: [RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Linus Torvalds
On Tue, Jan 14, 2020 at 1:37 PM Vineet Gupta wrote: > > On 1/14/20 12:42 PM, Arnd Bergmann wrote: > > > > What's wrong with the generic version on little-endian? Any > > chance you can find a way to make it work as well for you as > > this copy? > > find_zero() by default doesn't use pop count ins

Re: [RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Vineet Gupta
On 1/14/20 12:42 PM, Arnd Bergmann wrote: > On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta > wrote: > >> diff --git a/arch/arc/include/asm/word-at-a-time.h >> b/arch/arc/include/asm/word-at-a-time.h >> new file mode 100644 >> index ..00e92be70987 >> --- /dev/null >> +++ b/arch/arc/inc

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Linus Torvalds
On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta wrote: > > There are 2 generic varaints of strncpy_from_user() / strnlen_user() > (1). inline version in asm-generic/uaccess.h I think we should get rid of this entirely. It's just a buggy garbage implementation that nobody should ever actually use.

Re: [RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Linus Torvalds
On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta wrote: > > This came up when switching ARC to word-at-a-time interface and using > generic/optimized strncpy_from_user > > It seems the existing code checks for user buffer/string range multiple > times and one of tem cn be avoided. NO! DO NOT DO THI

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Arnd Bergmann
On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta wrote: > > There are 2 generic varaints of strncpy_from_user() / strnlen_user() > (1). inline version in asm-generic/uaccess.h > (2). optimized word-at-a-time version in lib/* > > This patch disables #1 if #2 selected. This allows arches to continue >

Re: [RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Arnd Bergmann
On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta wrote: > diff --git a/arch/arc/include/asm/word-at-a-time.h > b/arch/arc/include/asm/word-at-a-time.h > new file mode 100644 > index ..00e92be70987 > --- /dev/null > +++ b/arch/arc/include/asm/word-at-a-time.h > @@ -0,0 +1,49 @@ > +/* SPDX

[RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Vineet Gupta
There are 2 generic varaints of strncpy_from_user() / strnlen_user() (1). inline version in asm-generic/uaccess.h (2). optimized word-at-a-time version in lib/* This patch disables #1 if #2 selected. This allows arches to continue reusing asm-generic/uaccess.h for rest of code This came up when

[RFC 0/4] Switching ARC to optimized generic strncpy_from_user

2020-01-14 Thread Vineet Gupta
Hi, This came up when trying to move ARC over to generic word-at-a-time interface. - 1/4 is a trivial fix (and needed for ARC switch) - 2/4 is mucking with internals hence the RFC. I could very likely be overlooking some possible DoS / exploit issues and apologies in advance if thats the

[RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Vineet Gupta
These rely on word access rather than byte loop Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 2 + arch/arc/include/asm/Kbuild | 1 - arch/arc/include/asm/uaccess.h| 71 ++- arch/arc/include/asm/word-at-a-time.h | 49 +

[RFC 3/4] ARC: uaccess: remove noinline variants of __strncpy_from_user() and friends

2020-01-14 Thread Vineet Gupta
This helps with subsequent removal of arch specific variants in favour of optimized generic routines (word vs byte access) Signed-off-by: Vineet Gupta --- arch/arc/include/asm/uaccess.h | 26 ++ arch/arc/mm/extable.c | 23 --- 2 files changed,

[RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Vineet Gupta
This came up when switching ARC to word-at-a-time interface and using generic/optimized strncpy_from_user It seems the existing code checks for user buffer/string range multiple times and one of tem cn be avoided. There's an open-coded range check which computes @max off of user_addr_max() and th

Re: [PATCH net 4/4] ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node

2020-01-14 Thread Vineet Gupta
On 1/14/20 8:09 AM, Jose Abreu wrote: > Add a missing property to GMAC node so that multicast filtering works > correctly. > > Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software > development platform)") > Signed-off-by: Jose Abreu Added to for-curr. Thx, -Vineet _

RE: [PATCH net 4/4] ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node

2020-01-14 Thread Alexey Brodkin
Hi Jose, > -Original Message- > From: Jose Abreu > Sent: Tuesday, January 14, 2020 7:09 PM > To: net...@vger.kernel.org > Cc: Joao Pinto ; Jose Abreu ; > Alexey Brodkin > ; Rob Herring ; Mark Rutland > ; Vineet > Gupta ; devicet...@vger.kernel.org; > linux-snps-arc@lists.infradead.org;

[PATCH net 0/4] net: stmmac: Fix selftests in Synopsys AXS101 board

2020-01-14 Thread Jose Abreu
Set of fixes for sefltests so that they work in Synopsys AXS101 board. Final output: $ ethtool -t eth0 The test result is PASS The test extra info: 1. MAC Loopback 0 2. PHY Loopback -95 3. MMC Counters 0 4. EEE -95 5. H

[PATCH net 3/4] net: stmmac: selftests: Guard VLAN Perfect test against non supported HW

2020-01-14 Thread Jose Abreu
When HW does not support perfect filtering the feature will not be enabled in the net_device. Add a check for this to prevent failures. Fixes: 1b2250a04c1f ("net: stmmac: selftests: Add tests for VLAN Perfect Filtering") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH net 1/4] net: stmmac: selftests: Make it work in Synopsys AXS101 boards

2020-01-14 Thread Jose Abreu
Synopsys AXS101 boards do not support unaligned memory loads or stores. Change the selftests mechanism to explicity: - Not add extra alignment in TX SKB - Use the unaligned version of ether_addr_equal() Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Signed-off-by: Jose Abreu --

[PATCH net 4/4] ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node

2020-01-14 Thread Jose Abreu
Add a missing property to GMAC node so that multicast filtering works correctly. Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software development platform)") Signed-off-by: Jose Abreu --- Cc: Alexey Brodkin Cc: Rob Herring Cc: Mark Rutland Cc: Vineet Gupta Cc: devicet...

[PATCH net 2/4] net: stmmac: selftests: Mark as fail when received VLAN ID != expected

2020-01-14 Thread Jose Abreu
When the VLAN ID does not match the expected one it means filter failed in HW. Fix it. Fixes: 94e18382003c ("net: stmmac: selftests: Add selftest for VLAN TX Offload") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Co