Re: [PATCH] gen_compile_command: Add support for separate KBUILD_OUTPUT directory

2019-06-20 Thread Tom Roeder
thias Kaehlcke Reviewed-by: Tom Roeder Tested-by: Tom Roeder > --- > Feel free to bikeshed about the option names ;-) > > scripts/gen_compile_commands.py | 28 +++- > 1 file changed, 19 insertions(+), 9 deletions(-) > > diff --gi

Re: [PATCH] gen_compile_commands: Add support for separate kbuild output directory

2020-08-11 Thread Tom Roeder
Adding the kbuild mailing list on CC, which owns this directory. On Fri, Jul 31, 2020 at 02:21:41PM -0700, Peter Kalauskas wrote: Add support for builds that use an output directory different than the kernel source tree (e.g. make O=/tmp/kernel-obj). This also introduces support for .cmd files t

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-10 Thread Tom Roeder
w where the source location is in your particular use case because the .cmd files do not record it (maybe some future improvement?) This patch appears to generate what I think the compile_commands.json should look like for the most part, I am not sure if this is proper or works correctly though. CC&#

Re: [PATCH v2] nvme: Cache DMA descriptors to prevent corruption.

2020-11-30 Thread Tom Roeder
On Fri, Nov 20, 2020 at 09:02:43AM +0100, Christoph Hellwig wrote: On Thu, Nov 19, 2020 at 05:27:37PM -0800, Tom Roeder wrote: This patch changes the NVMe PCI implementation to cache host_mem_descs in non-DMA memory instead of depending on descriptors stored in DMA memory. This change is needed

Re: [PATCH v2] nvme: Cache DMA descriptors to prevent corruption.

2020-11-30 Thread Tom Roeder
On Fri, Nov 20, 2020 at 06:29:54AM -0800, Keith Busch wrote: On Fri, Nov 20, 2020 at 09:02:43AM +0100, Christoph Hellwig wrote: On Thu, Nov 19, 2020 at 05:27:37PM -0800, Tom Roeder wrote: > This patch changes the NVMe PCI implementation to cache host_mem_descs > in non-DMA memory inst

Re: [RFC PATCH] kbuild: Add option to generate a Compilation Database

2019-06-06 Thread Tom Roeder
On Thu, Jun 06, 2019 at 02:30:03PM -0600, Raul E Rangel wrote: > Clang tooling requires a compilation database to figure out the build > options for each file. This enables tools like clang-tidy and > clang-check. > > See https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html for more > informa

Re: [RFC PATCH] kbuild: Add option to generate a Compilation Database

2019-06-07 Thread Tom Roeder
On Thu, Jun 06, 2019 at 04:40:00PM -0700, Nick Desaulniers wrote: > On Thu, Jun 6, 2019 at 1:54 PM Tom Roeder wrote: > > > > On Thu, Jun 06, 2019 at 02:30:03PM -0600, Raul E Rangel wrote: > > > Clang tooling requires a compilation database to figure out the build > >

Re: [PATCH] scripts: add a tool to produce a compile_commands.json file

2018-12-17 Thread Tom Roeder
On Sat, Dec 15, 2018 at 06:37:49PM +0900, Masahiro Yamada wrote: > On Fri, Dec 7, 2018 at 7:24 AM Tom Roeder wrote: > > > > The LLVM/Clang project provides many tools for analyzing C source code. > > Many of these tools are based on LibTooling > > (https://clang.ll

Re: [RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-23 Thread Tom Roeder
On Tue, Jan 15, 2019 at 11:15:51AM +0100, Paolo Bonzini wrote: > On 15/01/19 03:43, Sean Christopherson wrote: > >> - vmx->nested.cached_vmcs12 = kmalloc(VMCS12_SIZE, GFP_KERNEL); > >> + vmx->nested.cached_vmcs12 = kzalloc(VMCS12_SIZE, GFP_KERNEL); > >>if (!vmx->nested.cached_vmcs12) > >>

Re: [RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-23 Thread Tom Roeder
On Tue, Jan 15, 2019 at 09:51:11AM -0800, Tom Roeder wrote: > On Mon, Jan 14, 2019 at 06:43:04PM -0800, Sean Christopherson wrote: > > On Mon, Jan 14, 2019 at 03:47:28PM -0800, Tom Roeder wrote: > > > This changes the allocation of cached_vmcs12 to use kzalloc instead of &

Re: [RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-24 Thread Tom Roeder
On Thu, Jan 24, 2019 at 02:18:26AM +0100, Paolo Bonzini wrote: > On 23/01/19 19:33, Tom Roeder wrote: > > > > Even in vmx_set_nested_state, there are about 30 lines of code in > > between enter_vmx_operation and copy_from_user, and there are a couple > > of cases that

[PATCH v2] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-24 Thread Tom Roeder
.com Signed-off-by: Tom Roeder --- Changelog since v1: - Changed the copy_to_user calls in vmx_get_nested_state to copy the full 4k buffer. arch/x86/kvm/vmx/nested.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nest

[PATCH] scripts: add a tool to produce a compile_commands.json file

2018-12-06 Thread Tom Roeder
tput and --directory flags. Signed-off-by: Tom Roeder --- scripts/gen_compile_commands.py | 146 1 file changed, 146 insertions(+) create mode 100755 scripts/gen_compile_commands.py diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_com

Re: [RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-15 Thread Tom Roeder
On Mon, Jan 14, 2019 at 06:43:04PM -0800, Sean Christopherson wrote: > On Mon, Jan 14, 2019 at 03:47:28PM -0800, Tom Roeder wrote: > > This changes the allocation of cached_vmcs12 to use kzalloc instead of > > kmalloc. This removes the information leak found by Syzkaller (see >

[RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12

2019-01-14 Thread Tom Roeder
n RFC Reported-by: syzbot+ded1696f6b50b615b...@syzkaller.appspotmail.com Signed-off-by: Tom Roeder --- arch/x86/kvm/vmx/nested.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 2616bd2c7f2c7..ad46667042c7a 100644 --- a

Re: [PATCH] scripts: add a tool to produce a compile_commands.json file

2018-12-18 Thread Tom Roeder
On Tue, Dec 18, 2018 at 11:17:35AM +0900, Masahiro Yamada wrote: > On Tue, Dec 18, 2018 at 8:21 AM Tom Roeder wrote: > > > > On Sat, Dec 15, 2018 at 06:37:49PM +0900, Masahiro Yamada wrote: > > > On Fri, Dec 7, 2018 at 7:24 AM Tom Roeder wrote: > > > > >

[PATCH v2] scripts: add a tool to produce a compile_commands.json file

2018-12-18 Thread Tom Roeder
tput and --directory flags. Signed-off-by: Tom Roeder --- Changelog since v1: - Add simple string replacement to unescape the pound sign. scripts/gen_compile_commands.py | 151 1 file changed, 151 insertions(+) create mode 100755 scripts/gen_compil

Re: [PATCH] scripts: add a tool to produce a compile_commands.json file

2018-12-18 Thread Tom Roeder
On Tue, Dec 18, 2018 at 11:17:35AM +0900, Masahiro Yamada wrote: > On Tue, Dec 18, 2018 at 8:21 AM Tom Roeder wrote: > > > > On Sat, Dec 15, 2018 at 06:37:49PM +0900, Masahiro Yamada wrote: > > > On Fri, Dec 7, 2018 at 7:24 AM Tom Roeder wrote: > > > > >

Re: [PATCH] gen_compile_commands: lower the entry count threshold

2019-07-29 Thread Tom Roeder
have tried with allnoconfig when I originally did this, but I didn't think of it. > > Signed-off-by: Masahiro Yamada Reviewed-by: Tom Roeder > --- > > scripts/gen_compile_commands.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH] nvme: Cache DMA descriptors to prevent corruption.

2020-11-19 Thread Tom Roeder
wrong size. To prevent this attack, this commit changes the code to cache those descriptors in non-DMA memory and to use the cached values when freeing the memory they describe. Tested: Built and ran with Google-internal NVMe tests. Tested-by: Tom Roeder Signed-off-by: Tom Roeder --- drivers

Re: [PATCH] nvme: Cache DMA descriptors to prevent corruption.

2020-11-19 Thread Tom Roeder
On Thu, Nov 19, 2020 at 01:09:14PM -0800, Keith Busch wrote: On Thu, Nov 19, 2020 at 10:59:19AM -0800, Tom Roeder wrote: This patch changes the NVMe PCI implementation to cache host_mem_descs in non-DMA memory instead of depending on descriptors stored in DMA memory. This change is needed under

[PATCH v2] nvme: Cache DMA descriptors to prevent corruption.

2020-11-19 Thread Tom Roeder
wrong size. To prevent this attack, this commit changes the code to cache those descriptors in non-DMA memory and to use the cached values when freeing the memory they describe. Tested: Built and ran with Google-internal NVMe tests. Tested-by: Tom Roeder Signed-off-by: Tom Roeder --- Changes

Re: [PATCH v2] Makefile: Add clang-tidy and static analyzer support to makefile

2020-07-13 Thread Tom Roeder
On Thu, Jul 09, 2020 at 12:56:07PM -0500, Nathan Huckleberry wrote: On Wed, Jul 8, 2020 at 2:11 PM Nick Desaulniers wrote: On Wed, Jul 8, 2020 at 11:21 AM 'Nathan Huckleberry' via Clang Built Linux wrote: > > This patch adds clang-tidy and the clang static-analyzer as make > targets. The goal