Commit Graph

42059 Commits

Author SHA1 Message Date
Rosen Penev
1249e6d498 tools/xz: Add PKG_CPE_ID for proper CVE tracking
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 622176262d)
2018-12-18 17:22:07 +01:00
Rosen Penev
ae16d0fb39 tools/libressl: Add PKG_CPE_ID for proper CVE tracking
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 74a5c619dc)
2018-12-18 17:22:07 +01:00
Rosen Penev
b2df8076bd tools/patch: Add fedora patch for crashing git style patches
https://lists.gnu.org/archive/html/bug-patch/2018-10/msg00000.html

I assume a CVE number will be assigned soon.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 32fc41baab)
2018-12-18 17:22:06 +01:00
Rosen Penev
27528d48e1 tools: patch: Add missing CVE-2018-6951 fix
uscan reports a new CVE now that PKG_CPE_ID was added.

Reordered patches by date.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[re-title commit & refresh patches]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(backported from a6bd9d0cb6)
2018-12-18 17:22:06 +01:00
Hauke Mehrtens
a10c67b057 tools: patch: Fix build by not modifing Makefile.am
A new test case was adding in one of the patches fixing a problem, this
also included a change in the test/Makefile.am to add this test case.
The build system detected a change in the Makefile.am and wants to
regenerate the Makefile.in, but this fails because automake-1.15 is not
installed yet. As automake depends on patch being build first, make sure
we do not modify the Makefile.am.

This fixes build problem seen by the build bots.

Fixes: 4797dddfde ("patch: apply upstream cve fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 759f111f8d)
2018-12-18 17:22:06 +01:00
Hauke Mehrtens
1adb3b28a9 tools: patch: make patch build depend on automake
The Makefile.am changed and now patch wants to use automake to
regenerate the Makefile.in. Make sure automake was build before we build
patch.

This fixes build problem seen by the build bots.
Fixes: 4797dddfde ("patch: apply upstream cve fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 07e8c217cb)
2018-12-18 17:22:06 +01:00
Russell Senior
ed32045bcc patch: apply upstream cve fixes
Apply two upstream patches to address two CVEs:

 * CVE-2018-1000156
 * CVE-2018-6952

Add PKG_CPE_ID to Makefile.

Build tested on apm821xx and ar71xx.

Signed-off-by: Russell Senior <russell@personaltelco.net>
(backported from 4797dddfde)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 17:22:06 +01:00
Alexander Couzens
ab64f9da81 ugps: update to latest git HEAD
07528d43f9bc nmea.c: set _BSD_SOURCE to have timegm() & stime() on musl
b88037b6bf6a check timegm return code
ccabdf6c235f nmea.c: Add null byte to nmea fields
cdc1478a8133 remove deprication warning

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
(backported from 81d7f82441)
2018-12-18 17:22:06 +01:00
Florian Eckert
b64622b0c8 uqmi: update PKG_RELEASE version
update PKG_RELEASE

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 4cabda8b7d)
2018-12-18 17:22:06 +01:00
Florian Eckert
bcf824a479 uqmi: stop proto handler if verify pin count is not 3
Check pin count value from pin status and stop verification the pin if
the value is less then 3. This should prevent the proto-handler to
lock the SIM. If SIM is locked then the PUK is needed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 0c9d06b5b2)
2018-12-18 17:22:06 +01:00
Florian Eckert
4f02bee9bb uqmi: evaluate pin-status output in qmi_setup function
Load the json output from uqmi --get-pin-status command and evaluate the
"pin1_status" value.

The following uqmi "pin1_status" values are evaluated:

- disabled
  Do not verify PIN because SIM verification is disabled on this SIM

- blocked
  Stop qmi_setup because SIM is locked and a PUK is required

- not_verified
  SIM is not yet verified. Do a uqmi --verify-pin1 command if a SIM is
  specified

- verified:
  Do not verify the PIN because this was already done before

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 4b80bd878d)
2018-12-18 17:22:06 +01:00
Florian Eckert
5a3810b386 uqmi: do not block proto handler if SIM is uninitialized
QMI proto setup-handler will wait forever if SIM does not get initialized.
To fix this stop polling pin status and notify netifd. Netifd will generate
then a "ifup-failed" ACTION.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from f171a86d06)
2018-12-18 17:22:06 +01:00
Florian Eckert
1e012fd697 uqmi: do not block proto handler if modem is unable to registrate
QMI proto setup-handler will wait forever if it is unable to registrate to
the mobile network. To fix this stop polling network registration status
and notify netifd. Netifd will generate then a "ifup-failed" ACTION.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from dec1bfa0f4)
2018-12-18 17:22:06 +01:00
Florian Eckert
5c10aaa65b uqmi: fix variable initilization for timeout handling
Also add logging output for SIM initilization.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 71865200c9)
2018-12-18 17:22:06 +01:00
Florian Eckert
251f4fd20e uqmi: add timeout option value
This value will be used for now during following situations:
* Ask the sim with the uqmi --get-pin-status command.
* Wait for network registration with the uqmi --get-serving-system command.

This two commands wait forever in a while loop. Add a timeout to stop
waiting and so inform netifd.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from dee93def39)
2018-12-18 17:22:06 +01:00
Florian Eckert
860e2dac40 uqmi: redirect uqmi commands output to /dev/null
Move uqmi std and error output on commands without using them to /dev/null.
This will remove useless outputs in the syslog.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 2d57aa9c4c)
2018-12-18 17:22:05 +01:00
Florian Eckert
5d8040455e uqmi: fix indenting
fix indenting

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 692c6d9a5d)
2018-12-18 17:22:05 +01:00
Hans Dedecker
1c56c3d253 gre: make encaplimit support configurable
Make inclusion of the destination option header containing the tunnel
encapsulation limit configurable for IPv6 GRE packets.
Setting the uci parameter encaplimit to ignore; allows to disable the
insertion of the destination option header in the IPv6 GRE packets.
Otherwise the tunnel encapsulation limit value can be set to a value
from 0 till 255 by setting the encaplimit uci parameter accordingly.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 3d015e971f)
2018-12-18 17:22:05 +01:00
Hans Dedecker
d5dd3b1134 odhcpd: update to latest git HEAD (FS#1853)
57f639e (HEAD -> master, origin/master, origin/HEAD) odhcpd: make DHCPv6/RA/NDP support optional
402c274 dhcpv6: check return code of dhcpv6_ia_init()
ee7472a router: don't leak RA message in relay mode (FS#1853)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from af78e90d4c)
2018-12-18 17:22:05 +01:00
Felix Fietkau
dc78c70d5c iw: strip a few more non-essential features from iw-tiny
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 518fb345e1)
2018-12-18 17:22:05 +01:00
Felix Fietkau
ab1b468701 iw: fix filtering linked object files for iw-tiny
It was broken by the recent commit that added iw-full

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 7999282f7f)
2018-12-18 17:22:05 +01:00
Felix Fietkau
0609ea0bf0 iw: add iw-full package without size reduction hacks
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 8c647e873f)
2018-12-18 17:22:05 +01:00
Hans Dedecker
0d8ef97874 ubus: update to latest git HEAD
221ce7e ubusd_acl: event send access list support
da503db ubusd_acl: event listen access list support
c035bab ubusd_acl: rework wildcard support
73bd847 ubusd_event: move strmatch_len to ubus_common.h
0327a91 ubus/lua: add support for BLOBMSG_TYPE_DOUBLE

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from f771a1b962)
2018-12-18 17:22:05 +01:00
Syrone Wong
ea08a29d2a ipset: update to 6.38
dropped already upstream patch

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from 68f109609b)
2018-12-18 17:22:05 +01:00
Emil Muratov
52e9f03b49 zram-swap: bump pkg version
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
(backported from bbf46c9f8f)
2018-12-18 17:22:05 +01:00
Emil Muratov
2432658128 zram-swap: Add "max compression streams" configuration option
Config option to limit maximum compression streams per zram dev for
multicore CPU's. This could be defined via 'zram_comp_streams' option in
the 'system' section of '/etc/config/system' file or via cli (for e.x.
with 'uci set system.@System[0].zram_comp_streams=2 && uci commit
system'). Default is number of logical CPU cores.

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
(backported from 70d3ffb47f)
2018-12-18 17:22:05 +01:00
Emil Muratov
2d4b52707d zram-swap: fix number of created zram devices for multicore CPU's
Use only one zram swap device of the specified $size instead of
[N x $size] devices for multicore CPUs Now zram module uses multiple
compression streams for each dev by default, so we do not need to create
several zram devs to utilize multicore CPUs.

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
(backported from 814cae7362)
2018-12-18 17:22:05 +01:00
Emil Muratov
9a5509736a zram-swap: fix zram dev reset for multicore cpu devices
* "zram stop" could reset up to $(num_of_cores) zram devices even if
   some of those were not mounted as swap dev's. This fix tries to
   enumerate mounted swap zram dev's before making a reset

 * remove hot-added zram devs on stop (except zram0)

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
(backported from 9edc1fe8ab)
2018-12-18 17:22:05 +01:00
Emil Muratov
5ff4ea6bc4 zram-swap: compression algorithm configuration option
Compression algorithms for zram are provided by kernel crypto API, could
be any of [lzo|zl4|deflate|<some_more>] depending on kernel modules.
Compress algo for zram-swap could be defined via 'zram_comp_algo' option
in 'system' section of '/etc/config/system' file, or via cli (for e.x.
with 'uci set system.@System[0].zram_comp_algo=lz4 && uci commit
system'). check available algo's via 'cat /sys/block/zram0
/comp_algorithm'

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
(backported from b9e89adfb7)
2018-12-18 17:22:04 +01:00
Samuel Casa
afd6460418 zram-swap: Shell cosmetic
Signed-off-by: Samuel Casa <samuel.casa@neratec.com>
(backported from 65e9561b3d)
2018-12-18 17:22:04 +01:00
Samuel Casa
ac7c30708f zram-swap: remove trailing whitespaces in init script
Signed-off-by: Samuel Casa <samuel.casa@neratec.com>
[slightly reword subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from b291517fdf)
2018-12-18 17:22:04 +01:00
Rosy Song
d275b30414 odhcpd-ipv6only: fix dependency for IPV6
Signed-off-by: Rosy Song <rosysong@rosinson.com>
(backported from 456df06071)
2018-12-18 17:22:04 +01:00
Hans Dedecker
b1cc8c8ef2 netifd: update to latest git HEAD
4b83102 treewide: switch to C-code style comments
70506bf treewide: make some functions static
d9872db interface: fix removal of dynamic interfaces
2f7ef7d interface: rework code to get rid of interface_set_dynamic

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 8e409f476b)
2018-12-18 17:22:04 +01:00
Hans Dedecker
0ca423d595 netifd: update to latest git HEAD
841b5d1 system-linux: enable by default ignore encaplimit for grev6 tunnels
125cbee system-linux: fix a typo in gre tunnel data parsing logic

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from db6f9d5598)
2018-12-18 17:22:04 +01:00
Felix Fietkau
46fa2453fd hostapd: expose device taxonomy signature via ubus
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 7d8681ccb9)
2018-12-18 17:22:04 +01:00
Felix Fietkau
c1a856b18b hostapd: add support for client taxonomy in the full config
This can be used to fingerprint clients to try to identify the exact
model

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 23c1827e34)
2018-12-18 17:22:04 +01:00
Jo-Philipp Wich
8bf1a35eda hostapd: fix MAC filter related log spam
Backport two upstream fixes to address overly verbose logging of MAC ACL
rejection messages.

Fixes: FS#1468
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 3e633bb370)
2018-12-18 17:22:04 +01:00
Felix Fietkau
0439280c2f kernel: support gcc-optimized inlining on all architectures
Optimized inlining was disabled by default when gcc 4 was still
relatively new. By now, all gcc versions handle this well and there
seems to be no real reason to keep it x86-only.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 1e8882585c)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 17:22:04 +01:00
Hauke Mehrtens
a29fe94e8c kernel: Add missing config option for NFSDv4
This configuration option is not set when building the
layerscape/armv8_64b target.

Fixes: 92aa21497b ("kernel: build support for NFSv4 in nfsd")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 99e1a12fd0)
2018-12-18 17:22:04 +01:00
W. Michael Petullo
c1e53d2c82 kernel: build support for NFSv4 in nfsd
Signed-off-by: W. Michael Petullo <mike@flyn.org>
(backported from 92aa21497b)
2018-12-18 17:22:04 +01:00
Hauke Mehrtens
1a3c129967 kernel: add missing dependency to regmap to kmod-gpio-mcp23s08
This fixes a build problem recently introduced.

Fixes: a904003b9b ("kernel: fix kmod-gpio-mcp23s08 for linux 4.14")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from e882e63f1e)
2018-12-18 17:22:03 +01:00
Petr Štetiar
9885d3aec1 build: Introduce building of artifacts
We currently could (ab)use IMAGES for this task, but the downside is,
that the filenames has filesystem tied to the filename, which might be
confusing as the artifact itself don't has to be used with that specific
filesystem. Another downside is, that the artifacts built with IMAGES
target are build for every FILESYSTEMS filesystem.

Consider following use case:

 define Device/apalis
   ...
   FILESYSTEMS := ext4 squashfs
   IMAGES := spl-uboot.bin recovery.scr
   IMAGE/spl-uboot.bin := append-uboot-spl | pad-to 68k | append-uboot
   IMAGE/recovery.scr := recovery-scr
 endef

Where we would get target binaries with following filenames:

 openwrt-imx6-apalis-squashfs.recovery.scr
 openwrt-imx6-apalis-squashfs.spl-uboot.bin
 openwrt-imx6-apalis-ext4.recovery.scr
 openwrt-imx6-apalis-ext4.spl-uboot.bin

With proposed patch, we could now just do:

 define Device/apalis
   ...
   ARTIFACTS := spl-uboot.bin recovery.scr
   ARTIFACT/spl-uboot.bin := append-uboot-spl | pad-to 68k | append-uboot
   ARTIFACT/recovery.scr := recovery-scr
 endef

Which would produce target binaries with following filenames:

 openwrt-imx6-apalis-recovery.scr
 openwrt-imx6-apalis-spl-uboot.bin

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 493c9a3551)
2018-12-18 17:22:03 +01:00
Thorsten Glaser
16f4057188 build: fix libressl build on x32 (amd64ilp32) host
disable use of assembly code since x32 gets misdetected as amd64

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
(backported from a395563f68)
2018-12-18 17:22:03 +01:00
Christian Lamparter
8b07cd6000 build: remove obsolete -rc kernel testing rewrites
The -rcX "testing" kernels are no longer hosted on
cdn.kernel.org file servers directly in a "testing"
directory. Therefore the logic that tested for "-rc"
can be removed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 92bcd08989)
2018-12-18 17:22:03 +01:00
Felix Fietkau
868a4cf69f build: insert blank line after KernelPackage template to allow chaining calls to it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from b7855230a3)
2018-12-18 17:22:03 +01:00
Felix Fietkau
ca05fd5ebf build: fix kernel headers install for uml
The kernel headers makefile needs to override LINUX_KARCH

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from c3a0102195)
2018-12-18 17:22:03 +01:00
Koen Vandeputte
2f11a9ed68 cns3xxx: fix writing to wrong PCI registers
Originally, cns3xxx used it's own functions for mapping, reading and writing registers.

Upstream commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
removed the internal PCI config write function in favor of the generic one:

cns3xxx_pci_write_config() --> pci_generic_config_write()

cns3xxx_pci_write_config() expected aligned addresses, being produced by cns3xxx_pci_map_bus()
while the generic one pci_generic_config_write() actually expects the real address
as both the function and hardware are capable of byte-aligned writes.

This currently leads to pci_generic_config_write() writing
to the wrong registers on some ocasions.

First issue seen due to this:

- driver ath9k gets loaded
- The driver wants to write value 0xA8 to register PCI_LATENCY_TIMER, located at 0x0D
- cns3xxx_pci_map_bus() aligns the address to 0x0C
- pci_generic_config_write() effectively writes 0xA8 into register 0x0C (CACHE_LINE_SIZE)

This seems to cause some slight instability when certain PCI devices are used.

Another issue example caused by this this is the PCI bus numbering,
where the primary bus is higher than the secondary, which is impossible.

Before:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=02, secondary=01, subordinate=ff, sec-latency=0

After fix:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=00, secondary=01, subordinate=02, sec-latency=0

And very likely some more ..

Fix all by omitting the alignment being done in the mapping function.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-18 15:12:06 +01:00
Koen Vandeputte
7b0e1d28e8 kernel: bump 4.14 to 4.14.89
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-18 15:12:06 +01:00
Koen Vandeputte
386a57dc59 kernel: bump 4.9 to 4.9.146
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-18 15:12:06 +01:00
Hauke Mehrtens
217219ee1d kernel: Activate VDSO on MIPS again
The cache coloring problem on MIPS CPUs was fixed with kernel 4.9.129 of
the kernel 4.9 branch. Activate VDSO support for MIPS again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 91a71804f8)
2018-12-18 11:28:15 +01:00