Re: [OpenWrt-Devel] [openwrt/openwrt] Revert "ar71xx: ag71xx: Add connect message: fixed phy"

2018-08-01 Thread Hannu Nyman

Daniel F. Dickinson wrote at Wed Aug 1 14:17:41 PDT 2018:

> Is this reported to do nasty things *without* debugging?


Daniel,

I compiled for WNDR3800 and your commits totally broke the switch/interface 
detection/initialisation. That was with the default Openwrt kernel options. 
No adjustments for debugging.


Like I wrote in my detailed bug message attached to your original PR and 
referenced in jow's commit message:


https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087


* reverting both your commits fix things in WNDR3800

* reverting only the OOPS prevention leads into OOPS (no surprise), as your 
first commit adds the dev_info message code likely generating the OOPS.



Apparently your first commit tries to give so a detailed error message that 
all needed info is not available and that leads to OOPS. Then your second 
commit tries to prevent the OOPS (which you also noticed??), but you placed 
all your OOPS detection code before the actual tasks of the function, so that 
the actual tasks are not run for some devices.


Additionally, you adopted a new return code ENODEV that may cause unexpected 
things in the calling function. Earlier this function has returned 0 or 
EINVAL, but you added ENODEV as a return code. I have not checked there, so 
just an idea...



Things might work if the OOPS prevention code was inside the (!ret) condition 
block where the values are actually needed, and it would not invent new 
return codes. Simply check that the needed data is available for the detailed 
dev_info message that you are creating. If all data is not available, write a 
simpler dev_info message, but do not adjust return value of the function itself.




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [openwrt/openwrt] Revert "ar71xx: ag71xx: Prevent kernel oops for board def"

2018-08-01 Thread Daniel F. Dickinson
Looking further.  WNDR has a RTL switch right?

On 2018-08-01 04:34 PM, LEDE Commits wrote:
> jow pushed a commit to openwrt/openwrt.git, branch master:
> https://git.lede-project.org/b9bd3285c7c6fbc60374b05ac2da9be41ce75651
> 
> commit b9bd3285c7c6fbc60374b05ac2da9be41ce75651
> Author: Jo-Philipp Wich 
> AuthorDate: Wed Aug 1 22:33:49 2018 +0200
> 
> Revert "ar71xx: ag71xx: Prevent kernel oops for board def"
> 
> This reverts commit 7a3e133751870a3431e2430386a77a002eb24117.
> 
> This change reportedly breaks connectivity on some ar71xx devices, so
> revert it for now.
> 
> Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087
> Reported-by: Hannu Nyman 
> Signed-off-by: Jo-Philipp Wich 
> ---
>  .../drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c | 16 
> +---
>  1 file changed, 1 insertion(+), 15 deletions(-)
> 
> diff --git 
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c 
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> index daa373be69..12fa2e301b 100644
> --- 
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> +++ 
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> @@ -76,24 +76,10 @@ void ag71xx_phy_stop(struct ag71xx *ag)
>  
>  static int ag71xx_phy_connect_fixed(struct ag71xx *ag)
>  {
> - struct platform_device *pdev = ag->pdev;
> - struct device *dev = NULL;
> + struct device *dev = >pdev->dev;
>   struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
>   int ret = 0;
>  
> - if (!pdev)
> - return -ENODEV;
> -
> - dev = >dev;
> -
> - if (!dev)
> - return -ENODEV;
> -
> - if (!ag->phy_dev) {
> - pr_err("Missing PHY for %s", dev_name(dev));
> - return -ENODEV;
> - }

Could the issue be this line: in the case of RTL switch ag71xxx
isn't actually used?  Not sure how the probing happens in that case.

Regards,

Daniel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [openwrt/openwrt] Revert "ar71xx: ag71xx: Add connect message: fixed phy"

2018-08-01 Thread Daniel F. Dickinson
Hi Jo,

Re:

On 2018-08-01 04:34 PM, LEDE Commits wrote:
> jow pushed a commit to openwrt/openwrt.git, branch master:
> https://git.lede-project.org/33dbe2c55da1480559092185c4ef071995d9bc90
> 
> commit 33dbe2c55da1480559092185c4ef071995d9bc90
> Author: Jo-Philipp Wich 
> AuthorDate: Wed Aug 1 22:31:34 2018 +0200
> 
> Revert "ar71xx: ag71xx: Add connect message: fixed phy"
> 
> This reverts commit 0b9f4e880807e3cfd22d12b929202e1edcdc577c.
> 
> This change reportedly breaks connectivity on some ar71xx devices, so
> revert it for now.
> 
> Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087
> Reported-by: Hannu Nyman 
> Signed-off-by: Jo-Philipp Wich 
> ---
>  .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c  | 7 
> ---
>  1 file changed, 7 deletions(-)
> 
> diff --git 
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c 
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> index 53507ab5a3..daa373be69 100644
> --- 
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> +++ 
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> @@ -111,13 +111,6 @@ static int ag71xx_phy_connect_fixed(struct ag71xx *ag)
>   ag->duplex = pdata->duplex;
>   ag->speed = pdata->speed;
>  
> - if (!ret) {
> - dev_info(dev, "connected to fixed PHY at %s [uid=%08x, 
> driver=%s]\n",
> - phydev_name(ag->phy_dev),
> - ag->phy_dev->phy_id, ag->phy_dev->drv->name);
> - } else {
> - pr_err("Failed to connect to fixed PHY\n");
> - }
>   return ret;
>  }
>  
> 

If someone is running with AG71XX debugging enabled, connectivity is
liable to be broken, not by *these* patches but by the console mii_read
and mii_write messages that slow mii communication down.

Is this reported to do nasty things *without* debugging?

Regards,

Daniel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kernel: modules: fix kmod-regmap

2018-08-01 Thread Christian Lamparter
On Wednesday, August 1, 2018 3:21:00 PM CEST Jonas Gorski wrote:
> On 30 July 2018 at 22:35, John Crispin  wrote:
> > On 30/07/18 22:33, Christian Lamparter wrote:
> >>
> >> This patch fixes the a compile issue that was triggered by
> >> apm821xx/sata when kmod-regmap was selected.
> >>
> >> The CONFIG_REGMAP is declared in drivers/base/regmap/Kconfig
> >> as type "bool" and not "tristate". Hence the symbol should
> >> never be set to module, as this confuses the #if CONFIG_REGMAP
> >> guards in include/linux/regmap.h:
> >>
> >> |.../drivers/regulator/core.c:4041: undefined reference to
> >> `dev_get_regmap'
> >> |.../drivers/regulator/core.c:4042: undefined reference to
> >> `dev_get_regmap'
> >> |.../drivers/regulator/core.c:4044: undefined reference to
> >> `dev_get_regmap'
> >> |.../drivers/regulator/helpers.o: In function
> >> `regulator_is_enabled_regmap':
> >> |.../drivers/regulator/helpers.c:36: undefined reference to `regmap_read'
> >> |...
> >
> > i started a test build 2 minutes ago to figure this one out :-) thanks !
> 
> This is actually the wrong fix and papers over an issue in one of our
> local patches.
> 
> We intentionally allow regmap to be built as a module, see
> 
> https://github.com/openwrt/openwrt/blob/master/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
> 
> So there are likely some additional EXPORT_SYMBOL_GPL()s required instead.

Thanks for FYI, I missed this patch completely.

I found that the issue lies in the upstream regulator core code.
It is using these regmap's functions. And the CONFIG_REGULATOR symbol that pulls
in the core's code is sadly a bool menuconfig option... so CONFIG_REGMAP pretty
much becomes a requirement/select for the REGULATOR.

---
diff --git a/target/linux/generic/hack-4.14/259-regmap_dynamic.patch 
b/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
index 1c6e78df30..35803c3181 100644
--- a/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
@@ -9,8 +9,9 @@ Signed-off-by: Felix Fietkau 
  drivers/base/regmap/Kconfig  | 15 ++-
  drivers/base/regmap/Makefile | 12 
  drivers/base/regmap/regmap.c |  3 +++
+ drivers/regulator/Kconfig|  1 +
  include/linux/regmap.h   |  2 +-
- 4 files changed, 22 insertions(+), 10 deletions(-)
+ 5 files changed, 23 insertions(+), 10 deletions(-)
 
 --- a/drivers/base/regmap/Kconfig
 +++ b/drivers/base/regmap/Kconfig
@@ -96,6 +97,15 @@ Signed-off-by: Felix Fietkau 
  postcore_initcall(regmap_initcall);
 +
 +MODULE_LICENSE("GPL");
+--- a/drivers/regulator/Kconfig
 b/drivers/regulator/Kconfig
+@@ -1,5 +1,6 @@
+ menuconfig REGULATOR
+   bool "Voltage and Current Regulator Support"
++  select REGMAP
+   help
+ Generic Voltage and Current Regulator support.
+ 
 --- a/include/linux/regmap.h
 +++ b/include/linux/regmap.h
 @@ -139,7 +139,7 @@ struct reg_sequence {
---

or alternatively, I could just add the
CONFIG_REGMAP=y
(This is possible thanks to the changes in 259-regmap_dynamic.patch)
to the apm821xx/sata config:

---
diff --git a/target/linux/apm821xx/sata/config-default 
b/target/linux/apm821xx/sata/config-default
index 5af8c338f5..c267e7cddc 100644
--- a/target/linux/apm821xx/sata/config-default
+++ b/target/linux/apm821xx/sata/config-default
@@ -45,5 +45,6 @@ CONFIG_PPC_EARLY_DEBUG_44x=y
 # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set
 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x4
 CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
+CONFIG_REGMAP=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
---

What is prefered? I like the first patch more, since it would avoid such
a error in the future. But it does add to the pile of hacks.

Regards,
Christian



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] kernel: bump 4.14 to 4.14.59 for 18.06

2018-08-01 Thread Stijn Segers



Op di, 31 jul 2018 om 12:44 , schreef Koen Vandeputte 
:



On 2018-07-30 21:31, Stijn Segers wrote:

* Refreshed patches.
* Patches made redundant by changes upstream:
   - 
target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

* Patches accepted upstream:
   - 
target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
   - 
target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
   - 
target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
   - 
target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
   - 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
   - 
target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch


Compile-tested on: ramips/mt7621, x86/64
Run-tested on: ramips/mt7621, x86/64

Signed-off-by: Stijn Segers 
---
  include/kernel-version.mk  |   4 +-
  ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 
  ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
  ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
  ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
  ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
  ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
  ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
  ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 --
  .../802-usb-xhci-force-msi-renesas-xhci.patch  |   2 +-
  ...-add-support-for-performing-fake-doorbell.patch |   2 +-
  .../patches-4.14/830-huawei_e970_support.patch |   4 +-
  ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 


  ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 
  .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
  ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 
-

  ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
  .../generic/hack-4.14/207-disable-modorder.patch   |   4 +-
  .../hack-4.14/211-host_tools_portability.patch |   2 +-
  .../linux/generic/hack-4.14/220-gc_sections.patch  |   2 +-
  .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
  ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
  .../pending-4.14/201-extra_optimization.patch  |   2 +-
  ...610-netfilter_match_bypass_default_checks.patch |   6 +-
  .../pending-4.14/630-packet_socket_type.patch  |   6 +-
  .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
  .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 --
  .../patches-4.14/0052-net-phy-add-FC.patch |   2 +-
  ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
  .../oxnas/patches-4.14/999-libata-hacks.patch  |   8 +-
  .../0032-USB-dwc2-add-device_reset.patch   |   2 +-
  ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 
  ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
  33 files changed, 44 insertions(+), 540 deletions(-)
  delete mode 100644 
target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
  delete mode 100644 
target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
  delete mode 100644 
target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
  delete mode 100644 
target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
  delete mode 100644 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
  delete mode 100644 
target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
  delete mode 100644 
target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch


Hi Stijn,

Thanks for the patch.


The patch is missing the fix for the possible ext4 corruption issue 
on newly created filesystems [1]
Stijn Tintel bumped a kernel update to master adding it, which can be 
used as a reference [2]



Koen

[1] 
https://github.com/torvalds/linux/commit/5012284700775a4e6e3fbe7eac4c543c4874b559.patch
[2] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=22b9f99b87fa1ff991180cabf02dd04d1bddce2b


Hi Koen,

Will send in a v2.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/1] ustream-ssl: mbedtls: use chacha-poly ciphersuites

2018-08-01 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
These ciphersuites were added in mbedtls v2.12.0, our current version,
so we may add them to the ustream-ssl ciphersuite list.
They were already part of the list for openssl and wolfssl.
Chacha20-Poly1305 is a 256-bit cipher with AEAD, much faster than AES on
CPUs without special AES instructions (the case for most embedded
chips).

Signed-off-by: Eneas U de Queiroz 

diff --git a/ustream-mbedtls.c b/ustream-mbedtls.c
index 347c600..b7d7629 100644
--- a/ustream-mbedtls.c
+++ b/ustream-mbedtls.c
@@ -94,7 +94,9 @@ static int _urandom(void *ctx, unsigned char *out, size_t len)
 
 static const int default_ciphersuites_server[] =
 {
+   MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
AES_CIPHERS(ECDHE_ECDSA),
+   MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
AES_CIPHERS(ECDHE_RSA),
AES_CIPHERS(RSA),
0
@@ -102,8 +104,11 @@ static const int default_ciphersuites_server[] =
 
 static const int default_ciphersuites_client[] =
 {
+   MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
AES_CIPHERS(ECDHE_ECDSA),
+   MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
AES_CIPHERS(ECDHE_RSA),
+   MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
AES_CIPHERS(DHE_RSA),
MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
AES_CIPHERS(RSA),
-- 
2.16.4


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 0/1] ustream-ssl: mbedtls: use chacha-poly ciphersuites

2018-08-01 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Here are the ciphersuite preference parameters being used in
ustream-ssl with openssl/wolfssl (and with mbedtls, minus the
chacha-poly cipher):

 - key exchange: prefer ECDHE, then DHE(client only), then RSA
 - prefer AEAD ciphers:
  chacha20-poly1305, the fastest in software, 256-bits
  aes128-gcm, 128-bits
  aes256-gcm, 256-bits
 - CBC ciphers
  aes128, aes256, 3DES(client only)

Now that mbedtls added support to chacha-poly, we can finally make them
all the same.  As for the speed comparison between the AEAD ciphers,
here are the numbers using openssl 1.1.0 on Asus RT-N56U (mips74kc).

((openssl speed -evp chacha20-poly1305 | egrep "^(type|chacha)") && (openssl 
speed -evp aes-128-gcm && openssl speed -evp aes-256-gcm) | egrep "^aes") 
2>/dev/null
type  16 bytes   64 bytes  256 bytes  1024 bytes 8192 bytes  16384 
bytes
chacha20-poly1305  6873.30k  10734.22k  12217.75k   12613.07k  12769.39k
12665.00k
aes-128-gcm3759.88k   4280.96k   4415.66k4437.79k   4456.12k 
4436.88k
aes-256-gcm3408.83k   3738.10k   3838.52k3841.90k   3864.31k 
3882.17k

chach20-poly1305 is almost 3 times faster than AES128, with twice the
strength.

Eneas U de Queiroz (1):
  ustream-ssl: mbedtls: use chacha-poly ciphersuites

 ustream-mbedtls.c | 5 +
 1 file changed, 5 insertions(+)

-- 
2.16.4


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kernel: modules: fix kmod-regmap

2018-08-01 Thread Jonas Gorski
On 30 July 2018 at 22:35, John Crispin  wrote:
>
>
> On 30/07/18 22:33, Christian Lamparter wrote:
>>
>> This patch fixes the a compile issue that was triggered by
>> apm821xx/sata when kmod-regmap was selected.
>>
>> The CONFIG_REGMAP is declared in drivers/base/regmap/Kconfig
>> as type "bool" and not "tristate". Hence the symbol should
>> never be set to module, as this confuses the #if CONFIG_REGMAP
>> guards in include/linux/regmap.h:
>>
>> |.../drivers/regulator/core.c:4041: undefined reference to
>> `dev_get_regmap'
>> |.../drivers/regulator/core.c:4042: undefined reference to
>> `dev_get_regmap'
>> |.../drivers/regulator/core.c:4044: undefined reference to
>> `dev_get_regmap'
>> |.../drivers/regulator/helpers.o: In function
>> `regulator_is_enabled_regmap':
>> |.../drivers/regulator/helpers.c:36: undefined reference to `regmap_read'
>> |...
>
> i started a test build 2 minutes ago to figure this one out :-) thanks !

This is actually the wrong fix and papers over an issue in one of our
local patches.

We intentionally allow regmap to be built as a module, see

https://github.com/openwrt/openwrt/blob/master/target/linux/generic/hack-4.14/259-regmap_dynamic.patch

So there are likely some additional EXPORT_SYMBOL_GPL()s required instead.


Regards
Jonas

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/1] libpcap: patch to add limits.h to pcap-usb-linux.c

2018-08-01 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This is an upstream-applied patch that fixes 'PATH_MAX' and 'NAME_MAX'
undeclared when compiling on musl with CONFIG_PCAP_HAS_USB.

[aafa351] pcap-usb-linux.c: add missing limits.h for musl systems.

Signed-off-by: Eneas U de Queiroz 

diff --git 
a/package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch 
b/package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch
new file mode 100644
index 00..cae8012ede
--- /dev/null
+++ 
b/package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch
@@ -0,0 +1,22 @@
+From aafa3512b7b742f5e66a5543e41974cc5e7eebfa Mon Sep 17 00:00:00 2001
+From: maxice8 
+Date: Sun, 22 Jul 2018 18:54:17 -0300
+Subject: [PATCH] pcap-usb-linux.c: add missing limits.h for musl systems.
+
+fix compilation on musl libc systems like Void Linux and Alpine.
+---
+ pcap-usb-linux.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c
+index 6f8adf65e..b92c05ea1 100644
+--- a/pcap-usb-linux.c
 b/pcap-usb-linux.c
+@@ -50,6 +50,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
-- 
2.16.4


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 0/1] libpcap: patch to add limits.h to pcap-usb-linux.c

2018-08-01 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This patch, taken from
https://github.com/the-tcpdump-group/libpcap/commit/aafa351
fixes compilation with CONFIG_PCAP_HAS_USB set on musl.

./pcap-usb-linux.c: In function 'usb_findalldevs':
./pcap-usb-linux.c:264:19: error: 'PATH_MAX' undeclared (first use in
this function); did you mean 'AF_MAX'?
  char usb_mon_dir[PATH_MAX];
   ^~~~
   AF_MAX
./pcap-usb-linux.c:264:19: note: each undeclared identifier is reported
only once for each function it appears in
./pcap-usb-linux.c: In function 'probe_devices':
./pcap-usb-linux.c:419:41: error: 'NAME_MAX' undeclared (first use in
this function); did you mean 'AF_MAX'?
  char buf[sizeof("/dev/bus/usb/000/") + NAME_MAX];
 ^~~~
 AF_MAX
make[3]: *** [Makefile:95: pcap-usb-linux.o] Error 1

Eneas U de Queiroz (1):
  libpcap: patch to add limits.h to pcap-usb-linux.c

 ...205-pcap-usb-linux.c-add-missing-limits.h.patch | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 
package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch

-- 
2.16.4


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt 18.06.0 final

2018-08-01 Thread Jo-Philipp Wich
Hi,

The OpenWrt community is proud to announce the first release of the
OpenWrt 18.06 stable version series. It incorporates over 4000 commits
since branching the previous LEDE 17.01 release and has been under
development for well over a year.

With this release, the re-merged OpenWrt project attempts to define a
baseline for future development based on the technological modernization
and refined release processes done by the former LEDE project.

---

Some selected highlights of this release since the previous LEDE 17.01
and OpenWrt Chaos Calmer 15.05 versions are:

  * Linux kernel updated to version either 4.9.111 or 4.14.52, depending
on the architecture
  * Updated toolchain:
* musl libc 1.1.19
* uClibc-ng 1.0.30
* glibc 2.26+
* gcc 7.3.0
* binutils 2.29.1
  * Updated Linux kernel:
* Kernel 4.9.111 for ar7, ar71xx, arc770, at91, brcm2708, brcm63xx,
  ixp4xx, lantiq, layerscape, mpc85xx, orion, rb532 and uml
* Kernel 4.14.52 for apm821xx, archs38, armvirt, ath25, bcm53xx,
  brcm47xx, cns3xxx, gemini, imx6, ipq40xx, ipq806x, kirkwood,
  malta, mediatek, mvebu, mxs, octeon, octeontx, omap, oxnas,
  pistachio, ramips, sunxi and x86
* Backported network flow offloading support for targets using the
  4.14 Linux kernel
  * Network userland:
* IPv6 related fixes in DHCPv6 client and servers
* Support for user DHCPv6 client options in sent packets
* DHCP forced renew support (RFC6704) in odhcpd
* Firewall support for conntrack helper setup and better ipset
  integration
* Introduced support for configuring GRE, GRE-TAP, VETH, VTI, VXLAN
* CAKE v20180716 includes tc filter classification making ingress
  prioritisation easier
* Cake & sqm-scripts updated representing state of the art
  mitigations for bufferbloat
* Wireguard VPN v20180625 with MIPS optimisations and flow-offload
  compatibility
  * System userland:
* Improvements in system upgrade procedure
* Bugfixes in the process manager, system message bus, embedded
  webserver and the configuration management library
  * Platform and Driver Support
* Dropped adm5120, adm8668, au1000, mcs814x, omap24xx, ppc40x,
  ppc44x, xburst and zynq targets
* Added Spectre and Meltdown mitigations as well as microcode
  loading support to x86
* Rebased oxnas target on top of upstream Kernel 4.14 support
* Updates and new device support across all targets
  * Web interface:
* New auto-rollback functionality to revert configuration changes
  when access to the router is lost
* Better support for displaying virtual interfaces and low level
  configuration errors
* Security improvements


For a detailed list of changes since 18.06.0-rc2, see
https://openwrt.org/releases/18.06/changelog-18.06.0-final

For a complete list of changes since branching the previous old stable
LEDE 17.01 release refer to
https://lede-project.org/releases/18.06/changelog-18.06.0

---

Known issues:

  * Support for a hardware-bug workaround needed for devices having an
AT8032 ethernet phy accidentally got dropped. Hence devices with
that ethernet chip may experience connectivity issues. At least
ubnt-loco-m-xw and most likely other single-port ubnt devices are
affected. [fix merged, queued for 18.06.1]
  * Using ip4ip6 tunnel interface as a fallback interface accepting
ip4-in-ip6 tunneled packets from any remote address doesn't work.
[fix merged, queued for 18.06.1]
  * Support for PCIe on ox820 is broken, results in missing USB3 support
on Shuttle KD20 [driver needs more work]
  * Images for some device became too big to support a persistent
overlay, causing such models to lose configuration after a reboot.
If you experience this problem, please report the affected device
and consider downgrading to LEDE 17.01.5 or using the Image Builder
to pack a smaller custom image.
  * Some devices, such as the Netgear R6100, may lack 5GHz wireless AC
support. Investigation is ongoing and a fix is expected for 18.06.1.
Affected users shall downgrade to LEDE 17.01.5 for the time being
and wait for the first service release.
  * Devices using the mt76 wireless driver may experience stability
issues on 2.4GHz
  * The legacy at91 and legacy ath25 (formerly “atheros”) targets failed
to build due to image size constraints and are not part of the
release.
  * A GUI bug prevents selecting and scrolling text in the system and
kernel log pages. To solve, either upgrade “luci-theme-bootstrap”
using opkg or switch to another theme. [fix merged, queued for
18.06.1]
  * Any outstanding issues reported at https://bugs.lede-project.org/

---

For latest information about the 18.06 series, refer to the wiki at:
https://openwrt.org/releases/18.06/

To download the v18.06.0 images, navigate to:
https://downloads.openwrt.org/releases/18.06.0/

---

With the release of OpenWrt 18.06, the old 

Re: [OpenWrt-Devel] [PATCH] libpcap: patch to add limits.h to pcap-usb-linux.c

2018-08-01 Thread John Crispin



On 01/08/18 14:08, Bjørn Mork wrote:

John Crispin  writes:


none of the buildservers seem to break without this patch. please
repost explaining how the build breaks without this patch. also
reference the place where you copied the patch from

The buildservers probably don't build this file since
CONFIG_PCAP_HAS_USB is 'n' by default?

Building on current master with

  bjorn@canardo:/usr/local/src/lede$ grep PCAP .config
  CONFIG_PCAP_HAS_USB=y
  CONFIG_PCAP_HAS_NETFILTER=y

results in:

bjorn@canardo:/usr/local/src/lede$ make V=s package/libpcap/compile
..
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable 
-Wno-error=unused-result -mfloat-abi=hard 
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections 
-I/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux/include
 -fpic -I.  -DBUILDING_PCAP -D_BSD_SOURCE -Dpcap_EXPORTS -DHAVE_CONFIG_H  -Os 
-pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard 
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections  -c -o 
pcap-usb-linux.o ./pcap-usb-linux.c
./pcap-usb-linux.c: In function 'usb_findalldevs':
./pcap-usb-linux.c:264:19: error: 'PATH_MAX' undeclared (first use in this 
function); did you mean 'AF_MAX'?
   char usb_mon_dir[PATH_MAX];
^~~~
AF_MAX
./pcap-usb-linux.c:264:19: note: each undeclared identifier is reported only 
once for each function it appears in
./pcap-usb-linux.c: In function 'probe_devices':
./pcap-usb-linux.c:419:41: error: 'NAME_MAX' undeclared (first use in this 
function); did you mean 'AF_MAX'?
   char buf[sizeof("/dev/bus/usb/000/") + NAME_MAX];
  ^~~~
  AF_MAX
Makefile:94: recipe for target 'pcap-usb-linux.o' failed
make[3]: *** [pcap-usb-linux.o] Error 1
make[3]: Leaving directory 
'/home/bjorn/tmp/tmp-lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0'
Makefile:101: recipe for target 
'/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built'
 failed
make[2]: *** 
[/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built]
 Error 2
make[2]: Leaving directory 
'/mnt/storage/media/.diverse/src/lede/package/libs/libpcap'
Command exited with non-zero status 2
time: package/libs/libpcap/compile#2.20#0.39#6.47
package/Makefile:107: recipe for target 'package/libs/libpcap/compile' failed
make[1]: *** [package/libs/libpcap/compile] Error 2
make[1]: Leaving directory '/mnt/storage/media/.diverse/src/lede'
/mnt/storage/media/.diverse/src/lede/include/toplevel.mk:216: recipe for target 
'package/libpcap/compile' failed
make: *** [package/libpcap/compile] Error 2


Patch looks good to me.




Bjørn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Hi Bjørn,

thanks for testing, I;ll merge it in a sec

John






___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libpcap: patch to add limits.h to pcap-usb-linux.c

2018-08-01 Thread Bjørn Mork
John Crispin  writes:

> none of the buildservers seem to break without this patch. please
> repost explaining how the build breaks without this patch. also
> reference the place where you copied the patch from

The buildservers probably don't build this file since
CONFIG_PCAP_HAS_USB is 'n' by default?

Building on current master with

 bjorn@canardo:/usr/local/src/lede$ grep PCAP .config
 CONFIG_PCAP_HAS_USB=y
 CONFIG_PCAP_HAS_NETFILTER=y

results in:

bjorn@canardo:/usr/local/src/lede$ make V=s package/libpcap/compile
..
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable 
-Wno-error=unused-result -mfloat-abi=hard 
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections 
-I/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux/include
 -fpic -I.  -DBUILDING_PCAP -D_BSD_SOURCE -Dpcap_EXPORTS -DHAVE_CONFIG_H  -Os 
-pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard 
-iremap/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0:libpcap-1.9.0
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections  -c -o 
pcap-usb-linux.o ./pcap-usb-linux.c
./pcap-usb-linux.c: In function 'usb_findalldevs':
./pcap-usb-linux.c:264:19: error: 'PATH_MAX' undeclared (first use in this 
function); did you mean 'AF_MAX'?
  char usb_mon_dir[PATH_MAX];
   ^~~~
   AF_MAX
./pcap-usb-linux.c:264:19: note: each undeclared identifier is reported only 
once for each function it appears in
./pcap-usb-linux.c: In function 'probe_devices':
./pcap-usb-linux.c:419:41: error: 'NAME_MAX' undeclared (first use in this 
function); did you mean 'AF_MAX'?
  char buf[sizeof("/dev/bus/usb/000/") + NAME_MAX];
 ^~~~
 AF_MAX
Makefile:94: recipe for target 'pcap-usb-linux.o' failed
make[3]: *** [pcap-usb-linux.o] Error 1
make[3]: Leaving directory 
'/home/bjorn/tmp/tmp-lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0'
Makefile:101: recipe for target 
'/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built'
 failed
make[2]: *** 
[/mnt/storage/media/.diverse/src/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/libpcap-1.9.0/.built]
 Error 2
make[2]: Leaving directory 
'/mnt/storage/media/.diverse/src/lede/package/libs/libpcap'
Command exited with non-zero status 2
time: package/libs/libpcap/compile#2.20#0.39#6.47
package/Makefile:107: recipe for target 'package/libs/libpcap/compile' failed
make[1]: *** [package/libs/libpcap/compile] Error 2
make[1]: Leaving directory '/mnt/storage/media/.diverse/src/lede'
/mnt/storage/media/.diverse/src/lede/include/toplevel.mk:216: recipe for target 
'package/libpcap/compile' failed
make: *** [package/libpcap/compile] Error 2


Patch looks good to me.




Bjørn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ustream-ssl: mbedtls: use chacha-poly ciphersuites

2018-08-01 Thread John Crispin
The patch description is missing a reason why we should enable it. just 
because upstream added it is not really reason enough.

    John

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libpcap: patch to add limits.h to pcap-usb-linux.c

2018-08-01 Thread John Crispin
none of the buildservers seem to break without this patch. please repost 
explaining how the build breaks without this patch. also reference the 
place where you copied the patch from

    John

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel