Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-19 Thread Matt Corallo
thers here that actually solving the DoS issue isn't trivial, but making it less absurdly trivial to have 30 second dropouts of your VPN connection would also be a nice change. Matt On 4/19/21 05:43, Eric Dumazet wrote: On Sun, Apr 18, 2021 at 4:31 PM Matt Corallo wrote: Should the default

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-18 Thread Matt Corallo
are dropped. After all, I submitted the patch to "scratch my own itch" :). Matt On 4/18/21 00:39, Willy Tarreau wrote: I do agree that we shouldn't keep them that long nowadays, we can't go too low without risking to break some slow transmission stacks (SLIP/PPP over modems for example).

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Matt Corallo
suggested in 1981!). You get a lot more bang for your buck if you don't wait around so long (or we could restructure things to kick out the oldest fragments, but that is a lot more work, and probably extra indexes that just aren't worth it). Matt On 4/17/21 21:38, Keyu Man wrote: Willy's words

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Matt Corallo
oS attacks are concerning, its also incredibly practical (and I do) hit this issue in normal non-adversarial conditions. Matt On 4/17/21 03:50, Willy Tarreau wrote: On Sat, Apr 17, 2021 at 12:42:39AM -0700, Keyu Man wrote: How about at least allow the existing queue to finish? Currently

[PATCH] misc: hpilo: MAINTAINERS: add entry for hpilo

2021-03-28 Thread matt . hsiao
From: Matt Hsiao The original maintainer left the company, add myself as the successor. Signed-off-by: Matt Hsiao --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fb2a3633b719..0546e7f84a4e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [PATCH v6 03/24] iio: make use of devm_iio_kfifo_buffer_setup() helper

2021-02-18 Thread Matt Ranostay
On Tue, Feb 16, 2021 at 3:46 PM Gwendal Grignou wrote: > > Reviewed-by: Gwendal Grignou Looks fine to me as well. Reviewed-by: Matt Ranostay > > On Mon, Feb 15, 2021 at 4:11 AM Jonathan Cameron wrote: > > > > On Mon, 15 Feb 2021 12:40:22 +0200 > > Alexandru

Re: [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in apds9960 driver

2020-12-20 Thread Matt Ranostay
On Sat, Dec 19, 2020 at 5:51 PM Max Leiter wrote: > > The device is used in the Microsoft Surface Book 3 and Surface Pro 7 > > Signed-off-by: Max Leiter Reviewed-by: Matt Ranostay > --- > drivers/iio/light/apds9960.c | 8 > 1 file changed, 8 insertions(+) >

Re: [PATCH v3] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-23 Thread Matt Mullins
artin KaFai Lau > Cc: Song Liu > Cc: Yonghong Song > Cc: Andrii Nakryiko > Cc: John Fastabend > Cc: KP Singh > Cc: netdev > Cc: bpf > Cc: Kees Cook > Cc: Florian Weimer > Fixes: 97e1c18e8d17b ("tracing: Kernel Tracepoints") > Reported-by: syzbot+83a

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Matt Mullins
On Tue, Nov 17, 2020 at 06:05:51PM -0500, Mathieu Desnoyers wrote: > - On Nov 16, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > > > On Mon, 16 Nov 2020 16:34:41 -0500 (EST) > > Mathieu Desnoyers wrote: > > [...] > > >> I think you'll want a WRITE_ONCE(old[i].func, tp_stub_func)

[PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-14 Thread Matt Mullins
...@syzkaller.appspotmail.com Signed-off-by: Matt Mullins --- I previously referenced a "pretty ugly" patch. This is not that one, because I don't think there's any way I can make the caller of ->release() actually handle errors like ENOMEM. It also looks like most of the other ways tracepoint_probe_unregis

Re: KASAN: vmalloc-out-of-bounds Read in bpf_trace_run3

2020-11-12 Thread Matt Mullins
compiler: gcc (GCC) 10.1.0-syz 20200507 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10f4b03250 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1371a47c50 > > > > The issue was bisected to: > > > > commit 9

Re: [PATCH] hwmon: applesmc: avoid overlong udelay()

2020-11-06 Thread Matt Turner
problem. They said it began occurring between v5.7 and v5.8, so I looked and found this commit. After reverting commit fff2d0f701e6753591609739f8ab9be1c8e80ebb from v5.9, I no longer see the errors in dmesg and the fan controls work again. Any ideas what the problem is? Thanks, Matt [1] https:/

Re: [PATCH] iio: light: apds9960: remove unneeded semicolon

2020-10-28 Thread Matt Ranostay
On Tue, Oct 27, 2020 at 1:14 PM wrote: > > From: Tom Rix > > A semicolon is not needed after a switch statement. > Acked-by: Matt Ranostay > Signed-off-by: Tom Rix > --- > drivers/iio/light/apds9960.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > &g

Re: [PATCH] iio: proximity: as3935 change of_property_read to device_property_read

2020-10-17 Thread Matt Ranostay
On Fri, Oct 16, 2020 at 11:41 AM Vaishnav M A wrote: > > > This patch aims to replace the of_property_read_u32 for reading > the ams,tuning-capacitor-pf, ams,nflwdth properties with > device_property_read_u32. > > Thanks and Regards, > Vaishnav M A Could you explain a bit more in the commit

Re: [Intel-gfx] [PATCH 2/2] drm/i915/edp/jsl: Update vswing table for HBR and HBR2

2020-09-28 Thread Matt Roper
ot;ELK", reg_val); > drivers/gpu/drm/i915/gem/i915_gem_stolen.c: * Whether ILK really reuses > the ELK register for this is unclear. > drivers/gpu/drm/i915/intel_pm.c: * Not 100% sure which way ELK should > go here as the > drivers/gpu/drm/i915/intel_pm.c:

Re: [PATCH 1/2] drm/i915/jsl: Split EHL/JSL platform info and PCI ids

2020-09-28 Thread Matt Roper
to differentiate between the two platforms, IS_ELKHARTLAKE() > must mean only ELK and IS_JASPERLAKE() must mean only JSP. > > It's non-negotiable. We've made the mistake before, we're not doing it > again. > > There are 32 references to IS_ELKHARTLAKE(). It's slightly painful, but > the

Re: [PATCH v3 02/23] alpha: use asm-generic/mmu_context.h for no-op implementations

2020-09-01 Thread Matt Turner
On Tue, Sep 1, 2020 at 7:15 AM Nicholas Piggin wrote: > > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner > Cc: linux-al...@vger.kernel.org > Signed-off-by: Nicholas Piggin > --- > > Please ack or nack if you object to this being mered via > Arn

Re: [PATCH 5.4 047/215] iio:humidity:hdc100x Fix alignment and data leak issues

2020-07-20 Thread Matt Ranostay
channels[2]; > > + s64 ts __aligned(8); > > Why does an s64 need __aligned(8) ? This is due to on 32-bit x86 it is aligned to 4 bytes by default. - Matt > This seems needlessly redundant. > > Isn't this naturally aligned by the compiler? > > The struct isn't packed. >

Re: [PATCH] drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state

2020-07-15 Thread Matt Roper
nitialization step") > Link: https://github.com/ClangBuiltLinux/linux/issues/1094 > Signed-off-by: Nathan Chancellor Reviewed-by: Matt Roper > --- > drivers/gpu/drm/i915/display/intel_combo_phy.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

Re: [PATCH 0/5] RFC: connector: Add network namespace awareness

2020-07-13 Thread Matt Bennett
On Tue, 2020-07-14 at 15:03 +1000, Aleksa Sarai wrote: > On 2020-07-13, Eric W. Biederman wrote: > > Matt Bennett writes: > > > > > On Thu, 2020-07-02 at 21:10 +0200, Christian Brauner wrote: > > > > On Thu, Jul 02, 2020 at 08:17:38AM -0500, Eric W. Bie

Re: [PATCH 0/5] RFC: connector: Add network namespace awareness

2020-07-05 Thread Matt Bennett
On Thu, 2020-07-02 at 21:10 +0200, Christian Brauner wrote: > On Thu, Jul 02, 2020 at 08:17:38AM -0500, Eric W. Biederman wrote: > > Matt Bennett writes: > > > > > Previously the connector functionality could only be used by processes > > > running in th

Re: [PATCH 0/5] RFC: connector: Add network namespace awareness

2020-07-05 Thread Matt Bennett
On Thu, 2020-07-02 at 13:59 -0500, Eric W. Biederman wrote: > Matt Bennett writes: > > > Previously the connector functionality could only be used by processes > > running in the > > default network namespace. This meant that any process that uses the > > con

Re: [PATCH v2] Replace HTTP links with HTTPS ones: Documentation/devicetree/bindings/iio

2020-07-04 Thread Matt Ranostay
On Sat, Jul 4, 2020 at 12:34 PM Alexander A. Klimov wrote: > > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > With regards to the drivers that I've authored the changes look good to me. Reviewed-by

[PATCH 1/5] connector: Use task pid helpers

2020-07-01 Thread Matt Bennett
In preparation for supporting the connector outside of the default network namespace we switch to using these helpers now. As the connector is still only supported in the default namespace this change is a no-op. Signed-off-by: Matt Bennett --- drivers/connector/cn_proc.c | 48

[PATCH 5/5] connector: Create connector per namespace

2020-07-01 Thread Matt Bennett
Move to storing the connector instance per network namespace. In doing so the ability to use the connector functionality outside the default namespace is now available. Signed-off-by: Matt Bennett --- drivers/connector/cn_proc.c | 49 ++ drivers/connector/connector.c | 171

[PATCH 3/5] connector: Ensure callback entry is released

2020-07-01 Thread Matt Bennett
Currently the entry itself appears to be being leaked. Signed-off-by: Matt Bennett --- drivers/connector/cn_queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 49295052ba8b..a82ceeb37f26 100644

[PATCH 4/5] connector: Prepare for supporting multiple namespaces

2020-07-01 Thread Matt Bennett
Extend the existing function definitions / call sites to start passing the network namespace. For now we still only pass the default namespace. Signed-off-by: Matt Bennett --- Documentation/driver-api/connector.rst | 6 +++--- drivers/connector/cn_proc.c| 5 +++-- drivers

[PATCH 2/5] connector: Use 'current_user_ns' function

2020-07-01 Thread Matt Bennett
In preparation for supporting the connector outside of the default network namespace we switch to using this function now. As the connector is still only supported in the default namespace this change is a no-op. Signed-off-by: Matt Bennett --- drivers/connector/cn_proc.c | 10 +- 1

[PATCH 0/5] RFC: connector: Add network namespace awareness

2020-07-01 Thread Matt Bennett
-kernel=150806196728365=2 Matt Bennett (5): connector: Use task pid helpers connector: Use 'current_user_ns' function connector: Ensure callback entry is released connector: Prepare for supporting multiple namespaces connector: Create connector per namespace Documentation/driver-api

Re: [RFC][PATCH v5 00/51] objtool: Make recordmcount a subcommand

2020-06-23 Thread Matt Helsley
On Thu, Jun 18, 2020 at 01:37:46PM -0700, Matt Helsley wrote: > recordmcount has its own ELF wrapper code and could utilize > objtool's ELF code to more-portably handle architecture variations. > This series makes recordmcount a subcommand of objtool. It very > gradually converts

[tip: x86/urgent] x86/asm/64: Align start of __clear_user() loop to 16-bytes

2020-06-19 Thread tip-bot2 for Matt Fleming
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: bb5570ad3b54e7930997aec76ab68256d5236d94 Gitweb: https://git.kernel.org/tip/bb5570ad3b54e7930997aec76ab68256d5236d94 Author:Matt Fleming AuthorDate:Thu, 18 Jun 2020 11:20:02 +01:00

[RFC][PATCH v5 12/51] objtool: mcount: Walk relocation lists

2020-06-18 Thread Matt Helsley
Rather than walk the section tables using the old recordmcount mapping of the ELF file, walk the section list provided by objtool's ELF code. This removes the last use of of the Elf_r_sym wrapper so we remove that too. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 10

[RFC][PATCH v5 04/51] objtool: recordmcount: Start using objtool's elf wrapper

2020-06-18 Thread Matt Helsley
-- the libelf/objtool way and the old recordmcount wrapper way which avoids these extra data structures by using indices, offsets, and pointers into the mmapped ELF file. Subsequent patches will convert from the old recordmcount accessors to the libelf/objtool accessors. Signed-off-by: Matt Helsley

[RFC][PATCH v5 10/51] objtool: mcount: Walk objtool Elf structs in find_secsym_ndx

2020-06-18 Thread Matt Helsley
the function to something that reads more easily. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 2 + tools/objtool/recordmcount.h | 94 2 files changed, 22 insertions(+), 74 deletions(-) diff --git a/tools/objtool/recordmcount.c b/tools

[RFC][PATCH v5 26/51] objtool: mcount: Remove unused file mapping

2020-06-18 Thread Matt Helsley
data and call instruction offsets. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 99 +++- tools/objtool/recordmcount.h | 4 +- 2 files changed, 9 insertions(+), 94 deletions(-) diff --git a/tools/objtool/recordmcount.c b/tools/objtool

[RFC][PATCH v5 29/51] objtool: mcount: Pre-allocate new ELF sections

2020-06-18 Thread Matt Helsley
Rather than allocating the ELF sections after collecting the mcount locations and building the relocation entries, create the empty sections beforehand. This has the benefit of removing the memcpy() and just using the resulting libelf buffers directly. Signed-off-by: Matt Helsley --- tools

[RFC][PATCH v5 16/51] objtool: mcount: Move is_fake_mcount()

2020-06-18 Thread Matt Helsley
Promote the now-bit-independent is_fake_mcount() out of the old recordmcount ELF wrapper. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 48 +++--- tools/objtool/recordmcount.h | 50 2 files changed, 45 insertions

[RFC][PATCH v5 27/51] objtool: mcount: Reduce usage of _size wrapper

2020-06-18 Thread Matt Helsley
Use a new loc_size parameter to append_func() rather than use the wrapper's _size macro directly. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/objtool/recordmcount.h b/tools/objtool

[RFC][PATCH v5 03/51] objtool: Make recordmcount into mcount subcmd

2020-06-18 Thread Matt Helsley
recordmcount to be more easily readable and remove recordmcount's crude accessor wrapping code. Signed-off-by: Matt Helsley --- Documentation/dontdiff | 2 +- Documentation/trace/ftrace.rst | 6 ++-- Makefile| 15 -- arch/arm64/include/asm/ftrace.h | 2

[RFC][PATCH v5 02/51] objtool: Prepare to merge recordmcount

2020-06-18 Thread Matt Helsley
Move recordmcount into the objtool directory. We keep this step separate so changes which turn recordmcount into a subcommand of objtool don't get obscured. Signed-off-by: Matt Helsley --- Documentation/trace/ftrace-design.rst | 4 ++-- Documentation/trace/ftrace.rst | 2

[RFC][PATCH v5 07/51] objtool: mcount: Move nhdr into find_symtab()

2020-06-18 Thread Matt Helsley
Since it's no longer needed in the rest of do_func() we can move it to where it's needed rather than pass it as a parameter. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/objtool/recordmcount.h b

[RFC][PATCH v5 28/51] objtool: mcount: Move mcount_adjust out of wrapper

2020-06-18 Thread Matt Helsley
of the variable's type inside the wrapper -- we can just use a regular int. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 11 --- tools/objtool/recordmcount.h | 5 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/objtool/recordmcount.c b/tools/objtool

[RFC][PATCH v5 19/51] objtool: mcount: Restrict using ehdr in append_func()

2020-06-18 Thread Matt Helsley
and those will get replaced later. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/objtool/recordmcount.h b/tools/objtool/recordmcount.h index eed592954f37..19bff5a7c8ce 100644 --- a/tools/objtool

[RFC][PATCH v5 37/51] objtool: mcount: Simplify mcount name matching

2020-06-18 Thread Matt Helsley
Setting altmcount only when processing ARM ELF files is not necessary -- we can make the code easier to read by always checking for the string. Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/objtool/mcount.c b

[RFC][PATCH v5 30/51] objtool: mcount: Generic location and relocation table types

2020-06-18 Thread Matt Helsley
the recordmcount wrapper. The next patch will move it out of the wrapper. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 44 +++-- tools/objtool/recordmcount.h | 122 ++- 2 files changed, 60 insertions(+), 106 deletions(-) diff --git a/tools/objtool

[RFC][PATCH v5 50/51] objtool: mcount: Remove useless lookup

2020-06-18 Thread Matt Helsley
Since the relocation section's sh_info points back to the text section it applies to and we already have that we can just pass it in and greatly simplify find_section_sym_index(). Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 39 +++ 1 file changed

[RFC][PATCH v5 13/51] objtool: mcount: Return symbol from mcountsym

2020-06-18 Thread Matt Helsley
to the objtool struct symbol which callers can use as-needed. Reported-by: Kamalesh Babulal Signed-off-by: Matt Helsley Co-developed-by: Kamalesh Babulal Co-developed-by: Peter Zijlstra -- Thanks to Kamalesh Babulal for reporting this problem and suggesting a fix. Thanks to Peter Zijlstra

[RFC][PATCH v5 49/51] objtool: mcount: Remove relocation size check

2020-06-18 Thread Matt Helsley
Rather than use the size of the relocations check the section header type directly to see if the mcount relocations should be rel or rela relocations. Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 4 ++-- tools/objtool/elf.h| 2 +- tools/objtool/mcount.c | 15 +-- 3

[RFC][PATCH v5 45/51] objtool: mcount: Move mcount section test to objtool ELF

2020-06-18 Thread Matt Helsley
. Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 16 tools/objtool/elf.h| 2 +- tools/objtool/mcount.c | 36 +++- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index

[RFC][PATCH v5 14/51] objtool: mcount: Move get_mcountsym

2020-06-18 Thread Matt Helsley
Now that it's been stripped of using the old recordmcount ELF wrapper get_mcountsym() is ready to be promoted out of the double-included wrapper header. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 16 tools/objtool/recordmcount.h | 19 --- 2

[RFC][PATCH v5 09/51] objtool: mcount: Use libelf for section header names

2020-06-18 Thread Matt Helsley
-by: Matt Helsley --- tools/objtool/elf.c | 3 +- tools/objtool/elf.h | 1 + tools/objtool/recordmcount.c | 2 +- tools/objtool/recordmcount.h | 89 ++-- 4 files changed, 37 insertions(+), 58 deletions(-) diff --git a/tools/objtool/elf.c b/tools

[RFC][PATCH v5 38/51] objtool: mcount: mcount symbol name simplification

2020-06-18 Thread Matt Helsley
Remove gpfx -- the recognized prefix for the mcount symbol -- and just recognize any of the prefixes. This allows us to further substitute the various strings directly into the code rather than using variables. Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 19 --- 1

[RFC][PATCH v5 51/51] objtool: mcount: Remove stale description

2020-06-18 Thread Matt Helsley
The comments at the top no longer reflect how we process the ELF contents. More helpful comments are inline with the code so we don't need the top comments either. Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 13 - 1 file changed, 13 deletions(-) diff --git a/tools

[RFC][PATCH v5 35/51] objtool: mcount: Remove endian wrappers

2020-06-18 Thread Matt Helsley
Now that they're no longer used we can remove these endian wrappers. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 63 1 file changed, 63 deletions(-) diff --git a/tools/objtool/recordmcount.c b/tools/objtool/recordmcount.c index

[RFC][PATCH v5 46/51] objtool: mcount: Flag mcount relocation sections

2020-06-18 Thread Matt Helsley
Move the check for relocations sections that apply to mcountable text sections into objtool's ELF code. Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 13 + tools/objtool/elf.h| 2 +- tools/objtool/mcount.c | 36 3 files changed

[RFC][PATCH v5 43/51] objtool: check: Use class to recognize kcov calls

2020-06-18 Thread Matt Helsley
Suggested-by: Peter Zijlstra Signed-off-by: Matt Helsley --- tools/objtool/check.c | 3 +-- tools/objtool/elf.c | 7 +++ tools/objtool/elf.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 78375908acda

[RFC][PATCH v5 33/51] objtool: mcount: Remove wrapper for ELF relocation type

2020-06-18 Thread Matt Helsley
Remove the last uses of the Elf_Rela wrapper by passing the size of the relocations we're dealing with as a parameter. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 4 ++-- tools/objtool/recordmcount.h | 7 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git

[RFC][PATCH v5 42/51] objtool: mcount: Move mcount symbol name testing

2020-06-18 Thread Matt Helsley
for individual subcommands. Finally, if we manage to combine subcommands into a single exec of objtool the number of passes through the ELF data could be even further reduced. Suggested-by: Peter Zijlstra Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 18 ++ tools

[RFC][PATCH v5 34/51] objtool: mcount: Remove wrapper double-include trick

2020-06-18 Thread Matt Helsley
the wrapped naming. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 113 -- tools/objtool/recordmcount.h | 132 --- 2 files changed, 107 insertions(+), 138 deletions(-) delete mode 100644 tools/objtool/recordmcount.h diff

[RFC][PATCH v5 40/51] objtool: mcount: const-ify ARM instruction patterns

2020-06-18 Thread Matt Helsley
-by: Matt Helsley --- tools/objtool/mcount.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tools/objtool/mcount.c b/tools/objtool/mcount.c index 5c59df0df97b..629eb7222ef3 100644 --- a/tools/objtool/mcount.c +++ b/tools/objtool/mcount.c

[RFC][PATCH v5 31/51] objtool: mcount: Use objtool relocation section

2020-06-18 Thread Matt Helsley
difference between this and the old recordmcount code is we didn't set SHF_INFO_LINK so we clear the sh_flags as before. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tools/objtool/recordmcount.h

[RFC][PATCH v5 48/51] objtool: mcount: Eliminate first pass

2020-06-18 Thread Matt Helsley
Determine the size of the mcount relocations in objtool's ELF reading code. This reduces the number of passes we make through the list of sections (which can become large due to things like -ffunction-sections). Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 2 ++ tools/objtool/elf.h

[RFC][PATCH v5 25/51] objtool: mcount: Use ELF header from objtool

2020-06-18 Thread Matt Helsley
The ELF header is the very first structure in an ELF file. Rather than cast it from the file mapping we use the ELF header extracted via objtool's ELF code. This is the last usage of the open-coded mapping of the ELF file which we will remove in a later step. Signed-off-by: Matt Helsley

[RFC][PATCH v5 41/51] objtool: mcount: Convert nop writes to elf_write_insn()

2020-06-18 Thread Matt Helsley
objtool's elf_write_insn() does extra checking when writing to an instruction so use that rather than a plain memcpy(). Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/objtool/mcount.c b/tools/objtool

[RFC][PATCH v5 47/51] objtool: mcount: Merge section mcount flags

2020-06-18 Thread Matt Helsley
One flag is only for relocation sections and the other only for text (not relocation) sections so we can share the same flag and test the section type when we need to. Signed-off-by: Matt Helsley --- tools/objtool/elf.c| 5 ++--- tools/objtool/elf.h| 2 +- tools/objtool/mcount.c | 9

[RFC][PATCH v5 32/51] objtool: mcount: Move sift_rel_mcount out of wrapper file

2020-06-18 Thread Matt Helsley
Now that this function no longer uses any of the old recordmcount wrapper code we can move it out of the wrapper too. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 47 + tools/objtool/recordmcount.h | 50 2

[RFC][PATCH v5 44/51] objtool: mcount: Keep lists locations and relocations

2020-06-18 Thread Matt Helsley
. Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 133 +++-- 1 file changed, 75 insertions(+), 58 deletions(-) diff --git a/tools/objtool/mcount.c b/tools/objtool/mcount.c index 7fbde6ce6eb8..7d7843f7cd44 100644 --- a/tools/objtool/mcount.c +++ b/tools

[RFC][PATCH v5 36/51] objtool: mcount: Rename to mcount.c

2020-06-18 Thread Matt Helsley
Now that we've converted recordmcount to a subcommand of objtool rename the .c file in order to follow the convention of the other objtool subcmds. Signed-off-by: Matt Helsley --- tools/objtool/Build| 2 +- tools/objtool/{recordmcount.c => mcount.c} | 0 2 files chan

[RFC][PATCH v5 39/51] objtool: mcount: Verify x86 instruction with memcmp()

2020-06-18 Thread Matt Helsley
Instead of hard-coding what amounts to a memcmp() use memcmp to determine if the instruction we wish to replace matches what we expect. This makes the x86 code more like that of, for instance, ARM. Signed-off-by: Matt Helsley --- tools/objtool/mcount.c | 19 ++- 1 file changed

[RFC][PATCH v5 08/51] objtool: mcount: Remove unused fname parameter

2020-06-18 Thread Matt Helsley
The name of the object file being processed is unused in the wrapper's leaf functions so we no longer need to pass it as a parameter. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 4 ++-- tools/objtool/recordmcount.h | 19 --- 2 files changed, 10 insertions

[RFC][PATCH v5 20/51] objtool: mcount: Use objtool ELF to write

2020-06-18 Thread Matt Helsley
te parameters. Note that this patch does not move the associated parts out of the wrapper file. We postpone that cleanup for later so that it's easier to see the changes to the functions rather than obscuring them with the move. Signed-off-by: Matt Helsley --- tools/objtool/

[RFC][PATCH v5 22/51] objtool: mcount: Move has_rel_mcount() and tot_relsize()

2020-06-18 Thread Matt Helsley
The has_rel_mcount() and tot_relsize() helpers are no longer dependent on the ELF wrapper so we can move them. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 26 ++ tools/objtool/recordmcount.h | 33 - 2 files changed, 26

[RFC][PATCH v5 21/51] objtool: mcount: Move nop_mcount()

2020-06-18 Thread Matt Helsley
if they should be turned into no-ops, then calling the arch-specific code. Since none of these use the recordmcount ELF wrappers anymore we can move it out of the wrapper. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 47 + tools/objtool

[RFC][PATCH v5 15/51] objtool: mcount: Replace MIPS offset types

2020-06-18 Thread Matt Helsley
Replace MIPS is_fake_mcount code using Elf_Addr with unsigned long for the offsets. This is consistent with the way that objtool more generally treats offsets and removes the last use of the Elf_Addr wrapper. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 9 +++-- 1 file

[RFC][PATCH v5 23/51] objtool: mcount: Move relocation entry size detection

2020-06-18 Thread Matt Helsley
Move where we detect the size of relocation entries we wish to use into the first loop over the sections. This will allow us to allocate the mcount location and relocation sections before the next loop that collects them. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 8

[RFC][PATCH v5 24/51] objtool: mcount: Only keep ELF file size

2020-06-18 Thread Matt Helsley
Since we're no longer writing to the ELF file mapping and we're not appending to it we don't need to keep more information from the stat structure. At the same time we can give the smaller global variable a better name. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 9

[RFC][PATCH v5 17/51] objtool: mcount: Stop using ehdr in find_section_sym_index

2020-06-18 Thread Matt Helsley
We can use the objtool GElf_Ehdr structure to access ehdr here. This makes the function completely independent of the old recordmcount ELF wrapper. The next step will be to promote it to the C file. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 13 ++--- 1 file changed

[RFC][PATCH v5 18/51] objtool: mcount: Move find_section_sym_index()

2020-06-18 Thread Matt Helsley
This function is no longer dependent upon the old recordmcount ELF wrapper code -- it doesn't use the wrapper's Elf_* types nor does it call wrapped functions. Move it into the C file. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 42 tools

[RFC][PATCH v5 11/51] objtool: mcount: Use symbol structs to find mcount relocations

2020-06-18 Thread Matt Helsley
Rather than open coding symbol name lookups in get_sym_and_*() we rename the structure and use objtool's lookup function to get the symbol name for a relocation. We also change the name of the function to better reflect its purpose. Signed-off-by: Matt Helsley --- tools/objtool/elf.c

[RFC][PATCH v5 05/51] objtool: recordmcount: Search for __mcount_loc before walking the sections

2020-06-18 Thread Matt Helsley
string pointer trick. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.c | 4 tools/objtool/recordmcount.h | 17 +++-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/tools/objtool/recordmcount.c b/tools/objtool/recordmcount.c index b2c606eb269b

[RFC][PATCH v5 06/51] objtool: recordmcount: Convert do_func() relhdrs

2020-06-18 Thread Matt Helsley
to modify the ELF file -- it only changes the way we walk the ELF sections and do lookups to find the relocations. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 61 +++- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/tools/objtool

[RFC][PATCH v5 01/51] objtool: Factor out reasons to build objtool

2020-06-18 Thread Matt Helsley
a bunch of per-supported-arch ifdef blocks in tools/objtool/Makefile. Signed-off-by: Matt Helsley --- Makefile | 15 --- arch/Kconfig | 23 +++ arch/x86/Kconfig.debug | 1 + lib/Kconfig.debug | 1 + tools/objtool/Makefile | 5 +++-- 5

[RFC][PATCH v5 00/51] objtool: Make recordmcount a subcommand

2020-06-18 Thread Matt Helsley
801.git.mhels...@vmware.com/ Matt Helsley (51): objtool: Factor out reasons to build objtool objtool: Prepare to merge recordmcount objtool: Make recordmcount into mcount subcmd objtool: recordmcount: Start using objtool's elf wrapper objtool: recordmcount: Search for __mcount_loc b

[PATCH] pci: pcie: AER: Fix logging of Correctable errors

2020-06-18 Thread Matt Jolly
users, and can be filtered separately from uncorrectable errors. This should hopefully reduce the need for users to disable AER to suppress corrected errors. Link: https://bugzilla.kernel.org/show_bug.cgi?id=201517 Link: https://bugzilla.kernel.org/show_bug.cgi?id=196183 Signed-off-by: Matt Jolly

[PATCH] x86/asm/64: Align start of __clear_user() loop to 16-bytes

2020-06-18 Thread Matt Fleming
m Detector (verified using perf events). Fixes: 1153933703d9 ("x86/asm/64: Micro-optimize __clear_user() - Use immediate constants") Cc: "Grimm, Jon" Cc: "Kumar, Venkataramanan" CC: Jan Kara Cc: # v4.19+ Signed-off-by: Matt Fleming --- arch/x86/lib/usercopy

Re: [RFC][PATCH v4 18/32] objtool: mcount: Move nop_mcount()

2020-06-17 Thread Matt Helsley
On Fri, Jun 12, 2020 at 06:05:34PM +0200, Peter Zijlstra wrote: > On Fri, Jun 12, 2020 at 03:26:57PM +0200, Peter Zijlstra wrote: > > On Tue, Jun 02, 2020 at 12:50:11PM -0700, Matt Helsley wrote: > > > +static int nop_mcount(struct section * const rels, > > > +

[tip: objtool/core] objtool: Rename rela to reloc

2020-06-17 Thread tip-bot2 for Matt Helsley
The following commit has been merged into the objtool/core branch of tip: Commit-ID: f1974222634010486c1692e843af0ab11304dd2c Gitweb: https://git.kernel.org/tip/f1974222634010486c1692e843af0ab11304dd2c Author:Matt Helsley AuthorDate:Fri, 29 May 2020 14:01:13 -07:00

[tip: objtool/core] objtool: Add support for relocations without addends

2020-06-17 Thread tip-bot2 for Matt Helsley
The following commit has been merged into the objtool/core branch of tip: Commit-ID: fb414783b65c880606fbc1463e6849f017e60d46 Gitweb: https://git.kernel.org/tip/fb414783b65c880606fbc1463e6849f017e60d46 Author:Matt Helsley AuthorDate:Fri, 29 May 2020 14:01:14 -07:00

Re: [RFC][PATCH 2/3] objtool: Provide elf_write_{insn,reloc}()

2020-06-16 Thread Matt Helsley
; + } else { > > + reloc->rela.r_info = GELF_R_INFO(reloc->sym->idx, reloc->type); > > + reloc->rela.r_addend = reloc->addend; > > + reloc->rela.r_offset = reloc->offset; > > + > > + if (!gelf_update_rela(sec->data, reloc->id

Re: [RFC][PATCH 1/3] objtool: Clean up elf_write() condition

2020-06-15 Thread Matt Helsley
On Fri, Jun 12, 2020 at 04:30:35PM +0200, Peter Zijlstra wrote: > With there being multiple ways to change the ELF data, let's more > concisely track modification. > > Signed-off-by: Peter Zijlstra (Intel) Would it make sense to set the relocation section's "changed" flag in addition to the elf

Re: [RFC][PATCH 0/3] objtool: KCOV vs noinstr

2020-06-13 Thread Matt Helsley
() into NOPs, similar to what recordmcount does. > > I'm hoping the pending objtool-recordmcount patches can also reuse some of > this. This sounds great to me -- I'll have a look through your series and will try rebasing my work on this. Cheers, -Matt Helsley

Re: [RFC][PATCH v4 18/32] objtool: mcount: Move nop_mcount()

2020-06-13 Thread Matt Helsley
On Fri, Jun 12, 2020 at 03:26:56PM +0200, Peter Zijlstra wrote: > On Tue, Jun 02, 2020 at 12:50:11PM -0700, Matt Helsley wrote: > > +static int nop_mcount(struct section * const rels, > > + const char *const txtname) > > +{ > > + struct reloc *reloc; &

[PULL] alpha.git

2020-06-12 Thread Matt Turner
Hi Linus, Please pull a few changes for alpha. They're mostly small janitorial fixes but there's also a build fix and most notably a patch from Mikulas that fixes a hang on boot on the Avanti platform, which required quite a bit of work and review. Thanks, Matt The following changes since

Re: [PATCH] alpha: Fix build around srm_sysrq_reboot_op

2020-06-12 Thread Matt Turner
On Thu, Jun 11, 2020 at 2:14 AM Joerg Roedel wrote: > > From: Joerg Roedel > > The patch introducing the struct was probably never compile tested, > because it sets a handler with a wrong function signature. Wrap the > handler into a functions with the correct signature to fix the build. > >

Re: Regression bisected to f2f84b05e02b (bug: consolidate warn_slowpath_fmt() usage)

2020-06-11 Thread Matt Turner
On Tue, Jun 2, 2020 at 11:03 AM Kees Cook wrote: > > On Mon, Jun 01, 2020 at 07:48:04PM -0700, Matt Turner wrote: > > I bisected a regression on alpha to f2f84b05e02b (bug: consolidate > > warn_slowpath_fmt() usage) which looks totally innocuous. > > > > R

Re: [PATCH] capabilities: Introduce CAP_RESTORE

2020-06-11 Thread Matt Helsley
The parent can then pass the *reserved* pidfd into clone3(). The reserved pidfd seamlessly turns into a pidfd reference to the child if clone3() succeeds. If it fails the eservation is still consumed -- a given pidfd reserved for clone3() can only be passed to clone3() and succeed once. Perhaps this scheme could concentrate the need for CAP_SYS_ADMIN to one process so maybe it would obviate the need for CAP_RESTORE. That said, perhaps there's something that prevents implementing such a pidfd or perhaps I have misunderstood what CRIU is doing and this pidfd idea isn't workable. Cheers, -Matt Helsley

Re: [RFC][PATCH v4 02/32] objtool: Make recordmcount into mcount subcmd

2020-06-09 Thread Matt Helsley
On Tue, Jun 09, 2020 at 02:52:07PM -0400, Steven Rostedt wrote: > On Tue, 9 Jun 2020 11:39:51 -0700 > Matt Helsley wrote: > > > > > +ifeq ($(SRCARCH),sparc) > > > > + SUBCMD_MCOUNT := y > > > > > > Is there some arch for which MC

Re: [RFC][PATCH v4 02/32] objtool: Make recordmcount into mcount subcmd

2020-06-09 Thread Matt Helsley
On Tue, Jun 09, 2020 at 10:00:59AM +0100, Julien Thierry wrote: > Hi Matt, > > On 6/2/20 8:49 PM, Matt Helsley wrote: > > Rather than a standalone executable merge recordmcount as a sub command > > of objtool. This is a small step towards cleaning up recordmcount and > &

Re: [RFC][PATCH v4 27/32] objtool: mcount: Generic location and relocation table types

2020-06-09 Thread Matt Helsley
On Tue, Jun 09, 2020 at 12:11:55PM +0530, Kamalesh Babulal wrote: > On 6/3/20 1:20 AM, Matt Helsley wrote: > > Rather than building the exact ELF section data we need and > > avoiding libelf's conversion step, use more GElf types > > and then libelf's elfxx_xlatetof()

Re: [RFC][PATCH v4 01/32] objtool: Prepare to merge recordmcount

2020-06-09 Thread Matt Helsley
On Tue, Jun 09, 2020 at 09:54:33AM +0100, Julien Thierry wrote: > Hi Matt, > > On 6/2/20 8:49 PM, Matt Helsley wrote: > > Move recordmcount into the objtool directory. We keep this step separate > > so changes which turn recordmcount into a subcommand of objtool d

  1   2   3   4   5   6   7   8   9   10   >