Commit Graph

45544 Commits (8cb13f4e6d5750957449b4c5740f64af11a9ad36)
 

Author SHA1 Message Date
Alexander Couzens 8cb13f4e6d
rootfs.mk: ensure all timestamp are set to SOURCE_DATE_EPOCH
Some tools doesn't support SOURCE_DATE_EPOCH (e.g. initramfs images).
Ensure all files of a root filesystem are set to SOURCE_DATE_EPOCH.
Make initramfs builds reproducible (for ramips).

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years ago
Hauke Mehrtens 81e93fff7d usign: update to latest Git HEAD
f34a383 main: fix some resource leaks

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 541a321070 fstools: update to latest Git HEAD
4327ed4 mkdev: Avoid out of bounds read
9b3eb63 libblkid-tiny: use blkid_probe_set_utf8label for label set
c9d0462 libblkid-tiny: adds blkid_probe_set_utf8label support

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens a700b5353a procd: update to the latest git HEAD
8e9fb51 procd: Switch to nanosleep
c844ace system: Fix possible integer overflows

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens a6981604b3 hostapd: Fix AP mode PMF disconnection protection bypass
This fixes
* CVE-2019-16275 AP mode PMF disconnection protection bypass
https://w1.fi/security/2019-7/ap-mode-pmf-disconnection-protection-bypass.txt

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hal Martin 3819c1638a sunxi: Add support for Banana Pi M2 Ultra
CPU: Allwinner R40 Quad-Core Cortex-A7 @ 1.2GHz
GPU: Mali 400 MP2
Memory: 2GB DDR3 onboard (shared with GPU)
Onboard: Storage microSD card slot
Onboard: Storage 8GB eMMC
Onboard: Network 10/100/1000M Ethernet RJ45
Onboard: Network WiFi 802.11b/g/n 1x1 (AMPAK AP6212; brcmfmac)
Onboard header: SPI, I2C, GPIO, UART
USB: Two USB 2.0 Host, One USB 2.0 OTG

Known issues:
- WiFi doesn't work
- eMMC not supported

Signed-off-by: Hal Martin <hal.martin@gmail.com>
5 years ago
Rosen Penev f4da28c301 elfutils: Add host build
Needed for glib2 host build:

gresource-tool.c:32:20: fatal error: libelf.h: No such file or directory
 #include <libelf.h>

Changed PKG_LICENSE to the SPDX version.

Switched build dependency for argp-standalone to !USE_GLIBC. argp is a
glibc extension. Treat it as such.

Adjusted patch to use strerror_l, which works properly with both glibc
and musl. The patch errors under glibc with:

dwfl_error.c:158:7: error: ignoring return value of 'strerror_r', declared
with attribute warn_unused_result [-Werror=unused-result]
       strerror_r (error & 0xffff, s, sizeof(s));

void casting does not fix the error.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years ago
Sandeep Sheriker M 89fe1dfac2 at91:sam9x: create sdcard images
create sdcard images for sam9x25 & sam9x35 ek targets.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 612e9ed7b8 at91:sama5: create fit image
create fit image & add it to sdcard image for sama5 target
device.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Eneas U de Queiroz ab19627ecc wolfssl: allow building with hw-crytpo and AES-CCM
Hardware acceleration was disabled when AES-CCM was selected as a
workaround for a build failure.  This applies a couple of upstream
patches fixing this.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years ago
Magnus Kroken 49d96ffc5c mbedtls: update to 2.16.3
Remove 300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch,
the issue has been fixed upstream.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
5 years ago
Rosen Penev 977a8fc5fc uClibc++: Remove faulty patch
This patch was originally added to fix compilation with v4l2rtspserver.
Turns out it was v4l2rtspserver that was broken, not uClibc++. This now
causes issues with a different package where the arguments are being
split.

Note that with this patch, shellcheck throws an error:

SC2068: Double quote array expansions to avoid re-splitting elements.

More: https://github.com/openwrt/packages/pull/9972#discussion_r324878373

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years ago
Hauke Mehrtens 9edd7edcda gcc: Fix ICE in GCC 9.2.0
This backports a fix from GCC master to fix a internal compiler
exception seen when compiling libjson-c with mips16 activated.

Fixes: FS#2455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte c5b10c8282 kernel: bump 4.19 to 4.19.74
Refreshed all patches.

Fixes:
- CVE-2019-15504

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 0b18fca82f kernel: bump 4.14 to 4.14.145
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Jo-Philipp Wich d6bd3fd5c4 iwinfo: update to latest Git HEAD
02112f9 cli: fix reporting of mixed WPA2/WPA3 versions
7faeaea nl80211: properly detect WEP encryption in wpa_supp scan results
629b5ff nl80211: do not confuse open connections with WEP ones
3d47ddd nl80211: rework hostapd and wpa_supplicant wpa suite parsing

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Jo-Philipp Wich abb4f4075e hostapd: mirror ieee80211w ap mode defaults in station mode
For AP mode, OpenWrt automatically sets ieee80211w to either 1 or 2, depending
on whether the encryption is set to sae-mixed, or sae/owe/eap suite-b.

Mirror the same defaults for client mode connections, in order to allow an
OpenWrt station to associate to an OpenWrt ap with SAE, OWE or Suite-B encryption
without the need to manually specify "option ieee80211w" on the station.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Jo-Philipp Wich 4209b28d23 hostapd: fix OWE settings in client mode
This changes fixes the generation of the wpa_supplicant client configuration
in WPA3 OWE client mode. Instead of incorrectly emitting key_mgmt=NONE, use
the proper key_mgmt=OWE setting instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Koen Vandeputte c79cb9fda7 kernel: bump 4.19 to 4.19.73
Refreshed all patches.

Remove upstreamed:
- 840-media-i2c-tda1997x-select-V4L2_FWNODE.patch
- 079-v4.20-ARM-dts-qcom-ipq4019-fix-PCI-range.patch
- 083-ARM-dts-qcom-ipq4019-enlarge-PCIe-BAR-range.patch
- 084-ARM-dts-qcom-ipq4019-Fix-MSI-IRQ-type.patch

Fixes:
- CVE-2019-15030

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte fb0c3eb5a3 kernel: bump 4.14 to 4.14.144
Refreshed all patches.

Altered patches:
- 816-pcie-support-layerscape.patch

Fixes:
-CVE-2019-15030

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f331420654 kernel: bump 4.9 to 4.9.193
Refreshed all patches.

Fixes:
- CVE-2019-15030

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Nick Briggs 3df3bb0dae ramips: add support for EnGenius ESR600
The EnGenius ESR600 is a dual band wireless router with a 4-port gigabit
Ethernet switch, a gigabit Ethernet WAN port and a USB port.

Specification:

- Bootloader:	U-Boot
- SoC:		MediaTek MT7620A (600 MHz)
- Flash:	16MB, Macronix MX25L12845E
- RAM:		64MB, Nanya NT5TU32M16DG-AC
- Serial:	115200 baud, no header, 3.3V
  		J2: Vcc (arrow), Gnd, Tx, Rx
- USB:		USB 2, 5V
- Ethernet:	5 x 1 Gb/s 4 LAN 1 WAN, Atheros AR8327
- WiFi0:	5 GHz 802.11 b/g/n Ralink RT5592N
  		300 Mb/s, 2T2R
- WiFi1:	2.4 GHz 802.11 b/g/n integrated
  		300 Mb/s, 2T2R
- Antennas:	2 per radio, internal
- LEDs:		1 programmable power (amber)
  		2 programable radio (blue)
		1 programable WPS-5G (blue)
		1 non-programable WAN activity (blue)
		1 unconfigured WPS-2.4G (amber)
- Buttons:	GPIO: Reset, WPS

Installation:

Use the OEM web interface to install the ...-factory.dlf image.
Use the OpenWRT ...-sysupgrade.bin image for future upgrades.

The J2 serial port can be accessed either by soldering in a header,
standard 0.1" spacing, or by using pogo-pins against the back side.

As configured by the OEM, the U-Boot boot delay is short, however quickly
typing "1" leads to the U-Boot "System load Linux to SDRAM via TFTP"
prompt.  The TFTP client is configured by default with
     client:   192.168.99.9
     server:   192.168.99.8
     filename: uImageESR600
It will load an OpenWRT initramfs kernel with this method.

Known issues:

1) Only the ports externally labeled WAN, LAN3 and LAN4 are operational.
LAN1 and LAN2 do not appear to power up. This issue is also present
in the Lava LR25G001.

2) The amber WPS-2.4G LED, in the same lightguide as the blue WPS-5G LED,
is not configured in the Device Tree specification.

3) The blue WAN activity LED is not configured in the Device Tree
specification as this causes the AR8327 switch to fail to initialize.

Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
[merge conflict in 02_network]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Daniel Danzberger 10c5d3dd5f ramips: mt7621: Add new device AsiaRF AP7621-NV1
SoC:    Mediatek MT7621A
CPU:    4x 880Mhz
Cache:  32 KB I-Cache and 32 KB D-Cach
        256 KB L2 Cache (shared by Dual-Core)
RAM:    DDR3 512MB 16bits BUS
FLASH:  16MB
Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
POE:    (1x PD, 2x PSE)
USB:    1x 3.0
PCI:    3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
GPS:    Quectel L70B
SIM:    2 Slots
BTN:    Reset
LED:    - Power
        - Ethernet
        - Wifi
        - USB
UART:  UART is present as Pads with throughholes on the PCB.
       They are located on left side.
       3.3V - RX - GND - TX / 57600-8N1
       3.3V is the square pad

Installation
------------
The stock image is a modified openwrt and can be overflashed via sysupgrade -F

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
[merge conflict in mt7621.mk]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Birger Koblitz fde8e2e035 ramips: add support for Asus RT-AC85P
SoC:	MediaTek MT7621AT dual-core @ 880MHz
RAM:	256M (Winbond W632GG6KB-1)
FLASH:	128MB (Macronix MX30LF1G18AC-TI)
WiFi:	- 2.4GHz MediaTek MT7615N bgn
	- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB:	1 x USB 3.1 (Gen 1)
BTN:	Reset, WPS
LED:	- Power (blue)
	- 5Ghz (blue)
	- 2.4GHz (blue)
	- Internet (blue)
	- 4x LAN (blue)
	(LAN/WAN leds are not controllable by GPIOs)
UART: 	UART is present as Pads marked J4 on the PCB.
	3.3V - TX - RX - GND / 57600-8N1
	3.3V is the square pad
MAC:	The MAC address on the router-label matches the MAC of
	the 2.4 GHz WiFi.
	LAN and WAN MAC are identical: MAC_LABEL+4
	5 GHz WiFi MAC: also MAC_LABEL+4

Installation
------------
Via U-Boot tftpd:
Switch on device, within 2s press reset button and keep pressed
until power LED starts blinking slowly.
Upload factory image via tftp put, the router's ip is 192.168.1.1
and expects the client on 192.168.1.75.

The images also work on the Asus RT-AC65P models as tested by Gabor.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Gabor Varga <vargagab@gmail.com>
[fixed Asus -> ASUS in DTS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Birger Koblitz f285e8634c ramips: add support for Edimax RG21S
SoC:	MediaTek MT7621AT dual-core @ 880MHz
RAM:	256M (Nanya NT5CC128M)
FLASH:	16MB (Macronix MX25L12835F)
WiFi:	- 2.4GHz MediaTek MT7615N bgn
	- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB:	No
BTN:	Reset, WPS
LED:	4 red LEDs, indistinguishable when casing closed
UART: 	UART is present as Pads marked J1 on the PCB.
	3.3V - RX - GND - TX / 57600-8N1
	3.3V is the square pad

Installation
------------
Update the factory image via the OEM web-interface
(by default:http://192.168.1.1)
The sysupgrade image can be installed via TFTP from
the U-Boot bootloader. Connect ethernet port 2.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
[flash node rename, EDIMAX -> Edimax, complete device model name]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Álvaro Fernández Rojas 2e2fe82d1e brcm2708: fix Hifiberry DAC+DSP package definition
Fixes: ce536ae ("brcm2708: add support for Hifiberry DAC+DSP")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years ago
Fredrik Olofsson dc76900021 kernel: Correctly search for the FIT image in mtd partition.
Previously all iterations of the loop checked offset=0 in the partition.

Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
5 years ago
Johann Neuhauser 205e0939f0 build: make device tree arg really optional in mkits.sh
If no device tree is given there is no node generated, but
the configuration does still include the name of the missing node.
This will result in a successful build fit image, but bootm does
throw a error message if we want to boot the bad configuration.

Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
5 years ago
Martin Schiller 315405f36b lantiq-dsl: fix value of FECS counter
Instead of the nFECS value, the nFEC value (the number of corrected code words)
was mistakenly used.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 years ago
Alberto Bursi 827f47749b kernel: add module for Emulex OneConnect 10Gbit
add module to support Emulex OneConnect
common in 10Gbit SFP+ cards by Dell/HP/IBM
supports OneConnect OCe10xxx OCe11xxx OCe14xxx, 
LightPulse LPe12xxx

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
5 years ago
Leon M. George f974f8213b hostapd: declare struct wpa_bss early
wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
CONFIG_WPS is not defined.  With the later inclusion of
600-ubus_support, the issue manifests in warnings like these:

wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter list will not be visible outside of this definition or declaration
        struct wpa_bss *bss)
               ^~~~~~~

This patch forward declares 'struct wpa_bss' regardless.

Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit message facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Leon M. George a123df2758 hostapd: revert signature change in patch
The original wpa_hexdump uses a 'void *' for the payload.  With patch
410-limit_debug_messages, the signature changes and compiler warnings
occur at various places.  One such warning is:

 wpa_debug.h:106:20: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'struct wpa_eapol_key *'

Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit message facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Roger Pueyo Centelles 6dda2ea6ad ath79: add SUPPORTED_DEVICES to ubnt_nanostation-m-xw
The ar71xx images for the Ubiquiti NanoStation M (XW) devices use
"nanostation-m-xw" as the board name, but the ath79 images are only
compatible with the "nano-m-xw" board name, so sysupgrade complains.

By adding this additional supported device, sysuspgrade smoothly
upgrades from ar71xx to ath79.

Tested on a NanoStation M (XW) running OpenWrt ar71xx r10250-016d1eb.

Ref: https://github.com/openwrt/openwrt/pull/2418
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[removed duplicate DEVICE_VARIANT, removed uneeded nano-m-xw support]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Adrian Schmutzler 425e0bd19a ath79: add XM device variant for Ubiquiti devices
So far, XW devices have DEVICE_VARIANT defined and XM devices have
no DEVICE_VARIANT set.

This adds DEVICE_VARIANT for XM devices, and moves definitions for
both XM and XW to the common definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 7140394903 ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler f8d9648529 ipq806x: provide label MAC address
This patch adds the label MAC address for several devices in
ipq806x.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler d0f800cfbd mpc85xx: provide label MAC address
This patch adds the label MAC address for some devices in
mpc85xx.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 50fdc0374b ath79: provide label MAC address
This patch adds the label MAC address for several devices in
ath79.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- alfa-network,ap121f
- avm,fritz300e
- ubnt-xm devices

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- adtran,bsap1800-v2
- adtran,bsap1840
- dlink,dir-842-c1/-c2/-c3
- engenius,ecb1750
- iodata,etg3-r
- iodata,wn-ac1167dgr
- iodata,wn-ac1600dgr
- iodata,wn-ac1600dgr2
- iodata,wn-ag300dgr
- nec,wg800hp
- nec,wg1200cr
- trendnet,tew-823dru

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 469e347f19 base-files: provide option to specify label MAC address in board.d
For many devices, MAC addresses cannot be retrieved via the
device tree alias.

To still provide the label MAC address for those, this implements
a second mechanism that will put the address into uci config.
Note that this stores the actual MAC address, whereas in DTS
we reference the bearing device.

This is based on the work of Rosy Song <rosysong@rosinson.com>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 0340718863 base-files: add function to retrieve label MAC address
To refer to the MAC address on a device's label, one can
specify the alias label-mac-device in the DTS which should
point to the bearer of the corresponding MAC address.

With the function get_mac_label, the user can retrieve then
retrieve this address and use it as a value that uniquely
identifies his device.

This is severely helpful for several downstream functionalities,
e.g. define MAC addresses of custom netifs or change the SSID to
be easily recognizable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Hans Dedecker 71cf4a272c curl: bump to 7.66.0
Refresh patches, for changes in version 7.66.0 see https://curl.haxx.se/changes.html#7_66_0

Fixes CVEs:
    CVE-2019-5481
    CVE-2019-5482

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Eneas U de Queiroz d868d0a5d7 openssl: bump to 1.1.1d
This version fixes 3 low-severity vulnerabilities:

- CVE-2019-1547: ECDSA remote timing attack
- CVE-2019-1549: Fork Protection
- CVE-2019-1563: Padding Oracle in PKCS7_dataDecode and
		 CMS_decrypt_set1_pkey

Patches were refreshed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years ago
Álvaro Fernández Rojas ce536aeb39 brcm2708: add support for Hifiberry DAC+DSP
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years ago
Álvaro Fernández Rojas 39ddb25fbd brcm2708: add support for Raspberry Pi 2B 1.2
RPi 2B 1.2 has a BCM2710/BCM2837 like RPi 3 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years ago
Álvaro Fernández Rojas 4f8b350be0 brcm2708: update to latest patches from RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years ago
Álvaro Fernández Rojas b400179ca6 brcm2708-gpu-fw: update to latest firmware
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years ago
DENG Qingfang 1979af10ca kernel: 4.19: fix crash when setting up spi-gpio
If an spi-gpio was specified with num-chipselects = <0> in dts, kernel
will crash:

 Unable to handle kernel paging request at virtual address 32697073
 pgd = (ptrval)
 [32697073] *pgd=00000000
 Internal error: Oops: 5 [# 1] SMP ARM
 Modules linked in:
 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.72 #0
 Hardware name: Generic DT based system
 PC is at validate_desc+0x28/0x80
 LR is at gpiod_direction_output+0x14/0x128
 ...
 [<c0544db4>] (validate_desc) from [<c0545228>] (gpiod_direction_output+0x14/0x128)
 [<c0545228>] (gpiod_direction_output) from [<c05fa714>] (spi_gpio_setup+0x58/0x64)
 [<c05fa714>] (spi_gpio_setup) from [<c05f7258>] (spi_setup+0x12c/0x148)
 [<c05f7258>] (spi_setup) from [<c05f7330>] (spi_add_device+0xbc/0x12c)
 [<c05f7330>] (spi_add_device) from [<c05f7f74>] (spi_register_controller+0x838/0x924)
 [<c05f7f74>] (spi_register_controller) from [<c05fa494>] (spi_bitbang_start+0x108/0x120)
 [<c05fa494>] (spi_bitbang_start) from [<c05faa34>] (spi_gpio_probe+0x314/0x338)
 [<c05faa34>] (spi_gpio_probe) from [<c05a844c>] (platform_drv_probe+0x34/0x70)

The cause is spi_gpio_setup() did not check if the spi-gpio has
chipselect pins before setting their direction and results in derefing
an invalid pointer.

The bug is spotted in kernel 4.19.72 and does not occur in 4.14.

There is a similar fix upstream in kernel 5.2 in commit 249e2632dcd0
("spi: gpio: Don't request CS GPIO in DT use-case").

Ref: https://patchwork.kernel.org/patch/11150619/
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[use upstream patch, moved from hack to pending dir, commit facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Jo-Philipp Wich c933b6d224 procd: fix invalid JSON filter expression in procd_running()
Since service and instance names may contain characters which are not allowed
in JSON path labels, such as dashes or spaces, change the filter expression
to array square bracket notation to properly match these cases as well.

Fixes: 2c3dd70741 ("procd: add procd_running() helper for checking running state")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Jo-Philipp Wich 5ef9e4f107 firewall: update to latest Git HEAD
383eb58 ubus: do not overwrite ipset name attribute

Ref: https://forum.openwrt.org/t/fw3-ipset-procd-objects/44044
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Rafał Miłecki 04e912d217 procd: update to the latest git HEAD
62dc8c0 system: sysupgrade: send reply on error
2710c65 system: refuse sysupgrade with backup if it's unsupported

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago