Skip to content

2.2.0 - major fixes, security improvements#12

Merged
viralcode merged 8 commits intomainfrom
feature/desktop-manager
Jan 20, 2026
Merged

2.2.0 - major fixes, security improvements#12
viralcode merged 8 commits intomainfrom
feature/desktop-manager

Conversation

@viralcode
Copy link
Owner

@viralcode viralcode commented Jan 19, 2026

major changes and fixes.

…ss spaces, and more

Phase 1 - Userspace Improvements:
- Enhanced ELF loader for true userspace process execution
- Added user address space management (mm_struct, vm_area)
- Implemented vmm_map_user_page() and vmm_map_user_range()
- Created userspace media library header (user/lib/media.h)

Phase 2 - Network Stack:
- Implemented complete TCP state machine (SYN/SYN-ACK/ACK/FIN)
- Added tcp_send_packet() for building and sending TCP segments
- Added tcp_handle_segment() for processing incoming TCP
- Implemented ARP request/reply handling
- Added IP packet processing (ICMP, TCP, UDP dispatch)
- Proper connection tracking with tcp_find_connection()

Phase 3 - Hardware Improvements:
- Rewrote Intel HDA driver with proper DMA ring buffers
- Added 256KB ring buffer with 32 BDL entries
- Implemented intel_hda_stop() and intel_hda_is_playing()
- Added cache flush helpers for DMA coherency

SMP Support:
- Added spinlock implementation (spin_lock/spin_unlock)
- Implemented smp_processor_id(), smp_num_cpus()
- Added PSCI-based secondary CPU boot (smp_boot_secondary)
- Added per-CPU GIC initialization (gic_cpu_init)
- Added kernel-wide smp_lock()/smp_unlock()

Syscall Improvements:
- Implemented file descriptor table (MAX_FDS=256)
- sys_openat now properly opens files via VFS
- sys_read/sys_write now use FD table
- sys_close properly releases file descriptors
- sys_lseek implemented for file positioning
- sys_execve now loads ELF binaries

All changes maintain backwards compatibility with existing functionality.
…cs optimizations

Major Features:
- Desktop Manager: Shows files/folders from /Desktop directory with icon rendering
- Right-click context menu system with actions:
  - New Folder / New File creation
  - Open, Rename, Delete operations
  - Copy/Cut/Paste functionality
  - Sort by Name/Date/Type
  - Refresh desktop
- Icon types: Folder, File, Image, Audio, Text, App with visual representations
- Selection system with click and shift-click multi-select
- Double-click to open files/folders

Graphics Performance:
- Dirty rectangle tracking for partial screen updates
- Optimized compositor with fast memory copy
- Memory barriers for reliable frame updates
- Periodic full redraws (every 64 frames) for consistency

Infrastructure:
- VFS: Implemented vfs_unlink and vfs_rmdir functions
- RamFS: Added unlink/rmdir support for file deletion
- RamFS: Fixed ramfs_create_file to handle full paths correctly
- Created /Desktop directory with sample files on boot

Files Added:
- kernel/gui/desktop.c - Desktop manager implementation
- kernel/gui/desktop.h - Desktop manager header

Files Modified:
- kernel/gui/window.c - Integrated desktop manager
- kernel/fs/vfs.c - Added unlink/rmdir implementations
- kernel/fs/ramfs.c - Added unlink/rmdir operations, fixed path handling
- kernel/include/fs/vfs.h - Added ENOTEMPTY error code
- kernel/core/main.c - Create Desktop directory with sample files
Bug Fixes:
- Fixed right-click not showing context menu (was blocked by early return)
- Moved right-click handling before the left_click gate
- Fixed vfs_readdir callback argument order (was swapping ctx and filldir)

New Features:
- Windows-style context menu with comprehensive options:
  * File context menu: Open, Open with, Cut, Copy, Create shortcut, Delete, Rename, Properties
  * Desktop context menu: View, Sort by, Refresh, Paste, New Folder, New Text Document,
    New Shortcut, Open in Terminal, Display settings, Personalize
- Opening folders now opens File Manager with that folder's content
- Added gui_create_file_manager_path() to open File Manager at specific path
- Added gui_get_screen_width/Height() helper functions
- Context menu now stays within screen bounds

Technical:
- Centralized all extern declarations at top of desktop.c
- Fixed duplicate extern declaration errors
- Menu automatically repositions if too close to screen edge
…side Nanolang examples, modules, tests, and build artifacts.
- Add spinlock synchronization for kernel (ARM64/x86)
- Add media sandbox for fault isolation
- Add ASLR for process address randomization
- Fix menu dropdown click detection
- Fix window callback stale pointer bug
- Update README with new screenshots and Python/Nano support
- Add author attribution (JIJO JOHN)
@viralcode viralcode force-pushed the feature/desktop-manager branch from 3940e21 to 50fc710 Compare January 20, 2026 03:10
@viralcode viralcode changed the title Feature/desktop manager 2.2.0 - major fixes, security improvements Jan 20, 2026
- Add PF_THREAD, CLONE_VM, CLONE_FS, CLONE_FILES, CLONE_SIGHAND, CLONE_THREAD, CLONE_PARENT to sched.h
- Remove duplicate File Descriptor Table block in syscall.c (merge artifact)
- Fixes GitHub Actions build failure
@viralcode viralcode merged commit 22863bc into main Jan 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant