Re: [PATCH] x86/hyperv/vtl: Replace real_mode_header only under Hyper-V

2023-09-12 Thread Saurabh Singh Sengar
On Mon, Sep 11, 2023 at 10:00:59AM +0200, Mathias Krause wrote: > On 08.09.23 17:02, Saurabh Singh Sengar wrote: > > On Fri, Sep 08, 2023 at 12:26:10PM +0200, Mathias Krause wrote: > >> Booting a CONFIG_HYPERV_VTL_MODE=y enabled kernel on bare metal or a > >> non-Hyper-V hypervisor leads to serve

[PATCH v4 18/18] selftests/sgx: Add scripts for epc cgroup testing

2023-09-12 Thread Haitao Huang
Scripts rely on cgroup-tools package from libcgroup [1]. To test: 1) sudo ./setup_epc_cg.sh (optional one time setup) 2) sudo ./run_tests_in_misc_cg.sh To watch misc group current: ./watch_misc_for_tests.sh current [1] https://github.com/libcgroup/libcgroup/blob/main/README Signed-off-by:

[PATCH v4 17/18] Docs/x86/sgx: Add description for cgroup support

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Add initial documentation of how to regulate the distribution of SGX Enclave Page Cache (EPC) memory via the Miscellaneous cgroup controller. Signed-off-by: Sean Christopherson Signed-off-by: Kristen Carlson Accardi Signed-off-by: Haitao Huang Cc: Sean

[PATCH v4 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi When an OOM event occurs, all pages associated with an enclave will need to be freed, including pages that are not currently tracked by the cgroup LRU lists. Add a new "unreclaimable" list to the sgx_epc_lru_lists struct and update the "sgx_record/drop_epc_pages()"

[PATCH v4 16/18] x86/sgx: Limit process EPC usage with misc cgroup controller

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Implement support for cgroup control of SGX Enclave Page Cache (EPC) memory using the misc cgroup controller. EPC memory is independent from normal system memory, e.g. must be reserved at boot from RAM and cannot be converted between EPC and normal memory while the

[PATCH v4 13/18] x86/sgx: Expose sgx_reclaim_pages() for use by EPC cgroup

2023-09-12 Thread Haitao Huang
From: Sean Christopherson Adjust and expose the top-level reclaim function as sgx_reclaim_epc_pages() for use by the upcoming EPC cgroup, which will initiate reclaim to enforce the max limit. Make these adjustments to the function signature. 1) To take a parameter that specifies the number of

[PATCH v4 15/18] x86/sgx: Prepare for multiple LRUs

2023-09-12 Thread Haitao Huang
Add sgx_can_reclaim() wrapper and encapsulate direct references to the global LRU list in the reclaimer functions so that they can be called with an LRU list per EPC cgroup. Signed-off-by: Sean Christopherson Signed-off-by: Kristen Carlson Accardi Signed-off-by: Haitao Huang Cc: Sean

[PATCH v4 14/18] x86/sgx: Add helper to grab pages from an arbitrary EPC LRU

2023-09-12 Thread Haitao Huang
From: Sean Christopherson Move the isolation loop into a helper, sgx_isolate_pages(), in preparation for existence of multiple LRUs. Expose the helper to other SGX code so that it can be called from the EPC cgroup code, e.g., to isolate pages from a single cgroup LRU. Exposing the isolation loop

[PATCH v4 10/18] x86/sgx: Add EPC page flags to identify owner types

2023-09-12 Thread Haitao Huang
From: Sean Christopherson Two types of owners of struct sgx_epc_page, 'sgx_encl' for VA pages and 'sgx_encl_page' can be stored in the previously introduced union field. OOM support for cgroups requires that the owner needs to be identified when selecting pages from the unreclaimable list.

[PATCH v4 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-09-12 Thread Haitao Huang
From: Sean Christopherson Introduce the OOM path for killing an enclave with a reclaimer that is no longer able to reclaim enough EPC pages. Find a victim enclave, which will be an enclave with only "unreclaimable" EPC pages left in the cgroup LRU lists. Once a victim is identified, mark the

[PATCH v4 09/18] x86/sgx: Store struct sgx_encl when allocating new VA pages

2023-09-12 Thread Haitao Huang
In a later patch, when a cgroup has exceeded the max capacity for EPC pages, it may need to identify and OOM kill a less active enclave to make room for other enclaves within the same group. Such a victim enclave would have no active pages other than the unreclaimable Version Array (VA) and SECS

[PATCH v4 07/18] x86/sgx: Introduce RECLAIM_IN_PROGRESS state

2023-09-12 Thread Haitao Huang
From: Sean Christopherson Add RECLAIM_IN_PROGRESS state to not rely on list_empty(_page->list) to determine if an EPC page is selected as a reclaiming candidate. When a page is being reclaimed from the page pool (sgx_global_lru), there is an intermediate stage where a page may have been

[PATCH v4 08/18] x86/sgx: Use a list to track to-be-reclaimed pages

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Change sgx_reclaim_pages() to use a list rather than an array for storing the epc_pages which will be reclaimed. This change is needed to transition to the LRU implementation for EPC cgroup support. When the EPC cgroup is implemented, the reclaiming process will do

[PATCH v4 06/18] x86/sgx: Introduce EPC page states

2023-09-12 Thread Haitao Huang
Use the lower 3 bits in the flags field of sgx_epc_page struct to track EPC states in its life cycle and define an enum for possible states. More state(s) will be added later. Signed-off-by: Haitao Huang --- V4: - No changes other than required for patch reordering. V3: - This is new in V3 to

[PATCH v4 05/18] x86/sgx: Store reclaimable EPC pages in sgx_epc_lru_lists

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Replace sgx_mark_page_reclaimable() and sgx_unmark_page_reclaimable() with sgx_record_epc_page() and sgx_drop_epc_page(). The sgx_record_epc_page() function adds the epc_page to the "reclaimable" list in the sgx_epc_lru_lists struct, while sgx_drop_epc_page()

[PATCH v4 04/18] x86/sgx: Use sgx_epc_lru_lists for existing active page list

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi All EPC pages of enclaves including VA and SECS will be tracked in sgx_epc_lru_lists structs, one per cgroup. For now just replace the existing sgx_active_page_list in the reclaimer and its spinlock with a global sgx_epc_lru_lists struct. VA and SECS pages are still

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

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Introduce a data structure to wrap the existing reclaimable list and its spinlock. Each cgroup later will have one instance of this structure to track EPC pages allocated for processes associated with the same cgroup. Just like the global SGX reclaimer (ksgxd), an

[PATCH v4 02/18] cgroup/misc: Add SGX EPC resource type and export APIs for SGX driver

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi The SGX driver will need to get access to the root misc_cg object to do iterative walks and also determine if a charge will be towards the root cgroup or not. To manage the SGX EPC memory via the misc controller, the SGX driver will also need to be able to iterate

[PATCH v4 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-12 Thread Haitao Huang
From: Kristen Carlson Accardi Consumers of the misc cgroup controller might need to perform separate actions for Cgroups Subsystem State(CSS) events: cgroup alloc and free. In addition, writes to the max value may also need separate action. Add the ability to allow downstream users to setup

[PATCH v4 00/18] Add Cgroup support for SGX EPC memory

2023-09-12 Thread Haitao Huang
SGX EPC memory allocations are separate from normal RAM allocations, and are managed solely by the SGX subsystem. The existing cgroup memory controller cannot be used to limit or account for SGX EPC memory, which is a desirable feature in some environments, e.g., support for pod level control in a

Re: [PATCH v2] fs: ocfs2: Replace strlcpy with sysfs_emit

2023-09-12 Thread Joseph Qi
On 9/1/23 3:38 AM, 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 strlcpy()

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

2023-09-12 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 3/3] tracing/selftests: Update kprobe args char/string to match new functions

2023-09-12 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 0/3] tracing: Remove eventfs_files by use of callbacks

2023-09-12 Thread Steven Rostedt
The first patch adds a file to tracefs that shows all the event_files that have been allocated for the dynamic eventfs file system. It also shows the dentries that were created and their current ref counts. This is useful for debugging and knowing when a dentry has been created and freed. I was

[PATCH 1/3] tracefs: Add show_events_dentries

2023-09-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a file in tracefs that shows the "events" allocated entries and the dentries that are attached to them. This is used to see what dentries have been dynamically allocated as well as their current ref counts. ~# cat

Re: [PATCH] certs: Restrict blacklist updates to the secondary trusted keyring

2023-09-12 Thread Eric Snowberg
> On Sep 12, 2023, at 4:47 PM, Mimi Zohar wrote: > > On Tue, 2023-09-12 at 17:11 +, Eric Snowberg wrote: >> >>> On Sep 12, 2023, at 5:54 AM, Mimi Zohar wrote: >>> >>> On Tue, 2023-09-12 at 02:00 +, Eric Snowberg wrote: > On Sep 11, 2023, at 5:08 PM, Mimi Zohar wrote:

[PATCH RESEND v2 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-12 Thread SeongJae Park
DAMON provides damon_aggregated tracepoint, which exposes details of each region and its access monitoring results. It is useful for getting whole monitoring results, e.g., for recording purposes. For investigations of DAMOS, DAMON Sysfs interface provides DAMOS statistics and tried_regions

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

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 6:26 PM 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_pad` [2] due to the fact that it guarantees >

[PATCH v2] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`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_pad` [2] due to the fact that it guarantees NUL-termination on the destination buffer whilst maintaining the

[PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`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_pad` [2] due to the fact that it guarantees NUL-termination on the destination buffer whilst maintaining the

[PATCH] dax: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`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 zero-allocated. A suitable replacement is `strscpy` [2] due to the fact that it

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
; > > > > > ipmi_panic_request_and_wait(intf, , ); > > > diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c > > > index 3b921c78ba08..edcb83765dce 100644 > > > --- a/drivers/char/ipmi/ipmi_ssif.c > > > +

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
a/drivers/char/ipmi/ipmi_ssif.c > > +++ b/drivers/char/ipmi/ipmi_ssif.c > > @@ -1940,7 +1940,7 @@ static int new_ssif_client(int addr, char > > *adapter_name, > > } > > } > > > > - strncpy(addr_info->binfo.type, DEVICE_NAME, > > + strscpy(addr_info->binfo.type, DEVICE_NAME, > > sizeof(addr_info->binfo.type)); > > This one is good. > > -corey > > > addr_info->binfo.addr = addr; > > addr_info->binfo.platform_data = addr_info; > > > > --- > > base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c > > change-id: 20230912-strncpy-drivers-char-ipmi-ipmi-dda47b3773fd > > > > Best regards, > > -- > > Justin Stitt > >

[PATCH] cpuidle: dt: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`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 NUL-termination on the destination buffer. With this, we can also drop the now

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Corey Minyard
trscpy(addr_info->binfo.type, DEVICE_NAME, > sizeof(addr_info->binfo.type)); This one is good. -corey > addr_info->binfo.addr = addr; > addr_info->binfo.platform_data = addr_info; > > --- > base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c > change-id: 20230912-strncpy-drivers-char-ipmi-ipmi-dda47b3773fd > > Best regards, > -- > Justin Stitt >

[PATCH] cpufreq: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
e_init(void) BUG_ON(!cpufreq_global_kobject); if (!strlen(default_governor)) - strncpy(default_governor, gov->name, CPUFREQ_NAME_LEN); + strscpy(default_governor, gov->name, CPUFREQ_NAME_LEN); return 0; } --- base-commit: 2dde18cd1d8fac735875f2e4987

[PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
info.type, DEVICE_NAME, + strscpy(addr_info->binfo.type, DEVICE_NAME, sizeof(addr_info->binfo.type)); addr_info->binfo.addr = addr; addr_info->binfo.platform_data = addr_info; --- base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c change-id: 20230912-strn

Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Google
On Tue, 12 Sep 2023 21:47:52 +0800 Jinjie Ruan wrote: > Inject fault while probing btrfs.ko, if kstrdup() fails in > eventfs_prepare_ef() in eventfs_add_dir(), it will return ERR_PTR > to assign file->ef. But the eventfs_remove() check NULL in > trace_module_remove_events(), which causes the

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

2023-09-12 Thread Justin Stitt
;obj_type, obj_type, 16); - cmd_params->obj_type[15] = '\0'; + strscpy_pad(cmd_params->obj_type, obj_type, 16); /* send command to mc*/ err = mc_send_command(mc_io, ); --- base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c change-id: 20230912-strncpy-drivers-bus-fsl-mc-dprc-c-bc7d818386ec Best regards, -- Justin Stitt

Re: [PATCH] certs: Restrict blacklist updates to the secondary trusted keyring

2023-09-12 Thread Mimi Zohar
On Tue, 2023-09-12 at 17:11 +, Eric Snowberg wrote: > > > On Sep 12, 2023, at 5:54 AM, Mimi Zohar wrote: > > > > On Tue, 2023-09-12 at 02:00 +, Eric Snowberg wrote: > >> > >>> On Sep 11, 2023, at 5:08 PM, Mimi Zohar wrote: > >>> > >>> On Mon, 2023-09-11 at 22:17 +, Eric Snowberg

Re: [PATCH] selinux: Annotate struct sidtab_str_cache with __counted_by

2023-09-12 Thread Paul Moore
On Aug 17, 2023 Kees Cook wrote: > > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array indexing) and

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

2023-09-12 Thread Justin Stitt
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 destination strings [1]. > > > > `gate_buf` should always be NUL-terminated and does

[GIT PULL] tpmdd changes for v6.6-rc2

2023-09-12 Thread Jarkko Sakkinen
Merge tag 'for-6.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux (2023-09-12 11:28:00 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tags/tpmdd-v6.6-rc2 for you to fetch changes up to

Re: [PATCH] audit: Annotate struct audit_chunk with __counted_by

2023-09-12 Thread Paul Moore
On Aug 17, 2023 Paul Moore wrote: > > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array indexing) and

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Mimi Zohar
On Tue, 2023-09-12 at 22:32 +0300, Jarkko Sakkinen wrote: > On Tue Sep 12, 2023 at 10:22 PM EEST, Mimi Zohar wrote: > > On Tue, 2023-09-12 at 12:49 +0300, Jarkko Sakkinen wrote: > > > On Tue Sep 12, 2023 at 10:41 AM EEST, Michal Suchánek wrote: > > > > On Mon, Sep 11, 2023 at 11:39:38PM -0400,

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 10:22 PM EEST, Mimi Zohar wrote: > On Tue, 2023-09-12 at 12:49 +0300, Jarkko Sakkinen wrote: > > On Tue Sep 12, 2023 at 10:41 AM EEST, Michal Suchánek wrote: > > > On Mon, Sep 11, 2023 at 11:39:38PM -0400, Nayna wrote: > > > > > > > > On 9/7/23 13:32, Michal Suchánek wrote:

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Mimi Zohar
On Tue, 2023-09-12 at 12:49 +0300, Jarkko Sakkinen wrote: > On Tue Sep 12, 2023 at 10:41 AM EEST, Michal Suchánek wrote: > > On Mon, Sep 11, 2023 at 11:39:38PM -0400, Nayna wrote: > > > > > > On 9/7/23 13:32, Michal Suchánek wrote: > > > > Adding more CC's from the original patch, looks like

[PATCH v2 1/2] mm/damon/core: add a tracepoint for damos apply target regions

2023-09-12 Thread SeongJae Park
DAMON provides damon_aggregated tracepoint, which exposes details of each region and its access monitoring results. It is useful for getting whole monitoring results, e.g., for recording purposes. For investigations of DAMOS, DAMON Sysfs interface provides DAMOS statistics and tried_regions

[PATCH v2 1/3] tracing/user_events: Allow events to persist for perfmon_capable users

2023-09-12 Thread Beau Belgrave
There are several scenarios that have come up where having a user_event persist even if the process that registered it exits. The main one is having a daemon create events on bootup that shouldn't get deleted if the daemon has to exit or reload. Another is within OpenTelemetry exporters, they wish

[PATCH v2 0/3] tracing/user_events: Allow events to persist for perfmon_capable users

2023-09-12 Thread Beau Belgrave
There are several scenarios that have come up where having a user_event persist even if the process that registered it exits. The main one is having a daemon create events on bootup that shouldn't get deleted if the daemon has to exit or reload. Another is within OpenTelemetry exporters, they wish

[PATCH v2 3/3] tracing/user_events: Document persist event flags

2023-09-12 Thread Beau Belgrave
Users need to know how to make events persist now that we allow for that. We also now allow the dynamic_events file to create events by utilizing the persist flag during event register. Add back in to documentation how /sys/kernel/tracing/dynamic_events can be used to create persistent

[PATCH v2 2/3] selftests/user_events: Test persist flag cases

2023-09-12 Thread Beau Belgrave
Now that we have exposed USER_EVENT_REG_PERSIST events can persist both via the ABI and in the /sys/kernel/tracing/dynamic_events file. Ensure both the ABI and DYN cases work by calling both during the parse tests. Add new flags test that ensures only USER_EVENT_REG_PERSIST is honored and any

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

2023-09-12 Thread Joe Perches
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 checks for these new functions. > > Link:

Re: [PATCH v2] tpm: Fix typo in tpmrm class definition

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 8:02 PM EEST, Justin M. Forbes wrote: > Commit d2e8071bed0be ("tpm: make all 'class' structures const") > unfortunately had a typo for the name on tpmrm. > > Fixes: d2e8071bed0b ("tpm: make all 'class' structures const") > Signed-off-by: Justin M. Forbes > --- >

Re: [PATCH] certs: Restrict blacklist updates to the secondary trusted keyring

2023-09-12 Thread Eric Snowberg
> On Sep 12, 2023, at 5:54 AM, Mimi Zohar wrote: > > On Tue, 2023-09-12 at 02:00 +, Eric Snowberg wrote: >> >>> On Sep 11, 2023, at 5:08 PM, Mimi Zohar wrote: >>> >>> On Mon, 2023-09-11 at 22:17 +, Eric Snowberg wrote: > On Sep 11, 2023, at 10:51 AM, Mickaël Salaün wrote:

Re: [PATCH] tpm: Fix typo in tpmrm class definition

2023-09-12 Thread Justin Forbes
On Tue, Sep 12, 2023 at 4:41 AM Jarkko Sakkinen wrote: > > On Tue Sep 12, 2023 at 1:32 AM EEST, Justin M. Forbes wrote: > > Commit d2e8071bed0be ("tpm: make all 'class' structures const") > > unfortunately had a typo for the name on tpmrm. > > > > Fixes: d2e8071bed0b ("tpm: make all 'class'

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

2023-09-12 Thread Gustavo A. R. Silva
vmalloc() and vzalloc() functions have now 2-factor multiplication argument forms vmalloc_array() and vcalloc(), correspondingly. Add alloc-with-multiplies checks for these new functions. Link: https://github.com/KSPP/linux/issues/342 Signed-off-by: Gustavo A. R. Silva ---

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 6:39 AM EEST, Nayna wrote: > > On 9/7/23 13:32, Michal Suchánek wrote: > > Adding more CC's from the original patch, looks like get_maintainers is > > not that great for this file. > > > > On Thu, Sep 07, 2023 at 06:52:19PM +0200, Michal Suchanek wrote: > >> No other

[PATCH v2] tpm: Fix typo in tpmrm class definition

2023-09-12 Thread Justin M. Forbes
Commit d2e8071bed0be ("tpm: make all 'class' structures const") unfortunately had a typo for the name on tpmrm. Fixes: d2e8071bed0b ("tpm: make all 'class' structures const") Signed-off-by: Justin M. Forbes --- drivers/char/tpm/tpm-chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 1/8] scripts/gdb/symbols: add specific ko module load command

2023-09-12 Thread Andrew Morton
On Tue, 12 Sep 2023 11:41:29 +0200 Johannes Berg wrote: > On Tue, 2023-08-08 at 16:30 +0800, Kuan-Ying Lee wrote: > > Add lx-symbols command to support add specific > > ko module. > > I'm not sure how this was supposed to work? It should have updated the > documentation, but more importantly,

[PATCH v3 2/2] uapi: fix header guard in include/uapi/linux/stddef.h

2023-09-12 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan --- include/uapi/linux/stddef.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/uapi/linux/stddef.h +++ b/include/uapi/linux/stddef.h @@ -50,8 +50,9 @@ TYPE NAME[]; \ } #endif -#endif #ifndef __counted_by

[PATCH v3 1/2] uapi: fix __DECLARE_FLEX_ARRAY for C++

2023-09-12 Thread Alexey Dobriyan
__DECLARE_FLEX_ARRAY(T, member) macro expands to struct { struct {} __empty_member; T member[]; }; which is subtly wrong in C++ because sizeof(struct{}) is 1 not 0, changing UAPI structures layouts. This can be fixed by expanding to T

Re: [PATCH v3 25/25] integrity: Switch from rbtree to LSM-managed blob for integrity_iint_cache

2023-09-12 Thread Stefan Berger
On 9/4/23 09:40, Roberto Sassu wrote: From: Roberto Sassu Before the security field of kernel objects could be shared among LSMs with the LSM stacking feature, IMA and EVM had to rely on an alternative storage of inode metadata. The association between inode metadata and inode is maintained

[PATCH v2 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Iuliana Prodan (OSS)
From: Iuliana Prodan Add the reserve-memory nodes used by DSP when the rpmsg feature is enabled. Signed-off-by: Iuliana Prodan --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi

[PATCH v2 1/2] remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op

2023-09-12 Thread Iuliana Prodan (OSS)
From: Iuliana Prodan Add the .find_loaded_rsc_table operation for i.MX DSP. We need it for inter-process communication between DSP and main core. This callback is used to find the resource table (defined in remote processor linker script) where the address of the vrings along with the other

[PATCH v2 0/2] Rpmsg support for i.MX DSP with resource table

2023-09-12 Thread Iuliana Prodan (OSS)
From: Iuliana Prodan These patches are needed in order to support rpmsg on DSP when a resource table is available. Changes since v1: - add missing bracket in dtsi (patch 2/2) Iuliana Prodan (2): remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op arm64: dts: imx8mp: add

Re: [PATCH v2] uapi: fix __DECLARE_FLEX_ARRAY for C++

2023-09-12 Thread Alexey Dobriyan
On Mon, Sep 11, 2023 at 08:19:20AM +, David Laight wrote: > ... > > Okay, can you please split the patch so they can be backported > > separately? Then I'll get them landed, etc. > > Since the header with just the extra #endif is badly broken on C++ > isn't it best to ensure they get

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Mathieu Poirier
On Tue, Sep 12, 2023 at 01:51:42PM +0300, Iuliana Prodan wrote: > On 9/12/2023 12:36 PM, Krzysztof Kozlowski wrote: > > On 12/09/2023 10:49, Iuliana Prodan wrote: > > > > > Should I test this on other tree(s)? > > > > You test the patch on the tree you send it. What is the point to test it > > > >

Re: [PATCH v3] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-09-12 Thread Alessandro Carminati
Hello Alexander, Thank you for your mail. Il giorno lun 11 set 2023 alle ore 16:26 Alexander Lobakin ha scritto: > > From: Alessandro Carminati (Red Hat) > Date: Mon, 28 Aug 2023 08:04:23 + > > > From: Alessandro Carminati > > > > It is not uncommon for drivers or modules related to

Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Steven Rostedt
On Tue, 12 Sep 2023 21:47:52 +0800 Jinjie Ruan wrote: > v5: > - Move the ef below dir to keep the "upside-down x-mas tree" format. That was quick! I'll add it to my queue and start testing it. Thanks Ruan! -- Steve

[PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Jinjie Ruan
Inject fault while probing btrfs.ko, if kstrdup() fails in eventfs_prepare_ef() in eventfs_add_dir(), it will return ERR_PTR to assign file->ef. But the eventfs_remove() check NULL in trace_module_remove_events(), which causes the below NULL pointer dereference. As both Masami and Steven suggest,

Re: [PATCH v4] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Steven Rostedt
On Tue, 12 Sep 2023 10:58:08 +0800 Jinjie Ruan wrote: This looks good. But I have a small nit. > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c > index ed367d713be0..8e0593d4c6a6 100644 > --- a/kernel/trace/trace_events.c > +++ b/kernel/trace/trace_events.c > @@ -2296,6

[PATCH v2 14/14] arm64: dts: qcom: sdm630: Fix USB2 clock-names order

2023-09-12 Thread Konrad Dybcio
The last 2 clock-names entries for the USB2 controller were swapped, resulting in schema warnings: ['cfg_noc', 'core', 'mock_utmi', 'sleep'] is too short 'iface' was expected 'sleep' was expected 'mock_utmi' was expected Fix it and take the liberty to make the clock-names

[PATCH v2 13/14] arm64: dts: qcom: msm8996: Remove PNoC clock from MSS

2023-09-12 Thread Konrad Dybcio
The PNoC clock is a clock for the entire PNoC bus, managed from within the interconnect driver. Attaching it to MSS was a total hack. Get rid of it and take the liberty to make the clock-names entries more readable. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 11

[PATCH v2 11/14] arm64: dts: qcom: msm8998: Remove AGGRE2 clock from SLPI

2023-09-12 Thread Konrad Dybcio
The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from within the interconnect driver. Attaching it to SLPI was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH v2 12/14] arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI

2023-09-12 Thread Konrad Dybcio
The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from within the interconnect driver. Attaching it to SLPI was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH v2 09/14] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Remove PNoC clock

2023-09-12 Thread Konrad Dybcio
The PNoC clock is a clock for the entire PNoC bus, managed from within the interconnect driver. Attaching it to MSS was a total hack. Get rid of it. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml | 2 -- 1

[PATCH v2 10/14] remoteproc: qcom: q6v5-mss: Remove PNoC clock from 8996 MSS

2023-09-12 Thread Konrad Dybcio
The PNoC clock is a clock for the entire PNoC bus, managed from within the interconnect driver. Attaching it to MSS was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio --- drivers/remoteproc/qcom_q6v5_mss.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v2 08/14] dt-bindings: remoteproc: qcom,adsp: Remove AGGRE2 clock

2023-09-12 Thread Konrad Dybcio
The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from within the interconnect driver. Attaching it to SLPI was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/remoteproc/qcom,adsp.yaml| 20 ++-- 1 file changed, 2

[PATCH v2 07/14] arm64: dts: qcom: msm8939: Drop RPM bus clocks

2023-09-12 Thread Konrad Dybcio
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 Dybcio --- arch/arm64/boot/dts/qcom/msm8939.dtsi | 12 1 file changed, 12 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi

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

2023-09-12 Thread Konrad Dybcio
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 Dybcio --- arch/arm64/boot/dts/qcom/sdm630.dtsi | 49 +++- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git

[PATCH v2 05/14] dt-bindings: usb: qcom,dwc3: Fix SDM660 clock description

2023-09-12 Thread Konrad Dybcio
SDM660 was abusingly referencing one of the internal bus clocks, that were recently dropped from Linux (because the original implementation did not make much sense), circumventing the interconnect framework. Drop it. Signed-off-by: Konrad Dybcio ---

[PATCH v2 04/14] dt-bindings: arm-smmu: Fix SDM630 clocks description

2023-09-12 Thread Konrad Dybcio
SDM630 was abusingly referencing one of the internal bus clocks, that were recently dropped from Linux (because the original implementation did not make much sense), circumventing the interconnect framework. Fix it by dropping the bus-mm clock (which requires separating 630 from similar entries)

[PATCH v2 03/14] arm64: dts: qcom: qcs404: Drop RPM bus clocks

2023-09-12 Thread Konrad Dybcio
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 Dybcio --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi

[PATCH v2 02/14] arm64: dts: qcom: msm8996: Drop RPM bus clocks

2023-09-12 Thread Konrad Dybcio
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 Dybcio --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git

[PATCH v2 00/14] Clean up RPM bus clocks remnants

2023-09-12 Thread Konrad Dybcio
After the recent cleanups ([1], [2]) some in-tree abusers that directly accessed the RPM bus clocks, effectively circumventing and working against the efforts of the interconnect framework, were found. Patches 1-5 drop deprecated references and the rest attempt to stop direct bus clock abuses.

[PATCH v2 01/14] arm64: dts: qcom: msm8916: Drop RPM bus clocks

2023-09-12 Thread Konrad Dybcio
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 Dybcio --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi

Re: [PATCH] certs: Restrict blacklist updates to the secondary trusted keyring

2023-09-12 Thread Mimi Zohar
On Tue, 2023-09-12 at 02:00 +, Eric Snowberg wrote: > > > On Sep 11, 2023, at 5:08 PM, Mimi Zohar wrote: > > > > On Mon, 2023-09-11 at 22:17 +, Eric Snowberg wrote: > >> > >>> On Sep 11, 2023, at 10:51 AM, Mickaël Salaün wrote: > >>> > >>> On Mon, Sep 11, 2023 at 09:29:07AM -0400,

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Marco Felsch
On 23-09-12, Iuliana Prodan wrote: > On 9/12/2023 2:30 PM, Marco Felsch wrote: > > Hi Iuliana, > > > > On 23-09-12, Iuliana Prodan (OSS) wrote: > > > From: Iuliana Prodan > > > > > > Add the reserve-memory nodes used by DSP when the rpmsg > > > feature is enabled. > > > These can be later used

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Iuliana Prodan
On 9/12/2023 2:30 PM, Marco Felsch wrote: Hi Iuliana, On 23-09-12, Iuliana Prodan (OSS) wrote: From: Iuliana Prodan Add the reserve-memory nodes used by DSP when the rpmsg feature is enabled. These can be later used in a dsp node, like: dsp: dsp@3b6e8000 { compatible =

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Marco Felsch
Hi Iuliana, On 23-09-12, Iuliana Prodan (OSS) wrote: > From: Iuliana Prodan > > Add the reserve-memory nodes used by DSP when the rpmsg > feature is enabled. > These can be later used in a dsp node, like: > dsp: dsp@3b6e8000 { > compatible = "fsl,imx8mp-dsp"; > reg = <0x3b6e8000

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Daniel Baluta
On Tue, Sep 12, 2023 at 12:54 PM Iuliana Prodan wrote: > > On 9/12/2023 11:26 AM, Krzysztof Kozlowski wrote: > > On 12/09/2023 10:13, Iuliana Prodan wrote: > >> On 9/12/2023 10:07 AM, Krzysztof Kozlowski wrote: > >>> On 12/09/2023 00:44, Iuliana Prodan (OSS) wrote: > From: Iuliana Prodan >

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Iuliana Prodan
On 9/12/2023 12:36 PM, Krzysztof Kozlowski wrote: On 12/09/2023 10:49, Iuliana Prodan wrote: Should I test this on other tree(s)? You test the patch on the tree you send it. What is the point to test it on some old code, cherry-pick with bugs and then send? If you have cross-tree dependencies

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Michal Suchánek
On Tue, Sep 12, 2023 at 12:46:32PM +0300, Jarkko Sakkinen wrote: > On Tue Sep 12, 2023 at 10:51 AM EEST, Michal Suchánek wrote: > > On Tue, Sep 12, 2023 at 12:45:35AM +0300, Jarkko Sakkinen wrote: > > > On Thu Sep 7, 2023 at 7:52 PM EEST, Michal Suchanek wrote: > > > > No other platform needs

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 10:41 AM EEST, Michal Suchánek wrote: > On Mon, Sep 11, 2023 at 11:39:38PM -0400, Nayna wrote: > > > > On 9/7/23 13:32, Michal Suchánek wrote: > > > Adding more CC's from the original patch, looks like get_maintainers is > > > not that great for this file. > > > > > > On

Re: [PATCH] integrity: powerpc: Do not select CA_MACHINE_KEYRING

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 10:51 AM EEST, Michal Suchánek wrote: > On Tue, Sep 12, 2023 at 12:45:35AM +0300, Jarkko Sakkinen wrote: > > On Thu Sep 7, 2023 at 7:52 PM EEST, Michal Suchanek wrote: > > > No other platform needs CA_MACHINE_KEYRING, either. > > > > > > This is policy that should be decided

Re: [PATCH v2 1/8] scripts/gdb/symbols: add specific ko module load command

2023-09-12 Thread Johannes Berg
On Tue, 2023-08-08 at 16:30 +0800, Kuan-Ying Lee wrote: > Add lx-symbols command to support add specific > ko module. I'm not sure how this was supposed to work? It should have updated the documentation, but more importantly, it shouldn't have broken the documented usage of this command:

Re: [PATCH] tpm: Fix typo in tpmrm class definition

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 1:32 AM EEST, Justin M. Forbes wrote: > Commit d2e8071bed0be ("tpm: make all 'class' structures const") > unfortunately had a typo for the name on tpmrm. > > Fixes: d2e8071bed0b ("tpm: make all 'class' structures const") > Signed-off-by: Justin M. Forbes > --- >

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Krzysztof Kozlowski
On 12/09/2023 10:49, Iuliana Prodan wrote: >>> Should I test this on other tree(s)? >> You test the patch on the tree you send it. What is the point to test it >> on some old code, cherry-pick with bugs and then send? >> >> If you have cross-tree dependencies between subsystem, isn't linux-next >>

Re: [PATCH 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

2023-09-12 Thread Iuliana Prodan
On 9/12/2023 11:26 AM, Krzysztof Kozlowski wrote: On 12/09/2023 10:13, Iuliana Prodan wrote: On 9/12/2023 10:07 AM, Krzysztof Kozlowski wrote: On 12/09/2023 00:44, Iuliana Prodan (OSS) wrote: From: Iuliana Prodan Add the reserve-memory nodes used by DSP when the rpmsg feature is enabled.

  1   2   >