Re: [PATCH 1/2 RESEND] iio: add kernel-doc for field @owner

2018-01-06 Thread Tobin C. Harding
On Sat, Jan 06, 2018 at 01:00:53PM +, Jonathan Cameron wrote: > On Sat, 6 Jan 2018 12:31:57 +1100 > "Tobin C. Harding" wrote: > > > When building kernel documentation sphinx emits the following warning > > > > warning: No description found for param

[PATCH v3 0/2] fix kernel-docs for struct iio_trigger

2018-01-06 Thread Tobin C. Harding
for @use_count). v3: - Fix up patch title to include correct version number. v2: - Change field identifier from DRIVER to INTERN. - Add second patch, change subject line. v1: - [PATCH] iio: add kernel-doc '@owner' Tobin C. Harding (2): iio: add kernel-doc for field @owner iio: add f

[PATCH v3 2/2] iio: add field identifier for @use_count kernel-doc

2018-01-06 Thread Tobin C. Harding
Kernel-doc for @use_count does not currently have a field identifier. All the rest of the fields do. @use_count is used internally and should not be accessed directly by the driver so it should be marked as so. Add [INTERN] identifier to @use_count field. Signed-off-by: Tobin C. Harding

[PATCH v3 1/2] iio: add kernel-doc for field @owner

2018-01-06 Thread Tobin C. Harding
When building kernel documentation sphinx emits the following warning warning: No description found for parameter 'owner' Add description for struct member 'owner'. Signed-off-by: Tobin C. Harding --- include/linux/iio/trigger.h | 1 + 1 file changed, 1 insert

[PATCH] crypto: clear htmldocs build warnings for crypto/hash

2018-01-06 Thread Tobin C. Harding
ieves the resulting hash from the driver and pushes it back to upper layers. No data processing happens at this point unless hardware requires it to finish the transformation (then the data buffered by the device driver is processed). Signed-off-by: Tobin C. Harding --- This patch be

[PATCH] jbd2: fix sphinx kerel-doc build warnings for journal_s

2018-01-06 Thread Tobin C. Harding
ight above each struct member. Use the set of all existing comments (kernel-doc and c89). Signed-off-by: Tobin C. Harding --- This patch only fixes 6 of the 24 warnings. If this work is deemed useful I can do the rest. If there is a way to fix the warnings that is cleaner than this please say s

Re: [PATCH] trace_uprobe: Display correct offset in uprobe_events

2018-01-07 Thread Tobin C. Harding
On Mon, Jan 08, 2018 at 12:01:04PM +0530, Ravi Bangoria wrote: > > > On 01/08/2018 10:49 AM, Srikar Dronamraju wrote: > > * Ravi Bangoria [2018-01-06 11:12:46]: > > > >> Recently, how the pointers being printed with %p has been changed > >> by commit ad67b74d2469 ("printk: hash addresses printed

[PATCH] leaking_addresses: add 32-bit support

2018-01-28 Thread Tobin C. Harding
. Add support for 32-bit kernels. Add a command line option for page offset. Suggested-by: Kaiwan N Billimoria Signed-off-by: Tobin C. Harding --- The basis for this patch has been in development for a while by Kaiwan but didn't get finished before the merge window opened. I'd li

Re: [PATCH] leaking_addresses: add 32-bit support

2018-01-29 Thread Tobin C. Harding
On Tue, Jan 30, 2018 at 09:14:49AM +0530, kaiwan.billimo...@gmail.com wrote: > Hi Tobin, > > On Mon, 2018-01-29 at 15:51 +1100, Tobin C. Harding wrote: > > Currently script only supports x86_64 and ppc64. It would be nice to be > > able to scan 32-bit machines also. W

Re: [PATCH] jbd2: fix sphinx kerel-doc build warnings for journal_s

2018-01-08 Thread Tobin C. Harding
On Mon, Jan 08, 2018 at 04:16:04PM +0100, Jan Kara wrote: > On Sun 07-01-18 11:46:14, Tobin C. Harding wrote: > > Sphinx emits various warnings when building make target 'htmldocs'. > > > > Currently struct journal_s definition contains duplicate documentation, >

Re: [PATCH] docs: add index entry for networking/msg_zerocopy

2018-01-09 Thread Tobin C. Harding
On Tue, Jan 09, 2018 at 10:58:23AM -0700, Jonathan Corbet wrote: > On Sat, 6 Jan 2018 12:30:37 +1100 > "Tobin C. Harding" wrote: > > > Currently msg_zerocopy is not included in any toctree. Sphinx emits a > > build warning to this effect. The other three

[PATCH v2] jbd2: fix sphinx kerel-doc build warnings

2018-01-09 Thread Tobin C. Harding
above each struct member. Use the set of all existing comments (kernel-doc and c89). Add documentation for missing struct members and function arguments. Signed-off-by: Tobin C. Harding --- Please review carefully the newly added doc strings (first three changes in patch). I'm not familiar

[RFC] doc: fix code snippet build warnings

2018-01-09 Thread Tobin C. Harding
orrect spacing. Use '::' to pre-fix code snippet. Clears build warnings but does not render correctly. Signed-off-by: Tobin C. Harding --- To view current broken rendering see https://www.kernel.org/doc/html/latest/core-api/kernel-api.html?highlight=rcu_pointer_handoff#c.rcu_p

Re: [PATCH v2] jbd2: fix sphinx kerel-doc build warnings

2018-01-09 Thread Tobin C. Harding
On Wed, Jan 10, 2018 at 12:26:19AM -0500, Theodore Ts'o wrote: > On Wed, Jan 10, 2018 at 12:42:29PM +1100, Tobin C. Harding wrote: > > Sphinx emits various (26) warnings when building make target 'htmldocs'. > > Currently struct definitions contain duplicate document

Re: [PATCH v5] leaking_addresses: add generic 32-bit support

2018-01-13 Thread Tobin C. Harding
On Sat, Jan 13, 2018 at 10:55:26AM +, Kaiwan N Billimoria wrote: > Hi Tobin, > > Thanks very much for your detailed review. > Just wanted to say that am up to my neck in work (an exceptionally busy > time), hence will take a while to work on this - around another 3 weeks > perhaps. > I'd like

Re: [PATCH] rsi: Remove stack VLA usage

2018-03-11 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 12:37:06PM +0200, Kalle Valo wrote: > "Tobin C. Harding" writes: > > > The kernel would like to have all stack VLA usage removed[1]. rsi uses > > a VLA based on 'blksize'. Elsewhere in the SDIO code maximum block size > > is

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-11 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 01:10:30PM -0800, Linus Torvalds wrote: > On Fri, Mar 9, 2018 at 12:05 PM, Kees Cook wrote: > > When max() is used in stack array size calculations from literal values > > (e.g. "char foo[max(sizeof(struct1), sizeof(struct2))]", the compiler > > thinks this is a dynamic cal

[PATCH v2] staging: vchiq_arm: Clear VLA warning

2018-03-11 Thread Tobin C. Harding
, let's just allocate the memory instead of using the stack. This saves stack space and removes the VLA build warning. kmalloc a buffer for dumping state instead of using the stack. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- v1 of this patch already merged

[RESEND PATCH] rsi: Remove stack VLA usage

2018-03-11 Thread Tobin C. Harding
essing the array in case of programmer error. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- RESEND: add wireless mailing list to CC's (requested by Kalle) drivers/net/wireless/rsi/rsi_91x_hal.c | 13 +++-- drivers/net/wireless/rsi/rsi_91x_sdio.c |

Re: [PATCH] scsi: eata: drop VLA in reorder()

2018-03-11 Thread Tobin C. Harding
Adding kernel newbies to CC because I pose a few noob questions :) Adding Linus to CC because I quoted him. On Sun, Mar 11, 2018 at 10:06:58PM +0100, Salvatore Mesoraca wrote: > n_ready will always be less than or equal to MAX_MAILBOXES. > So we avoid a VLA[1] and use fixed-length arrays instead.

[PATCH] of: unittest: Remove VLA stack usage

2018-03-11 Thread Tobin C. Harding
Signed-off-by: Tobin C. Harding --- Kees is this annoying you, CC'ing you an all my VLA patches? drivers/of/unittest.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 1991fe4319f5..38cbc343b7da 100644

[PATCH] rbd: Remove VLA stack usage

2018-03-11 Thread Tobin C. Harding
variable we can use the ARRAY_SIZE() macro. Use constant statement to declare array. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- drivers/block/rbd.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c

[PATCH] rbd: Remove VLA saving ack buffer size

2018-03-11 Thread Tobin C. Harding
zero on the error path; the buffer size variable is used later in the function, we can maintain this behavior by setting the variable using the macro ARRAY_SIZE. Use constant statement to declare array. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- Excuse the lack of

Re: [PATCH] rbd: Remove VLA stack usage

2018-03-11 Thread Tobin C. Harding
On Sun, Mar 11, 2018 at 10:02:04PM -0700, Eric Biggers wrote: > On Mon, Mar 12, 2018 at 03:49:40PM +1100, Tobin C. Harding wrote: > > The kernel would like to have all stack VLA usage removed[1]. > > Can you please stop writing this? The Linux kernel isn't sentient; it doesn

Re: [PATCH v2] staging: vchiq_arm: Clear VLA warning

2018-03-11 Thread Tobin C. Harding
On Mon, Mar 12, 2018 at 12:37:53PM +1100, Tobin C. Harding wrote: > The kernel would like to have all stack VLA usage removed[1]. The array > here is fixed (declared with a const variable) but it appears like a VLA > to the compiler. Also, currently we are putting 768 bytes on the >

Re: [PATCH v2] staging: vchiq_arm: Clear VLA warning

2018-03-11 Thread Tobin C. Harding
On Mon, Mar 12, 2018 at 06:58:04AM +0100, Stefan Wahren wrote: > Hi Tobin, > > > "Tobin C. Harding" hat am 12. März 2018 um 06:46 > > geschrieben: > > > > > > On Mon, Mar 12, 2018 at 12:37:53PM +1100, Tobin C. Harding wrote: > > > The

Re: [PATCH 2/2] docs: add Co-Developed-by docs

2018-03-05 Thread Tobin C. Harding
On Mon, Mar 05, 2018 at 04:11:35AM -0800, Matthew Wilcox wrote: > On Mon, Mar 05, 2018 at 02:58:21PM +1100, Tobin C. Harding wrote: > > -12) When to use Acked-by: and Cc: > > -- > > +12) When to use Acked-by: and Cc:

Re: [PATCH] staging: lustre: Remove VLA usage

2018-03-07 Thread Tobin C. Harding
On Tue, Mar 06, 2018 at 09:46:08PM -0800, Kees Cook wrote: > The kernel would like to remove all VLA usage. This switches to a > simple kasprintf() instead. > > Signed-off-by: Kees Cook > --- > drivers/staging/lustre/lustre/llite/xattr.c | 19 +-- > 1 file changed, 13 insertions(

[PATCH] mmc: pwrseq: Use kmalloc_array instead of stack VLA

2018-03-25 Thread Tobin C. Harding
uffix of function `gpiod_set_array_value_cansleep()`. It can be expected that this patch will result in a small increase in overhead due to the use of `kmalloc_array()` [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- Patch is untested. I was not able to fully grok the ca

[GIT PULL] leaking_addresses: changes for 14.17-rc1

2018-04-06 Thread Tobin C. Harding
processes. Also it was noted that the script does not scan _all_ the kernel since it only scans active processes. Scanning only for PID==1 makes explicit the inherent flaw in the script that the scan is only partial and also speeds things up. Signed-off-by: Tobin C. Harding

Re: [PATCH] Documentation: Mention why %p prints ptrval

2018-03-22 Thread Tobin C . Harding
providing a unique identifier. On 64-bit machines > -the first 32 bits are zeroed. If you *really* want the address see %px > -below. > +the first 32 bits are zeroed. The kernel will print ``(ptrval)`` until it > +gathers enough entropy. If you *really* want the address see %px below. Acked-by: Tobin C. Harding thanks, Tobin.

[PATCH 4/4] video: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
The kernel would like to have all stack VLA usage removed[1]. The arrays are fixed here (declared with a const variable) but they appear like VLAs to the compiler. We can use a pre-processor define to fix the warning. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding

[PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
Signed-off-by: Tobin C. Harding --- drivers/usb/misc/usbtest.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 90028ef541e3..9e1142b8b91b 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c

Re: [PATCH 4/4] video: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
On Thu, Mar 08, 2018 at 10:01:07PM -0800, Joe Perches wrote: > On Fri, 2018-03-09 at 16:50 +1100, Tobin C. Harding wrote: > > The kernel would like to have all stack VLA usage removed[1]. The > > arrays are fixed here (declared with a const variable) but they appear > > like

Re: [PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 04:55:35PM +1100, Tobin C. Harding wrote: > Signed-off-by: Tobin C. Harding > --- Please drop this. To much on github not writing proper commit logs :( v2 to come. thanks, Tobin.

[PATCH v2] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variable param-sglen. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- drivers/usb/misc/usbtest.c | 5 - 1

[PATCH] staging: vchiq_arm: Clear VLA warning

2018-03-08 Thread Tobin C. Harding
The kernel would like to have all stack VLA usage removed[1]. The array here is fixed (declared with a const variable) but it appears like VLA to the compiler. We can use a pre-processor define to quiet the compiler. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding

Re: [PATCH 4/4] video: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 12:16:21AM -0600, Gustavo A. R. Silva wrote: > > I sent a patch for this six hours ago: > > https://patchwork.kernel.org/patch/10268591/ > > -- > Gustavo lol, I knew there would be a race on to fix these :) And you got it right, bonus points. Let's drop this one then.

[PATCH] rsi: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
essing the array in case of programmer error. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- drivers/net/wireless/rsi/rsi_91x_hal.c | 13 +++-- drivers/net/wireless/rsi/rsi_91x_sdio.c | 9 +++-- 2 files changed, 14 insertions(+), 8 deletions(-) di

Re: [RESEND PATCH] rsi: Remove stack VLA usage

2018-03-13 Thread Tobin C. Harding
On Sun, Mar 11, 2018 at 09:06:10PM -0500, Larry Finger wrote: > On 03/11/2018 08:43 PM, Tobin C. Harding wrote: > >The kernel would like to have all stack VLA usage removed[1]. rsi uses > >a VLA based on 'blksize'. Elsewhere in the SDIO code maximum block size > >

Re: [RESEND] rsi: Remove stack VLA usage

2018-03-13 Thread Tobin C. Harding
On Tue, Mar 13, 2018 at 11:00:47PM +0200, Andy Shevchenko wrote: > On Tue, Mar 13, 2018 at 10:17 PM, tcharding wrote: > > On Mon, Mar 12, 2018 at 09:46:06AM +, Kalle Valo wrote: > >> tcharding wrote: > > I'm pretty much sure it depends on the original email headers, like > above ^^^ — no nam

Re: [RESEND] rsi: Remove stack VLA usage

2018-03-13 Thread Tobin C. Harding
Added Konstantin in case he is in charge of administering patchwork.kernel.org? On Tue, Mar 13, 2018 at 07:53:34PM -0700, Kees Cook wrote: > On Tue, Mar 13, 2018 at 7:11 PM, Tobin C. Harding wrote: > > On Tue, Mar 13, 2018 at 11:00:47PM +0200, Andy Shevchenko wrote: > >> On Tu

Re: [PATCH RFC 14/15] lib: replace **** with a hug

2018-12-02 Thread Tobin C. Harding
On Fri, Nov 30, 2018 at 11:27:23AM -0800, Jarkko Sakkinen wrote: > In order to comply with the CoC, replace with a hug. > > Signed-off-by: Jarkko Sakkinen > --- > lib/vsprintf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > index

Re: [PATCH] vsprintf: fix build warning

2018-07-09 Thread Tobin C. Harding
On Fri, Jul 06, 2018 at 11:49:51AM -0400, Steven Rostedt wrote: > On Fri, 6 Jul 2018 23:42:13 +0900 > Sergey Senozhatsky wrote: > > > On (07/06/18 15:47), Arnd Bergmann wrote: > > [..] > > > Fixes: bfe80ed3d7c7 ("vsprintf: add command line option > > > debug_boot_weak_hash") > > > > Seems lik

[PATCH 1/3] random: Remove unnecessary cast

2018-07-09 Thread Tobin C. Harding
Currently we are casting an argument to the macro min_t(). This is unnecessary since the macro already includes a cast. Remove unnecessary cast from argument to macro min_t() Signed-off-by: Tobin C. Harding --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 0/3] fix: enable early printing of hashed pointers

2018-07-09 Thread Tobin C. Harding
"vsprintf: fix build warning" - thanks Arnd). Epic amounts of confusion, solely caused as usual by myself. thanks, Tobin. Tobin C. Harding (3): random: Remove unnecessary cast vsprintf: Remove incorrect EXPORT_SYMBOL docs: Fix docs for boot parameter debug_boot_weak_hash Do

[PATCH 3/3] docs: Fix docs for boot parameter debug_boot_weak_hash

2018-07-09 Thread Tobin C. Harding
parameter 'debug_boot_weak_hash' as discussed (patch posted and acked) on LKML. Fixes: bfe80ed3d7c76 ("vsprintf: add command line option debug_boot_weak_hash") Acked-by: Randy Dunlap Signed-off-by: Tobin C. Harding --- Documentation/admin-guide/kernel-parameters.txt | 13 ++

[PATCH 2/3] vsprintf: Remove incorrect EXPORT_SYMBOL

2018-07-09 Thread Tobin C. Harding
s. Remove incorrect usage of macro EXPORT_SYMBOL() Fixes: bfe80ed3d7c76 ("vsprintf: add command line option debug_boot_weak_hash") Signed-off-by: Tobin C. Harding --- lib/vsprintf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index cdc2c355dff5..fe834a201

Re: [PATCH 0/3] fix: enable early printing of hashed pointers

2018-07-09 Thread Tobin C. Harding
On Mon, Jul 09, 2018 at 10:07:16PM -0400, Steven Rostedt wrote: > On Tue, 10 Jul 2018 10:25:16 +1000 > "Tobin C. Harding" wrote: > > > Since I'm a massive noob I did not realise that since v7 of this set was > > applied to random-next already that doing in

[PATCH v6 2/4] random: Return nbytes filled from hw RNG

2018-05-27 Thread Tobin C. Harding
bytes_arch(). Only get random bytes from the hw RNG, make function return the number of bytes retrieved from the hw RNG. Signed-off-by: Tobin C. Harding Acked-by: Theodore Ts'o Reviewed-by: Steven Rostedt (VMware) --- drivers/char/random.c | 16 +--- include/linux/random.h |

[PATCH v6 0/4] enable early printing of hashed pointers

2018-05-27 Thread Tobin C. Harding
quested by Steve, and solves original problem for Anna-Maria). - Added Acked-by tag from Ted (patch 1 and 2) Tobin C. Harding (4): random: Fix whitespace pre random-bytes work random: Return nbytes filled from hw RNG vsprintf: Use hw RNG for ptr_key vsprintf: Add command line op

[PATCH v6 4/4] vsprintf: Add command line option debug_boot_weak_hash

2018-05-27 Thread Tobin C. Harding
Cc: Steven Rostedt Cc: Randy Dunlap Signed-off-by: Tobin C. Harding --- Documentation/admin-guide/kernel-parameters.txt | 9 + lib/vsprintf.c | 20 2 files changed, 29 insertions(+) diff --git a/Documentation/admin-guide/kernel-para

[PATCH v6 1/4] random: Fix whitespace pre random-bytes work

2018-05-27 Thread Tobin C. Harding
There are a couple of whitespace issues around the function get_random_bytes_arch(). In preparation for patching this function let's clean them up. Signed-off-by: Tobin C. Harding Acked-by: Theodore Ts'o --- drivers/char/random.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletion

[PATCH v6 3/4] vsprintf: Use hw RNG for ptr_key

2018-05-27 Thread Tobin C. Harding
Currently we must wait for enough entropy to become available before hashed pointers can be printed. We can remove this wait by using the hw RNG if available. Use hw RNG to get keying material. Cc: Steven Rostedt (VMware) Suggested-by: Kees Cook Signed-off-by: Tobin C. Harding --- lib

Re: linux-next: build warning after merge of the random tree

2018-06-17 Thread Tobin C. Harding
On Mon, Jun 18, 2018 at 01:35:23PM +1000, Stephen Rothwell wrote: > Hi all, > > On Fri, 8 Jun 2018 13:37:48 +1000 Stephen Rothwell > wrote: > > > > After merging the random tree, today's linux-next build (arm > > multi_v7_defconfig) produced this warning: > > > > lib/vsprintf.c:1668:13: warning

[PATCH v8 3/4] vsprintf: Use hw RNG for ptr_key

2018-06-19 Thread Tobin C. Harding
Currently we must wait for enough entropy to become available before hashed pointers can be printed. We can remove this wait by using the hw RNG if available. Use hw RNG to get keying material. Reviewed-by: Steven Rostedt (VMware) Suggested-by: Kees Cook Signed-off-by: Tobin C. Harding

[PATCH v8 1/4] random: Fix whitespace pre random-bytes work

2018-06-19 Thread Tobin C. Harding
There are a couple of whitespace issues around the function get_random_bytes_arch(). In preparation for patching this function let's clean them up. Acked-by: Theodore Ts'o Signed-off-by: Tobin C. Harding --- drivers/char/random.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletion

[PATCH v8 0/4] enable early printing of hashed pointers

2018-06-19 Thread Tobin C. Harding
or Anna-Maria). - Added Acked-by tag from Ted (patch 1 and 2) Tobin C. Harding (4): random: Fix whitespace pre random-bytes work random: Return nbytes filled from hw RNG vsprintf: Use hw RNG for ptr_key vsprintf: Add command line option debug_boot_weak_hash .../admin-guide/kernel-par

[PATCH v8 2/4] random: Return nbytes filled from hw RNG

2018-06-19 Thread Tobin C. Harding
bytes_arch(). Only get random bytes from the hw RNG, make function return the number of bytes retrieved from the hw RNG. Acked-by: Theodore Ts'o Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Tobin C. Harding --- drivers/char/random.c | 16 +--- include/linux/random.h |

[PATCH v8 4/4] vsprintf: Add command line option debug_boot_weak_hash

2018-06-19 Thread Tobin C. Harding
ent to use cryptographically secure hashing during debugging. This enables debugging while keeping development/production kernel behaviour the same. If new command line option debug_boot_weak_hash is enabled use cryptographically insecure hashing and hash pointer value immediately. Signed-off-by: Tobin

Re: [PATCH v3 1/4] seccomp: add a return code to trap to userspace

2018-06-19 Thread Tobin C . Harding
On Thu, May 31, 2018 at 08:49:46AM -0600, Tycho Andersen wrote: > This patch introduces a means for syscalls matched in seccomp to notify > some other task that a particular filter has been triggered. > > The motivation for this is primarily for use with containers. For example, > if a container d

Re: [PATCH v3 1/4] seccomp: add a return code to trap to userspace

2018-06-19 Thread Tobin C . Harding
A few other piddly suggestions. On Thu, May 31, 2018 at 08:49:46AM -0600, Tycho Andersen wrote: > This patch introduces a means for syscalls matched in seccomp to notify > some other task that a particular filter has been triggered. > > The motivation for this is primarily for use with containers

Re: [PATCH v6 4/4] vsprintf: Add command line option debug_boot_weak_hash

2018-05-29 Thread Tobin C. Harding
On Mon, May 28, 2018 at 10:40:43AM -0700, Randy Dunlap wrote: > On 05/27/2018 06:46 PM, Tobin C. Harding wrote: > > Currently printing [hashed] pointers requires enough entropy to be > > available. Early in the boot sequence this may not be the case > > result

Re: [PATCH v6 4/4] vsprintf: Add command line option debug_boot_weak_hash

2018-05-31 Thread Tobin C. Harding
On Thu, May 31, 2018 at 05:35:15PM -0400, Steven Rostedt wrote: > On Mon, 28 May 2018 11:46:42 +1000 > "Tobin C. Harding" wrote: > > > Currently printing [hashed] pointers requires enough entropy to be > > available. Early in the boot sequence this may not be th

Re: [PATCH v7 3/4] vsprintf: Use hw RNG for ptr_key

2018-06-12 Thread Tobin C. Harding
On Tue, Jun 12, 2018 at 02:44:58PM -0400, Steven Rostedt wrote: > On Tue, 12 Jun 2018 10:39:13 +1000 > "Tobin C. Harding" wrote: > > > Currently we must wait for enough entropy to become available before > > hashed pointers can be printed. We can remove this

Re: [PATCH v7 2/4] random: Return nbytes filled from hw RNG

2018-06-12 Thread Tobin C. Harding
On Tue, Jun 12, 2018 at 11:39:56AM +0300, Andy Shevchenko wrote:. > On Tue, Jun 12, 2018 at 3:39 AM, Tobin C. Harding wrote: > > Currently the function get_random_bytes_arch() has return value 'void'. > > If the hw RNG fails we currently fall back to using get_random_byte

[PATCH 0/7] drivers: tty: Fix kernel-docs comments

2018-10-16 Thread Tobin C. Harding
ho reviews this. This set is super non-critical so please only review at your leisure. thanks, Tobin. Tobin C. Harding (7): tty: Fix whitespace before tab warnings tty: Remove trailing whitespace tty: Partially fix kernel-docs layout tty: Fix kernel-doc variable typos tty: Fix spaci

[PATCH 5/7] tty: Fix spacing between kernel-doc sections

2018-10-16 Thread Tobin C. Harding
There is a specified spacing for kernel-doc layout in Documentation/doc-guide/kernel-doc.rst we should try to adhere to it as much as possible. Fix spacing between sections. Signed-off-by: Tobin C. Harding --- drivers/tty/n_hdlc.c | 2 ++ drivers/tty/serial/serial-tegra.c | 2

[PATCH 1/7] tty: Fix whitespace before tab warnings

2018-10-16 Thread Tobin C. Harding
. We do not fix any that are obviously there for extra-ordinary formatting reasons. Any line in the diff with obvious other formatting errors is fixed also excluding kernel-docs lines. Signed-off-by: Tobin C. Harding --- drivers/tty/amiserial.c | 43 --- drivers/tty/hvc

[PATCH 6/7] tty: Remove newline after function kernel-doc

2018-10-16 Thread Tobin C. Harding
From: "Tobin C. Harding" Currently there are many places were a newline is left between the kernel-doc function comment and the function it is documenting. There should not be a newline here. Remove newline after function kernel-doc. This patch is whitespace only. Signed-off-b

[PATCH 7/7] tty: Fix section format

2018-10-16 Thread Tobin C. Harding
would make the comment less legible). Signed-off-by: Tobin C. Harding --- drivers/tty/hvc/hvc_console.c | 4 +- drivers/tty/hvc/hvc_iucv.c | 14 +-- drivers/tty/mips_ejtag_fdc.c| 4 +- drivers/tty/n_gsm.c | 37 drivers/tty/n_hdlc.c

[PATCH 4/7] tty: Fix kernel-doc variable typos

2018-10-16 Thread Tobin C. Harding
From: "Tobin C. Harding" There are a few typos in the kernel-doc variables [descriptions]. Fix these by using the correct variable name and adding a description. Fix kernel-doc variable typos. Signed-off-by: Tobin C. Harding --- drivers/tty/serial/men_z135_uart.c | 4 ++-- 1 file

Re: [PATCH 0/7] drivers: tty: Fix kernel-docs comments

2018-10-17 Thread Tobin C. Harding
On Wed, Oct 17, 2018 at 09:00:26AM +0200, Geert Uytterhoeven wrote: > Hi Tobin, > > Thanks for your series! > > On Wed, Oct 17, 2018 at 1:23 AM Tobin C. Harding wrote: > > My first patch set using kernel.org email address. I've been so careful > > with this

Re: [PATCH 0/7] drivers: tty: Fix kernel-docs comments

2018-10-17 Thread Tobin C. Harding
On Wed, Oct 17, 2018 at 09:00:26AM +0200, Geert Uytterhoeven wrote: > Hi Tobin, > > Thanks for your series! > > On Wed, Oct 17, 2018 at 1:23 AM Tobin C. Harding wrote: > > My first patch set using kernel.org email address. I've been so careful > > with this

Re: [PATCH 2/7] tty: Remove trailing whitespace

2018-10-17 Thread Tobin C. Harding
On Thu, Oct 18, 2018 at 07:19:33AM +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 17, 2018 at 10:21:25AM +1100, Tobin C. Harding wrote: > > From: "Tobin C. Harding" > > > > Currently files under drivers/tty/ contain trailing whitespace. This is > > easy to

[PATCH v2 1/7] tty: Fix whitespace before tab warnings

2018-10-18 Thread Tobin C. Harding
. We do not fix any that are obviously there for extra-ordinary formatting reasons. Any line in the diff with obvious other formatting errors is fixed also excluding kernel-docs lines. Signed-off-by: Tobin C. Harding --- Actually, checkpatch is only noisy on a couple of patches from this set

[PATCH v2 0/7] drivers: tty: Fix kernel-docs comments

2018-10-18 Thread Tobin C. Harding
ch patch, run when required: `git commit --amend --author="Tobin C. Harding " - Fix introduced 'space before tab warnings' in patch 3 and 7. Tobin C. Harding (7): tty: Fix whitespace before tab warnings tty: Remove trailing whitespace tty: Partially fix kernel-

[PATCH v2 4/7] tty: Fix kernel-doc variable typos

2018-10-18 Thread Tobin C. Harding
There are a few typos in the kernel-doc variables [descriptions]. Fix these by using the correct variable name and adding a description. Fix kernel-doc variable typos. Signed-off-by: Tobin C. Harding --- drivers/tty/serial/men_z135_uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 7/7] tty: Fix section format

2018-10-18 Thread Tobin C. Harding
he code (if I was not _sure_ of the documented locking or if changing it would make the comment less legible). Signed-off-by: Tobin C. Harding --- drivers/tty/hvc/hvc_console.c | 4 +- drivers/tty/hvc/hvc_iucv.c | 14 +-- drivers/tty/mips_ejtag_fdc.c| 4 +- drivers/tty/

[PATCH v2 5/7] tty: Fix spacing between kernel-doc sections

2018-10-18 Thread Tobin C. Harding
There is a specified spacing for kernel-doc layout in Documentation/doc-guide/kernel-doc.rst we should try to adhere to it as much as possible. Fix spacing between sections. Signed-off-by: Tobin C. Harding --- drivers/tty/n_hdlc.c | 2 ++ drivers/tty/serial/serial-tegra.c | 2

[PATCH v2 6/7] tty: Remove newline after function kernel-doc

2018-10-18 Thread Tobin C. Harding
Currently there are many places were a newline is left between the kernel-doc function comment and the function it is documenting. There should not be a newline here. Remove newline after function kernel-doc. This patch is whitespace only. Signed-off-by: Tobin C. Harding --- drivers/tty

[PATCH net-next v2 2/2] docs: networking: Convert bridge.txt to rst

2018-07-17 Thread Tobin C. Harding
The kernel documentation is now restructured text. Convert the Ethernet Bridge documentation and include it in the toplevel kernel documentation. - Fix heading adornments. - Add license identifier. Signed-off-by: Tobin C. Harding --- Documentation/networking/{bridge.txt => bridge.rst}

[PATCH net-next v2 1/2] docs: networking: Convert alias.txt to rst

2018-07-17 Thread Tobin C. Harding
license identifier. Signed-off-by: Tobin C. Harding --- Documentation/networking/00-INDEX | 2 -- Documentation/networking/alias.rst | 49 ++ Documentation/networking/alias.txt | 40 Documentation/networking/index.rst | 1 + 4 files changed

Re: [PATCH] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests

2018-05-22 Thread Tobin C . Harding
; instead > + * of a hashed address when printing '%p' in plain_hash() and > + * plain_format(). > + */ > + wait_for_random_bytes(); > + > err = plain_hash(); > if (err) { > pr_warn("plain 'p' does not appear to be hashed\n"); > -- > 2.14.1 Not sure if I'm qualified for this but here goes Acked-by: Tobin C. Harding thanks, Tobin.

Re: [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:07PM -0800, Quytelda Kahja wrote: > The case statement in get_ap_information() should not use literal integers > to parse information element IDs when these values are provided by name > in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'. Nice. Magic number re

Re: [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:07PM -0800, Quytelda Kahja wrote: ... I would normally respond to the cover letter but here goes. Reviewed-by: Tobin C. Harding thanks, Tobin.

Re: [PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:09PM -0800, Quytelda Kahja wrote: > The code that generates a WLAN capability mask is repeated in five > functions. This change refactors that code into a new function, which is > called now in each of those functions. Perhaps in future something like: Code to gener

Re: [PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

2018-03-01 Thread Tobin C. Harding
On Thu, Mar 01, 2018 at 02:15:00PM +0300, Dan Carpenter wrote: > On Thu, Mar 01, 2018 at 05:37:21PM +1100, Tobin C. Harding wrote: > > On Wed, Feb 28, 2018 at 09:19:09PM -0800, Quytelda Kahja wrote: > > > The code that generates a WLAN capability mask is repeated in five >

Re: [PATCH 1/3] leaking_addresses: skip all /proc/PID except /proc/1

2018-03-01 Thread Tobin C. Harding
On Tue, Feb 27, 2018 at 03:45:09PM +1100, Tobin C. Harding wrote: > When the system is idle it is likely that most files under /proc/PID > will be identical for various processes. Scanning _all_ the PIDs under > /proc is unnecessary and implies that we are thoroughly scanning /proc.

[PATCH 0/2] leaking_addresses: check path name for leaks

2018-03-01 Thread Tobin C. Harding
A couple more patches to the leaking_addresses.pl script. First one is refactor, does not change program logic. Patch 2 adds a check on each path name as the scan traverses the directory tree. Suggested by Tycho. thanks, Tobin. Tobin C. Harding (2): leaking_addresses: explicitly name

[PATCH 1/2] leaking_addresses: explicitly name variable used in regex

2018-03-01 Thread Tobin C. Harding
instead of implicit $_ Signed-off-by: Tobin C. Harding --- scripts/leaking_addresses.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl index d5d31f3df97e..65a65aa64d26 100755 --- a/scripts/leaking_addresses.pl +++

[PATCH 2/2] leaking_addresses: check if file name contains address

2018-03-01 Thread Tobin C. Harding
Sometimes files may be created by using output from printk. As the scan traverses the directory tree we should parse each path name and check if it is leaking an address. Add check for leaking address on each path name. Suggested-by: Tycho Andersen Signed-off-by: Tobin C. Harding --- scripts

Re: [PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

2018-03-01 Thread Tobin C. Harding
On Thu, Mar 01, 2018 at 05:28:26PM -0800, Quytelda Kahja wrote: > Tobin, > I understand your point, and I've read submitting-patches.rst. I made > that wording choice because I was looking at some older commits that > were worded like that. I'm fairly new to the kernel workflow, so I > was just t

Re: [RFC][PATCH] tracing, printk: Force no hashing when trace_printk() is used

2018-04-03 Thread Tobin C. Harding
On Tue, Apr 03, 2018 at 05:06:12PM -0400, Steven Rostedt wrote: > On Tue, 3 Apr 2018 13:07:58 -0700 > Kees Cook wrote: > > > On Tue, Apr 3, 2018 at 12:41 PM, Steven Rostedt wrote: > > > Both trace_debug is set and kptr_restrict is set to zero in the same > > > code that produces the above banner

Re: Hashed pointer issues

2018-04-30 Thread Tobin C. Harding
On Mon, Apr 30, 2018 at 12:16:45PM -0700, Kees Cook wrote: > On Mon, Apr 30, 2018 at 12:00 PM, Linus Torvalds > wrote: > > On Mon, Apr 30, 2018 at 11:38 AM Kees Cook wrote: > > > >> Something like this? (Untested.) > > > > Looks workable. > > > >> + /* If we have hw RNG, start hashing immed

[PATCH 1/3] random: Fix whitespace pre random-bytes work

2018-05-01 Thread Tobin C. Harding
There are a couple of whitespace issues around the function get_random_bytes_arch(). In preparation for patching this function let's clean them up. Signed-off-by: Tobin C. Harding --- drivers/char/random.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH 0/3] enable early printing of hashed pointers

2018-05-01 Thread Tobin C. Harding
thin init/main.c:kernel_init() and that did _not_ work. I do not know how early is early, or in other words, when we are hoping for this to work. thanks, Tobin. Tobin C. Harding (3): random: Fix whitespace pre random-bytes work random: Return nbytes filled from hw RNG vsprintf: Ad

[PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Tobin C. Harding
bytes_arch(). Only get random bytes from the hw RNG, make function return the number of bytes retrieved from the hw RNG. Suggested-by: Linus Torvalds Signed-off-by: Tobin C. Harding --- drivers/char/random.c | 16 +--- include/linux/random.h | 2 +- 2 files changed, 10 insert

[PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread Tobin C. Harding
er hashing behaviour. Add a command line option 'use-early-random-bytes'. When enabled get key material from the hw RNG if available. This option should NOT be enabled on production kernels. Suggested-by: Kees Cook Signed-off-by: Tobin C. Harding ---

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Tobin C. Harding
On Wed, May 02, 2018 at 09:33:39AM +1000, Tobin C. Harding wrote: > Currently the function get_random_bytes_arch() has return value 'void'. > If the hw RNG fails we currently fall back to using get_random_bytes(). > This defeats the purpose of requesting random material from

<    1   2   3   4   5   6   7   8   9   10   >