Previously the dts were using a value determined by empirical testing,
because of a spi driver/clock bug. The bug was fixed quite some time
ago. 33 MHz is the default clock frequency used by RouterBOOT and thus
safe.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/dts
also verified that signal integrity is not
an issue, the clock edges are still pretty good.
v3 is just a rebase on an up-to-date OpenWrt tree due to moved files.
Tobias
Changelog:
v2:
- Remove m25p,fast-read from dts
v3:
- Rebase for renamed dts files
Tobias Schramm (1):
ramips: mt7621
also verified that signal integrity is not
an issue, the clock edges are still pretty good.
v2 removes the m25p,fast-read property from the dts since it is not
required until 50 MHz.
Tobias
Changelog:
v2:
- Remove m25p,fast-read from dts
Tobias Schramm (1):
ramips: mt7621: use higher SPI
Previously the dts were using a value determined by empirical testing,
because of a spi driver/clock bug. The bug was fixed quite some time
ago. 33 MHz is the default clock frequency used by RouterBOOT and thus
safe.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/dts
Hi,
>> @@ -83,8 +83,8 @@
>> w25q128@0 {
>> compatible = "jedec,spi-nor";
>> reg = <0>;
>> - // XXX empiric value to obtain actual 10MHz SCK at the chip
>> - spi-max-frequency = <3125000>;
>> + m25p,fast-read;
>> +
also verified that signal integrity is not
an issue, the clock edges are still pretty good.
Tobias
Tobias Schramm (1):
ramips: mt7621: use higher SPI clock speed on Mikrotik rbm11g and
rbm33g
target/linux/ramips/dts/mt7621_mikrotik_rbm11g.dts | 4 ++--
target/linux/ramips/dts
Previously the dts were using a value determined by empirical testing,
because of a spi driver/clock bug. The bug was fixed quite some time
ago. 33 MHz is the default clock frequency used by RouterBOOT and thus
safe.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/dts
port@0 {
status = "okay";
label = "lan";
+ mtd-mac-address = <_config 0x0010>;
+ mtd-mac-address-increment = <2>;
>>>
>>> That doesn't make sense to me.
>>>
>>> gmac0 is configured to 0x10
Hi Adrian,
>> port@0 {
>> status = "okay";
>> label = "lan";
>> +mtd-mac-address = <_config 0x0010>;
>> +mtd-mac-address-increment = <2>;
>
> That doesn't make sense to me.
>
> gmac0 is configured to
This commit adds a mac address from the hard_config partition
to LAN port of rbm11g.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/dts/mt7621_mikrotik_rbm11g.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_rbm11g.dts
b/target/linux
I have a rbm11g and can confirm that the LAN port is indeed
switch port 0.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/dts/mt7621_mikrotik_rbm11g.dts | 1 -
target/linux/ramips/image/mt7621.mk| 1 -
2 files changed, 2 deletions(-)
diff --git a/target/linux/ramips/dts
e LAN port.
Additionally the first two patches remove some differences between
the rbm33g and rbm11g.
Feel free to apply partially if you don't agree with one or both
of the first two patches.
Tobias
Tobias Schramm (3):
ramips: mt7621: add LAN port mac address to rbm11g dts
ramips: mt7621: add
The rbm11g has a label with printed on mac address similar to the
rbm33g.
Signed-off-by: Tobias Schramm
---
target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
b/target
Hi,
good catch. I've sent a v4 that addresses this issue.
Regards
Tobias
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
,
Tobias Schramm
Changelog:
v2:
- Add documentation to attribute checking methods in blobmsg.h
v3:
- Inline attribute checking methods
- Fix orthography
v4:
- Replace inappropriate use of 'NULL' with 'false'
Tobias Schramm (3):
Ensure blob_attr length check does not perform out of bounds reads
blobmsg_check_attr_safe adds a length limit specifying the max offset from attr
that
can be read safely
Signed-off-by: Tobias Schramm
---
blobmsg.c | 24 ++--
blobmsg.h | 24 +++-
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/blobmsg.c
Signed-off-by: Tobias Schramm
---
blobmsg.c | 12 ++--
blobmsg.h | 49 -
2 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/blobmsg.c b/blobmsg.c
index 10f3801..13c83bc 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -75,13 +75,16
Before there might have been as little as one single byte left which would
result
in 3 bytes of blob_attr->id_len being out of bounds
Signed-off-by: Tobias Schramm
---
blob.h| 4 ++--
blobmsg.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blob.h b/blob.h
in
Hi,
thanks for the feedback.
I've sent a v3 that should implement all improvements you have pointed out.
Regards,
Tobias
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Signed-off-by: Tobias Schramm
---
blobmsg.c | 12 ++--
blobmsg.h | 49 -
2 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/blobmsg.c b/blobmsg.c
index 10f3801..4b142e9 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -75,13 +75,16
blobmsg_check_attr_safe adds a length limit specifying the max offset from attr
that
can be read safely
Signed-off-by: Tobias Schramm
---
blobmsg.c | 24 ++--
blobmsg.h | 24 +++-
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/blobmsg.c
Before there might have been as little as one single byte left which would
result
in 3 bytes of blob_attr->id_len being out of bounds
Signed-off-by: Tobias Schramm
---
blob.h| 4 ++--
blobmsg.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blob.h b/blob.h
in
,
Tobias Schramm
Changelog:
v2:
- Add documentation to attribute checking methods in blobmsg.h
v3:
- Inline attribute checking methods
- Fix orthography
Tobias Schramm (3):
Ensure blob_attr length check does not perform out of bounds reads
Replace use of blobmsg_check_attr
Hey,
sorry for top posting. Using the Gmail App for Mailinglist posts might
not be the best of ideas.
In my code I'm trying to set a precedent for how the attribute
checking methods should be used.
My gerneral idea was to code that part defensively. Thus I call the
_safe variants in my code.
You
Signed-off-by: Tobias Schramm
---
blobmsg.c | 15 ---
blobmsg.h | 40
2 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/blobmsg.c b/blobmsg.c
index dd4b506..97a9a0b 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -81,10 +81,14 @@ bool
blobmsg_check_attr_safe adds a length limit specifying the max offset from attr
that
can be read safely
Signed-off-by: Tobias Schramm
---
blobmsg.c | 27 ++-
blobmsg.h | 18 ++
2 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/blobmsg.c b
Before there might have been as little as one single byte left which would
result
in 3 bytes of blob_attr->id_len being out of bounds
Signed-off-by: Tobias Schramm
---
blob.h| 4 ++--
blobmsg.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blob.h b/blob.h
in
,
Tobias Schramm
Changelog:
v2:
- Add documentation to attribute checking methods in blobmsg.h
Tobias Schramm (3):
Ensure blob_attr length check does not perform out of bounds reads
Replace use of blobmsg_check_attr by blobmsg_check_attr_safe
Add _safe variants for all attribute checking methods
True. I'll send a V2 with some documentation added.
Am Fr., 23. Nov. 2018 um 05:11 Uhr schrieb Yousong Zhou :
>
> On Thu, 22 Nov 2018 at 10:00, Tobias Schramm wrote:
> >
> > Hi,
> >
> > this patch set makes parsing of blobmsg messages more robust against
> >
at the implementation of __blob_for_each_attr and
understand it first. Also I don't see any downsides to calling
blobmsg_check_attr_safe over blobmsg_check_attr.
Am Fr., 23. Nov. 2018 um 05:06 Uhr schrieb Yousong Zhou :
>
> On Thu, 22 Nov 2018 at 10:01, Tobias Schramm
Hi,
thanks for the feedback. While blob_pad_len does cover the size of
struct blob_attr it will always read attr->id_len which might be out
of bounds already. Thus we need to check that rem >= sizeof(struct
blob_attr) before.
Tobias
___
openwrt-devel
blobmsg_check_attr_safe adds a length limit specifying the max offset from attr
that
can be read safely
Signed-off-by: Tobias Schramm
---
blobmsg.c | 27 ++-
blobmsg.h | 2 ++
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/blobmsg.c b/blobmsg.c
index
Before there might have been as little as one single byte left which would
result
int 3 bytes of blob_attr->id_len being out of bounds
Signed-off-by: Tobias Schramm
---
blob.h| 4 ++--
blobmsg.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blob.h b/blob.h
in
Signed-off-by: Tobias Schramm
---
blobmsg.c | 15 ---
blobmsg.h | 12 ++--
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/blobmsg.c b/blobmsg.c
index dd4b506..97a9a0b 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -81,10 +81,14 @@ bool blobmsg_check_attr_safe
,
Tobias Schramm
Tobias Schramm (3):
Ensure blob_attr length check does not perform out of bounds reads
Replace use of blobmsg_check_attr by blobmsg_check_attr_safe
Add _safe variants for all attribute checking methods
blob.h| 4 ++--
blobmsg.c | 42
: Close ustream file handle only if allocated
Signed-off-by: Tobias Schramm
---
package/libs/uclient/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index 3eefa2e012..888fce3e2a 100644
--- a/package
patching for LEDE, please
let me know if it isn't.
Cheers,
Tobias
Tobias Schramm (1):
uclient: update to latest git HEAD
package/libs/uclient/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.18.0
___
openwrt-devel mailing
Since the connection setup in uclient_do_connect can fail before
ustream_init_fd is called we must check the fd was actually allocated
before closing it, else we would close STDIN.
Signed-off-by: Tobias Schramm
---
uclient-http.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
Hi,
this patch fixes a bug in uclient that caused it to close STDIN if the
connection setup failed very early on.
Together with a small oversight in busybox this lead to quite an
interesting bug in Freifunk Gluon:
https://github.com/freifunk-gluon/gluon/issues/1496
Cheers,
Tobias
Tobias
Hi,
I'm currently working on bringing OpenWRT support to the RouterBOARD RBM33G [1].
The device is based on the mt7621 SoC and has two spi nor-flash chips.
The first chip is very small (512 kB) and connected to CS0. The second
chip is a lot larger (16 MB) and connected to CS1.
The mt7621-spi
Add null pointer check to allocation of url filename
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/uclient-utils.c b/uclient-utils.c
index a375eea..3eaf2d5 100644
--- a/uclient-utils.c
+++ b/u
Add some error handling for errors during assembly of headers
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 35 +++
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/uclient-http.c b/uclient-http.c
index 20b8a9a..1
of auth header functions
Fix wrong goto in open_output_file
Fix wrong patch subject
Tobias Schramm (7):
uclient-fetch: Check for nullpointer returned by
uclient_get_url_filename
uclient-http: basic auth: Handle memory allocation failure
uclient-http: auth digest: Handle multiple possible
Yep Philip, you are right. That's a much nicer solution.
I'll wait for some more feedback and do just that in v3.
2018-02-18 19:35 GMT+01:00 Philip Prindeville
<monster_phi...@redfish-solutions.com>:
>
>
>> On Feb 17, 2018, at 8:36 PM, Tobias Schramm <toblemi...@gmail.com>
Check ptr to url after allocation to prevent null pointer
dereference
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/uclient.c b/uclient.c
index 8862b55..1137168 100644
--- a/uclient.c
+++ b/uclient.c
@@ -59,6
Add null pointer check to allocation of url filename
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-utils.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/uclient-utils.c b/uclient-utils.c
index a375eea..9c4dd42 100644
--- a/uclient-utils.c
Add null pointer check to allocation of uclient_http struct
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/uclient-http.c b/uclient-http.c
index 04f16a3..b6607f1 100644
--- a/uclient-http.c
+++ b/uclient-
Add null pointer checks to allocation of buffers for authentication parameters
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 43 ++-
1 file changed, 34 insertions(+), 9 deletions(-)
diff --git a/uclient-http.c b/uclient-
Add some error handling for errors during assembly of headers
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 32
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/uclient-http.c b/uclient-http.c
index 20b8a9a..0
Allocation of the base64 buffer might fail, resulting in a null
ptr being passed to base64_encode as a target buffer
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/uclient-http.c b/u
uclient_get_url_filename may return a null ptr resulting in a null
ptr dereference by fprintf and open
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-fetch.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/uclient-fetch.c b/uclient-fetch.c
index 6961d94..3
Hi John,
I've implemented the suggested improvements and performed some more
reformatting to match the codestyle of uclient more closely.
Regards
Tobias Schramm
Changes since v1:
Fix codestyle
Fix memory leak in uclient_http_add_auth_digest
Honour return value of auth header functions
Fix
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/uclient.c b/uclient.c
index 8862b55..dfbe26c 100644
--- a/uclient.c
+++ b/uclient.c
@@ -59,6 +59,9 @@ __uclient_get_url(const struct uclient_backend *b
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-utils.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/uclient-utils.c b/uclient-utils.c
index a375eea..ee0f8e8 100644
--- a/uclient-utils.c
+++ b/uclient-utils.c
@@ -177,8 +177,12 @
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/uclient-http.c b/uclient-http.c
index 2a3cf5d..24f091e 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -944,6 +944,9 @@ static struct uclient *uclient_http_allo
Hi,
this series of patches adds some code to handle memory allocation failures
without crashing.
Previously a lot of memory allocations were not checked for NULL ptrs
resulting in nullpointer dereferences if (lib)uclient ran out of memory
Regards
Tobias Schramm
Tobias Schramm (6):
uclient
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 41 -
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/uclient-http.c b/uclient-http.c
index 36e051b..2a3cf5d 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-fetch.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/uclient-fetch.c b/uclient-fetch.c
index 6961d94..46f9b3d 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -122,6 +122,11 @@ static int open_output_file(cons
Signed-off-by: Tobias Schramm <toblemi...@gmail.com>
---
uclient-http.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/uclient-http.c b/uclient-http.c
index ef8de98..36e051b 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -299,7 +299,7 @@ stati
Hi,
I've recently added support for the Ubiquiti NanoStation AC loco to
OpenWRT (https://github.com/openwrt/openwrt/pull/689).
If any of the devs here have a NanoStation AC loco or can get their
hands on one easily I'd greatly appreciate reviews to get support for
this device merged in OpenWRT.
60 matches
Mail list logo