Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-16 Thread Timon Gehr via Digitalmars-d-announce
On 1/12/23 07:25, Walter Bright wrote: But also, adding dynamic arrays to C won't make the currently existing C code safer, the one they care about, because no one's gonna send the money to update their C89/99/whatever code to C23/26. Even if they did, there's no guarantee others would as wel

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-12 Thread Siarhei Siamashka via Digitalmars-d-announce
On Wednesday, 11 January 2023 at 09:44:27 UTC, Walter Bright wrote: Bounds checking in the Linux kernel is done by https://docs.kernel.org/dev-tools/kfence.html or Being sampling based, this is not good enough. I disagree. KFENCE is actually a perfect fit for what is needed for the Linux ker

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Walter Bright via Digitalmars-d-announce
On 1/11/2023 8:15 PM, Tejas wrote: Well, the companies don't get to single-handedly decide what features to add or deprecate, thanks to C spec being written by ISO, which is why they have developed their own PLs. Yes they can, as they add extensions to C all the time. But also, adding dynami

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Tejas via Digitalmars-d-announce
On Wednesday, 11 January 2023 at 19:27:15 UTC, Walter Bright wrote: On 1/11/2023 3:26 AM, Paulo Pinto wrote: It is kind of "solved", by turning all computers into C machines, What an amazing amount of work just to avoid adding dynamic arrays to C. Well, the companies don't get to single-han

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Walter Bright via Digitalmars-d-announce
On 1/11/2023 3:26 AM, Paulo Pinto wrote: It is kind of "solved", by turning all computers into C machines, What an amazing amount of work just to avoid adding dynamic arrays to C.

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Paulo Pinto via Digitalmars-d-announce
On Wednesday, 11 January 2023 at 09:52:23 UTC, Walter Bright wrote: By the way, back in the 80's, I wrote my own pointer checker for my own use developing C code. It was immensely useful in flushing bugs out of my code. There are vestiges of it still in the dmd source code. But it ran very ss

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Walter Bright via Digitalmars-d-announce
By the way, back in the 80's, I wrote my own pointer checker for my own use developing C code. It was immensely useful in flushing bugs out of my code. There are vestiges of it still in the dmd source code. But it ran very slooowwly, and was not usable for shipped code.

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-11 Thread Walter Bright via Digitalmars-d-announce
On 1/10/2023 10:49 PM, Siarhei Siamashka wrote: It's impractical to have this in the ISO standard, but surely not impossible. Various C compilers from different vendors implement bounds checking. See:   * https://bellard.org/tcc/tcc-doc.html#Bounds This works by constructing a data structure

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-10 Thread Siarhei Siamashka via Digitalmars-d-announce
On Monday, 9 January 2023 at 07:15:43 UTC, Walter Bright wrote: On 1/8/2023 8:31 PM, Siarhei Siamashka wrote: Yes, they are not baked into the ISO language standard. They can't be because the C semantics make it impossible. It's impractical to have this in the ISO standard, but surely not i

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-09 Thread Paulo Pinto via Digitalmars-d-announce
On Monday, 9 January 2023 at 20:07:01 UTC, areYouSureAboutThat wrote: On Monday, 9 January 2023 at 11:04:24 UTC, Patrick Schluter wrote: On Monday, 9 January 2023 at 09:08:59 UTC, areYouSureAboutThat wrote: On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Yes, as long as you do

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-09 Thread areYouSureAboutThat via Digitalmars-d-announce
On Monday, 9 January 2023 at 11:04:24 UTC, Patrick Schluter wrote: On Monday, 9 January 2023 at 09:08:59 UTC, areYouSureAboutThat wrote: On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Yes, as long as you don't make any mistakes. A table saw won't cut your fingers off if you n

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-09 Thread Patrick Schluter via Digitalmars-d-announce
On Monday, 9 January 2023 at 09:08:59 UTC, areYouSureAboutThat wrote: On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Yes, as long as you don't make any mistakes. A table saw won't cut your fingers off if you never make a mistake, too. And yet, people keep using them (table

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-09 Thread Paulo Pinto via Digitalmars-d-announce
On Monday, 9 January 2023 at 07:23:48 UTC, Siarhei Siamashka wrote: On Monday, 9 January 2023 at 06:34:23 UTC, Paulo Pinto wrote: On Monday, 9 January 2023 at 04:31:48 UTC, Siarhei Siamashka ASAN, Valgrind, Clang Static Analyzer and plenty of other tools are the practical mechanisms to prevent

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-09 Thread areYouSureAboutThat via Digitalmars-d-announce
On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Yes, as long as you don't make any mistakes. A table saw won't cut your fingers off if you never make a mistake, too. And yet, people keep using them (table saws). Don't underestimate the level of risk humans are happily willi

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Siarhei Siamashka via Digitalmars-d-announce
On Monday, 9 January 2023 at 06:34:23 UTC, Paulo Pinto wrote: On Monday, 9 January 2023 at 04:31:48 UTC, Siarhei Siamashka ASAN, Valgrind, Clang Static Analyzer and plenty of other tools are the practical mechanisms to prevent buffer overflows. Yes, they are not baked into the ISO language sta

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Walter Bright via Digitalmars-d-announce
On 1/8/2023 8:31 PM, Siarhei Siamashka wrote: On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Buffer overflows are trivial to have in C, and C has no mechanism to prevent them. ASAN, Valgrind, Clang Static Analyzer and plenty of other tools are the practical mechanisms to prev

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Walter Bright via Digitalmars-d-announce
On 1/8/2023 10:34 PM, Paulo Pinto wrote: The best part of memory safe systems programming languages is that many of those tools don't even have to exist, they are part of language semantics! Exactly! I once annoyed the Coverity folks by telling them that my goal with D was to make Coverity irr

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Paulo Pinto via Digitalmars-d-announce
On Monday, 9 January 2023 at 04:31:48 UTC, Siarhei Siamashka wrote: On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Buffer overflows are trivial to have in C, and C has no mechanism to prevent them. ASAN, Valgrind, Clang Static Analyzer and plenty of other tools are the practi

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Siarhei Siamashka via Digitalmars-d-announce
On Monday, 9 January 2023 at 03:54:32 UTC, Walter Bright wrote: Buffer overflows are trivial to have in C, and C has no mechanism to prevent them. ASAN, Valgrind, Clang Static Analyzer and plenty of other tools are the practical mechanisms to prevent buffer overflows. Yes, they are not baked

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-08 Thread Walter Bright via Digitalmars-d-announce
On 1/7/2023 2:25 PM, areYouSureAboutThat wrote: In fact, C can be used in a perfectly memory safe manner. Yes, as long as you don't make any mistakes. A table saw won't cut your fingers off if you never make a mistake, too. The problem is that too few programmers know how to do that, and ev

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread monkyyy via Digitalmars-d-announce
On Sunday, 8 January 2023 at 03:58:43 UTC, Siarhei Siamashka wrote: On Sunday, 8 January 2023 at 03:18:27 UTC, monkyyy wrote: On Sunday, 8 January 2023 at 02:15:27 UTC, areYouSureAboutThat wrote: C is not just a programming language anymore. It's a complete (and very diverse) ecosystem. No

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread Siarhei Siamashka via Digitalmars-d-announce
On Sunday, 8 January 2023 at 03:18:27 UTC, monkyyy wrote: On Sunday, 8 January 2023 at 02:15:27 UTC, areYouSureAboutThat wrote: C is not just a programming language anymore. It's a complete (and very diverse) ecosystem. No progress has been made for decades but that doesn't mean progress is

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread monkyyy via Digitalmars-d-announce
On Sunday, 8 January 2023 at 02:15:27 UTC, areYouSureAboutThat wrote: C is not just a programming language anymore. It's a complete (and very diverse) ecosystem. No progress has been made for decades but that doesn't mean progress is impossible. Maybe the academia will take note that impera

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread areYouSureAboutThat via Digitalmars-d-announce
On Saturday, 7 January 2023 at 23:27:02 UTC, Siarhei Siamashka wrote: There are attempts to rewrite it in safer programming languages ;-) Such as https://github.com/Byron/gitoxide I'd love to hear Lord Linus's thought on this. Let's see if the alternative implementations turn out to be good

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread Siarhei Siamashka via Digitalmars-d-announce
On Saturday, 7 January 2023 at 22:25:30 UTC, areYouSureAboutThat wrote: Well, the worlds most widely used source code revision control system, is written in C ;-) There are attempts to rewrite it in safer programming languages ;-) Such as https://github.com/Byron/gitoxide Let's see if the al

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread areYouSureAboutThat via Digitalmars-d-announce
On Friday, 6 January 2023 at 11:02:03 UTC, Tejas wrote: Those statements, even if spoken recently, are just a way of maintaining PR. Elon also similarly calls C++ a bloated mess and that all high performance code at Tesla is in C, as if that's something to be proud of... their ultra safety cr

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-07 Thread Bastiaan Veelo via Digitalmars-d-announce
On Thursday, 5 January 2023 at 20:24:07 UTC, Alexandru Militaru wrote: Hi everyone, If you remember the "D for a @safer Linux Kernel“ talk from DConf 2019 [1], then you might want to read our paper [2] on that matter that was just published in IEEE Access Journal. [1] https://youtu.be/weRS

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-06 Thread areYouSureAboutThat via Digitalmars-d-announce
On Friday, 6 January 2023 at 04:07:12 UTC, areYouSureAboutThat wrote: btw. Linus one said, more or less, that one reason he likes C so much, is because when he is typing it, he can visualise what assembly will be produced (i.e. his mind is always intune with the code the machine will actually

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-06 Thread Tejas via Digitalmars-d-announce
On Friday, 6 January 2023 at 10:29:30 UTC, H. S. Teoh wrote: On Fri, Jan 06, 2023 at 04:07:12AM +, areYouSureAboutThat via Digitalmars-d-announce wrote: [...] btw. Linus one said, more or less, that one reason he likes C so much, is because when he is typing it, he can visualise what assemb

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-06 Thread H. S. Teoh via Digitalmars-d-announce
On Fri, Jan 06, 2023 at 04:07:12AM +, areYouSureAboutThat via Digitalmars-d-announce wrote: [...] > btw. Linus one said, more or less, that one reason he likes C so much, is > because when he is typing it, he can visualise what assembly will be > produced (i.e. his mind is always intune with t

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-05 Thread thebluepandabear via Digitalmars-d-announce
On Thursday, 5 January 2023 at 20:24:07 UTC, Alexandru Militaru wrote: Hi everyone, If you remember the "D for a @safer Linux Kernel“ talk from DConf 2019 [1], then you might want to read our paper [2] on that matter that was just published in IEEE Access Journal. There's also an ongoing dis

Re: Safer Linux Kernel Modules Using the D Programming Language

2023-01-05 Thread areYouSureAboutThat via Digitalmars-d-announce
On Thursday, 5 January 2023 at 20:24:07 UTC, Alexandru Militaru wrote: Hi everyone, If you remember the "D for a @safer Linux Kernel“ talk from DConf 2019 [1], then you might want to read our paper [2] on that matter that was just published in IEEE Access Journal. There's also an ongoing dis

Safer Linux Kernel Modules Using the D Programming Language

2023-01-05 Thread Alexandru Militaru via Digitalmars-d-announce
Hi everyone, If you remember the "D for a @safer Linux Kernel“ talk from DConf 2019 [1], then you might want to read our paper [2] on that matter that was just published in IEEE Access Journal. There's also an ongoing discussion about it on Hacker News in case someone is interested [3]. Ch