NetBSD goesPOSIX:2008 and C1XTakehiko NOZAKI<tnozaki@NetBSD.org>
What is the POSIX ?
What is the POSIX ? Portable
What is the POSIX ? Portable Operating System
What is the POSIX ? Portable Operating System Interface
What is the POSIX ? Portable Operating System Interface [for UNIX]
What does Interface means ?
What does Interface means ? User Interface (UI)
What does Interface means ? User Interface (UI) Command-line User Interface (CUI)
What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI)
What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Appli...
What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Appli...
POSIX target is...
POSIX target is... User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Application Pr...
Who revised the POSIX ?
Who revised the POSIX ? The Austin Common Standard RevisionGroup (The Austin Group)
Who is the member of the AustinGroup ?
Who is the member of the AustinGroup ? The Open Group (TOG)
Who is the member of the AustinGroup ? The Open Group (TOG) IEEE PASC
Who is the member of the AustinGroup ? The Open Group (TOG) IEEE PASC ISO/IEC JTC1/SC22/PAG
The Open Group (TOG)
The Open Group (TOG) A vendor/technology-neutralconsortium
The Open Group (TOG) A vendor/technology-neutralconsortium The certifying body for the UNIXtrademark
IEEE PASC
IEEE PASC Institute of Electrical and ElectronicsEngineers (米国電気電子学会)
IEEE PASC Portable Application StandardsCommittee
IEEE PASC Latest POSIX version - IEEE Std1003.1-2008
ISO/IEC JTC1/SC22/PAG International Organization forStandardization (国際標準化機構)
ISO/IEC JTC1/SC22/PAG International Organization forStandardization International ElectrotechnicalCommission (国際電気標準会議)
ISO/IEC JTC1/SC22/PAG International Organization forStandardization International ElectrotechnicalCommission Joint Tech...
ISO/IEC JTC1/SC22/PAG Sub Committee 22
ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem
ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem POSIX Advisory Group
ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem POSIX Advisory Group Former WG15 (Wo...
ISO/IEC JTC1/SC22/PAG Latest POSIX version – ISO/IEC9945:2008
You can freely subscribe theAustin Group Mailing Lists !
You can freely subscribe theAustin Group Mailing Lists ! austin-group-l general discussion austin-regexp-l regular exp...
What’s new POSIX:2008
What’s new POSIX:2008 The Open Group Base Specifications,Issue 7
What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 Former Single UNIX Specifications
What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 The Base Definitions (XBD) The System Interfaces and H...
What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 The Base Definitions (XBD) The System Interfaces and H...
Extended API Set, Part1
Extended API Set, Part1 New APIs derived from Linux StandardBase (LSB) fmemopen, open_w?memstream mbsnrtowcs, wcsnrtomb...
What is Linux Standard Base?
What is Linux Standard Base? Too many distribution Too many differences Too difficult to maintain compatibility
What is Linux Standard Base? Keep compatibility with several Linuxdistributions POSIX (CUI and API) compatibility + α A...
Who made Linux Standard Base ? History LI18NUX/OpenI18N → LINUX2000 Linux Standard Base OpenI18N + LSB = Free Standard...
Implementation status ofExtended API Set, Part1 Linux FreeBSD NetBSD – patch provided (by me)
Extended API Set, Part2
Extended API Set, Part2 New system calls with relativepathname fdopendir, fexecve {open,link,readlink,rename,symlink,un...
Extended API Set, Part2 Background TOCTTOU (time of check to time of use)races and vulnerabilities (e.g. symlinkattack)...
Implementation status ofExtended API Set, Part2 Solaris 9 Linux kernel 2.6.16 FreeBSD 8 NetBSD – patch provided(by ad@)
Extended API Set, Part3
Extended API Set, Part3 New pthread API for robust mutexes pthread_mutex_consistent pthread_mutexattr_{get,set}robust ...
Extended API Set, Part3 Background Deadlock possibility
Implementation status ofExtended API Set, Part3 Solaris 9 later Linux/glibc2
Extended API Set, Part4
Extended API Set, Part4 New locale APIs for multi-locale locale_t, newlocale, freelocale isw{alnum,alpha,blank,...}_l ...
Extended API Set, Part4 Background setlocale(3) is not MT-safe C++ std::locale requires multi-locale Thread-aware Loca...
Extended API Set, Part4 Problems Bad design: too complecated, its hard tomanage the set of locale_t, mbstate_t,wchar_t f...
Implementation status ofExtended API Set, Part4 glibc2 Microsoft Visual C/C++ 2005 MacOS X NetBSD – patch provided (by...
What is C1X?
What is C1X? The second revision of ISO/IEC 9899“Programming Language C” And the first revision in the 21stcentury
What is C1X? The second revision of ISO/IEC 9899“Programming Language C” And the first revision in the 21stcentury 1990...
Whats new in C1X ? C – The C1X Charter (N1250) Latest Draft of ISO/IEC 9899:201X(N1425) Including “C Secure Coding Guid...
DTR 19769: New character typein C (N1040) UTF{16,32} hardwired character type char{16,32}_t, u and U prefix mbrtoc{1632...
DTR 19769: New character typein C (N1040) Background C string function(e.g. strcmp, mbrtowc)cant treat UTF{16,32} String...
DTR 19769: New character typein C (N1040) Problem mbrtoc{16,32} / c{16,32}rtomb is justlesser iconv(3)
DTR 19769: New character typein C (N1040) Implementation status glibc2 and gcc4 - WIP NetBSD and pcc - NOT YET
TR24731: Extension to the Clibrary
TR24731: Extension to the Clibrary Part1: Bouns-checking interfaces(N1225)
TR24731: Extension to the Clibrary Part1: Bouns-checking interfaces(N1225) strcpy_s, strcat_s, sprintf_s fopen_s, geten...
TR24731: Extension to the Clibrary Part2: Dynamic allocation functions(N1337)
TR24731: Extension to the Clibrary Part2: Dynamic allocation functions(N1337) fmemopen, open_w?memstream {str, wcs}n?du...
TR24731-1: Bouns-checkinginterfaces (N1225) Background Smashing the Stack for Fun and Profit (byAleph One) No more stac...
TR24731-1: Bouns-checkinginterfaces (N1225) Problems gcc already have Stack Smashing Protector(a.k.a Propolice) and libs...
TR24731-1: Bouns-checkinginterfaces (N1225) Implementation statusMicrosoft Visual C/C++ 2005(_CRT_SECURE_CPP_OVERLOAD_STA...
TR24731-2: Dynamic allocationfunctions (N1337) Background strl{cat,cpy} flame war between Theo deRaadt with Urlich Drepp...
Others... TR 18037: Embedded C (N1169) TR 24732: Decimal floating point(N1312) TR 24747: Mathematical specialfunctions
More C1X Proposal On The Removal of gets() (N1420) Blocks and GC Proposal (N1451) Atomic Proposal (N1473) Anonymous Me...
More C1X Proposal #macro Proposal (N1410) Adding Alignment support for C(N1397) Namespace Reservation for the CStandard...
Upcoming SlideShare
Loading in...5
×

2010 JNUG BoF

205

Published on

2010 JNUG BoF

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
205
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

2010 JNUG BoF

  1. 1. NetBSD goesPOSIX:2008 and C1XTakehiko NOZAKI<tnozaki@NetBSD.org>
  2. 2. What is the POSIX ?
  3. 3. What is the POSIX ? Portable
  4. 4. What is the POSIX ? Portable Operating System
  5. 5. What is the POSIX ? Portable Operating System Interface
  6. 6. What is the POSIX ? Portable Operating System Interface [for UNIX]
  7. 7. What does Interface means ?
  8. 8. What does Interface means ? User Interface (UI)
  9. 9. What does Interface means ? User Interface (UI) Command-line User Interface (CUI)
  10. 10. What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI)
  11. 11. What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Application Programming Interface(API)
  12. 12. What does Interface means ? User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Application Programming Interface(API) Application Binary Interface (ABI)
  13. 13. POSIX target is...
  14. 14. POSIX target is... User Interface (UI) Command-line User Interface (CUI) Graphical User Interface (GUI) Application Programming Interface(API) Application Binary Interface (ABI)
  15. 15. Who revised the POSIX ?
  16. 16. Who revised the POSIX ? The Austin Common Standard RevisionGroup (The Austin Group)
  17. 17. Who is the member of the AustinGroup ?
  18. 18. Who is the member of the AustinGroup ? The Open Group (TOG)
  19. 19. Who is the member of the AustinGroup ? The Open Group (TOG) IEEE PASC
  20. 20. Who is the member of the AustinGroup ? The Open Group (TOG) IEEE PASC ISO/IEC JTC1/SC22/PAG
  21. 21. The Open Group (TOG)
  22. 22. The Open Group (TOG) A vendor/technology-neutralconsortium
  23. 23. The Open Group (TOG) A vendor/technology-neutralconsortium The certifying body for the UNIXtrademark
  24. 24. IEEE PASC
  25. 25. IEEE PASC Institute of Electrical and ElectronicsEngineers (米国電気電子学会)
  26. 26. IEEE PASC Portable Application StandardsCommittee
  27. 27. IEEE PASC Latest POSIX version - IEEE Std1003.1-2008
  28. 28. ISO/IEC JTC1/SC22/PAG International Organization forStandardization (国際標準化機構)
  29. 29. ISO/IEC JTC1/SC22/PAG International Organization forStandardization International ElectrotechnicalCommission (国際電気標準会議)
  30. 30. ISO/IEC JTC1/SC22/PAG International Organization forStandardization International ElectrotechnicalCommission Joint Technical Committee 1 (第一合同技術委員会)
  31. 31. ISO/IEC JTC1/SC22/PAG Sub Committee 22
  32. 32. ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem
  33. 33. ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem POSIX Advisory Group
  34. 34. ISO/IEC JTC1/SC22/PAG Sub Committee 22 Programming languages and, OperatingSystem POSIX Advisory Group Former WG15 (Workgroup-15)
  35. 35. ISO/IEC JTC1/SC22/PAG Latest POSIX version – ISO/IEC9945:2008
  36. 36. You can freely subscribe theAustin Group Mailing Lists !
  37. 37. You can freely subscribe theAustin Group Mailing Lists ! austin-group-l general discussion austin-regexp-l regular expression subgroup austin-group-futures-l futures discussion austin-group-offtopic-l offtopic discussion
  38. 38. What’s new POSIX:2008
  39. 39. What’s new POSIX:2008 The Open Group Base Specifications,Issue 7
  40. 40. What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 Former Single UNIX Specifications
  41. 41. What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 The Base Definitions (XBD) The System Interfaces and Headers (XSH) The Commands and Utilities (XCU)
  42. 42. What’s new POSIX:2008 The Open Group Base Specifications,Issue 7 The Base Definitions (XBD) The System Interfaces and Headers (XSH) The Commands and Utilities (XCU) Extended API Set, Part 1 - 4
  43. 43. Extended API Set, Part1
  44. 44. Extended API Set, Part1 New APIs derived from Linux StandardBase (LSB) fmemopen, open_w?memstream mbsnrtowcs, wcsnrtombs etc.
  45. 45. What is Linux Standard Base?
  46. 46. What is Linux Standard Base? Too many distribution Too many differences Too difficult to maintain compatibility
  47. 47. What is Linux Standard Base? Keep compatibility with several Linuxdistributions POSIX (CUI and API) compatibility + α ABI Filesystem hierarchy Standard (FHS) Runlevel X Window System extensions Printing system
  48. 48. Who made Linux Standard Base ? History LI18NUX/OpenI18N → LINUX2000 Linux Standard Base OpenI18N + LSB = Free StandardGroup(FSG) Open Source Development Labs(OSDL) FSG + OSDL = Linux Foundation ISO/IEC JTC1/SC22 Linux StudyingGroup(LSG) → Extended API Set, Part1
  49. 49. Implementation status ofExtended API Set, Part1 Linux FreeBSD NetBSD – patch provided (by me)
  50. 50. Extended API Set, Part2
  51. 51. Extended API Set, Part2 New system calls with relativepathname fdopendir, fexecve {open,link,readlink,rename,symlink,unlink}at etc.
  52. 52. Extended API Set, Part2 Background TOCTTOU (time of check to time of use)races and vulnerabilities (e.g. symlinkattack) chdir(2) is not MT-safe
  53. 53. Implementation status ofExtended API Set, Part2 Solaris 9 Linux kernel 2.6.16 FreeBSD 8 NetBSD – patch provided(by ad@)
  54. 54. Extended API Set, Part3
  55. 55. Extended API Set, Part3 New pthread API for robust mutexes pthread_mutex_consistent pthread_mutexattr_{get,set}robust EOWNERDEAD etc.
  56. 56. Extended API Set, Part3 Background Deadlock possibility
  57. 57. Implementation status ofExtended API Set, Part3 Solaris 9 later Linux/glibc2
  58. 58. Extended API Set, Part4
  59. 59. Extended API Set, Part4 New locale APIs for multi-locale locale_t, newlocale, freelocale isw{alnum,alpha,blank,...}_l etc.
  60. 60. Extended API Set, Part4 Background setlocale(3) is not MT-safe C++ std::locale requires multi-locale Thread-aware Locale Model (by UrlichDrepper@Redhat)
  61. 61. Extended API Set, Part4 Problems Bad design: too complecated, its hard tomanage the set of locale_t, mbstate_t,wchar_t for programmers Require Thread Local Storage support
  62. 62. Implementation status ofExtended API Set, Part4 glibc2 Microsoft Visual C/C++ 2005 MacOS X NetBSD – patch provided (by me)
  63. 63. What is C1X?
  64. 64. What is C1X? The second revision of ISO/IEC 9899“Programming Language C” And the first revision in the 21stcentury
  65. 65. What is C1X? The second revision of ISO/IEC 9899“Programming Language C” And the first revision in the 21stcentury 1990 - C90 (C89) 1995 - C90 AMD1 (C95) [Ammendant-1] 1999 – C99 [Second Edition] 201X – C1X [Third Edition]
  66. 66. Whats new in C1X ? C – The C1X Charter (N1250) Latest Draft of ISO/IEC 9899:201X(N1425) Including “C Secure Coding Guidelines”
  67. 67. DTR 19769: New character typein C (N1040) UTF{16,32} hardwired character type char{16,32}_t, u and U prefix mbrtoc{1632}, c{1632}rtomb etc.
  68. 68. DTR 19769: New character typein C (N1040) Background C string function(e.g. strcmp, mbrtowc)cant treat UTF{16,32} String (L0 != 0) C99: __STDC_ISO_10646__ and UniversalCharacter Name (e.g. L“u3042”) C++0x: Native Unicode Support Unicode Raw String Literal (N1333)
  69. 69. DTR 19769: New character typein C (N1040) Problem mbrtoc{16,32} / c{16,32}rtomb is justlesser iconv(3)
  70. 70. DTR 19769: New character typein C (N1040) Implementation status glibc2 and gcc4 - WIP NetBSD and pcc - NOT YET
  71. 71. TR24731: Extension to the Clibrary
  72. 72. TR24731: Extension to the Clibrary Part1: Bouns-checking interfaces(N1225)
  73. 73. TR24731: Extension to the Clibrary Part1: Bouns-checking interfaces(N1225) strcpy_s, strcat_s, sprintf_s fopen_s, getenv_s etc.
  74. 74. TR24731: Extension to the Clibrary Part2: Dynamic allocation functions(N1337)
  75. 75. TR24731: Extension to the Clibrary Part2: Dynamic allocation functions(N1337) fmemopen, open_w?memstream {str, wcs}n?dup Etc.→ see POSIX:2008 Extended API Set, Part1
  76. 76. TR24731-1: Bouns-checkinginterfaces (N1225) Background Smashing the Stack for Fun and Profit (byAleph One) No more stack buffer overflow
  77. 77. TR24731-1: Bouns-checkinginterfaces (N1225) Problems gcc already have Stack Smashing Protector(a.k.a Propolice) and libssps checkingfunction, str{cat,cpy}_chk *BSD already have strl{cat, cpy} and widelyused by many applications And more, NetBSD have efun(3)s estrl{cat,cpy} in util.h
  78. 78. TR24731-1: Bouns-checkinginterfaces (N1225) Implementation statusMicrosoft Visual C/C++ 2005(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES) OpenWatcom NetBSD – patch provided (by me)
  79. 79. TR24731-2: Dynamic allocationfunctions (N1337) Background strl{cat,cpy} flame war between Theo deRaadt with Urlich Drepper Drepper wrote “Defensive Programmingfor RHEL”
  80. 80. Others... TR 18037: Embedded C (N1169) TR 24732: Decimal floating point(N1312) TR 24747: Mathematical specialfunctions
  81. 81. More C1X Proposal On The Removal of gets() (N1420) Blocks and GC Proposal (N1451) Atomic Proposal (N1473) Anonymous Member-Structures and-Union (N1406) Toward support for attributes in C(N1403) Type generic macro (N1405)
  82. 82. More C1X Proposal #macro Proposal (N1410) Adding Alignment support for C(N1397) Namespace Reservation for the CStandard (N1345) Thread Local Storage (N1329) Adding Threads to the C StandardLibrary (N1325)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×