Implement port for given CID as input argument instead of using
hardcoded value '1234'. This allows to run different test instances
on a single CID. Port argument is not required parameter and if it is
not set, then default value will be '1234' - thus we preserve previous
behaviour.
Signed-off-by:
On Mon, Jan 22, 2024 at 06:22:56PM +0800, Liang Chen wrote:
> The RSS hash report is a feature that's part of the virtio specification.
> Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost
> (still a work in progress as per [1]) support this feature. While the
> capability to
On Tue, 23 Jan 2024 10:56:05 +0800
Ye Bin wrote:
> Similar to '%pD' for printk, use '%pD' for print struct file's name.
>
> Signed-off-by: Ye Bin
> ---
> kernel/trace/trace_probe.c | 41 --
> 1 file changed, 26 insertions(+), 15 deletions(-)
>
> diff --git
This patch adds test cases for new print format type "%pd/%pD".The test cases
test the following items:
1. Test README if add "%pd/%pD" type;
2. Test "%pd" type for dput();
3. Test "%pD" type for vfs_read();
Signed-off-by: Ye Bin
---
.../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 79 +++
Similar to '%pd' for printk, use '%pd' for print struct dentry's name.
Signed-off-by: Ye Bin
---
kernel/trace/trace_kprobe.c | 6 ++
kernel/trace/trace_probe.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index c4c6e0e0068b.
Similar to '%pD' for printk, use '%pD' for print struct file's name.
Signed-off-by: Ye Bin
---
kernel/trace/trace_probe.c | 41 --
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index cc8
During fault locating, the file name needs to be printed based on the
dentry/file address. The offset needs to be calculated each time, which
is troublesome. Similar to printk, kprobe supports printing file names
for dentry/file addresses.
Diff v3 vs v2:
1. Return the index of where the suffix was
Add traceprobe_expand_dentry_args() to expand dentry args. this API is
prepare to support "%pd" print format for kprobe.
Signed-off-by: Ye Bin
---
kernel/trace/trace_probe.c | 36
kernel/trace/trace_probe.h | 2 ++
2 files changed, 38 insertions(+)
diff --g
Similar to printk() '%pd' is for fetch dentry's name from struct dentry's
pointer, and '%pD' is for fetch file's name from struct file's pointer.
Signed-off-by: Ye Bin
---
Documentation/trace/kprobetrace.rst | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/t
str_has_suffix() is test string if ends with specify string, and also
this API may return the index of where the suffix was found.
Signed-off-by: Ye Bin
---
include/linux/string.h | 28
1 file changed, 28 insertions(+)
diff --git a/include/linux/string.h b/include/l
Signed-off-by: Ye Bin
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 2a7c6fd934e9..13197d3b86bd 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5745,7 +5745,7 @@ static const char read
On 2024/1/23 0:07, Steven Rostedt wrote:
On Mon, 22 Jan 2024 15:40:09 +0800
Ye Bin wrote:
str_has_suffix() is test string if ends with specify string.
Signed-off-by: Ye Bin
---
include/linux/string.h | 20
1 file changed, 20 insertions(+)
diff --git a/include/linu
On Tue, 23 Jan 2024 09:44:43 +0800
George Guo wrote:
> There are two reasons of percpu_alloc failed without warnings:
>
> 1. do_warn is false
> 2. do_warn is true and warn_limit is reached the limit.
Yes I know the reasons.
>
> Showing do_warn and warn_limit makes things simple, maybe dont n
On Mon, 22 Jan 2024 10:57:00 -0500
Steven Rostedt wrote:
> On Mon, 22 Jan 2024 15:36:29 +0800
> George Guo wrote:
>
> > From: George Guo
> >
> > Add do_warn, warn_limit fields to the output of the
> > percpu_alloc_percpu_fail ftrace event.
> >
> > This is required to percpu_alloc failed with
Hello.
We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec.
Recently, our team has discovered a issue in Linux kernel 6.7.0-g9d1694dc91ce.
Attached to the email were a POC file of the issue.
Stack dump:
general protection fault, probably for non-canonical address
0xdc000
On Mon, Jan 22, 2024 at 01:02:08PM -0700, Mathieu Poirier wrote:
> On Mon, 22 Jan 2024 at 10:51, Iuliana Prodan wrote:
> >
> > On 1/5/2024 6:01 PM, Ulf Hansson wrote:
> > > Let's avoid the boilerplate code to manage the multiple PM domain case, by
> > > converting into using dev_pm_domain_attach|d
On Mon, Jan 22, 2024 at 02:02:28PM -0800, Linus Torvalds wrote:
> On Mon, 22 Jan 2024 at 13:59, Darrick J. Wong wrote:
> >
> > though I don't think
> > leaking raw kernel pointers is an awesome idea.
>
> Yeah, I wasn't all that comfortable even with trying to hash it
> (because I think t
On Mon, 22 Jan 2024 19:45:41 -0300
"Ricardo B. Marliere" wrote:
> > Perhaps we need a:
> >
> > if (WARN_ON_ONCE(!s->seq.size))
> > seq_buf_init(&s->seq, s->buffer, TRACE_SEQ_BUFFER_SIZE);
> > else
> > seq_buf_clear(&s->seq);
> >
> >
> > in the trace_seq_reset()
On 22 Jan 17:10, Steven Rostedt wrote:
> On Mon, 22 Jan 2024 15:22:25 -0300
> "Ricardo B. Marliere" wrote:
>
> > Currently, trace_seq_init may be called many times with the intent of
> > resetting the buffer. Add a function trace_seq_reset that does that and
> > replace the relevant occurrences t
On Mon, 22 Jan 2024 15:22:25 -0300
"Ricardo B. Marliere" wrote:
> Currently, trace_seq_init may be called many times with the intent of
> resetting the buffer. Add a function trace_seq_reset that does that and
> replace the relevant occurrences to use it instead.
>
Hi Ricardo!
It's also OK to
On Mon, 22 Jan 2024 at 13:59, Darrick J. Wong wrote:
>
> though I don't think
> leaking raw kernel pointers is an awesome idea.
Yeah, I wasn't all that comfortable even with trying to hash it
(because I think the number of source bits is small enough that even
with a crypto hash, it's tr
On Tue, Jan 16, 2024 at 05:55:32PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)"
>
> The dentries and inodes are created in the readdir for the sole purpose of
> getting a consistent inode number. Linus stated that is unnecessary, and
> that all inodes can have the same inode num
Hi Petr,
On Mon, 2024-01-22 at 16:09 +0100, Petr Pavlu wrote:
> Running the following two commands in parallel on a multi-processor
> AArch64 machine can sporadically produce an unexpected warning about
> duplicate histogram entries:
>
> $ while true; do
> echo hist:key=id.syscall:val=hitco
On Mon, Jan 22, 2024 at 03:27:48PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)"
>
> The eventfs inodes and directories are allocated when referenced. But this
> leaves the issue of keeping consistent inode numbers and the number is
> only saved in the inode structure itself. Whe
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> When cgroup is enabled, all reclaimable pages will be tracked in cgroup
> LRUs. The global reclaimer needs to start reclamation from the root
> cgroup. Expose the top level cgroup reclamation function so th
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> Enclave Page Cache(EPC) memory can be swapped out to regular system
> memory, and the consumed memory should be charged to a proper
> mem_cgroup. Currently the selection of mem_cgroup to charge is done in
> sgx_encl_get_mem_cgroup(). But it
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> Implement the reclamation flow for cgroup, encapsulated in the top-level
> function sgx_epc_cgroup_reclaim_pages(). It does a pre-order walk on its
> subtree, and make calls to sgx_reclaim_pages() at each n
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Sean Christopherson
>
> Each EPC cgroup will have an LRU structure to track reclaimable EPC pages.
> When a cgroup usage reaches its limit, the cgroup needs to reclaim pages
> from its LRU or LRUs of its descendants to make room for a
From: "Steven Rostedt (Google)"
The eventfs inodes and directories are allocated when referenced. But this
leaves the issue of keeping consistent inode numbers and the number is
only saved in the inode structure itself. When the inode is no longer
referenced, it can be freed. When the file that t
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> SGX Enclave Page Cache (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 ac
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type
> for the misc controller.
>
> Signed-off-by: Kristen Carlson Accardi
> Co-developed-by: Haitao Huang
> Signed-off-by: Haitao Huang
>
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> The SGX EPC cgroup will reclaim EPC pages when a usage in a cgroup
> reaches its or ancestor's limit. This requires a walk from the current
> cgroup up to the root similar to misc_cg_try_charge(). Export
>
On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote:
> From: Kristen Carlson Accardi
>
> The misc cgroup controller (subsystem) currently does not perform
> resource type specific action for Cgroups Subsystem State (CSS) events:
> the 'css_alloc' event when a cgroup is created and the 'css_free
On Mon, 22 Jan 2024 at 10:51, Iuliana Prodan wrote:
>
> On 1/5/2024 6:01 PM, Ulf Hansson wrote:
> > Let's avoid the boilerplate code to manage the multiple PM domain case, by
> > converting into using dev_pm_domain_attach|detach_list().
> >
> > Cc: Mathieu Poirier
> > Cc: Bjorn Andersson
> > Cc:
On Mon, Jan 22, 2024 at 05:47:49PM +0100, Helge Deller wrote:
> On 1/22/24 17:10, Luis Chamberlain wrote:
> >
> > It's within the noise for x86_64, but given what you suggest
> > for parisc where it is much more expensive, we should see a non-noise
> > delta. Even just time on loading the module s
Currently, trace_seq_init may be called many times with the intent of
resetting the buffer. Add a function trace_seq_reset that does that and
replace the relevant occurrences to use it instead.
Signed-off-by: Ricardo B. Marliere
---
include/linux/trace_seq.h| 8
include/trace/trace_
On 1/5/2024 6:01 PM, Ulf Hansson wrote:
Let's avoid the boilerplate code to manage the multiple PM domain case, by
converting into using dev_pm_domain_attach|detach_list().
Cc: Mathieu Poirier
Cc: Bjorn Andersson
Cc: Shawn Guo
Cc: Sascha Hauer
Cc: Iuliana Prodan
Cc: Daniel Baluta
Cc:
Sign
On 1/5/2024 6:01 PM, Ulf Hansson wrote:
Let's avoid the boilerplate code to manage the multiple PM domain case, by
converting into using dev_pm_domain_attach|detach_list().
Cc: Mathieu Poirier
Cc: Bjorn Andersson
Cc: Shawn Guo
Cc: Sascha Hauer
Cc: Iuliana Prodan
Cc: Daniel Baluta
Cc:
Si
From: Kristen Carlson Accardi
Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type
for the misc controller.
Signed-off-by: Kristen Carlson Accardi
Co-developed-by: Haitao Huang
Signed-off-by: Haitao Huang
---
V6:
- Split the original patch into this and the preceding one (Kai)
From: Sean Christopherson
Each EPC cgroup will have an LRU structure to track reclaimable EPC pages.
When a cgroup usage reaches its limit, the cgroup needs to reclaim pages
from its LRU or LRUs of its descendants to make room for any new
allocations.
To prepare for reclamation per cgroup, expos
From: Sean Christopherson
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 EPC cg
From: Kristen Carlson Accardi
Implement the reclamation flow for cgroup, encapsulated in the top-level
function sgx_epc_cgroup_reclaim_pages(). It does a pre-order walk on its
subtree, and make calls to sgx_reclaim_pages() at each node passing in
the LRU of that node. It keeps track of total recl
From: Kristen Carlson Accardi
Previous patches have implemented all infrastructure needed for
per-cgroup EPC page tracking and reclaiming. But all reclaimable EPC
pages are still tracked in the global LRU as sgx_lru_list() returns hard
coded reference to the global LRU.
Change sgx_lru_list() to
From: Sean Christopherson
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
Co-developed-by: Kristen Carlson Accardi
Signed-off-by: Kristen Carlson Accardi
Co-develop
The scripts rely on cgroup-tools package from libcgroup [1].
To run selftests for epc cgroup:
sudo ./run_epc_cg_selftests.sh
To watch misc cgroup 'current' changes during testing, run this in a
separate terminal:
./watch_misc_for_tests.sh current
With different cgroups, the script starts one o
From: Kristen Carlson Accardi
When cgroup is enabled, all reclaimable pages will be tracked in cgroup
LRUs. The global reclaimer needs to start reclamation from the root
cgroup. Expose the top level cgroup reclamation function so the global
reclaimer can reuse it.
Co-developed-by: Sean Christoph
From: Kristen Carlson Accardi
To determine if any page available for reclamation at the global level,
only checking for emptiness of the global LRU is not adequate when pages
are tracked in multiple LRUs, one per cgroup. For this purpose, create a
new helper, sgx_can_reclaim(), currently only che
Enclave Page Cache(EPC) memory can be swapped out to regular system
memory, and the consumed memory should be charged to a proper
mem_cgroup. Currently the selection of mem_cgroup to charge is done in
sgx_encl_get_mem_cgroup(). But it only considers two contexts in which
the swapping can be done: n
From: Kristen Carlson Accardi
When the EPC usage of a cgroup is near its limit, the cgroup needs to
reclaim pages used in the same cgroup to make room for new allocations.
This is analogous to the behavior that the global reclaimer is triggered
when the global usage is close to total available EP
From: Kristen Carlson Accardi
SGX Enclave Page Cache (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 en
From: Kristen Carlson Accardi
The functions, sgx_{mark,unmark}_page_reclaimable(), manage the tracking
of reclaimable EPC pages: sgx_mark_page_reclaimable() adds a newly
allocated page into the global LRU list while
sgx_unmark_page_reclaimable() does the opposite. Abstract the hard coded
global L
From: Kristen Carlson Accardi
The SGX EPC cgroup will reclaim EPC pages when a usage in a cgroup
reaches its or ancestor's limit. This requires a walk from the current
cgroup up to the root similar to misc_cg_try_charge(). Export
misc_cg_parent() to enable this walk.
The SGX driver may also need
SGX Enclave Page Cache (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 po
From: Kristen Carlson Accardi
The misc cgroup controller (subsystem) currently does not perform
resource type specific action for Cgroups Subsystem State (CSS) events:
the 'css_alloc' event when a cgroup is created and the 'css_free' event
when a cgroup is destroyed.
Define callbacks for those e
On Montag, 22. Jänner 2024 11:53:33 CET Konrad Dybcio wrote:
> On 21.01.2024 11:21, Luca Weiss wrote:
> > Add the rmtfs-mem node which was part of one of the "unknown" memory
> > reservation. Split that one, make sure the reserved-memory in total
> > still covers the same space.
> >
> > Signed-off
On Mon, 22 Jan 2024 15:36:29 +0800
George Guo wrote:
> From: George Guo
>
> Add do_warn, warn_limit fields to the output of the
> percpu_alloc_percpu_fail ftrace event.
>
> This is required to percpu_alloc failed with no warning showing.
You mean to state;
In order to know why percpu_alloc
On 1/22/24 17:10, Luis Chamberlain wrote:
On Sat, Dec 30, 2023 at 08:33:24AM +0100, Helge Deller wrote:
Your selftest code is based on perf.
AFAICS we don't have perf on parisc/hppa,
I see!
so I can't test your selftest code
on that architecture.
I assume you tested on x86, where the CPU wil
On Monday, January 22, 2024 11:27:09 AM CET Krzysztof Kozlowski wrote:
> On 20/01/2024 22:16, Duje Mihanović wrote:
> > diff --git
> > a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> > b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
> > index
On Mon, 22 Jan 2024 15:40:12 +0800
Ye Bin wrote:
> Similar to '%pD' for printk, use '%pD' for print struct file's name.
>
> Signed-off-by: Ye Bin
> ---
> kernel/trace/trace_probe.c | 41 --
> 1 file changed, 26 insertions(+), 15 deletions(-)
>
> diff --git
On Sat, Dec 30, 2023 at 08:33:24AM +0100, Helge Deller wrote:
> Your selftest code is based on perf.
> AFAICS we don't have perf on parisc/hppa,
I see!
> so I can't test your selftest code
> on that architecture.
> I assume you tested on x86, where the CPU will transparently take care of
> unali
On Mon, 22 Jan 2024 15:40:10 +0800
Ye Bin wrote:
> Add traceprobe_expand_dentry_args() to expand dentry args. this API is
> prepare to support "%pd" print format for kprobe.
>
> Signed-off-by: Ye Bin
> ---
> kernel/trace/trace_probe.c | 34 ++
> kernel/trace/tra
On Mon, 22 Jan 2024 15:40:09 +0800
Ye Bin wrote:
> str_has_suffix() is test string if ends with specify string.
>
> Signed-off-by: Ye Bin
> ---
> include/linux/string.h | 20
> 1 file changed, 20 insertions(+)
>
> diff --git a/include/linux/string.h b/include/linux/string
Running the following two commands in parallel on a multi-processor
AArch64 machine can sporadically produce an unexpected warning about
duplicate histogram entries:
$ while true; do
echo hist:key=id.syscall:val=hitcount > \
/sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trig
On Sun, Jan 21, 2024 at 01:44:32PM -0500, Michael S. Tsirkin wrote:
> On Mon, Jan 08, 2024 at 02:13:25PM +0100, Tobias Huschle wrote:
> > On Thu, Dec 14, 2023 at 02:14:59AM -0500, Michael S. Tsirkin wrote:
> > >
> > > Peter, would appreciate feedback on this. When is cond_resched()
> > > insuffici
Hi Liang Chen,
在 2024/1/22 下午6:22, Liang Chen 写道:
The RSS hash report is a feature that's part of the virtio specification.
Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost
(still a work in progress as per [1]) support this feature. While the
capability to obtain the RSS
On Mon, Jan 22, 2024 at 11:47:22AM +0100, Eugenio Perez Martin wrote:
On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella wrote:
On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote:
>vdpasim_do_reset sets running to true, which is wrong, as it allows
>vdpasim_kick_vq to post work req
On 21.01.2024 11:21, Luca Weiss wrote:
> Add the rmtfs-mem node which was part of one of the "unknown" memory
> reservation. Split that one, make sure the reserved-memory in total
> still covers the same space.
>
> Signed-off-by: Luca Weiss
> ---
Could you please test dynamic rmtfs alloc, which
On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella wrote:
>
> On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote:
> >vdpasim_do_reset sets running to true, which is wrong, as it allows
> >vdpasim_kick_vq to post work requests before the device has been
> >configured. To fix, do not se
On 20/01/2024 22:16, Duje Mihanović wrote:
> IST3032C (and possibly some other models) has touch keys. Document this.
>
> Signed-off-by: Duje Mihanović
> ---
Please provide changelog describing what changed against v1. Cover
letter has something but it is not accurate. It says nothing about this
The RSS hash report is a feature that's part of the virtio specification.
Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost
(still a work in progress as per [1]) support this feature. While the
capability to obtain the RSS hash has been enabled in the normal path,
it's curren
On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote:
vdpasim_do_reset sets running to true, which is wrong, as it allows
vdpasim_kick_vq to post work requests before the device has been
configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK
is set.
Fixes: 0c89e2a3a9d
This patch refines ipi handling on LoongArch platform, there are
three changes with this patch.
1. Add generic get_percpu_irq api, replace some percpu irq function
such as get_ipi_irq/get_pmc_irq/get_timer_irq with get_percpu_irq.
2. Change parameter action definition with function
loongson_send_i
Physical cpuid is used to irq routing for irqchips such as ipi/msi/
extioi interrupt controller. And physical cpuid is stored at CSR
register LOONGARCH_CSR_CPUID, it can not be changed once vcpu is
created. Since different irqchips have different size definition
about physical cpuid, KVM uses the s
On LoongArch system, hypercall instruction is supported when system
runs on VM mode. This patch adds dummy function with hypercall
instruction emulation, rather than inject EXCCODE_INE invalid
instruction exception.
Signed-off-by: Bibo Mao
---
arch/loongarch/include/asm/Kbuild | 1 -
arch/
On LoongArch system, ipi hw uses iocsr registers, there is one iocsr
register access on ipi sender and two iocsr access on ipi receiver
which is ipi interrupt handler. On VM mode all iocsr registers
accessing will trap into hypervisor. So with one ipi hw notification
there will be three times of tr
The patch add paravirt interface for guest kernel, function
pv_guest_init firstly checks whether system runs on VM mode. If kernel
runs on VM mode, it will call function kvm_para_available to detect
whether current VMM is KVM hypervisor. And the paravirt function can work
only if current VMM is KVM
System will trap into hypervisor when executing cpucfg instruction.
And now hardware only uses the area 0 - 20 for actual usage, here
one specified area 0x1000 -- 0x10ff is used for KVM hypervisor,
and the area can be extended for other hypervisors in future.
Signed-off-by: Bibo Mao
---
This patchset adds pv ipi support for VM. On physical machine, ipi HW
uses IOCSR registers, however there is trap into hypervisor when vcpu
accesses IOCSR registers if system is in VM mode. SWI is a interrupt
mechanism like SGI on ARM, software can send interrupt to CPU, only that
on LoongArch SWI
78 matches
Mail list logo