[Bug 236714] Clang problem with rctl(8)

2019-04-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 Mateusz Guzik changed: What|Removed |Added Status|New |Closed Resolution|---

[Bug 236714] Clang problem with rctl(8)

2019-04-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #12 from Mateusz Guzik --- It is not being ignored. There is non-zero garbage in an area not written to by sysctl, which makes the zero comparison fail. diff --git a/usr.bin/rctl/rctl.c b/usr.bin/rctl/rctl.c index

[Bug 236714] Clang problem with rctl(8)

2019-04-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #11 from Edward Tomasz Napierala --- Patch looks good, thank you! What about the underlying issue, which is sysctl(3) silently failing when it receives an improperly sized buffer? Would it be feasible to make it return an

[Bug 236714] Clang problem with rctl(8)

2019-04-02 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #8 from Mateusz Guzik --- I thought markj wanted to handle a general case. I did not check if anything depends on the affected sysctl in userspace, so that's my bad. However, since the change is only in current and the tool

[Bug 236714] Clang problem with rctl(8)

2019-04-02 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 Konstantin Belousov changed: What|Removed |Added CC||k...@freebsd.org ---

[Bug 236714] Clang problem with rctl(8)

2019-04-01 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #6 from Mark Johnston --- (In reply to Mateusz Guzik from comment #5) Well, it's fine in the (probably more common) case where the kernel changed a type from int to bool and userspace applications are not immediately updated to

[Bug 236714] Clang problem with rctl(8)

2019-04-01 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #5 from Mateusz Guzik --- (In reply to Mark Johnston from comment #3) I don't think that's feasible since consumers can pass arbitrary sizes, and some probably pass more than they intended in a bogus manner where they would

[Bug 236714] Clang problem with rctl(8)

2019-03-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #3 from Mark Johnston --- (In reply to Edward Tomasz Napierala from comment #2) It would probably be better to detect the case where the old buffer is larger than 1 byte, and zero the full buffer before writing out the value.

[Bug 236714] Clang problem with rctl(8)

2019-03-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #2 from Edward Tomasz Napierala --- Thanks! I wonder if we could perhaps return an error from sysctl(3) in this case? -- You are receiving this mail because: You are the assignee for the bug.

[Bug 236714] Clang problem with rctl(8)

2019-03-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 Mark Johnston changed: What|Removed |Added CC||ma...@freebsd.org --- Comment #1

[Bug 236714] Clang problem with rctl(8)

2019-03-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 Mark Linimon changed: What|Removed |Added Assignee|b...@freebsd.org|toolch...@freebsd.org -- You are