Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting error #509

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kathryntolsen
Copy link

Matt Mackal was placed at the top out of order. Recommending a pull to make the document follow the proposed sorting rules Linus intended.

Matt Mackal was placed at the top out of order.
@KernelPRBot
Copy link

Hi @kathryntolsen!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Who do I send my contribution to?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

@ciscoxll
Copy link

@torvalds I love you.

krnowak added a commit to kinvolk/linux that referenced this pull request Jul 11, 2019
The new tests replicate the tests done for ARG_PTR_TO_LONG. There is a
missing test for the "size < sizeof(long)" case, because I'm not sure
I understand what this test is about and how to replicate it with
bpf_sk_get_netns.

An output of the tests:
  torvalds#508/p ARG_PTR_TO_LONG_OR_NULL uninitialized OK
  torvalds#509/p ARG_PTR_TO_LONG_OR_NULL half-uninitialized OK
  torvalds#510/p ARG_PTR_TO_LONG_OR_NULL misaligned OK
  torvalds#511/p ARG_PTR_TO_LONG_OR_NULL initialized OK
  torvalds#512/p ARG_PTR_TO_LONG_OR_NULL initialized to NULL OK

Signed-off-by: Krzesimir Nowak <[email protected]>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Jun 28, 2020
Now io_complete_rw_common() puts a ref, extra io_req_put() in
io_iopoll_queue() causes undeflow. Remove it.

[  455.998620] refcount_t: underflow; use-after-free.
[  455.998743] WARNING: CPU: 6 PID: 285394 at lib/refcount.c:28
	refcount_warn_saturate+0xae/0xf0
[  455.998772] CPU: 6 PID: 285394 Comm: read-write2 Tainted: G
          I E     5.8.0-rc2-00048-g1b1aa738f167-dirty torvalds#509
[  455.998772] RIP: 0010:refcount_warn_saturate+0xae/0xf0
...
[  455.998778] Call Trace:
[  455.998778]  io_put_req+0x44/0x50
[  455.998778]  io_iopoll_complete+0x245/0x370
[  455.998779]  io_iopoll_getevents+0x12f/0x1a0
[  455.998779]  io_iopoll_reap_events.part.0+0x5e/0xa0
[  455.998780]  io_ring_ctx_wait_and_kill+0x132/0x1c0
[  455.998780]  io_uring_release+0x20/0x30
[  455.998780]  __fput+0xcd/0x230
[  455.998781]  ____fput+0xe/0x10
[  455.998781]  task_work_run+0x67/0xa0
[  455.998781]  do_exit+0x35d/0xb70
[  455.998782]  do_group_exit+0x43/0xa0
[  455.998783]  get_signal+0x140/0x900
[  455.998783]  do_signal+0x37/0x780
[  455.998784]  __prepare_exit_to_usermode+0x126/0x1c0
[  455.998785]  __syscall_return_slowpath+0x3b/0x1c0
[  455.998785]  do_syscall_64+0x5f/0xa0
[  455.998785]  entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: a1d7c39 ("io_uring: enable READ/WRITE to use deferred completions")
Signed-off-by: Pavel Begunkov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
ojeda added a commit to ojeda/linux that referenced this pull request Oct 5, 2021
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Sep 8, 2022
The thermal driver [0] for Renesas RZ/G2L SoC does not implement
set_trip_temp() callback but has trips commit 9326167
("thermal/core: Move set_trip_temp ops to the sysfs code") changed
the behaviour which causes the below panic when trying to set the
trip temperature:

root@smarc-rzg2l:~# echo 51000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
[   92.461521] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   92.470958] Mem abort info:
[   92.474311]   ESR = 0x0000000086000004
[   92.478546]   EC = 0x21: IABT (current EL), IL = 32 bits
[   92.484290]   SET = 0, FnV = 0
[   92.487693]   EA = 0, S1PTW = 0
[   92.491153]   FSC = 0x04: level 0 translation fault
[   92.496461] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004e885000
[   92.503736] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[   92.510869] Internal error: Oops: 86000004 [#3] PREEMPT SMP
[   92.516556] CPU: 0 PID: 290 Comm: sh Tainted: G      D            6.0.0-rc4-next-20220906-arm64-renesas-00124-g84633c87c5f6-dirty torvalds#509
[   92.528814] Hardware name: Renesas SMARC EVK based on r9a07g044l2 (DT)
[   92.535441] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   92.542516] pc : 0x0
[   92.544764] lr : trip_point_temp_store+0x84/0x140
[   92.549582] sp : ffff80000a92bc10
[   92.552961] x29: ffff80000a92bc10 x28: ffff00000d8a45c0 x27: 0000000000000000
[   92.560249] x26: 0000000000000000 x25: ffff8000082b53e8 x24: ffff00000eaffc20
[   92.567532] x23: ffff80000a92bd68 x22: ffff00000d3e0f80 x21: 0000000000000006
[   92.574814] x20: ffff800009149000 x19: ffff00000b8ab000 x18: 0000000000000000
[   92.582097] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaab028cdee0
[   92.589378] x14: 0000000000000000 x13: 0000000000000000 x12: ffff80000a92bbd0
[   92.596659] x11: ffff00000d3e0f80 x10: ffff800009149eb8 x9 : 000000000000000a
[   92.603940] x8 : 00000000ffffffc9 x7 : 0000000000000005 x6 : 000000000000002a
[   92.611220] x5 : 000000000000c738 x4 : 00000000ffffffd3 x3 : 0000000000000000
[   92.618500] x2 : 000000000000c738 x1 : 0000000000000000 x0 : ffff00000b8ab000
[   92.625781] Call trace:
[   92.628282]  0x0
[   92.630176]  dev_attr_store+0x14/0x28
[   92.633935]  sysfs_kf_write+0x4c/0x70
[   92.637681]  kernfs_fop_write_iter+0x160/0x1e0
[   92.642213]  vfs_write+0x474/0x540
[   92.645703]  ksys_write+0x68/0xf8
[   92.649100]  __arm64_sys_write+0x18/0x20
[   92.653111]  invoke_syscall+0x40/0xf8
[   92.656866]  el0_svc_common.constprop.3+0x88/0x110
[   92.661758]  do_el0_svc+0x20/0x78
[   92.665158]  el0_svc+0x3c/0x90
[   92.668291]  el0t_64_sync_handler+0x90/0xb8
[   92.672563]  el0t_64_sync+0x148/0x14c
[   92.676322] Code: bad PC value
[   92.679453] ---[ end trace 0000000000000000 ]---
/bin/start_getty: line 40:   290 Segmentation fault      ${setsid:-} ${getty} -L $1 $2 $3

Poky (Yocto Project Reference Distro) 3.2.1 smarc-rzg2l ttySC0

smarc-rzg2l login:

This patch fixes the above issue by adding a check to see if
set_trip_temp() callback is implemented before calling it.

[0] drivers/thermal/rzg2l_thermal.c

Fixes: 9326167 ("thermal/core: Move set_trip_temp ops to the sysfs code")
Signed-off-by: Lad Prabhakar <[email protected]>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Sep 16, 2022
The thermal driver [0] for Renesas RZ/G2L SoC does not implement
set_trip_temp() callback but has trips commit 9326167
("thermal/core: Move set_trip_temp ops to the sysfs code") changed
the behaviour which causes the below panic when trying to set the
trip temperature:

root@smarc-rzg2l:~# echo 51000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
[   92.461521] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   92.470958] Mem abort info:
[   92.474311]   ESR = 0x0000000086000004
[   92.478546]   EC = 0x21: IABT (current EL), IL = 32 bits
[   92.484290]   SET = 0, FnV = 0
[   92.487693]   EA = 0, S1PTW = 0
[   92.491153]   FSC = 0x04: level 0 translation fault
[   92.496461] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004e885000
[   92.503736] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[   92.510869] Internal error: Oops: 86000004 [#3] PREEMPT SMP
[   92.516556] CPU: 0 PID: 290 Comm: sh Tainted: G      D            6.0.0-rc4-next-20220906-arm64-renesas-00124-g84633c87c5f6-dirty torvalds#509
[   92.528814] Hardware name: Renesas SMARC EVK based on r9a07g044l2 (DT)
[   92.535441] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   92.542516] pc : 0x0
[   92.544764] lr : trip_point_temp_store+0x84/0x140
[   92.549582] sp : ffff80000a92bc10
[   92.552961] x29: ffff80000a92bc10 x28: ffff00000d8a45c0 x27: 0000000000000000
[   92.560249] x26: 0000000000000000 x25: ffff8000082b53e8 x24: ffff00000eaffc20
[   92.567532] x23: ffff80000a92bd68 x22: ffff00000d3e0f80 x21: 0000000000000006
[   92.574814] x20: ffff800009149000 x19: ffff00000b8ab000 x18: 0000000000000000
[   92.582097] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaab028cdee0
[   92.589378] x14: 0000000000000000 x13: 0000000000000000 x12: ffff80000a92bbd0
[   92.596659] x11: ffff00000d3e0f80 x10: ffff800009149eb8 x9 : 000000000000000a
[   92.603940] x8 : 00000000ffffffc9 x7 : 0000000000000005 x6 : 000000000000002a
[   92.611220] x5 : 000000000000c738 x4 : 00000000ffffffd3 x3 : 0000000000000000
[   92.618500] x2 : 000000000000c738 x1 : 0000000000000000 x0 : ffff00000b8ab000
[   92.625781] Call trace:
[   92.628282]  0x0
[   92.630176]  dev_attr_store+0x14/0x28
[   92.633935]  sysfs_kf_write+0x4c/0x70
[   92.637681]  kernfs_fop_write_iter+0x160/0x1e0
[   92.642213]  vfs_write+0x474/0x540
[   92.645703]  ksys_write+0x68/0xf8
[   92.649100]  __arm64_sys_write+0x18/0x20
[   92.653111]  invoke_syscall+0x40/0xf8
[   92.656866]  el0_svc_common.constprop.3+0x88/0x110
[   92.661758]  do_el0_svc+0x20/0x78
[   92.665158]  el0_svc+0x3c/0x90
[   92.668291]  el0t_64_sync_handler+0x90/0xb8
[   92.672563]  el0t_64_sync+0x148/0x14c
[   92.676322] Code: bad PC value
[   92.679453] ---[ end trace 0000000000000000 ]---
/bin/start_getty: line 40:   290 Segmentation fault      ${setsid:-} ${getty} -L $1 $2 $3

