{"action":"created","issue":{"url":"https://api.github.com/repos/khenidak/dysk/issues/46","repository_url":"https://api.github.com/repos/khenidak/dysk","labels_url":"https://api.github.com/repos/khenidak/dysk/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/khenidak/dysk/issues/46/comments","events_url":"https://api.github.com/repos/khenidak/dysk/issues/46/events","html_url":"https://github.com/khenidak/dysk/issues/46","id":308776388,"number":46,"title":"Proposal: Refuse chr_dev seek requests","user":{"login":"ehotinger","id":1822836,"avatar_url":"https://avatars1.githubusercontent.com/u/1822836?v=4","gravatar_id":"","url":"https://api.github.com/users/ehotinger","html_url":"https://github.com/ehotinger","followers_url":"https://api.github.com/users/ehotinger/followers","following_url":"https://api.github.com/users/ehotinger/following{/other_user}","gists_url":"https://api.github.com/users/ehotinger/gists{/gist_id}","starred_url":"https://api.github.com/users/ehotinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehotinger/subscriptions","organizations_url":"https://api.github.com/users/ehotinger/orgs","repos_url":"https://api.github.com/users/ehotinger/repos","events_url":"https://api.github.com/users/ehotinger/events{/privacy}","received_events_url":"https://api.github.com/users/ehotinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-27T00:04:44Z","updated_at":"2018-03-27T01:43:39Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"1. Right now since `llseek` is not specified in `ep_ops` it will call `default_llseek` which will move the file pointer and nothing else. `default_llseek` protects this file pointer change using the BKL which is messy and in the case of `dysk`, unnecessary.\r\n\r\nSince `dysk` doesn't use anything but ioctl, we can set `llseek = no_llseek` and change `open` to be ` = nonseekable_open` instead of a default.\r\n\r\nThis advice is per `6038f373a3dcq` in the kernel:\r\n\r\n> New drivers should normally not use noop_llseek but instead use and call nonseekable_open at open time.  Existing drivers can be to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file.\r\n\r\n2. I would also propose we change `ENOTTY` to `EINVAL` in `ep_ioctl` as well as all of the default return methods for `open`, `write`, and `release`.\r\n\r\nNB: both of these changes are mostly fluff scenarios to make the driver similar to others in the kernel."},"comment":{"url":"https://api.github.com/repos/khenidak/dysk/issues/comments/376367797","html_url":"https://github.com/khenidak/dysk/issues/46#issuecomment-376367797","issue_url":"https://api.github.com/repos/khenidak/dysk/issues/46","id":376367797,"user":{"login":"khenidak","id":10683203,"avatar_url":"https://avatars2.githubusercontent.com/u/10683203?v=4","gravatar_id":"","url":"https://api.github.com/users/khenidak","html_url":"https://github.com/khenidak","followers_url":"https://api.github.com/users/khenidak/followers","following_url":"https://api.github.com/users/khenidak/following{/other_user}","gists_url":"https://api.github.com/users/khenidak/gists{/gist_id}","starred_url":"https://api.github.com/users/khenidak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khenidak/subscriptions","organizations_url":"https://api.github.com/users/khenidak/orgs","repos_url":"https://api.github.com/users/khenidak/repos","events_url":"https://api.github.com/users/khenidak/events{/privacy}","received_events_url":"https://api.github.com/users/khenidak/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T01:43:39Z","updated_at":"2018-03-27T01:43:39Z","author_association":"OWNER","body":"I agree - can i ask you to create a PR for this?\r\n"}}
{"actor":{"display_login":"khenidak"}}