From: Matteo Croce
The helper bpf_current_task_under_cgroup() currently is only allowed for
tracing programs, allow its usage also in the BPF_CGROUP_* program types.
Move the code from kernel/trace/bpf_trace.c to kernel/bpf/helpers.c,
so it compiles also without CONFIG_BPF_EVENTS.
This will be
From: Matteo Croce
These kfuncs are enabled even in BPF_PROG_TYPE_TRACING, so they
should be safe also in BPF_CGROUP_* programs.
Since all BPF_CGROUP_* programs share the same hook,
call register_btf_kfunc_id_set() only once.
In enum btf_kfunc_hook, rename BTF_KFUNC_HOOK_CGROUP_SKB to a more
From: Matteo Croce
Enable some BPF kfuncs and the helper bpf_current_task_under_cgroup()
for program types BPF_CGROUP_*.
These will be used by systemd-networkd:
https://github.com/systemd/systemd/pull/32212
v5->v6:
Called register_btf_kfunc_id_set() only once
Fixed build error w
From: Matteo Croce
These kfuncs are enabled even in BPF_PROG_TYPE_TRACING, so they
should be safe also in BPF_CGROUP_* programs.
In enum btf_kfunc_hook, rename BTF_KFUNC_HOOK_CGROUP_SKB to a more
generic BTF_KFUNC_HOOK_CGROUP, since it's used for all the cgroup
related program types.
S
From: Matteo Croce
The helper bpf_current_task_under_cgroup() currently is only allowed for
tracing programs, allow its usage also in the BPF_CGROUP_* program types.
Move the code from kernel/trace/bpf_trace.c to kernel/bpf/helpers.c,
so it compiles also without CONFIG_BPF_EVENTS.
This will be
From: Matteo Croce
Enable some BPF kfuncs and the helper bpf_current_task_under_cgroup()
for program types BPF_CGROUP_*.
These will be used by systemd-networkd:
https://github.com/systemd/systemd/pull/32212
v4->v5:
Same code, but v4 had an old cover letter
v3->v4:
Reset all the acked-b
From: Matteo Croce
The helper bpf_current_task_under_cgroup() currently is only allowed for
tracing programs, allow its usage also in the BPF_CGROUP_* program types.
Move the code from kernel/trace/bpf_trace.c to kernel/bpf/helpers.c,
so it compiles also without CONFIG_BPF_EVENTS.
This will be
From: Matteo Croce
These kfuncs are enabled even in BPF_PROG_TYPE_TRACING, so they
should be safe also in BPF_CGROUP_* programs.
In enum btf_kfunc_hook, rename BTF_KFUNC_HOOK_CGROUP_SKB to a more
generic BTF_KFUNC_HOOK_CGROUP, since it's used for all the cgroup
related program types.
S
From: Matteo Croce
From: Matteo Croce
These kfuncs are enabled even in BPF_PROG_TYPE_TRACING, so they
should be safe also in BPF_CGROUP_* programs.
Reset all the acked-by tags because the code changed a bit.
Signed-off-by: Matteo Croce
Matteo Croce (2):
bpf: enable generic kfuncs for
r every CGROUP program type, but a thing I wanted to avoid is to let
this enum proliferate in this way.
I wish to group all the CGROUP_ program types into a single hook, and
perhaps drop the "SKB" in "BTF_KFUNC_HOOK_CGROUP_SKB" which will have
no meaning anymore.
Ideas?
--
Matteo Croce
perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay
On Tue, Apr 13, 2021 at 9:53 AM David Laight wrote:
>
> From: Matteo Croce
> > Sent: 12 April 2021 01:38
> >
> > Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags.
>
> The real question is why, the change is:
>
> - for (i =
From: Matteo Croce
Coccinelle failed with the following error:
EXN: Failure("no position information") in net/core/dev.c
Apply it by hand as it's trivial.
Signed-off-by: Matteo Croce
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/c
From: Matteo Croce
use the new helper macro skb_for_each_frag() which allows to iterate
through all the SKB fragments.
The patch was created with Coccinelle, this was the semantic patch:
@@
struct sk_buff *skb;
identifier i;
statement S;
iterator name skb_for_each_frag;
@@
-for (i = 0; i
From: Matteo Croce
Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags.
First patch introduces the helper, the second one is generated with
coccinelle and uses the macro where possible.
Last one is a chunk which have to be applied by hand.
The second patch raises some
From: Matteo Croce
Add an skb_for_each_frag() macro to iterate on SKB fragments.
Signed-off-by: Matteo Croce
---
include/linux/skbuff.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index dbf820a50a39..a8d4ccacdda5 100644
--- a/include
On Fri, Apr 9, 2021 at 11:28 PM Jakub Kicinski wrote:
>
> On Fri, 9 Apr 2021 22:44:50 +0200 Matteo Croce wrote:
> > > What pops to mind (although quite nit picky) is the question if the
> > > assembly changes much between driver which used to cache nr_frags and
> >
On Sat, Apr 10, 2021 at 2:11 AM Ilias Apalodimas
wrote:
>
> Hi Matteo,
>
> [...]
> > +bool page_pool_return_skb_page(void *data);
> > +
> > struct page_pool *page_pool_create(const struct page_pool_params *params);
> >
> > #ifdef CONFIG_PAGE_POOL
> > @@ -243,4 +247,13 @@ static inline void page_
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate is more than doubled,
from 962 Kpps to 2047 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
30.67% [kernel] [k] page_pool_release_page
8.37% [kernel
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate increased di 10%,
from 269 Kpps to 296 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
21.78% [kernel] [k] __pi___inval_dcache_area
21.66% [mvneta
information we need for recycling in page->private and
enabling the recycling bit, or page_pool_store_mem_info() for a fragment
Since we added an extra argument on __skb_frag_unref() to handle
recycling, update the current users of the function with that.
Co-developed-by: Jesper Dangaard Bro
From: Matteo Croce
This is needed by the page_pool to avoid recycling a page not allocated
via page_pool.
Signed-off-by: Matteo Croce
---
include/linux/mm_types.h | 1 +
include/net/page_pool.h | 2 ++
net/core/page_pool.c | 4
3 files changed, 7 insertions(+)
diff --git a/include
From: Jesper Dangaard Brouer
It is possible to compress/reduce the size of struct xdp_mem_info.
This change reduce struct xdp_mem_info from 8 bytes to 4 bytes.
The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht
rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE
From: Matteo Croce
This is a respin of [1]
This patchset shows the plans for allowing page_pool to handle and
maintain DMA map/unmap of the pages it serves to the driver. For this
to work a return hook in the network core is introduced.
The overall purpose is to simplify drivers, by
On Fri, Apr 9, 2021 at 8:54 PM Jakub Kicinski wrote:
>
> On Fri, 9 Apr 2021 20:06:04 +0200 Matteo Croce wrote:
> > From: Matteo Croce
> >
> > use the new helper macro skb_for_each_frag() which allows to iterate
> > through all the SKB fragments.
> >
>
From: Matteo Croce
use the new helper macro skb_for_each_frag() which allows to iterate
through all the SKB fragments.
The patch was created with Coccinelle, this was the semantic patch:
@@
struct sk_buff *skb;
identifier i;
statement S;
iterator name skb_for_each_frag;
@@
-for (i = 0; i
From: Matteo Croce
Coccinelle failed with the following error:
EXN: Failure("no position information") in net/core/dev.c
Apply it by hand as it's trivial.
Signed-off-by: Matteo Croce
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/c
From: Matteo Croce
Add an skb_for_each_frag() macro to iterate on SKB fragments.
Signed-off-by: Matteo Croce
---
include/linux/skbuff.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index dbf820a50a39..a8d4ccacdda5 100644
--- a/include
From: Matteo Croce
Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags.
First patch introduces the helper, the second one is generated with
coccinelle and uses the macro where possible.
Last one is a chunk which have to be applied by hand.
The second patch raises some
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate increased di 10%,
from 269 Kpps to 296 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
21.78% [kernel] [k] __pi___inval_dcache_area
21.66% [mvneta
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate is more than doubled,
from 962 Kpps to 2047 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
30.67% [kernel] [k] page_pool_release_page
8.37% [kernel
information we need for recycling in page->private and
enabling the recycling bit, or page_pool_store_mem_info() for a fragment
Since we added an extra argument on __skb_frag_unref() to handle
recycling, update the current users of the function with that.
Co-developed-by: Jesper Dangaard Br
From: Matteo Croce
This is needed by the page_pool to avoid recycling a page not allocated
via page_pool.
Signed-off-by: Matteo Croce
---
include/linux/mm_types.h | 1 +
include/net/page_pool.h | 2 ++
net/core/page_pool.c | 4
3 files changed, 7 insertions(+)
diff --git a/include
From: Jesper Dangaard Brouer
It is possible to compress/reduce the size of struct xdp_mem_info.
This change reduce struct xdp_mem_info from 8 bytes to 4 bytes.
The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht
rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE
From: Matteo Croce
This is a respin of [1]
This patchset shows the plans for allowing page_pool to handle and
maintain DMA map/unmap of the pages it serves to the driver. For this
to work a return hook in the network core is introduced.
The overall purpose is to simplify drivers, by
On Mon, Mar 15, 2021 at 10:05 PM Matthew Wilcox wrote:
>
> On Mon, Mar 15, 2021 at 08:18:24PM +, Matthew Wilcox wrote:
> > On Mon, Mar 15, 2021 at 09:02:38PM +0100, Matteo Croce wrote:
> > > From: Matteo Croce
> > >
> > > Add a sequence number to the
On Tue, Mar 16, 2021 at 2:44 AM JeffleXu wrote:
>
> On 3/16/21 4:02 AM, Matteo Croce wrote:
> > From: Matteo Croce
> >
> > Add a sequence number to the disk devices. This number is put in the
> > uevent so userspace can correlate events when a driver reuses a
bakin wrote:
> > > > From: Matteo Croce
> > > > Date: Mon, 22 Mar 2021 18:02:55 +0100
> > > >
> > > > > From: Matteo Croce
> > > > >
> > > > > This series enables recycling of the buffers allocated with the
>
On Mon, Mar 22, 2021 at 6:03 PM Matteo Croce wrote:
>
> From: Ilias Apalodimas
>
> During skb_release_data() intercept the packet and if it's a buffer
> coming from our page_pool API recycle it back to the pool for further
> usage.
> To achieve that we introdu
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate increased di 10%,
from 269 Kpps to 296 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
21.78% [kernel] [k] __pi___inval_dcache_area
21.66% [mvneta
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate is more than doubled,
from 962 Kpps to 2047 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
30.67% [kernel] [k] page_pool_release_page
8.37% [kernel
From: Ilias Apalodimas
On a previous patch we added an extra argument on __skb_frag_unref() to
handle recycling. Update the current users of the function with that.
Signed-off-by: Ilias Apalodimas
Signed-off-by: Matteo Croce
---
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
Dangaard Brouer
Signed-off-by: Matteo Croce
---
include/linux/skbuff.h | 33 +++
include/net/page_pool.h | 13 +
include/net/xdp.h | 1 +
net/core/page_pool.c| 43 +
net/core/skbuff.c | 20 +
From: Matteo Croce
This is needed by the page_pool to avoid recycling a page not allocated
via page_pool.
Signed-off-by: Matteo Croce
---
include/linux/mm_types.h | 1 +
include/net/page_pool.h | 2 ++
net/core/page_pool.c | 4
3 files changed, 7 insertions(+)
diff --git a/include
From: Jesper Dangaard Brouer
It is possible to compress/reduce the size of struct xdp_mem_info.
This change reduce struct xdp_mem_info from 8 bytes to 4 bytes.
The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht
rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE
From: Matteo Croce
This series enables recycling of the buffers allocated with the page_pool API.
The first two patches are just prerequisite to save space in a struct and
avoid recycling pages allocated with other API.
Patch 2 was based on a previous idea from Jonathan Lemon.
The third one is
On Mon, Mar 15, 2021 at 9:13 PM Matthew Wilcox wrote:
>
> On Mon, Mar 15, 2021 at 09:02:39PM +0100, Matteo Croce wrote:
> > +++ b/include/uapi/linux/fs.h
> > @@ -184,6 +184,7 @@ struct fsxattr {
> > #define BLKSECDISCARD _IO(0x12,125)
> > #define BLKROTATIO
From: Matteo Croce
Add a new sysfs handle to export the new diskseq value.
Place it in /block//diskseq and document it.
Signed-off-by: Matteo Croce
---
Documentation/ABI/testing/sysfs-block | 12
block/genhd.c | 11 +++
2 files changed, 23
From: Matteo Croce
On a very loaded system, if there are many events queued up from multiple
attach/detach cycles, it's impossible to match them up with the
LOOP_CONFIGURE or LOOP_SET_FD call, since we don't know where the position
of our own association in the queue is[1].
Not eve
From: Matteo Croce
Move the sysfs register code from a function named disk_add_events() to
a new function named disk_add_sysfs(). Also, rename the attribute list
with a more generic name than disk_events_attrs.
Signed-off-by: Matteo Croce
---
block/genhd.c | 13 +
1 file changed
From: Matteo Croce
Add a new BLKGETDISKSEQ ioctl which retrieves the disk sequence number
from the genhd structure.
Signed-off-by: Matteo Croce
---
block/ioctl.c | 2 ++
include/uapi/linux/fs.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/block/ioctl.c b/block/ioctl.c
index
From: Matteo Croce
Add a sequence number to the disk devices. This number is put in the
uevent so userspace can correlate events when a driver reuses a device,
like the loop one.
Signed-off-by: Matteo Croce
---
block/genhd.c | 19 +++
include/linux/genhd.h | 2 ++
2
From: Matteo Croce
With this series a monotonically increasing number is added to disks,
precisely in the genhd struct, and it's exported in sysfs and uevent.
This helps the userspace correlate events for devices that reuse the
same device, like loop.
The first patch is the core one, the
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate increased di 10%,
from 269 Kpps to 296 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
21.78% [kernel] [k] __pi___inval_dcache_area
21.66% [mvneta
From: Matteo Croce
Use the new recycling API for page_pool.
In a drop rate test, the packet rate is more than doubled,
from 962 Kpps to 2047 Kpps.
perf top on a stock system shows:
Overhead Shared Object Symbol
30.67% [kernel] [k] page_pool_release_page
8.37% [kernel
From: Ilias Apalodimas
On a previous patch we added an extra argument on __skb_frag_unref() to
handle recycling. Update the current users of the function with that.
Signed-off-by: Ilias Apalodimas
Signed-off-by: Matteo Croce
---
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
Dangaard Brouer
Signed-off-by: Matteo Croce
---
include/linux/skbuff.h | 33 +++
include/net/page_pool.h | 13 +
include/net/xdp.h | 1 +
net/core/page_pool.c| 43 +
net/core/skbuff.c | 20 +
From: Matteo Croce
This is needed by the page_pool to avoid recycling a page not allocated
via page_pool.
Signed-off-by: Matteo Croce
---
include/linux/mm_types.h | 1 +
include/net/page_pool.h | 2 ++
net/core/page_pool.c | 4
3 files changed, 7 insertions(+)
diff --git a/include
From: Jesper Dangaard Brouer
It is possible to compress/reduce the size of struct xdp_mem_info.
This change reduce struct xdp_mem_info from 8 bytes to 4 bytes.
The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht
rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE
From: Matteo Croce
This series enables recycling of the buffers allocated with the page_pool API.
The first two patches are just prerequisite to save space in a struct and
avoid recycling pages allocated with other API.
Patch 2 was based on a previous idea from Jonathan Lemon.
The third one is
On Sat, Feb 6, 2021 at 1:09 AM Matteo Croce wrote:
>
> From: Matteo Croce
>
> With this series a monotonically increasing number is added to disks,
> precisely in the genhd struct, and it's exported in sysfs and uevent.
>
> This helps the userspace correlate events
On Mon, Feb 22, 2021 at 11:03 AM Pavel Machek wrote:
>
> On Tue 2020-11-10 21:27:46, Matteo Croce wrote:
> > From: Matteo Croce
> >
> > The kernel cmdline reboot= option offers some sort of control
> > on how the reboot is issued.
> > Add handles in sysfs t
isabled.
>
> Use the correct config option name.
>
> Signed-off-by: Jiri Bohac
> Fixes: fd49e03280e596e54edb93a91bc96170f8e97e4a ("pstore: Fix linking when
> crypto API disabled")
>
Acked-by: Matteo Croce
--
per aspera ad upstream
On Sat, Feb 6, 2021 at 1:29 PM Matteo Croce wrote:
>
> From: Matteo Croce
>
> The ieee80211 class registers a callback which actually does nothing.
> Given that the callback is optional, and all its accesses are protected
> by a NULL check, remove it entirely.
>
> Sig
From: Matteo Croce
The ieee80211 class registers a callback which actually does nothing.
Given that the callback is optional, and all its accesses are protected
by a NULL check, remove it entirely.
Signed-off-by: Matteo Croce
---
net/wireless/sysfs.c | 7 ---
1 file changed, 7 deletions
From: Matteo Croce
The ieee80211 class registers a callback which actually does nothing.
Given that the callback is optional, and all its accesses are protected
by a NULL check, remove it entirely.
Signed-off-by: Matteo Croce
---
net/wireless/sysfs.c | 7 ---
1 file changed, 7 deletions
From: Matteo Croce
Add a new sysfs handle to export the new diskseq value.
Place it in /block//diskseq and document it.
Signed-off-by: Matteo Croce
---
Documentation/ABI/testing/sysfs-block | 12
block/genhd.c | 11 +++
2 files changed, 23
From: Matteo Croce
Add a new BLKGETDISKSEQ ioctl which retrieves the disk sequence number
from the genhd structure.
Signed-off-by: Matteo Croce
---
block/ioctl.c | 2 ++
include/uapi/linux/fs.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/block/ioctl.c b/block/ioctl.c
index
From: Matteo Croce
With this series a monotonically increasing number is added to disks,
precisely in the genhd struct, and it's exported in sysfs and uevent.
This helps the userspace correlate events for devices that reuse the
same device, like loop.
The first patch is the core one, the
From: Matteo Croce
Move the sysfs register code from a function named disk_add_events() to
a new function named disk_add_sysfs(). Also, rename the attribute list
with a more generic name than disk_events_attrs.
Signed-off-by: Matteo Croce
---
block/genhd.c | 13 +
1 file changed
From: Matteo Croce
Add a sequence number to the disk devices. This number is put in the
uevent so userspace can correlate events when a driver reuses a device,
like the loop one.
Signed-off-by: Matteo Croce
---
block/genhd.c | 19 +++
include/linux/genhd.h | 2 ++
2
From: Matteo Croce
On a very loaded system, if there are many events queued up from multiple
attach/detach cycles, it's impossible to match them up with the
LOOP_CONFIGURE or LOOP_SET_FD call, since we don't know where the position
of our own association in the queue is[1].
Not eve
On Sat, Jan 16, 2021 at 5:41 AM David Ahern wrote:
>
> On 1/15/21 4:12 PM, Matteo Croce wrote:
> > On Fri, Jan 15, 2021 at 11:50 PM Jakub Kicinski wrote:
> >>
> >> On Fri, 15 Jan 2021 19:42:07 +0100 Matteo Croce wrote:
> >>> From: Matteo Croce
&
On Sat, Jan 16, 2021 at 5:36 AM David Ahern wrote:
>
> On 1/15/21 11:42 AM, Matteo Croce wrote:
> > From: Matteo Croce
> >
> > The ff00::/8 multicast route is created without specifying the fc_protocol
> > field, so the default RTPROT_BOOT value is used:
> >
On Fri, Jan 15, 2021 at 11:50 PM Jakub Kicinski wrote:
>
> On Fri, 15 Jan 2021 19:42:07 +0100 Matteo Croce wrote:
> > From: Matteo Croce
> >
> > Fix two wrong flags in the IPv6 multicast routes created
> > by the autoconf code.
>
> Any chance for Fixes tag
From: Matteo Croce
The multicast route ff00::/8 is created with type RTN_UNICAST:
$ ip -6 -d route
unicast ::1 dev lo proto kernel scope global metric 256 pref medium
unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium
unicast ff00::/8 dev eth0 proto kernel scope
From: Matteo Croce
The ff00::/8 multicast route is created without specifying the fc_protocol
field, so the default RTPROT_BOOT value is used:
$ ip -6 -d route
unicast ::1 dev lo proto kernel scope global metric 256 pref medium
unicast fe80::/64 dev eth0 proto kernel scope global metric
From: Matteo Croce
Fix two wrong flags in the IPv6 multicast routes created
by the autoconf code.
Matteo Croce (2):
ipv6: create multicast route with RTPROT_KERNEL
ipv6: set multicast flag on the multicast route
net/ipv6/addrconf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
From: Matteo Croce
Not all the reboot settings from both the kernel command line or sysfs
interface are available to all platforms.
Filter out reboot_type and reboot_force which are x86 only, and also
remove reboot_cpu on kernels without SMP support.
This saves some space, and avoid confusing
From: Matteo Croce
On some machines a quirk can force a specific reboot type.
Quirks are found during a DMI scan, the list of machines which need
special reboot handling is defined in reboot_dmi_table.
The kernel command line reboot= option overrides this via a global
variable `reboot_default
From: Matteo Croce
Some improvements to the sysfs reboot interface: hide not
working settings and support machines with known reboot quirks.
Matteo Croce (2):
reboot: allow to override reboot type if quirks are found
reboot: hide from sysfs not applicable settings
kernel/reboot.c | 58
On Fri, Nov 13, 2020 at 9:06 PM Petr Mladek wrote:
>
> On Fri 2020-11-13 03:58:49, Matteo Croce wrote:
> > On Fri, Nov 13, 2020 at 3:46 AM Andrew Morton
> > wrote:
> > >
> > > On Fri, 13 Nov 2020 02:38:18 +0100 Matteo Croce
> > > wrote:
>
On Fri, Nov 13, 2020 at 3:46 AM Andrew Morton wrote:
>
> On Fri, 13 Nov 2020 02:38:18 +0100 Matteo Croce
> wrote:
>
> > At this point, since 'pci' enables BOOT_CF9_FORCE type and
> > BOOT_CF9_SAFE is not user selectable, should I simply leave only
> >
From: Matteo Croce
BOOT_CF9_SAFE_STR is an internal value used only by the x86 code and
it's not possible to set it from userspace.
Remove it, and rename 'cf9_force' to 'pci', so to make it coherent with
the kernel command line reboot= option.
Tested with this script
On Fri, Nov 13, 2020 at 2:07 AM Matteo Croce wrote:
>
> From: Matteo Croce
>
> The valid values accepted by /sys/kernel/reboot/type are a bit different
> that the ones used in the kernel command line.
>
> In /sys we supports 'cf9_force' and 'cf9_safe'
On Fri, Nov 13, 2020 at 2:18 AM Andrew Morton wrote:
>
> On Fri, 13 Nov 2020 01:20:29 +0100 Matteo Croce
> wrote:
>
> > While writing the script I found that in the documentation I left for
> > 'type' the values from
> > Documentation/admin-guide/k
From: Matteo Croce
The valid values accepted by /sys/kernel/reboot/type are a bit different
that the ones used in the kernel command line.
In /sys we supports 'cf9_force' and 'cf9_safe', while in the kernel command
line 'pci' and 'q' are used.
On Fri, Nov 13, 2020 at 1:20 AM Matteo Croce wrote:
>
> On Fri, Nov 13, 2020 at 12:13 AM Andrew Morton
> wrote:
> >
> > On Wed, 11 Nov 2020 20:50:23 -0700 Nathan Chancellor
> > wrote:
> >
> > > Clang warns:
> > >
> > > kernel/re
On Fri, Nov 13, 2020 at 12:13 AM Andrew Morton
wrote:
>
> On Wed, 11 Nov 2020 20:50:23 -0700 Nathan Chancellor
> wrote:
>
> > Clang warns:
> >
> > kernel/reboot.c:707:17: warning: implicit conversion from enumeration
> > type 'enum reboot_type' to different enumeration type 'enum reboot_mode'
>
On Thu, Nov 12, 2020 at 6:49 PM Nathan Chancellor
wrote:
>
> Hi Matteo,
>
> On Thu, Nov 12, 2020 at 12:26:45PM +0100, Matteo Croce wrote:
> > On Thu, Nov 12, 2020 at 4:50 AM Nathan Chancellor
> > wrote:
> > >
> > > Clang warns:
> > >
> &g
On Thu, Nov 12, 2020 at 4:50 AM Nathan Chancellor
wrote:
>
> Clang warns:
>
> kernel/reboot.c:707:17: warning: implicit conversion from enumeration
> type 'enum reboot_type' to different enumeration type 'enum reboot_mode'
> [-Wenum-conversion]
> reboot_mode = BOOT_TRIPLE;
>
From: Matteo Croce
The kernel cmdline reboot= option offers some sort of control
on how the reboot is issued.
Add handles in sysfs to allow setting these reboot options, so they
can be changed when the system is booted, other than at boot time.
The handlers are under /kernel/reboot, can be read
On Tue, Nov 10, 2020 at 3:58 PM Petr Mladek wrote:
>
> On Mon 2020-11-09 17:45:38, Matteo Croce wrote:
> > From: Matteo Croce
> >
> > The kernel cmdline reboot= option offers some sort of control
> > on how the reboot is issued.
> > Add handles in sysfs to al
From: Matteo Croce
The kernel cmdline reboot= option offers some sort of control
on how the reboot is issued.
Add handles in sysfs to allow setting these reboot options, so they
can be changed when the system is booted, other than at boot time.
The handlers are under /kernel/reboot, can be read
On Mon, Nov 9, 2020 at 3:16 PM Petr Mladek wrote:
>
> On Fri 2020-11-06 21:07:04, Matteo Croce wrote:
> > From: Matteo Croce
> >
> > The kernel cmdline reboot= option offers some sort of control
> > on how the reboot is issued.
> > Add handles in sysfs to al
On Fri, Nov 6, 2020 at 11:33 PM Andrew Morton wrote:
>
> On Fri, 6 Nov 2020 21:07:04 +0100 Matteo Croce
> wrote:
>
> > The kernel cmdline reboot= option offers some sort of control
> > on how the reboot is issued.
> > Add handles in sysfs to allow setting these r
From: Matteo Croce
The kernel cmdline reboot= option offers some sort of control
on how the reboot is issued.
Add handles in sysfs to allow setting these reboot options, so they
can be changed when the system is booted, other than at boot time.
The handlers are under /kernel/reboot, can be read
On Thu, Nov 5, 2020 at 7:09 PM Petr Mladek wrote:
> > + if (reboot_cpu >= num_possible_cpus()) {
> > + pr_err("Ignoring the CPU number in reboot=
> > option. "
> > +"CPU %d exceeds possible cpu number
> > %d\n",
On Wed, Nov 4, 2020 at 8:42 PM Matteo Croce wrote:
> +#ifdef CONFIG_SYSFS
> +
> +#define STARTS_WITH(s, sc) (!strncmp(s, sc, sizeof(sc)))
> +
Just noticed an off-by-one here, it should be sizeof(sc)-1 because of
the null terminator.
This way, the CR usually added by echo wil
From: Matteo Croce
The kernel cmdline reboot= option offers some sort of control
on how the reboot is issued.
Add handles in sysfs to allow setting these reboot options, so they
can be changed when the system is booted, other than at boot time.
The handlers are under /kernel/reboot, can be read
From: Matteo Croce
Small improvements to the code, without changing the way it works:
- use a local variable, to avoid a small time lapse where reboot_cpu
can have an invalid value
- comment the code which is not easy to understand at a glance
- merge two identical code blocks into one
1 - 100 of 312 matches
Mail list logo