Message ID | 20240328-jag-sysctl_remove_empty_elem_kernel-v3-0-285d273912fe@samsung.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Just a heads up: will add this to the sysctl-next tree https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/log/?h=sysctl-next so it has time to soak there for next merge window. If you are a maintainer and are thinking of including any of these patches in your tree, let me know and I'll remove when upstreaming On Thu, Mar 28, 2024 at 04:44:01PM +0100, Joel Granados via B4 Relay wrote: > From: Joel Granados <j.granados@samsung.com> > > What? > These commits remove the sentinel element (last empty element) from the > sysctl arrays of all the files under the "kernel/" directory that use a > sysctl array for registration. The merging of the preparation patches > [1] to mainline allows us to remove sentinel elements without changing > behavior. This is safe because the sysctl registration code > (register_sysctl() and friends) use the array size in addition to > checking for a sentinel [2]. ... Best
On 3/28/24 16:44, Joel Granados wrote: > What? > These commits remove the sentinel element (last empty element) from the > sysctl arrays of all the files under the "kernel/" directory that use a > sysctl array for registration. The merging of the preparation patches > [1] to mainline allows us to remove sentinel elements without changing > behavior. This is safe because the sysctl registration code > (register_sysctl() and friends) use the array size in addition to > checking for a sentinel [2]. Hi, looks like *this* "patch" made it to the sysctl tree [1], breaking b4 for everyone else (as there's a "--- b4-submit-tracking ---" magic in the tree history now) on next-20240422 Please drop it (again, I'm only talking about this empty cover letter). Konrad [1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0
On 22/04/2024 16:27, Konrad Dybcio wrote: > > > On 3/28/24 16:44, Joel Granados wrote: >> What? >> These commits remove the sentinel element (last empty element) from the >> sysctl arrays of all the files under the "kernel/" directory that use a >> sysctl array for registration. The merging of the preparation patches >> [1] to mainline allows us to remove sentinel elements without changing >> behavior. This is safe because the sysctl registration code >> (register_sysctl() and friends) use the array size in addition to >> checking for a sentinel [2]. > > Hi, > > looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > for everyone else (as there's a "--- b4-submit-tracking ---" magic in > the tree history now) on next-20240422 > > Please drop it (again, I'm only talking about this empty cover letter). Just to clarify, in case it is not obvious: Please *do not merge your own trees* into kernel.org repos. Instead use b4 shazam to pick up entire patchset, even if it is yours. b4 allows to merge/apply also the cover letter, if this is your intention. With b4 shazam you would get proper Link tags and not break everyone's b4 workflow on next. :/ Best regards, Krzysztof
On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote: > >> These commits remove the sentinel element (last empty element) from > >> the > >> sysctl arrays of all the files under the "kernel/" directory that use a > >> sysctl array for registration. The merging of the preparation patches > >> [1] to mainline allows us to remove sentinel elements without changing > >> behavior. This is safe because the sysctl registration code > >> (register_sysctl() and friends) use the array size in addition to > >> checking for a sentinel [2]. > > > > Hi, > > > > looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > > for everyone else (as there's a "--- b4-submit-tracking ---" magic in > > the tree history now) on next-20240422 > > > > Please drop it (again, I'm only talking about this empty cover letter). > > Just to clarify, in case it is not obvious: > Please *do not merge your own trees* into kernel.org repos. Instead use > b4 shazam to pick up entire patchset, even if it is yours. b4 allows to > merge/apply also the cover letter, if this is your intention. > > With b4 shazam you would get proper Link tags and not break everyone's > b4 workflow on next. :/ I was expecting this to happen at some point. :/ Note, that you can still use b4 and merge your own trees, but you need to switch to using a different cover letter strategy: [b4] prep-cover-strategy = branch-description -K
On 22/04/2024 16:57, Konstantin Ryabitsev wrote: > On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote: >>>> These commits remove the sentinel element (last empty element) from >>>> the >>>> sysctl arrays of all the files under the "kernel/" directory that use a >>>> sysctl array for registration. The merging of the preparation patches >>>> [1] to mainline allows us to remove sentinel elements without changing >>>> behavior. This is safe because the sysctl registration code >>>> (register_sysctl() and friends) use the array size in addition to >>>> checking for a sentinel [2]. >>> >>> Hi, >>> >>> looks like *this* "patch" made it to the sysctl tree [1], breaking b4 >>> for everyone else (as there's a "--- b4-submit-tracking ---" magic in >>> the tree history now) on next-20240422 >>> >>> Please drop it (again, I'm only talking about this empty cover letter). >> >> Just to clarify, in case it is not obvious: >> Please *do not merge your own trees* into kernel.org repos. Instead use >> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to >> merge/apply also the cover letter, if this is your intention. >> >> With b4 shazam you would get proper Link tags and not break everyone's >> b4 workflow on next. :/ > > I was expecting this to happen at some point. :/ > > Note, that you can still use b4 and merge your own trees, but you need > to switch to using a different cover letter strategy: > > [b4] > prep-cover-strategy = branch-description Yes, but you still won't have: 1. Link tags 2. Nice thank-you letters 3. Auto-collecting review/tested/ack tags So sure, maintainer can even cherry-pick patches, use patch or manually edit git objects and then update git refs, but that's not the point. :) Just use b4 shazam, it's so awesome tool. Best regards, Krzysztof
On Mon, Apr 22, 2024 at 04:27:47PM +0200, Konrad Dybcio wrote: > > > On 3/28/24 16:44, Joel Granados wrote: > > What? > > These commits remove the sentinel element (last empty element) from the > > sysctl arrays of all the files under the "kernel/" directory that use a > > sysctl array for registration. The merging of the preparation patches > > [1] to mainline allows us to remove sentinel elements without changing > > behavior. This is safe because the sysctl registration code > > (register_sysctl() and friends) use the array size in addition to > > checking for a sentinel [2]. > > Hi, > > looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > for everyone else (as there's a "--- b4-submit-tracking ---" magic in > the tree history now) on next-20240422 > > Please drop it (again, I'm only talking about this empty cover letter). I see it. Will remove it from sysctl-next Thx for pointing it out. Best > > Konrad > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0
On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote: > On 22/04/2024 16:27, Konrad Dybcio wrote: > > > > > > On 3/28/24 16:44, Joel Granados wrote: > >> What? > >> These commits remove the sentinel element (last empty element) from the > >> sysctl arrays of all the files under the "kernel/" directory that use a > >> sysctl array for registration. The merging of the preparation patches > >> [1] to mainline allows us to remove sentinel elements without changing > >> behavior. This is safe because the sysctl registration code > >> (register_sysctl() and friends) use the array size in addition to > >> checking for a sentinel [2]. > > > > Hi, > > > > looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > > for everyone else (as there's a "--- b4-submit-tracking ---" magic in > > the tree history now) on next-20240422 > > > > Please drop it (again, I'm only talking about this empty cover letter). > > Just to clarify, in case it is not obvious: > Please *do not merge your own trees* into kernel.org repos. Instead use > b4 shazam to pick up entire patchset, even if it is yours. b4 allows to > merge/apply also the cover letter, if this is your intention. Noted. Will adjust my workflow to just use B4 to bring stuff into the sysctl-next tree. > > With b4 shazam you would get proper Link tags and not break everyone's > b4 workflow on next. :/ Ok. Sorry for the noise. > > Best regards, > Krzysztof >
On Mon, Apr 22, 2024 at 04:27:47PM +0200, Konrad Dybcio wrote: > > > On 3/28/24 16:44, Joel Granados wrote: > > What? > > These commits remove the sentinel element (last empty element) from the > > sysctl arrays of all the files under the "kernel/" directory that use a > > sysctl array for registration. The merging of the preparation patches > > [1] to mainline allows us to remove sentinel elements without changing > > behavior. This is safe because the sysctl registration code > > (register_sysctl() and friends) use the array size in addition to > > checking for a sentinel [2]. > > Hi, > > looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > for everyone else (as there's a "--- b4-submit-tracking ---" magic in > the tree history now) on next-20240422 > > Please drop it (again, I'm only talking about this empty cover letter). Here do you mean revert? or do you mean force-push without the cover letter commit? I did the later, but if the former is necessary I can always go back to the old HEAD, add a revert commit and then push that. Best > > Konrad > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/commit/?h=sysctl-next&id=ec04a7fa09ddedc1d6c8b86ae281897256c7fdf0
On Mon, Apr 22, 2024 at 05:07:59PM +0200, Krzysztof Kozlowski wrote: > On 22/04/2024 16:57, Konstantin Ryabitsev wrote: > > On Mon, Apr 22, 2024 at 04:49:27PM +0200, Krzysztof Kozlowski wrote: > >>>> These commits remove the sentinel element (last empty element) from > >>>> the > >>>> sysctl arrays of all the files under the "kernel/" directory that use a > >>>> sysctl array for registration. The merging of the preparation patches > >>>> [1] to mainline allows us to remove sentinel elements without changing > >>>> behavior. This is safe because the sysctl registration code > >>>> (register_sysctl() and friends) use the array size in addition to > >>>> checking for a sentinel [2]. > >>> > >>> Hi, > >>> > >>> looks like *this* "patch" made it to the sysctl tree [1], breaking b4 > >>> for everyone else (as there's a "--- b4-submit-tracking ---" magic in > >>> the tree history now) on next-20240422 > >>> > >>> Please drop it (again, I'm only talking about this empty cover letter). > >> > >> Just to clarify, in case it is not obvious: > >> Please *do not merge your own trees* into kernel.org repos. Instead use > >> b4 shazam to pick up entire patchset, even if it is yours. b4 allows to > >> merge/apply also the cover letter, if this is your intention. > >> > >> With b4 shazam you would get proper Link tags and not break everyone's > >> b4 workflow on next. :/ > > > > I was expecting this to happen at some point. :/ > > > > Note, that you can still use b4 and merge your own trees, but you need > > to switch to using a different cover letter strategy: > > > > [b4] > > prep-cover-strategy = branch-description > > Yes, but you still won't have: > 1. Link tags > 2. Nice thank-you letters > 3. Auto-collecting review/tested/ack tags > > So sure, maintainer can even cherry-pick patches, use patch or manually > edit git objects and then update git refs, but that's not the point. :) > > Just use b4 shazam, it's so awesome tool. I'll try this out going forward (instead of chaning the cover letter strategy) Thx again. Best
diff --git i/fs/proc/proc_sysctl.c w/fs/proc/proc_sysctl.c index 37cde0efee57..896c498600e8 100644 --- i/fs/proc/proc_sysctl.c +++ w/fs/proc/proc_sysctl.c @@ -966,6 +966,7 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set, table[0].procname = new_name; table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO; init_header(&new->header, set->dir.header.root, set, node, table, 1); + printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table)); return new; } @@ -1189,6 +1190,7 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, s> link_name += len; link++; } + printk("%ld sysctl saved mem kzalloc\n", sizeof(struct ctl_table)); init_header(links, dir->header.root, dir->header.set, node, link_table, head->ctl_table_size); links->nreg = nr_entries;