Poky (Yocto Project Reference Distro) 3.2.1 smarc-rzg2l ttySC0

smarc-rzg2l login:

This patch fixes the above issue by adding a check to see if
set_trip_temp() callback is implemented before calling it.

[0] drivers/thermal/rzg2l_thermal.c

Fixes: 9326167 ("thermal/core: Move set_trip_temp ops to the sysfs code")
Signed-off-by: Lad Prabhakar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Oct 5, 2022
The thermal driver [0] for Renesas RZ/G2L SoC does not implement
set_trip_temp() callback but has trips commit 9326167
("thermal/core: Move set_trip_temp ops to the sysfs code") changed
the behaviour which causes the below panic when trying to set the
trip temperature:

root@smarc-rzg2l:~# echo 51000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
[   92.461521] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   92.470958] Mem abort info:
[   92.474311]   ESR = 0x0000000086000004
[   92.478546]   EC = 0x21: IABT (current EL), IL = 32 bits
[   92.484290]   SET = 0, FnV = 0
[   92.487693]   EA = 0, S1PTW = 0
[   92.491153]   FSC = 0x04: level 0 translation fault
[   92.496461] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004e885000
[   92.503736] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[   92.510869] Internal error: Oops: 86000004 [#3] PREEMPT SMP
[   92.516556] CPU: 0 PID: 290 Comm: sh Tainted: G      D            6.0.0-rc4-next-20220906-arm64-renesas-00124-g84633c87c5f6-dirty torvalds#509
[   92.528814] Hardware name: Renesas SMARC EVK based on r9a07g044l2 (DT)
[   92.535441] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   92.542516] pc : 0x0
[   92.544764] lr : trip_point_temp_store+0x84/0x140
[   92.549582] sp : ffff80000a92bc10
[   92.552961] x29: ffff80000a92bc10 x28: ffff00000d8a45c0 x27: 0000000000000000
[   92.560249] x26: 0000000000000000 x25: ffff8000082b53e8 x24: ffff00000eaffc20
[   92.567532] x23: ffff80000a92bd68 x22: ffff00000d3e0f80 x21: 0000000000000006
[   92.574814] x20: ffff800009149000 x19: ffff00000b8ab000 x18: 0000000000000000
[   92.582097] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaab028cdee0
[   92.589378] x14: 0000000000000000 x13: 0000000000000000 x12: ffff80000a92bbd0
[   92.596659] x11: ffff00000d3e0f80 x10: ffff800009149eb8 x9 : 000000000000000a
[   92.603940] x8 : 00000000ffffffc9 x7 : 0000000000000005 x6 : 000000000000002a
[   92.611220] x5 : 000000000000c738 x4 : 00000000ffffffd3 x3 : 0000000000000000
[   92.618500] x2 : 000000000000c738 x1 : 0000000000000000 x0 : ffff00000b8ab000
[   92.625781] Call trace:
[   92.628282]  0x0
[   92.630176]  dev_attr_store+0x14/0x28
[   92.633935]  sysfs_kf_write+0x4c/0x70
[   92.637681]  kernfs_fop_write_iter+0x160/0x1e0
[   92.642213]  vfs_write+0x474/0x540
[   92.645703]  ksys_write+0x68/0xf8
[   92.649100]  __arm64_sys_write+0x18/0x20
[   92.653111]  invoke_syscall+0x40/0xf8
[   92.656866]  el0_svc_common.constprop.3+0x88/0x110
[   92.661758]  do_el0_svc+0x20/0x78
[   92.665158]  el0_svc+0x3c/0x90
[   92.668291]  el0t_64_sync_handler+0x90/0xb8
[   92.672563]  el0t_64_sync+0x148/0x14c
[   92.676322] Code: bad PC value
[   92.679453] ---[ end trace 0000000000000000 ]---
/bin/start_getty: line 40:   290 Segmentation fault      ${setsid:-} ${getty} -L $1 $2 $3

Poky (Yocto Project Reference Distro) 3.2.1 smarc-rzg2l ttySC0

smarc-rzg2l login:

This patch fixes the above issue by adding a check to see if
set_trip_temp() callback is implemented before calling it.

[0] drivers/thermal/rzg2l_thermal.c

Fixes: 9326167 ("thermal/core: Move set_trip_temp ops to the sysfs code")
Signed-off-by: Lad Prabhakar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants