Re: [PATCH v4] kobject: Replace strlcpy with strscpy

2023-09-14 Thread Kees Cook
On Thu, 31 Aug 2023 14:01:04 +, Azeem Shaikh wrote: > strlcpy() reads the entire source buffer first. > This read may exceed the destination size limit. > This is both inefficient and can lead to linear read > overflows if a source string is not NUL-terminated [1]. > In an effort to remove

Re: [PATCH] init/version.c: Replace strlcpy with strscpy

2023-09-14 Thread Kees Cook
On Wed, 30 Aug 2023 16:08:06 +, Azeem Shaikh wrote: > strlcpy() reads the entire source buffer first. > This read may exceed the destination size limit. > This is both inefficient and can lead to linear read > overflows if a source string is not NUL-terminated [1]. > In an effort to remove

Re: [PATCH] HID: uhid: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
t;name)); > + strscpy(hid->phys, ev->u.create2.phys, sizeof(hid->phys)); > + strscpy(hid->uniq, ev->u.create2.uniq, sizeof(hid->uniq)); Reviewed-by: Kees Cook -Kees > > hid->ll_driver = _hid_driver; > hid->bus = ev->u.create2.bus; > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: 20230914-strncpy-drivers-hid-uhid-c-a465f3e784dd > > Best regards, > -- > Justin Stitt > -- Kees Cook

Re: [PATCH] HID: prodikeys: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
ame, card->shortname, sizeof(rwmidi->name)); > + strscpy(rwmidi->name, card->shortname, sizeof(rwmidi->name)); > rwmidi->info_flags = SNDRV_RAWMIDI_INFO_INPUT; > rwmidi->private_data = pm; Same here. Reviewed-by: Kees Cook -Kees > > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: 20230914-strncpy-drivers-hid-hid-prodikeys-c-cf42614a21d4 > > Best regards, > -- > Justin Stitt > -- Kees Cook

Re: [PATCH] firmware: ti_sci: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 08:23:02PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees >

Re: [PATCH] firmware: tegra: bpmp: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 07:38:44PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > It seems like the filename stored at `namevirt` is expected to be >

Re: [PATCH v3] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 05:20:50PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it > guarantees

Re: [PATCH] dax: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 01:10:24AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `dax_id->dev_name` is expected to be NUL-terminated and has been >

Re: [PATCH] cpuidle: dt: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 12:23:19AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees >

Re: [PATCH] cpufreq: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Wed, Sep 13, 2023 at 12:07:21AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Both `policy->last_governor` and `default_governor` are expected to be >

Re: [PATCH] bus: fsl-mc: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Tue, Sep 12, 2023 at 10:52:04PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We need to prefer more robust and less ambiguous string interfaces. > > `obj_desc->(type|label)` are expected to be NUL-terminated strings as > per

Re: [PATCH][next] checkpatch: add a couple new alloc functions to alloc with multiplies check

2023-09-14 Thread Kees Cook
On Tue, Sep 12, 2023 at 10:51:22AM -0700, Joe Perches wrote: > On Tue, 2023-09-12 at 11:04 -0600, Gustavo A. R. Silva wrote: > > vmalloc() and vzalloc() functions have now 2-factor multiplication > > argument forms vmalloc_array() and vcalloc(), correspondingly. > > > Add alloc-with-multiplies

Re: [PATCH v2][next] RDMA/core: Use size_{add,mul}() in calls to struct_size()

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 05:27:59PM -0600, Gustavo A. R. Silva wrote: > Harden calls to struct_size() with size_add() and size_mul(). Specifically, make sure that open-coded arithmetic cannot cause an overflow/wraparound. (i.e. it will stay saturated at SIZE_MAX.) > > Fixes: 467f432a521a

Re: [PATCH] auxdisplay: panel: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 08:51:04PM +, Justin Stitt wrote: > `strncpy` is deprecated and as such we should prefer more robust and > less ambiguous interfaces. > > In this case, all of `press_str`, `repeat_str` and `release_str` are > explicitly marked as nonstring: > | struct { /* valid

Re: [PATCH] ACPI: OSI: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 08:36:44PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We know `osi->string` is a NUL-terminated string due to its eventual use > in `acpi_install_interface()` and `acpi_remove_interface()` which expect > a

Re: [PATCH] xen/efi: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 06:59:31PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > `efi_loader_signature` has space for 4 bytes. We are copying "Xen" (3 bytes) > plus a NUL-byte which makes 4 total bytes. With that being said, there is >

Re: [PATCH] x86/tdx: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 03:01:16PM -0700, Justin Stitt wrote: > On Mon, Sep 11, 2023 at 11:51 AM Dave Hansen wrote: > > > > On 9/11/23 11:27, Justin Stitt wrote: > > > `strncpy` is deprecated and we should prefer more robust string apis. > > > > I dunno. It actually seems like a pretty good fit

Re: [PATCH] um,ethertap: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Tue, Sep 12, 2023 at 01:12:35PM -0700, Justin Stitt wrote: > On Tue, Sep 12, 2023 at 12:36 AM Geert Uytterhoeven > wrote: > > > > Hi Justin, > > > > Thanks for your patch! > > > > On Mon, Sep 11, 2023 at 7:53 PM Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated

Re: [PATCH] vt: Fix potential read overflow of kernel memory

2023-09-14 Thread Kees Cook
On Thu, Aug 31, 2023 at 10:23:10AM -0400, Azeem Shaikh wrote: > Are folks ok with me sending out a v2 for this with a better commit > log that explains the issue? Yes, please do. It should clear up the questions from this thread. :) Thanks! -Kees -- Kees Cook

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Google
On Thu, 14 Sep 2023 15:11:02 +0200 Clément Léger wrote: > enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, > this will result in a misaligned access on 64 bits architectures since > set_bit()/clear_bit() are expecting an unsigned long (aligned) pointer. > On architecture

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
On 9/15/2023 10:16 AM, Steven Rostedt wrote: On Fri, 15 Sep 2023 09:11:06 +0800 Linyu Yuan wrote: + snprintf(__s, 9, "ep%d%s", te.address, \ + (te.caps.dir_in && te.caps.dir_out) ? "" : \ + te.caps.dir_in ? "in" : "out"); Note,

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Steven Rostedt
On Fri, 15 Sep 2023 09:11:06 +0800 Linyu Yuan wrote: > >> + snprintf(__s, 9, "ep%d%s", te.address, \ > >> + (te.caps.dir_in && te.caps.dir_out) ? "" : \ > >> + te.caps.dir_in ? "in" : "out"); > > Note, there's a temp buffer trace_seq 'p' available for

[ANNOUNCE] 4.14.325-rt154

2023-09-14 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 4.14.325-rt154 stable release. This release is just an update to the new stable 4.14.325 version and no RT specific changes have been made. You can get this release via the git tree at:

[ANNOUNCE] 5.10.194-rt94

2023-09-14 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 5.10.194-rt94 stable release. This release is just an update to the new stable 5.10.194 version and no RT specific changes have been made. You can get this release via the git tree at:

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
On 9/15/2023 9:51 AM, Alan Stern wrote: On Fri, Sep 15, 2023 at 09:02:48AM +0800, Linyu Yuan wrote: On 9/14/2023 10:54 PM, Alan Stern wrote: You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Alan Stern
On Fri, Sep 15, 2023 at 09:02:48AM +0800, Linyu Yuan wrote: > > On 9/14/2023 10:54 PM, Alan Stern wrote: > > You didn't include the version number in the Subject: line. Undoubtedly > > Greg's automatic error checker will warn you about this. Unless the > > version number is clearly marked for

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
On 9/15/2023 12:54 AM, Steven Rostedt wrote: On Thu, 14 Sep 2023 18:02:57 +0800 Linyu Yuan wrote: Save u32 members into trace event ring buffer and parse it for possible bit fields. Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. Signed-off-by: Linyu Yuan ---

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
On 9/14/2023 10:54 PM, Alan Stern wrote: You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version number is clearly marked for each patch, it's difficult for his programs to tell which email message

Re: linux-next: Tree for Sep 12 (bcachefs)

2023-09-14 Thread Kees Cook
On Thu, Sep 14, 2023 at 03:38:07PM -0400, Kent Overstreet wrote: > On Wed, Sep 13, 2023 at 06:17:00PM -0700, Kees Cook wrote: > > It looks like you just want a type union for the flexible array. > > This can be done like this: > > > > struct bch_sb_field_journal_seq_blacklist { > > struct

[PATCH] HID: uhid: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
strscpy(hid->name, ev->u.create2.name, sizeof(hid->name)); + strscpy(hid->phys, ev->u.create2.phys, sizeof(hid->phys)); + strscpy(hid->uniq, ev->u.create2.uniq, sizeof(hid->uniq)); hid->ll_driver = _hid_driver; hid->bus = ev->u.create2.bus; --- b

[PATCH] HID: prodikeys: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
eof(rwmidi->name)); + strscpy(rwmidi->name, card->shortname, sizeof(rwmidi->name)); rwmidi->info_flags = SNDRV_RAWMIDI_INFO_INPUT; rwmidi->private_data = pm; --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-hid-hid-prodikeys-c-cf42614a21d4 Best regards, -- Justin Stitt

Re: [PATCH v4 03/18] x86/sgx: Add sgx_epc_lru_lists to encapsulate LRU lists

2023-09-14 Thread Huang, Kai
On Thu, 2023-09-14 at 09:13 -0700, Dave Hansen wrote: > On 9/14/23 03:31, Huang, Kai wrote: > > > Signed-off-by: Haitao Huang > > > Cc: Sean Christopherson > > You don't need 'Cc:' Sean if the patch has Sean's SoB. > > It is a SoB for Sean's @intel address and cc's his @google address. > > It

Re: [PATCH] nd_btt: Make BTT lanes preemptible

2023-09-14 Thread Ira Weiny
Tomáš Glozar wrote: > From: Tomas Glozar > > nd_region_acquire_lane uses get_cpu, which disables preemption. This is > an issue on PREEMPT_RT kernels, since btt_write_pg and also > nd_region_acquire_lane itself take a spin lock, resulting in BUG: > sleeping function called from invalid context.

Re: linux-next: Tree for Sep 12 (bcachefs)

2023-09-14 Thread Gustavo A. R. Silva
On 9/14/23 13:38, Kent Overstreet wrote: On Wed, Sep 13, 2023 at 06:17:00PM -0700, Kees Cook wrote: On Tue, Sep 12, 2023 at 03:26:45PM +1000, Stephen Rothwell wrote: New tree: bcachefs Thanks for going through and fixing all the fake flexible array members. It looks much nicer. :) I have

Re: linux-next: Tree for Sep 12 (bcachefs)

2023-09-14 Thread Kent Overstreet
On Wed, Sep 13, 2023 at 06:17:00PM -0700, Kees Cook wrote: > On Tue, Sep 12, 2023 at 03:26:45PM +1000, Stephen Rothwell wrote: > > New tree: bcachefs > > Thanks for going through and fixing all the fake flexible array members. > It looks much nicer. :) > > I have some questions about the

Re: [PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-14 Thread Ira Weiny
Dave Jiang wrote: > > > On 9/14/23 00:03, Chen Ni wrote: [snip] > > diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c > > index 1b9f5b8a6167..5765674b36f2 100644 > > --- a/drivers/nvdimm/of_pmem.c > > +++ b/drivers/nvdimm/of_pmem.c > > @@ -30,7 +30,13 @@ static int

Re: [PATCH] module: print module name on refcount error

2023-09-14 Thread Michal Hocko
On Mon 28-08-23 14:18:30, Jean Delvare wrote: [...] > > > It would likely be better to use refcount_t instead of atomic_t. > > > > Patches welcomed. > > Michal, do I understand correctly that this would prevent the case our > customer had (too many gets), but won't make a difference for actual

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Al Viro
On Thu, Sep 14, 2023 at 05:58:05PM +0100, Al Viro wrote: > Incidentally, I'm going to add a (belated by 10 years) chunk in porting.rst > re making sure that anything in superblock that might be needed by methods > called in RCU mode should *not* be freed without an RCU delay... Should've > done

Re: [PATCH v1 1/1] lib/string_helpers: Don't copy a tail in kstrdup_and_replace() if 'new' is \0

2023-09-14 Thread Andy Shevchenko
On Wed, Sep 13, 2023 at 12:45:57PM +0300, Andy Shevchenko wrote: > The kstrdup_and_replace() takes two characters, old and new, to replace > former with latter after the copying of the original string. But in case > when new is a NUL, there is no point to copy the rest of the string, > the

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Clément Léger
On 14/09/2023 18:42, Beau Belgrave wrote: > On Thu, Sep 14, 2023 at 03:11:02PM +0200, Clément Léger wrote: >> enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, >> this will result in a misaligned access on 64 bits architectures since >> set_bit()/clear_bit() are expecting

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-14 Thread Catalin Marinas
Hi Kuan-Ying, On Wed, Sep 13, 2023 at 08:11:40AM +, Kuan-Ying Lee (李冠穎) wrote: > On Wed, 2023-08-23 at 14:13 +0100, Alexandru Elisei wrote: > > diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > b/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > index 60472d65a355..bd050373d6cf 100644 >

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Clément Léger
On 14/09/2023 19:29, Steven Rostedt wrote: > On Thu, 14 Sep 2023 13:17:00 -0400 > Steven Rostedt wrote: > >> Now lets look at big endian layout: >> >> uaddr = 0xbeef0004 >> enabler = 1; >> >> memory at 0xbeef: 00 00 00 00 00 00 00 02 >> ^ >>

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 13:17:00 -0400 Steven Rostedt wrote: > Now lets look at big endian layout: > > uaddr = 0xbeef0004 > enabler = 1; > > memory at 0xbeef: 00 00 00 00 00 00 00 02 > ^ > addr: 0xbeef0004 > >

Re: [PATCH v2] wifi: brcmfmac: Replace 1-element arrays with flexible arrays

2023-09-14 Thread Gustavo A. R. Silva
On 9/14/23 01:02, Juerg Haefliger wrote: Since commit 2d47c6956ab3 ("ubsan: Tighten UBSAN_BOUNDS on GCC"), UBSAN_BOUNDS no longer pretends 1-element arrays are unbounded. Walking 'element' and 'channel_list' will trigger warnings, so make them proper flexible arrays. False positive warnings

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 15:11:02 +0200 Clément Léger wrote: > @@ -511,13 +511,19 @@ static int user_event_enabler_write(struct > user_event_mm *mm, > } > > kaddr = kmap_local_page(page); > + > + bit_offset = uaddr & (sizeof(unsigned long) - 1); > + if (bit_offset) { > +

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Al Viro
On Thu, Sep 14, 2023 at 04:02:25PM +0200, Christian Brauner wrote: > Yes, you're right that making the superblock and not the filesytem type > the bd_holder changes the logic and we are aware of that of course. And > it requires changes such as moving additional block device closing from > where

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 18:02:57 +0800 Linyu Yuan wrote: > Save u32 members into trace event ring buffer and parse it for possible > bit fields. > > Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. > > Signed-off-by: Linyu Yuan > --- > drivers/usb/gadget/udc/trace.h | 154

Re: [PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 18:02:54 +0800 Linyu Yuan wrote: > some trace event use an interger to to save a bit field info of gadget, > also some trace save endpoint name in string forat, it all can be > chagned to other way at trace event store phase. > > bit field can be replace with a union

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Beau Belgrave
On Thu, Sep 14, 2023 at 03:11:02PM +0200, Clément Léger wrote: > enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, > this will result in a misaligned access on 64 bits architectures since > set_bit()/clear_bit() are expecting an unsigned long (aligned) pointer. > On

[PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-14 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Instead of having a descriptor for every file represented in the eventfs directory, only have the directory itself represented. Change the API to send in a list of entries that represent all the files in the directory (but not other directories). The entry list

[PATCH 0/2 v3] tracing: Remove eventfs_files by use of callbacks

2023-09-14 Thread Steven Rostedt
This is a bit of a redesign of the way the eventfs is created. It no longer creates a descriptor representing every file but instead just the directories. These descriptors get an array of entries that represent the files within it (but not for sub directories). Each entry has a name and a

[PATCH 2/2 v3] tracing/selftests: Update kprobe args char/string to match new functions

2023-09-14 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The function that the kprobe_args_char and kprobes_arg_string attaches to for its test has changed its name once again. Now we need to check for eventfs_create_dir(), and if it exists, use that, otherwise check for eventfs_add_dir() and if that exists use that,

[PATCH] ring_buffer: Use try_cmpxchg instead of cmpxchg in rb_insert_pages

2023-09-14 Thread Uros Bizjak
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in rb_insert_pages. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Cc: Steven Rostedt Cc: Masami

Re: [PATCH v4 03/18] x86/sgx: Add sgx_epc_lru_lists to encapsulate LRU lists

2023-09-14 Thread Dave Hansen
On 9/14/23 03:31, Huang, Kai wrote: >> Signed-off-by: Haitao Huang >> Cc: Sean Christopherson > You don't need 'Cc:' Sean if the patch has Sean's SoB. It is a SoB for Sean's @intel address and cc's his @google address. It is fine.

Re: (subset) [PATCH 00/11] Initial support for the Fairphone 5 smartphone

2023-09-14 Thread Bjorn Andersson
On Wed, 30 Aug 2023 11:58:25 +0200, Luca Weiss wrote: > Add support to boot up mainline kernel on the QCM6490-based Fairphone 5 > smartphone. > > These patches only cover a part of the functionality brought up on > mainline so far, with the rest needing larger dts and driver changes or > depend

Re: (subset) [PATCH v3 0/7] MSM8976 PLL,RPMPD and DTS changes

2023-09-14 Thread Bjorn Andersson
On Sat, 12 Aug 2023 13:24:43 +0200, Adam Skladowski wrote: > This patch series fixes introduce support for msm8976 pll, > also brings some adjustments and fixes domains setup and few dts nitpicks. > > Changes since v1 > > 1. Fixed few styling issues > 2. Changed compatibles for

Re: [PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-14 Thread Dave Jiang
On 9/14/23 00:03, Chen Ni wrote: > Use devm_kstrdup() instead of kstrdup() and check its return value to > avoid memory leak. > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus > provider") > Signed-off-by: Chen Ni Reviewed-by: Dave Jiang One unrelated comment

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-14 Thread Rob Herring
On Wed, Sep 13, 2023 at 6:17 AM Hari Nagalla wrote: > > K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. > The remote processor's life cycle management and IPC mechanisms are > similar across the R5F and M4F cores from remote processor driver > point of view. However, there are

Re: [PATCH] x86/hyperv: Restrict get_vtl to only VTL platforms

2023-09-14 Thread Vitaly Kuznetsov
Saurabh Sengar writes: > For non VTL platforms vtl is always 0, and there is no need of > get_vtl function. For VTL platforms get_vtl should always succeed > and should return the correct VTL. > > Signed-off-by: Saurabh Sengar > --- > arch/x86/hyperv/hv_init.c | 8 +--- > 1 file changed, 5

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Alan Stern
You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version number is clearly marked for each patch, it's difficult for his programs to tell which email message contains the most recent version. On Thu,

Re: [PATCH 1/8] trace: add new DECLARE_EVENT_CLASS_PRINT_INIT class type

2023-09-14 Thread kernel test robot
Hi Linyu, kernel test robot noticed the following build warnings: [auto build test WARNING on usb/usb-testing] [also build test WARNING on usb/usb-next usb/usb-linus linus/master v6.6-rc1 next-20230914] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Christian Brauner
> Christoph, could you explain what the hell do we need that for? It does > create the race in question and AFAICS 2c18a63b760a (and followups trying > to plug holes in it) had been nothing but headache. > > Old logics: if mount attempt with a different fs type happens, -EBUSY > is precisely

[PATCH 2/2] mm, vmscan: remove ISOLATE_UNMAPPED

2023-09-14 Thread Vlastimil Babka
This isolate_mode_t flag is effectively unused since 89f6c88a6ab4 ("mm: __isolate_lru_page_prepare() in isolate_migratepages_block()") as sc->may_unmap is now checked directly (and only node_reclaim has a mode that sets it to 0). The last remaining place is mm_vmscan_lru_isolate tracepoint for the

[PATCH 1/2] trace-vmscan-postprocess: sync with tracepoints updates

2023-09-14 Thread Vlastimil Babka
The script has fallen behind tracepoint changes for a while, fix it up. Most changes are mechanical (renames, removal of tracepoint parameters that are not used by the script). More notable change involves mm_vmscan_lru_isolate which is relying on the isolate_mode to determine if the inactive

[PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Clément Léger
enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, this will result in a misaligned access on 64 bits architectures since set_bit()/clear_bit() are expecting an unsigned long (aligned) pointer. On architecture that do not support misaligned access, this will crash the kernel.

Re: [PATCH v2] verification/dot2k: Delete duplicate imports

2023-09-14 Thread Daniel Bristot de Oliveira
On 9/6/23 17:57, Alessandro Carminati (Red Hat) wrote: > The presence of duplicate import lines appears to be a typo. > Removing them. > > Fixes: 24bce201d798 ("tools/rv: Add dot2k") > Signed-off-by: Alessandro Carminati (Red Hat) Queued, thanks!

Re: [PATCH v4 03/18] x86/sgx: Add sgx_epc_lru_lists to encapsulate LRU lists

2023-09-14 Thread Huang, Kai
Some non-technical staff: On Tue, 2023-09-12 at 21:06 -0700, Haitao Huang wrote: > From: Kristen Carlson Accardi The patch was from Kristen, but ... > > Introduce a data structure to wrap the existing reclaimable list and its > spinlock. Each cgroup later will have one instance of this

Re: [PATCH 10/19] USB: gadget/legacy: remove sb_mutex

2023-09-14 Thread Sergey Shtylyov
On 9/13/23 2:10 PM, Christoph Hellwig wrote: > Creating new a new super_block vs freeing the old one for single instance ^ I can't parse that. :-) > file systems is serialized by the wait for SB_DEAD. > > Remove the superfluous sb_mutex. > > Signed-off-by: Christoph

[PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
Some UDC trace event will save usb udc information, but it use one int size buffer to save one bit information of usb udc, it is wast trace buffer. Add anonymous union which have one u32 member can be used by trace event during fast assign stage to save more entries with same trace ring buffer

[PATCH 8/8] usb: musb: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 member into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/musb/musb_trace.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-)

[PATCH 7/8] usb: mtu3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/mtu3/mtu3_trace.h | 76 +++ 1 file changed, 50 insertions(+),

[PATCH 6/8] usb: cdns2: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/gadget/udc/cdns2/cdns2-trace.h | 175 ++--- 1 file changed, 121 insertions(+),

[PATCH 5/8] usb: dwc3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/dwc3/trace.h | 99 +--- 1 file changed, 63 insertions(+),

[PATCH 4/8] usb: cdns3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/cdns3/cdns3-trace.h | 201 ++-- drivers/usb/cdns3/cdnsp-trace.h |

[PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit fields. Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/gadget/udc/trace.h | 154 +++-- 1 file changed, 69 insertions(+), 85

[PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage

2023-09-14 Thread Linyu Yuan
some trace event use an interger to to save a bit field info of gadget, also some trace save endpoint name in string forat, it all can be chagned to other way at trace event store phase. bit field can be replace with a union interger member which include multiple bit fields. ep name stringe can

[PATCH 1/8] trace: add new DECLARE_EVENT_CLASS_PRINT_INIT class type

2023-09-14 Thread Linyu Yuan
This class almost same as DECLARE_EVENT_CLASS, it allow user add some init operation before print at output stage. Add a new macro TP_printk_init(), user can add operation in it. Also add a new TRACE_EVENT_PRINT_INIT() macro. Signed-off-by: Linyu Yuan --- include/linux/tracepoint.h

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Christian Brauner
> BTW, this part of commit message in 2c18a63b760a is rather confused: > Recent rework moved block device closing out of sb->put_super() and into > sb->kill_sb() to avoid deadlocks as s_umount is held in put_super() and > blkdev_put() can end up taking s_umount again. > > That was

Re: [PATCH v2 06/14] arm64: dts: qcom: sdm630: Drop RPM bus clocks

2023-09-14 Thread Konrad Dybcio
On 14.09.2023 08:26, Krzysztof Kozlowski wrote: > On 13/09/2023 14:08, Konrad Dybcio wrote: >> On 13.09.2023 09:13, Krzysztof Kozlowski wrote: >>> On 12/09/2023 15:31, Konrad Dybcio wrote: These clocks are now handled from within the icc framework and are no longer registered from within

[PATCH] livepatch: Fix missing newline character in klp_resolve_symbols()

2023-09-14 Thread Zheng Yejian
Without the newline character, the log may not be printed immediately after the error occurs. Fixes: ca376a937486 ("livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols") Signed-off-by: Zheng Yejian --- kernel/livepatch/core.c | 2 +- 1 file changed, 1

[PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-14 Thread Chen Ni
Use devm_kstrdup() instead of kstrdup() and check its return value to avoid memory leak. Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus provider") Signed-off-by: Chen Ni --- Changelog: v2 -> v3: 1. Use devm_kstrdup() instead of kstrdup() v1 -> v2: 1. Add a fixes tag.

Re: [PATCH v3] x86/platform/uv: refactor deprecated strcpy and strncpy

2023-09-14 Thread Ingo Molnar
* Hans de Goede wrote: > >> Which IMHO is much more readable then what has landed now. But since > >> v2 has already landed I guess the best thing is just to stick with > >> what we have upstream now... > > > > Well, how about we do a delta patch with all the changes you suggested? > > I'm

Re: [PATCH v2 06/14] arm64: dts: qcom: sdm630: Drop RPM bus clocks

2023-09-14 Thread Krzysztof Kozlowski
On 13/09/2023 14:08, Konrad Dybcio wrote: > On 13.09.2023 09:13, Krzysztof Kozlowski wrote: >> On 12/09/2023 15:31, Konrad Dybcio wrote: >>> These clocks are now handled from within the icc framework and are >>> no longer registered from within the CCF. Remove them. >>> >>> Signed-off-by: Konrad