This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年10月09日 09:26 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| getentropy.patch | vstinner, 2014年11月28日 22:59 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg228846 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年10月09日 09:26 | |
The future OpenBSD 5.6 (scheduled in november 2014) will have a new getentropy() syscall and a new getentropy() in their C library which avoid the need of a file descriptor: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2?query=getentropy&sec=2 Note: "The maximum buffer size permitted is 256 bytes. If buflen exceeds this, an error of EIO will be indicated." The file descriptor of os.urandom() causes perfomance issues and surprising bugs: #18756, #21207. For Python 2.7, see also the PEP 466 and the issue #21305. See also issues: - #22181: os.urandom() should use Linux 3.17 getrandom() syscall - #22542: Use arc4random under OpenBSD for os.urandom() if /dev/urandom is not present |
|||
| msg231837 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年11月28日 22:59 | |
Here is a patch using getentropy() if available. I tested it on OpenBSD 5.6 (the only OS implementing this function...). The patch prepares also random.c to support Linux getrandom(): issue #22181. |
|||
| msg232986 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年12月21日 00:18 | |
New changeset 75ede5bec8db by Victor Stinner in branch 'default': Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), https://hg.python.org/cpython/rev/75ede5bec8db |
|||
| msg233107 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年12月26日 17:09 | |
New changeset f11f84902713 by Victor Stinner in branch '3.4': Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), https://hg.python.org/cpython/rev/f11f84902713 |
|||
| msg238281 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月17日 11:36 | |
New changeset 371deb4a5fd1 by Ned Deily in branch '3.4': Issue #22585: make URandomFDTests test case actually run https://hg.python.org/cpython/rev/371deb4a5fd1 New changeset c89f7c34e356 by Ned Deily in branch 'default': Issue #22585: null merge https://hg.python.org/cpython/rev/c89f7c34e356 New changeset 961efafe9497 by Ned Deily in branch '2.7': Issue #22585, #23115: make URandomFDTests test case actually run https://hg.python.org/cpython/rev/961efafe9497 |
|||
| msg239586 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月30日 09:20 | |
New changeset 9d3013a383eb by Victor Stinner in branch '3.4': Issue #22585: os.urandom() now releases the GIL when the getentropy() is used https://hg.python.org/cpython/rev/9d3013a383eb New changeset 7f1015e4277a by Victor Stinner in branch 'default': (Merge 3.4) Issue #22585: os.urandom() now releases the GIL when the https://hg.python.org/cpython/rev/7f1015e4277a |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:08 | admin | set | github: 66775 |
| 2015年03月30日 09:20:16 | python-dev | set | messages: + msg239586 |
| 2015年03月17日 11:36:37 | python-dev | set | messages: + msg238281 |
| 2014年12月26日 17:09:12 | python-dev | set | messages: + msg233107 |
| 2014年12月21日 00:18:41 | vstinner | set | status: open -> closed resolution: fixed |
| 2014年12月21日 00:18:30 | python-dev | set | nosy:
+ python-dev messages: + msg232986 |
| 2014年11月28日 22:59:29 | vstinner | set | files:
+ getentropy.patch keywords: + patch messages: + msg231837 |
| 2014年10月09日 09:44:06 | vstinner | set | nosy:
+ alex |
| 2014年10月09日 09:28:09 | vstinner | set | nosy:
+ rpointel, 700eb415 |
| 2014年10月09日 09:26:08 | vstinner | create | |