Ghidra Load Linux Headers [on hold]

I’m trying to reverse engineer a linux kernel module (kernel version 4.19). Ghidra does recognize correctly all function names such as: open, misc_register etc, but it cannot determinate their exact signatures.

Let’s take as an example function copy_from_user with signature:

unsigned long copy_from_user (void *to, const void __user *from, unsigned long n); 

and here’s how Ghidra sees it:

undefined _copy_from_user (void) 

I believe that it won’t be the last kernel module for me to reverse engineer and so I would like to learn how to load all missing kernel structures to the program.

Moreover I am aware that I can edit the function signature by hand, but I would then need to add plenty of structures by hand as well (such as struct file) and this would be very ineffective.

What I’ve tried so far

(I’m super new to Ghidra and if you know better way, please just share)

I’ve downloaded headers from debian repository:

$   wget linux-headers-4.19.0-6-common_4.19.67-2+deb10u2_all.deb . $   ls linux-headers-4.19.0-6-common_4.19.67-2+deb10u2_all.deb  usr $   ls /usr/src/ linux-headers-4.19.0-6-common 

I extracted and then tried to load them using File>>Parse C Source option by specifying the path to the extracted folder..

enter image description here

and got an error. What can I do to make Ghidra aware of the correct function signatures?

Update: As MechMK1 has pointed out I have provided a directory instead of header files. I’ve corrected my mistake and this time I’ve just copied the whole content of all files into all_headers.h

$   cat `find . | grep .h` > all_headers.h $   cat all_headers.h | wc -c 29824650 

And I’ve provided all_headers.h to get parsed. This time there was no error, but Ghidra has only added around 20 defines and no function signatures.

enter image description here

enter image description here

Start Time of Page Load in Page Timings in Google Analytics

What’s the start event for the ‘Page Load Time’ in the ‘Page Timings’ report?

I’ve read that GA uses NavigationTiming API. Is it v1? Is the start event performance.timing.navigationStart? Also, what’s the end event? Is it domLoaded?

The reason for my question is that we’ve implemented page load metrics with custom code and User Timings. That’s to ensure that we measure time till we finish all additional XHR requests and a user can interact with a page. Our start time was navigationStart.

However, we’ve noticed problem with that. We have a Single-Page Application where even if the URL changes in the browser, it’s done via the history API, as a result the output of performance.timing doesn’t change when you go from one page to another. Hence, the load time could be artificially high for some pages, since navigationStart will indicate the moment the browser went to the web app, as opposed to specific page.

Moved site from primary domain of 1 cPanel, to add-on domain of 2nd cPanel, now site won’t load

I had a multisite WP install as the primary domain of a cPanel account. The website had the primary domain, plus a network site using a different domain.

I decided to move this website to become an add-on domain of a different cPanel account which had a totally unrelated primary domain.

I had to update the path, as was now an add-on domain, rather than the primary domain.

However, now redirects to and I see the message in Chrome:

This page isn’t working. redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS

I don’t have any cookies for this domain.

This is my wp-config.php:

define(‘WP_ALLOW_MULTISITE’, true); define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘’); define(‘PATH_CURRENT_SITE’, ‘/’); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); define(‘ADMIN_COOKIE_PATH’, ‘/’); define(‘COOKIEPATH’, ”); define(‘SITECOOKIEPATH’, ”); // define(‘COOKIE_DOMAIN’, $  _SERVER[ ‘HTTP_HOST’ ] ); // define(‘SUNRISE’, ‘on’); 

I’ve renamed .htaccess to .htaccess.temp and the issue remains.

I’ve checked wp_blogs and wp_options and the domains are correct.

Help appreciated. Steve

How to load large arrays to gpu and render with OpenGL?

I am trying to make a volumetric rendering of a cloud. I have been defining the cloud density functions on the glsl shaders and performing ray-marching methods successfully. But now I would like to render a 3D grid (100x100x100) representing the density of a cloud that I calculated using the cpu. The idea that I was trying was to make use of the storage buffer objects, but when I access the array to get the density value and render it, it doesn’t work.

This is at the beginning of the glsl fragment:

#version 440 core layout(std430, binding = 3) buffer layoutName {     float data_SSBO[100*100*100]; }; 

And the density function definition is:

float density(vec3 position, float t){     const float dx = 1./100., dy = 1./100., dz = 1./100.;     int i, j, k;     if( (position.x >= 0.)&&(position.y >= 0.)&&(position.z >= 0.)&&(position.x <= 1.)&&(position.y <= 1.)&&(position.z <= 1.)){         i = int(position.x/dx);         j = int(position.y/dy);         k = int(position.z/dz);          return data_SSBO[i*100*100 + j*100 + k];     }     else         return 0.; } 

And in the c code there are the buffer creation, bindings, etc:

    glGenBuffers(1, &ssbo);     glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo);     glBufferData(GL_SHADER_STORAGE_BUFFER, 100*100*100*sizeof(float), grid, GL_STATIC_DRAW);     glBufferSubData(GL_ARRAY_BUFFER, 0, 100*100*100*sizeof(float), grid); 

and in the rendering function there is:

    glClearColor(1.f, 1.f, 0.f, 1.0f);      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);       glBindBuffer(GL_ARRAY_BUFFER, VBO);       glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo);      glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3, ssbo);  //  glBufferSubData(GL_ARRAY_BUFFER, 0, 3*2*2*sizeof(float), buffer);        glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 2* sizeof(float), (void*)0);      // coordenadas      glEnableVertexAttribArray(0);         glUseProgram(shaderProgram); 

I believe the problem has to do with the binding, I have been trying different combinations, like binding after and before glUseProgram, etc. I literally have no idea what is wrong, I see this is really confusing.

c++ SDL2 : can’t load textures to the game

iam making a game with SDL and c++ iam trying to render simple image to the screen but i can’t i don’t know why iam not getting any ERROR but i see only black screen here is my code


#ifndef GAME_H #define GAME_H  #include <SDL2/SDL.h>  #include <iostream>   using namespace std;     class game {  public:      game();     ~game();      void init(char *title,int xpos, int ypos ,int xsize ,int ysize ,bool fullscreen);     void loop();     void input();     void update();     void render();     SDL_Renderer* renderer;     SDL_Window* window;    private:       const int target_Fps = 60;     const float TFEF = 1000/60; // time for each frame     int delta;     long int start_time;     bool isrunning = true;     int fps_counter = 0;     unsigned int counter = 1;    };  #endif 


#include "game.h"  #include "player.h"  player* pla;  game::game() {     cout << "something"<<endl;     if (SDL_Init(SDL_INIT_EVERYTHING) == 0)     {         cout << "another thing" << endl;          init("game",10,15,500,500,false);     }  loop(); }  game::~game() {  }  void game::init(char *title,int xpos, int ypos ,int xsize ,int ysize ,bool fullscreen) {      window = SDL_CreateWindow(title, xpos,  ypos , xsize , ysize , fullscreen);     renderer = SDL_CreateRenderer(window,-1,0);     //SDL_SetRenderDrawColor(renderer, 0, 0,0, 255);     SDL_RenderClear(renderer);     SDL_RenderPresent(renderer);      cout << "another another something" << endl;       pla = new player(renderer,32,32);     pla->init();        //SDL_Texture* tex = IMG_LoadTexture(renderer,"res/pss.png");    }  void game::loop() {      while(isrunning) {     start_time = SDL_GetTicks();      input();      update();      render();      delta = SDL_GetTicks() - start_time;     if (delta < TFEF)         SDL_Delay(TFEF - delta);      fps_counter++;      if (start_time >= 1000 * counter)     {         //cout <<"the FPS is : "<< fps_counter << endl;         counter++;         fps_counter = 0;      }       }  }  void game::input() {     SDL_Event e;     SDL_PollEvent(&e);     if (e.type == SDL_QUIT)         SDL_Quit();  }  void game::update(){}  void game::render() {      SDL_RenderClear(renderer);      pla->render(renderer);      SDL_RenderPresent(renderer); }   gameobject::~gameobject(){};  


#ifndef PLAYER_H #define PLAYER_H  #include "gameobject.h"    class gameobject;  class player : public gameobject {   public:      void init() override;     void tick() override;     void render(SDL_Renderer* renderer) override;     SDL_Renderer* renderer;     player(SDL_Renderer* renderer,int pwidth,int pheight); private:      ~player() override;     SDL_Texture* playertex;     };      #endif // PLAYER_H 


#include "player.h"  player::player(SDL_Renderer* renderer,int pwidth, int pheight) {   this->pos.w = pwidth;  this->pos.h = pheight;  this->pos.x = 0;  this->pos.y = 0;    this->renderer = renderer;     }  void player::init() {      this->playertex= IMG_LoadTexture(renderer,"res/pss.png");     cout<<"int in player \n"<<endl;      crop.x = 0;     crop.y = 0;     crop.w = 32;     crop.h = 32;      cout<<"pos x :"<<this->pos.x<<endl;     cout<<"pos y : "<<this->pos.y<<endl;     cout<<"pos w : "<<this->pos.w<<endl;     cout<<"pos h : "<<this->pos.h<<endl;     cout<<"crop x :"<<this->crop.x<<endl;     cout<<"crop y :"<<this->crop.y<<endl;     cout<<"crop w :"<<this->crop.w<<endl;     cout<<"crop h : "<<this->crop.h<<endl;   }  void player::tick() {  }  void player::render(SDL_Renderer *renderer) {  /*     cout<<"pos x :"<<this->pos.x<<endl;     cout<<"pos y : "<<this->pos.y<<endl;     cout<<"pos w : "<<this->pos.w<<endl;     cout<<"pos h : "<<this->pos.h<<endl;     cout<<"crop x :"<<this->crop.x<<endl;     cout<<"crop y :"<<this->crop.y<<endl;     cout<<"crop w :"<<this->crop.w<<endl;     cout<<"crop h : "<<this->crop.h<<endl; */  SDL_RenderCopy(renderer,playertex,&crop,&pos); }   player::~player(){};  

here is my files

enter image description here

How to implement an infinite scroll or Ajax load more

My site is I use geomywp to search/filter and display posts and do not want to change it.

My question is, how can I implement infinite scrolling or Ajax load more button functionality on the posts, so i can get rid of the ugly pagination buttons.

I tried various plugins but they all load the posts independently rather than integrating with geomywp /it’s template for displaying postsand infinitely loading them.

As a result I end up with two lots of posts – one infinitely loaded and the other as it is currently, with the pagination buttons.

I don’t have coding skills beyond minor tweaks. I’m lost 🙁

Load more and filter (not necessarily in this order)

The problem exposing might seems trivial to you. It still isn’t clear for me which solution to choose.

Saying that you have a input text where you can type anything. Beneath it a list of ten element and a load more button. Once the user clicks on “load more”, ten more elements are added to the list.

My question is, when typing a text to filter, if there is 100 potentials results in the database, should we show the 10 first and a load more button or 20 ? since the user already clicked once on load more, we could expect him to want it to stay as is.


Storage of SSL private key in load balancer VS HSM

I have a setup whereby the SSL certificates are terminated at the load balancer (i.e. Load balancer to web server is in plaintext). In order to do the SSL termination, the private key is stored on the load balancer itself. I do have a HSM in a data center.

I was told by security guys that best practice is to store the private key in a HSM.

I have read Should SSL be terminated at a load balancer? and I understand that there is nothing wrong in terminating SSL encryption at the load balancer.

However, should the private keys be stored in the load balancer itself (from a security perspective)? Are there any technical challenges in storing the SSL private keys in a central HSM instead?

Page error on first load after an app pool recycle

Any web part page throws an error the first time its loaded after the app pool recycles. Refreshing the page will then bring it up fine, and everything works until the next time the app pool is recycled. Pages that are not web part pages do not throw errors and load fine. For example, settings.aspx works fine, a newly created page with no web parts added will throw an error one time after an app pool recycle.

This also happens in central admin. Monitoring.aspx has web part zones, but no web parts, and throws an error. Pages like “manage servers in this farm”, _admin/farmservers, works fine.

The log has the generic error of “Unexpected System.ArgumentException: Value does not fall within the expected range.”, which I think is usually associated with custom solutions, but again, this occurs on pages with no customizations. Before this error in the log are many entries with “Config cache Name lookup failure in derived cache for…”. I’ve cleared the SP Config Cache, though that did not resolve the issue.

Any suggestions?

This is SharePoint 2019

how to filter posts by category without page load (ajax) in wordpress?

I Tried this code, here:

August, October, September are categories, I want to show post below without page load where currently title and date.

Can anyone please help?

//This is category filter:  <ul class="xiong-filters"> <?php        //This one is to display All in your category.       // Do not use show_option_all parameter since it includes all categories not just one your displaying       $  args= array(           'include'          =>   2, //Put here ID of your category         'title_li'          => __('')       );     wp_list_categories( $  args );   ?>   <?php        //This one displays subcategories of your category       $  args= array(           'child_of'          =>   2, //Put here parent category         'title_li'          => __('')       );     wp_list_categories( $  args );   ?> 

<!--Post LOOP  -->  <?php if ( have_posts() ) :?>   <div id="main-content" class="row">     <div id="inside">       <div class="container">    <?php while ( have_posts() ) : the_post(); ?>       <article> <a class="xiong-articlebox" href="<?php the_permalink();?>">     <header>         <h3><?php the_title( );?></h3>         <p><em><?php the_date( 'j.n.Y'); ?> </em></p>          </header>          <p><?php the_excerpt();?></p>        </a>    </article>    <?php endwhile; endif; ?>   </div><!-- container-->   

//AJAX Filters jQuery(function(){ var mainContent = jQuery('#main-content'),     cat_links = jQuery('ul.xiong-filters li a');      cat_links.on('click', function(e){          e.preventDefault();         el = $  (this);         var value = $  el.attr("href");         mainContent.animate({opacity:"0.5"});         mainContent.load(value + " #inside", function(){             mainContent.animate({opacity:"1"});         });         jQuery( "li" ).removeClass( "current-cat" );          jQuery(this).closest('li').addClass("current-cat");     }); });   //Function.php //ENQUEUE SCRIPTS HERE function xiong_theme_scripts() { //Ajax filter scripts wp_register_script( 'ajax', get_template_directory_uri() . '/js/ajax.js', array( 'jquery' ), '1.0.0', true );     wp_enqueue_script( 'ajax' );} add_action( 'wp_enqueue_scripts', 'xiong_theme_scripts' );