public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* programming tips
@ 2023-04-25 11:07 Raj J Putari
  2023-04-25 13:12 ` Bagas Sanjaya
  0 siblings, 1 reply; 2+ messages in thread
From: Raj J Putari @ 2023-04-25 11:07 UTC (permalink / raw)
  To: LKML

you can do stuff like

int x = read(x) = process(macro);

its like a little loop that occupies a thread

lets say im doing cpu stuff (im new to kernel programming.. some
asshole fried all my monitors) and i want wait for a return value

i can do
int x = cpu_read(code) = return_value_that_you_seek;

additionally i feel that, with security, that there should be a local
sql server tied to the linux kernel, so you can do stuff like easily
share data in a lan

sql in the linux kernel can be sorta secure if you do it from top
level = kernel to down = userspace

hope this helps, new to kernel programming and just want to help

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: programming tips
  2023-04-25 11:07 programming tips Raj J Putari
@ 2023-04-25 13:12 ` Bagas Sanjaya
  0 siblings, 0 replies; 2+ messages in thread
From: Bagas Sanjaya @ 2023-04-25 13:12 UTC (permalink / raw)
  To: Raj J Putari, LKML; +Cc: Willy Tarreau

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Tue, Apr 25, 2023 at 04:07:27AM -0700, Raj J Putari wrote:
> i can do
> int x = cpu_read(code) = return_value_that_you_seek;

Is it same as:

```
int x = cpu_read(foo)

if x == <desired return value> {
	/* do something */
}

```
?

> 
> additionally i feel that, with security, that there should be a local
> sql server tied to the linux kernel, so you can do stuff like easily
> share data in a lan

Implementing SQL language in the kernel? Making MySQL/PostgreSQL/SQLite
obsolete? How about prepared statements and input sanitation? Last but
not least, why is it hard for you to use wrapper libraries to SQL in
your userspace program to the point that you want kernelSQL?

I'm confused...

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-25 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 11:07 programming tips Raj J Putari
2023-04-25 13:12 ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox