Skip to contentSkip to conversation

- Paulo Almeida

Self-introduction Paulo Miguel Almeida 2 participants 3 messages Oct 9, 2022 – Oct 11, 2022

lore
Share & tools
lore
#0 lore raw

Hi everyone,

My name is Paulo Almeida and as per the instructions listed on the KSPP page, this is my self-introduction email :)

I will keep it short.

- My background is in HPC and AI
- I've been writing software for around 20 years now
- I've written my x86-64 hobbyist OS for fun and in my spare time I've writing a MOS 6502 emulator for the same reason.
- Contributing to KSPP is going to be a side project of mine that I plan to do outside of business hours... so expect a dedication of a few hours per week.

Q: What topics are you interested in?
A: kernel driver development, x86 & ARM hardware architecture, Math, Data structures, Rust and virtualisation.

Q: What do you want to learn about?
A: I see the KSPP project/initiative as a way to get exposed to pieces of code that I wouldn't normally come across which is always appreciated :)

I am also aware of the calibre of developers I will be dealing with and I'm sure that I will be learning really a lot from them :)

Q: What experience do you have with security, the kernel, programming,
or anything else you think is important.
A:
I've contributed to the kernel a few times time in the past for both adding features and janitorial tasks.

I took the Linux Kernel Internals (LF420) and the Linux Kernel Debugging and Security (LF44) courses by the Linux Foundation.

As for other experiences, due to the fact that I wrote my hobbyist OS, I do have a decent experience with the x86/x86-64 architecture. I also spent quite sometime writing static analysis parsers.... so should those experiences help anyone or any possible future plan for the KSPP, please count on me.

Thanks!

Paulo Almeida

#1 lore raw
Quoted 2 lines · Paulo Miguel Almeida

My name is Paulo Almeida and as per the instructions listed on the KSPP page, this is my self-introduction email :)

Hello! Welcome to the circus. :)

Quoted 6 lines

I will keep it short.

- My background is in HPC and AI
- I've been writing software for around 20 years now
- I've written my x86-64 hobbyist OS for fun and in my spare time I've writing a MOS 6502 emulator for the same reason.

Heh, nice. That made me wonder if there was a QEmu port, but it seems it hasn't been touched in a decade?
https://github.com/AVEx-6502/qemu-6502

Is there a particular 6502 system you're working to emulate?

Quoted 3 lines

- Contributing to KSPP is going to be a side project of mine that I plan to do outside of business hours... so expect a dedication of a few hours per week.

Excellent! We're always glad to have folks helping.

Quoted 8 lines

Q: What topics are you interested in?
A: kernel driver development, x86 & ARM hardware architecture, Math, Data structures, Rust and virtualisation.

Q: What do you want to learn about?
A: I see the KSPP project/initiative as a way to get exposed to pieces of code that I wouldn't normally come across which is always appreciated :)

Yeah, you'll end up uncovering some really weird stuff, as you seem to have already found[1]. ;)

Quoted 2 lines

I am also aware of the calibre of developers I will be dealing with and I'm sure that I will be learning really a lot from them :)

One of the double-edged swords with KSPP is while you get to work with all the kernel's subsystem maintainers, you also have to work with all the kernel's subsystem maintainers. ;) You'll learn a lot, but you can also end up discovering very different requirements as you send patches.

Quoted 5 lines

Q: What experience do you have with security, the kernel, programming,
or anything else you think is important.
A:
I've contributed to the kernel a few times time in the past for both adding features and janitorial tasks.

Excellent! Yeah, it looks like you've been helping clean up some staging drivers[2].

I see you touched rtl8192u -- there's a lot of duplicate code spread around in the rtl* drivers. It would be interesting to see those consolidated some day. If you're interested, it may be worth asking about it on the wireless list.

Quoted 2 lines

I took the Linux Kernel Internals (LF420) and the Linux Kernel Debugging and Security (LF44) courses by the Linux Foundation.

Cool -- did anything stand out for you in those courses?

Quoted 5 lines

As for other experiences, due to the fact that I wrote my hobbyist OS, I do have a decent experience with the x86/x86-64 architecture. I also spent quite sometime writing static analysis parsers.... so should those experiences help anyone or any possible future plan for the KSPP, please count on me.

Great! One area that needs some review and testing that is x86-specific is the userspace CET support[3]. That spans a wide range of from chipset all the way up through compiler, kernel, and glibc. Getting more people to try that series out and post results ("it works for me" or "I couldn't trigger the protection", etc) would be very welcome.

You've already found the "remove the 1-element arrays" work, and there are plenty more like that on the issue tracker. Trying to really put an end to strlcpy[4] is ongoing[5] too, as there has been a fairly concerted effort to remove them lately:

Count of "git grep strlcpy | wc -l" over recent releases:

         v5.17:  1535
         v5.18:  1525
         v5.19:  1507
          v6.0:  1379
        master:   544

next-20221010: 401

Thanks for introducing yourself!

-Kees

[1] https://lore.kernel.org/linux-hardening/[email protected]/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=author&q=Paulo+Miguel+Almeida
[3] https://lore.kernel.org/lkml/[email protected]/
[4] https://github.com/KSPP/linux/issues/89
[5] https://lore.kernel.org/lkml/?q=s%3A%22use+strscpy%22
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=strlcpy

Signature · 1 line
Kees Cook
#2 lore raw
Quoted 6 lines · Kees Cook
Quoted 2 lines · Paulo Miguel Almeida

My name is Paulo Almeida and as per the instructions listed on the KSPP page, this is my self-introduction email :)

Hello! Welcome to the circus. :)

Thanks =)

Quoted 8 lines
Quoted 1 line

writing a MOS 6502 emulator for the same reason.

Heh, nice. That made me wonder if there was a QEmu port, but it seems it hasn't been touched in a decade?
https://github.com/AVEx-6502/qemu-6502

Is there a particular 6502 system you're working to emulate?

Yes, there is. I am trying to emulate Ricoh 2A03 (RP2A03). That's the slightly modified 6502 CPU used in the NES system. It's a really well-documented platform so I chose that one to dip my toes in writing virtualisation-related software.

Quoted 5 lines
Quoted 2 lines

I took the Linux Kernel Internals (LF420) and the Linux Kernel Debugging and Security (LF44) courses by the Linux Foundation.

Cool -- did anything stand out for you in those courses?

I'm easily amused by debugging/instrumentation techniques and the kernel has so many of them for various specific niches.

What really stood out at the time was learning how versatile ftrace can be to the point that this "debugging/tracing" utility is one of the main gears of kernel live patching. Initially it felt wrong but after wrapping my head around it, that was a very creative solution.

Quoted 6 lines
Quoted 5 lines

As for other experiences, due to the fact that I wrote my hobbyist OS, I do have a decent experience with the x86/x86-64 architecture. I also spent quite sometime writing static analysis parsers.... so should those experiences help anyone or any possible future plan for the KSPP, please count on me.

Quoted 6 lines

Great! One area that needs some review and testing that is x86-specific is the userspace CET support[3]. That spans a wide range of from chipset all the way up through compiler, kernel, and glibc. Getting more people to try that series out and post results ("it works for me" or "I couldn't trigger the protection", etc) would be very welcome.

That sounds like it's my cup of tea :) I just finished reading the Intel CET paper, it's an interesting approach with lots of things to be tested. Thanks for the recommendation, I will get involved with that.

Quoted 5 lines

You've already found the "remove the 1-element arrays" work, and there are plenty more like that on the issue tracker. Trying to really put an end to strlcpy[4] is ongoing[5] too, as there has been a fairly concerted effort to remove them lately:

Quoted 9 lines

Count of "git grep strlcpy | wc -l" over recent releases:

         v5.17:  1535
         v5.18:  1525
         v5.19:  1507
          v6.0:  1379
        master:   544

next-20221010: 401

Fingers crossed! I saw many patches for the strlcpy replacement so you seem to be well covered for that... I will continue with the one-element array changes and try to get involved with the support for Intel CET =)

Thanks for all the suggestions Kees!

Paulo A.